# Is it possible to get this 'nicer' solution for an integral from Mathematica?

I'm on 11.3.0 for macOS (64-bit).

On a recent CAS-enabled exam question a few weeks ago I was required to evaluate the following integral:

$$\int_0^5\left(\sqrt[3]{125-x^3}\right)^2\,dx$$

In Mathematica, using the Integrate function returns this answer:

Integrate[(125-x^3)^(2/3),{x,0,5}]


$$75\cdot 3^{2/3} F_1\left(\frac{5}{3};-\frac{2}{3},-\frac{2}{3};\frac{8}{3};-\frac{1}{-1+(-1)^{2/3}},\frac{1}{1+\sqrt[3]{-1}}\right)$$ Where $$F_1$$ represents the AppellF1 function.

However, on a TI-Nspire CX CAS, the same integral evaluates to: $$\frac{500\pi}{9\sqrt3}$$

That's a much nicer looking answer!

Both of these have the same numerical value of about $$100.767$$, which tells me that both answers appear to be equivalent - but is it possible to get the CX's more concise answer in Mathematica? I've tried wrapping each of these functions around Mathematica's answer, but none of them have worked:

• RootReduce
• FullSimplify
• FunctionExpand
• ToRadicals
• ComplexExpand
• adding Assumptions -> x \[Element] Reals to the Integrate function

All of these seem to keep the F1 function in place, sometimes changing the arguments slightly but still keeping the F1 function there, more or less the same. If it is possible, how could I get the simpler answer in Mathematica? Thanks!

• v9.0.1 gives the simple answer: i.stack.imgur.com/a8oCg.png Which version are you in? How did you code it? – xzczd Jun 19 '18 at 13:52
• I get the same result as OP (the Appel function) on 10.4.1 for Microsoft Windows (64-bit). – AccidentalFourierTransform Jun 19 '18 at 13:55
• I'm on 11.3.0 for macOS. – numbermaniac Jun 20 '18 at 1:05
• We are nearing the point when Mathematica will give correct but unusable answers only to be left alone. – Peltio Jun 20 '18 at 17:47

IntegrateInverseIntegrate[(125 - x^3)^(2/3), {x, 0, 5}]

(*(500 π)/(9 Sqrt[3])*)


IntegrateInverseIntegrate this is an undocumented function.

Another method borrowed code from user: Michael-E2, is using substitution:125 - x^3 == t^3

ClearAll[trysub];
SetAttributes[trysub, HoldFirst];
trysub[Integrate[int_, x_], sub_Equal, u_] := Module[{sol, newint}, sol = Solve[sub, x];
newint = int*Dt[x] /. Last[sol] /. Dt[u] -> 1 // Simplify;
Integrate[newint, u] /. Last@Solve[sub, u] // Simplify];

Assuming[t > 0 && x ∈ Reals, int = trysub[Integrate[(125 - x^3)^(2/3), x], 125 - x^3 == t^3, t]]

(* 1/3 (125 - x^3)^(2/3) ((x^3)^(1/3) - 5 Hypergeometric2F1[2/3, 2/3, 5/3, 1 - x^3/125]) *)

(Limit[int, x -> 5]) - (Limit[int, x -> 0]) // FullSimplify(* Is function continuous !!! *)

(*(500 π)/(9 Sqrt[3])*)


I get the same result as in the OP (10.4.1 for Microsoft Windows (64-bit)). A possibility to get the correct answer is to Taylor-expand, integrate term-wise, and re-sum.

SeriesCoefficient[(125 - x^3)^(2/3), {x, 0, n}]
(* (5^(2 - n) (1/3 (-5 + n))!)/((-(5/3))! (n/3)!) if Mod[n,3]==0, zero otherwise *)

Integrate[% x^n, {x, 0, 5}]
(* (125 Gamma[1/3 (-2 + n)])/((1 + n) (n/3)! Gamma[-(2/3)]) if Mod[n,3]==0, zero otherwise *)

Sum[% /. n -> 3 n, {n, 0, Infinity}]
(* (500 Pi)/(9 Sqrt[3]) *)


Of course, this is somewhat hacky, but at least it proves that the "simple" result is correct.

--

Alternative: if you slightly generalise the integral, it returns the compact result:

Integrate[(a^3 - x^3)^(2/3), {x, 0, a}]
(* (4 a^3 Pi)/(9 Sqrt[3]) *)
% /. a-> 5
(* (500 Pi)/(9 Sqrt[3]) *)


Weird, huh?

• That's actually quite funny: if I use Integrate[(a^3 - x^3)^(2/3), {x, 0, a}], I get a conditional expression with the condition of Re[a] > 0 && Im[a] == 0. But if I instead use Integrate[(a^3 - x^3)^(2/3), {x, 0, a}, Assumptions -> a > 0] hoping that the assumption will remove ConditionalExpression, I get a long result in terms of AppellF1 and Hypergeometric2F1 on Mathematica 11.2, although not on 10.1. – Ruslan Jun 19 '18 at 20:50
• @Ruslan I was using \$Assumptions = a > 1, but I'm using MMA 10.4. Interesting. – AccidentalFourierTransform Jun 19 '18 at 21:25

You can always compare to Rubi's solution which is often able to produce better antiderivatives.

Installation in Mathematica 11.3:

Needs["PacletManager"];
PacletInstall[
];


Then you can solve the integral

<< Rubi
int = Int[((125 - x^3)^(1/3))^2, x]


Taking the limits at both ends

(Limit[int, x -> 5, Direction -> "FromBelow"]) -
(Limit[int, x -> 0, Direction -> "FromAbove"])


Simplify[%]


## Edit

For completeness and since KraZug mentioned it in the comment: Rubi can calculate the limits and the difference automatically, but be aware that it is not the same what Integrate[expr, {x, a, b}] does. Integrate is more powerful in this regard and takes care of discontinuities between the boundaries.

Int[((125 - x^3)^(1/3))^2, {x, 0, 5}] // Simplify
(* (500 \[Pi])/(9 Sqrt[3]) *)

• Why not just int = Int[((125 - x^3)^(1/3))^2, {x,0,5}]//Simplify? – KraZug Jun 19 '18 at 14:47
• Because I didn't want to imply that this is equivalent to Integrate's form with boundaries. It basically does the same (without the directions if I remember correctly) and if someone is interested, he will find the Int[expr,{x,a,b}] usage on the README I've written and which is directly behind the link :) But yes, I could have simply used the shorter form.. – halirutan Jun 19 '18 at 14:59
• The explanation as to why it is not the same is useful though, because it is not obvious to me. – KraZug Jun 19 '18 at 15:16
{ymin, ymax} = Through[{MinValue, MaxValue}[{(125 - x^3)^(2/3), 0 <= x <= 5}, x]]
expr = x /. First@Normal@Solve[y == (125 - x^3)^(2/3), x, Reals]
Integrate[expr, {y, ymin, ymax}]


{0, 25}

Root[-125 + Sqrt[y^3] + #1^3 &, 1]

(500 Pi)/(9 Sqrt[3])