0
$\begingroup$

I have a long expression with 7 parameters. I would like to simplify it so I can use it in another context (not Mathematica).

But I tried everything: Simplify, FullSimplify, Expand then Simplify, Rationalize, I also added assumptions but either it doesn't simplify or it just never shows a result.
All the parameters are real and positive and the result is supposed to be real and positive as well.

Is it possible to simplify this expression more than that? If yes, How?

Here you can have a look at the expression :

enter image description here

-0.5 \[Sqrt](-((2.38095 m)/(25. Na - 6. Ni)) + (
     0.793651 (25. m Na - 6. m Ni))/(
     625. Na^2 - 300. Na Ni + 
      36. Ni^2) - (419974. (625. m^2 Na^2 - 300. m^2 Na Ni + 
          36. m^2 Ni^2))/((25. Na - 
          6. Ni)^2 (-2.31525*10^15 (25. m Na - 6. m Ni)^3 + 
          2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
             300. Na Ni + 36. Ni^2) - 
          7.44188*10^8 (625. Na^2 - 300. Na Ni + 
             36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 2500. Ch m Nh - 
             2.16*10^6 m Ni + 1050. m Na x0 - 
             252. m Ni x0)^2 + \[Sqrt](-4. (2.75625*10^13 m^2 Na^2 - 
                1.323*10^13 m^2 Na Ni + 
                1.5876*10^12 m^2 Ni^2)^3 + (-2.31525*10^15 (25. m Na \
- 6. m Ni)^3 + 
               2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
                  300. Na Ni + 36. Ni^2) - 
               7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                  36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                  2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                  252. m Ni x0)^2)^2))^(1/3)) - (
     1/((25. Na - 6. Ni)^2))
     5.99925*10^-6 (-2.31525*10^15 (25. m Na - 6. m Ni)^3 + 
        2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
           300. Na Ni + 36. Ni^2) - 
        7.44188*10^8 (625. Na^2 - 300. Na Ni + 36. Ni^2) (25. g m^2 - 
           1.05*10^7 m Na - 2500. Ch m Nh - 2.16*10^6 m Ni + 
           1050. m Na x0 - 
           252. m Ni x0)^2 + \[Sqrt](-4. (2.75625*10^13 m^2 Na^2 - 
              1.323*10^13 m^2 Na Ni + 
              1.5876*10^12 m^2 Ni^2)^3 + (-2.31525*10^15 (25. m Na - 
                6. m Ni)^3 + 
             2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
                300. Na Ni + 36. Ni^2) - 
             7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                252. m Ni x0)^2)^2))^(1/3)) + 
 0.5 \[Sqrt](-((2.38095 m)/(25. Na - 6. Ni)) - (
     0.793651 (25. m Na - 6. m Ni))/(
     625. Na^2 - 300. Na Ni + 
      36. Ni^2) + (419974. (625. m^2 Na^2 - 300. m^2 Na Ni + 
          36. m^2 Ni^2))/((25. Na - 
          6. Ni)^2 (-2.31525*10^15 (25. m Na - 6. m Ni)^3 + 
          2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
             300. Na Ni + 36. Ni^2) - 

          7.44188*10^8 (625. Na^2 - 300. Na Ni + 
             36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 2500. Ch m Nh - 
             2.16*10^6 m Ni + 1050. m Na x0 - 
             252. m Ni x0)^2 + \[Sqrt](-4. (2.75625*10^13 m^2 Na^2 - 
                1.323*10^13 m^2 Na Ni + 
                1.5876*10^12 m^2 Ni^2)^3 + (-2.31525*10^15 (25. m Na \
- 6. m Ni)^3 + 
               2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
                  300. Na Ni + 36. Ni^2) - 
               7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                  36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                  2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                  252. m Ni x0)^2)^2))^(1/3)) + (
     1/((25. Na - 6. Ni)^2))
     5.99925*10^-6 (-2.31525*10^15 (25. m Na - 6. m Ni)^3 + 
        2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
           300. Na Ni + 36. Ni^2) - 
        7.44188*10^8 (625. Na^2 - 300. Na Ni + 36. Ni^2) (25. g m^2 - 
           1.05*10^7 m Na - 2500. Ch m Nh - 2.16*10^6 m Ni + 
           1050. m Na x0 - 
           252. m Ni x0)^2 + \[Sqrt](-4. (2.75625*10^13 m^2 Na^2 - 
              1.323*10^13 m^2 Na Ni + 
              1.5876*10^12 m^2 Ni^2)^3 + (-2.31525*10^15 (25. m Na - 
                6. m Ni)^3 + 
             2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
                300. Na Ni + 36. Ni^2) - 
             7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                252. m Ni x0)^2)^2))^(
      1/3) + (0.00113379 (25. g m^2 - 1.05*10^7 m Na - 
          2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
          252. m Ni x0))/((25. Na - 
          6. Ni)^2 \[Sqrt](-((2.38095 m)/(25. Na - 6. Ni)) + (
           0.793651 (25. m Na - 6. m Ni))/(
           625. Na^2 - 300. Na Ni + 
            36. Ni^2) - (419974. (625. m^2 Na^2 - 300. m^2 Na Ni + 
                36. m^2 Ni^2))/((25. Na - 
                6. Ni)^2 (-2.31525*10^15 (25. m Na - 6. m Ni)^3 + 
                2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
                   300. Na Ni + 36. Ni^2) - 
                7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                   36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                   2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                   252. m Ni x0)^2 + \[Sqrt](-4. (2.75625*10^13 m^2 \
Na^2 - 1.323*10^13 m^2 Na Ni + 
                    1.5876*10^12 m^2 Ni^2)^3 + (-2.31525*10^15 (25. m \
Na - 6. m Ni)^3 + 
                    2.08373*10^16 m^2 (25. m Na - 
                    6. m Ni) (625. Na^2 - 300. Na Ni + 36. Ni^2) - 
                    7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                    36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                    2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                    252. m Ni x0)^2)^2))^(1/3)) - (
           1/((25. Na - 6. Ni)^2))
           5.99925*10^-6 (-2.31525*10^15 (25. m Na - 6. m Ni)^3 + 
              2.08373*10^16 m^2 (25. m Na - 6. m Ni) (625. Na^2 - 
                 300. Na Ni + 36. Ni^2) - 
              7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                 36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                 2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                 252. m Ni x0)^2 + \[Sqrt](-4. (2.75625*10^13 m^2 \
Na^2 - 1.323*10^13 m^2 Na Ni + 
                    1.5876*10^12 m^2 Ni^2)^3 + (-2.31525*10^15 (25. m \
Na - 6. m Ni)^3 + 
                   2.08373*10^16 m^2 (25. m Na - 
                    6. m Ni) (625. Na^2 - 300. Na Ni + 36. Ni^2) - 
                   7.44188*10^8 (625. Na^2 - 300. Na Ni + 
                    36. Ni^2) (25. g m^2 - 1.05*10^7 m Na - 
                    2500. Ch m Nh - 2.16*10^6 m Ni + 1050. m Na x0 - 
                    252. m Ni x0)^2)^2))^(1/3))))

Here is the code that is above the expression (How I get this result). In this case A is the expression:

Ci = (10.08*x + 86400)/100;
Ca = (-42*x + 420000)/100;
Fh = Nh*100*Ch;
Fa = Na*100*Ca;
Fi = Ni*100*Ci;
F = Fh + Fa + Fi;

x[t_] = FullSimplify[Solve[(F/m - g)*t^2/2 + x0 == x, x][[1, 1, 2]]]

A = Solve[{x'[t] == 100}, t][[4, 1, 2]]

P.S. I tried to replace the parameters with actual values and the result was correct so I guess the expression is correct.

Thanks in advance.

$\endgroup$
7
  • 1
    $\begingroup$ Please provide the actual code, not the an image of the code. $\endgroup$
    – Feyre
    Commented Nov 21, 2016 at 21:16
  • $\begingroup$ I can't, when I try to add the code, it becomes half in code format and half in script format. $\endgroup$
    – Ticree1008
    Commented Nov 21, 2016 at 21:29
  • 1
    $\begingroup$ Try pasting the code, then select it and hit the {} button, this should shift everything by four spaces, and make sure everything is formatted code. $\endgroup$
    – Feyre
    Commented Nov 21, 2016 at 21:30
  • 3
    $\begingroup$ you have effectively a fourth order polynomial in t. I'm afraid there isn't much hope for simplification. $\endgroup$
    – george2079
    Commented Nov 21, 2016 at 22:12
  • $\begingroup$ You could replace (F/m - g) with (a + b x) $\endgroup$ Commented Nov 21, 2016 at 22:33

1 Answer 1

2
$\begingroup$

Following the comments you can write $x[t]$ as

x[t_] = FullSimplify[Solve[(a x + b)*t^2/2 + x0 == x, x][[1, 1, 2]]];

With

    a=(-42 Na + (252 Ni)/25)/m

and

    b=-g + (420000 Na + 100 Ch Nh + 86400 Ni)/m

This gives you

x[t_]:=(b t^2 + 2 x0)/(2 - a t^2);

With that you get a much shorter expression for A. As

Simplify[A] /. {(-27 a^2 b^2 - 27 a^4 x0^2 - 
 2 a^3 (320000 + 27 b x0) + 
 3 Sqrt[3] Sqrt[
  a^4 (b + a x0)^2 (1280000 a + 27 b^2 + 54 a b x0 + 
     27 a^2 x0^2)]) -> w}

Sqrt[400/a - (16000 10^(1/3))/w^(1/3) - (10^(2/3) w^(1/3))/a^2]/( 10 Sqrt[6]) + 1/2 Sqrt[16/(3 a) + (320 10^(1/3))/(3 w^(1/3)) + w^(1/3)/( 15 10^(1/3) a^2) - (2 Sqrt[6] (b + a x0))/( 5 a^2 Sqrt[ 400/a - (16000 10^(1/3))/w^(1/3) - (10^(2/3) w^(1/3))/a^2])]

$\endgroup$
1
  • $\begingroup$ Thanks a lot ! This makes it much easier for me ! I haven't thought about it ! And thanks to Simon Woods for bringing the idea ! $\endgroup$
    – Ticree1008
    Commented Nov 23, 2016 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.