# How to get a result in a form without complex numbers?

How can I get rid of the complex numbers in this result? The actual result is obviously real, but Mathematica gives me this inconvenient complex form.

Integrate[Exp[a*(x^3)], {x, 0, b}, Assumptions -> {a > 0, b > 0}]

((1 - I Sqrt[3]) (Gamma[1/3] - Gamma[1/3, -a b^3]))/(6 a^(1/3))


And I've already seen this related question, but the methods suggested for that problem didn't work for this. ComplexExpand[] just makes it into an absolute mess, and Simply puts it right back into complex form.

How to get rid of all complex numbers and functions?

Here is dirty trick suitable for that particular case:

rez = Integrate[Exp[5*(x^3)], {x, 0, 7},
Assumptions -> {a > 0, b > 0}] // ToRadicals

rezComplex =
Integrate[Exp[a*(x^3)], {x, 0, b}, Assumptions -> {a > 0, b > 0}]

realAnswer = (rez // ToRadicals) /. {5 -> a, -1715 -> -a*b^3}

FullSimplify[(realAnswer - rezComplex), Assumptions -> {a > 0, b > 0}]
(* 0*)


Try the following trick:

realPartRule = Complex[re_, im_] :> Complex[re, 0];
realPart[exp__] := exp /. realPartRule;


Applying this trick to your result we obtain:

realPart[Integrate[Exp[a*(x^3)], {x, 0, b},
Assumptions -> {a > 0, b > 0}]]
(*(Gamma[1/3] - Gamma[1/3, -a b^3])/(6 a^(1/3))*)