2
$\begingroup$

I am using Mathematica to integrate a complicated expression however the integration gives an answer containing these there terms

Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1], Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 2] and Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 3]

I know that Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1] means the first root to the equation $-2 + 2^{1/3} b^2 x + 2 b^2 x^3=0$ however I am confused because how am I supposed to find the first or the second or the third root. If I use the Solve function then it gives three solutions to the equation $-2 + 2^{1/3} b^2 x + 2 b^2 x^3=0$ that do not include the root function but how do I know which of these solution is the first or second or third to replace the root functions I got from integration?

Also, why do the root function appears when doing integration instead of just showing the root?

Thanks

$\endgroup$
  • $\begingroup$ @Kuba, I have already looked at that question before posting and it doesn't answer my question. $\endgroup$ – gbd Sep 12 '16 at 11:18
  • $\begingroup$ you can get that value by substituting b and use N in those roots. But that is in documentation. The second question appears to be answered in the linked topic. Maybe I've missed the point, can you then explain why those sources are not enough? $\endgroup$ – Kuba Sep 12 '16 at 11:26
  • $\begingroup$ @Kuba, $b$ is unknown. My question is that since the solve function gives three roots to the equation then can I replace the Root functions I got from integration by the roots I got from using the solve function. If yes then how do I know which root I got from the solve function is the first or second or the third? I hope you understand what I mean. $\endgroup$ – gbd Sep 12 '16 at 11:33
  • 1
    $\begingroup$ Use ToRadicals. This will express the roots in terms of radicals when possible. Note that for polynomials of degree $\ge 5$ it is not generally possible. $\endgroup$ – Szabolcs Sep 12 '16 at 11:45
  • 1
    $\begingroup$ @Kuba OK, I added an extra answer to the duplicate post. I think we should use that as the canonical version because there are alsready many questions marked as it duplicate. $\endgroup$ – Szabolcs Sep 12 '16 at 12:19
0
$\begingroup$

There is a function ToRadicals that sometimes can transform the Root expression into a usual one. Have a look:

  Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1] // ToRadicals

(* -(b^2/(6^(1/3) (9 b^4 + Sqrt[3] Sqrt[27 b^8 + b^12])^(
   1/3))) + (9 b^4 + Sqrt[3] Sqrt[27 b^8 + b^12])^(1/3)/(
 2^(1/3) 3^(2/3) b^2)  *)

Therefore, one can always start with trying to use this function. In some cases it does not help. I guess, it is if the function cannot be expressed analytically.

In these cases, nevertheless, Root enables you to work with your solution further in Mma. Indeed, you can do with it everything you can do with any other function defined in a more usual way.

For example you may get numerical values out of it:

Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1] /. b -> 0.5
With[{b = 0.5}, Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1]]

(* 1.45545

1.45545   *)

You may plot it:

Plot[Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1], {b, 0, 1}]

enter image description here

You may integrate it:

NIntegrate[Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1], {b, 0, 1}]

(*  2.87483  *)

you can solve differential equation, where it enters:

nds = NDSolveValue[{y''[b] == -y[b]*
      Root[-2 + 2^(1/3) b^2 #1 + 2 b^2 #1^3 &, 1], y[0] == 0, 
    y'[0] == 1}, y, {b, 0, 10}];
Plot[nds[b], {b, 0, 10}]

enter image description here

The conclusion is that this function does not essentially differ from, say, the sinus function and it enables one to go further at the place, where one previously would already stop.

Have fun!

$\endgroup$

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