\(\int \frac {(a-b x^3)^2}{\sqrt [3]{a+b x^3}} \, dx\) [81]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [C] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 22, antiderivative size = 115 \[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=-\frac {8}{9} a x \left (a+b x^3\right )^{2/3}+\frac {1}{6} b x^4 \left (a+b x^3\right )^{2/3}+\frac {17 a^2 \arctan \left (\frac {1+\frac {2 \sqrt [3]{b} x}{\sqrt [3]{a+b x^3}}}{\sqrt {3}}\right )}{9 \sqrt {3} \sqrt [3]{b}}-\frac {17 a^2 \log \left (-\sqrt [3]{b} x+\sqrt [3]{a+b x^3}\right )}{18 \sqrt [3]{b}} \] Output:

-8/9*a*x*(b*x^3+a)^(2/3)+1/6*b*x^4*(b*x^3+a)^(2/3)+17/27*a^2*arctan(1/3*(1 
+2*b^(1/3)*x/(b*x^3+a)^(1/3))*3^(1/2))*3^(1/2)/b^(1/3)-17/18*a^2*ln(-b^(1/ 
3)*x+(b*x^3+a)^(1/3))/b^(1/3)
                                                                                    
                                                                                    
 

Mathematica [A] (verified)

Time = 0.58 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.43 \[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=\frac {1}{18} \left (a+b x^3\right )^{2/3} \left (-16 a x+3 b x^4\right )+\frac {17 a^2 \arctan \left (\frac {\sqrt {3} \sqrt [3]{b} x}{\sqrt [3]{b} x+2 \sqrt [3]{a+b x^3}}\right )}{9 \sqrt {3} \sqrt [3]{b}}-\frac {17 a^2 \log \left (-\sqrt [3]{b} x+\sqrt [3]{a+b x^3}\right )}{27 \sqrt [3]{b}}+\frac {17 a^2 \log \left (b^{2/3} x^2+\sqrt [3]{b} x \sqrt [3]{a+b x^3}+\left (a+b x^3\right )^{2/3}\right )}{54 \sqrt [3]{b}} \] Input:

Integrate[(a - b*x^3)^2/(a + b*x^3)^(1/3),x]
 

Output:

((a + b*x^3)^(2/3)*(-16*a*x + 3*b*x^4))/18 + (17*a^2*ArcTan[(Sqrt[3]*b^(1/ 
3)*x)/(b^(1/3)*x + 2*(a + b*x^3)^(1/3))])/(9*Sqrt[3]*b^(1/3)) - (17*a^2*Lo 
g[-(b^(1/3)*x) + (a + b*x^3)^(1/3)])/(27*b^(1/3)) + (17*a^2*Log[b^(2/3)*x^ 
2 + b^(1/3)*x*(a + b*x^3)^(1/3) + (a + b*x^3)^(2/3)])/(54*b^(1/3))
 

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.06, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {933, 27, 913, 769}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx\)

\(\Big \downarrow \) 933

\(\displaystyle \frac {\int \frac {a b \left (7 a-13 b x^3\right )}{\sqrt [3]{b x^3+a}}dx}{6 b}-\frac {1}{6} x \left (a-b x^3\right ) \left (a+b x^3\right )^{2/3}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{6} a \int \frac {7 a-13 b x^3}{\sqrt [3]{b x^3+a}}dx-\frac {1}{6} x \left (a-b x^3\right ) \left (a+b x^3\right )^{2/3}\)

\(\Big \downarrow \) 913

\(\displaystyle \frac {1}{6} a \left (\frac {34}{3} a \int \frac {1}{\sqrt [3]{b x^3+a}}dx-\frac {13}{3} x \left (a+b x^3\right )^{2/3}\right )-\frac {1}{6} x \left (a-b x^3\right ) \left (a+b x^3\right )^{2/3}\)

\(\Big \downarrow \) 769

\(\displaystyle \frac {1}{6} a \left (\frac {34}{3} a \left (\frac {\arctan \left (\frac {\frac {2 \sqrt [3]{b} x}{\sqrt [3]{a+b x^3}}+1}{\sqrt {3}}\right )}{\sqrt {3} \sqrt [3]{b}}-\frac {\log \left (\sqrt [3]{a+b x^3}-\sqrt [3]{b} x\right )}{2 \sqrt [3]{b}}\right )-\frac {13}{3} x \left (a+b x^3\right )^{2/3}\right )-\frac {1}{6} x \left (a-b x^3\right ) \left (a+b x^3\right )^{2/3}\)

Input:

Int[(a - b*x^3)^2/(a + b*x^3)^(1/3),x]
 

Output:

-1/6*(x*(a - b*x^3)*(a + b*x^3)^(2/3)) + (a*((-13*x*(a + b*x^3)^(2/3))/3 + 
 (34*a*(ArcTan[(1 + (2*b^(1/3)*x)/(a + b*x^3)^(1/3))/Sqrt[3]]/(Sqrt[3]*b^( 
1/3)) - Log[-(b^(1/3)*x) + (a + b*x^3)^(1/3)]/(2*b^(1/3))))/3))/6
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 769
Int[((a_) + (b_.)*(x_)^3)^(-1/3), x_Symbol] :> Simp[ArcTan[(1 + 2*Rt[b, 3]* 
(x/(a + b*x^3)^(1/3)))/Sqrt[3]]/(Sqrt[3]*Rt[b, 3]), x] - Simp[Log[(a + b*x^ 
3)^(1/3) - Rt[b, 3]*x]/(2*Rt[b, 3]), x] /; FreeQ[{a, b}, x]
 

rule 913
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Si 
mp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(p + 1) + 1))), x] - Simp[(a*d - b*c*(n*( 
p + 1) + 1))/(b*(n*(p + 1) + 1))   Int[(a + b*x^n)^p, x], x] /; FreeQ[{a, b 
, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]
 

rule 933
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] 
:> Simp[d*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q - 1)/(b*(n*(p + q) + 1))), 
x] + Simp[1/(b*(n*(p + q) + 1))   Int[(a + b*x^n)^p*(c + d*x^n)^(q - 2)*Sim 
p[c*(b*c*(n*(p + q) + 1) - a*d) + d*(b*c*(n*(p + 2*q - 1) + 1) - a*d*(n*(q 
- 1) + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d 
, 0] && GtQ[q, 1] && NeQ[n*(p + q) + 1, 0] &&  !IGtQ[p, 1] && IntBinomialQ[ 
a, b, c, d, n, p, q, x]
 
Maple [A] (verified)

Time = 1.33 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.25

method result size
pseudoelliptic \(\frac {9 \left (b \,x^{3}+a \right )^{\frac {2}{3}} b^{\frac {4}{3}} x^{4}-48 a x \left (b \,x^{3}+a \right )^{\frac {2}{3}} b^{\frac {1}{3}}-34 \sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (b^{\frac {1}{3}} x +2 \left (b \,x^{3}+a \right )^{\frac {1}{3}}\right )}{3 b^{\frac {1}{3}} x}\right ) a^{2}-34 \ln \left (\frac {-b^{\frac {1}{3}} x +\left (b \,x^{3}+a \right )^{\frac {1}{3}}}{x}\right ) a^{2}+17 \ln \left (\frac {b^{\frac {2}{3}} x^{2}+b^{\frac {1}{3}} \left (b \,x^{3}+a \right )^{\frac {1}{3}} x +\left (b \,x^{3}+a \right )^{\frac {2}{3}}}{x^{2}}\right ) a^{2}}{54 b^{\frac {1}{3}}}\) \(144\)

Input:

int((-b*x^3+a)^2/(b*x^3+a)^(1/3),x,method=_RETURNVERBOSE)
 

Output:

1/54*(9*(b*x^3+a)^(2/3)*b^(4/3)*x^4-48*a*x*(b*x^3+a)^(2/3)*b^(1/3)-34*3^(1 
/2)*arctan(1/3*3^(1/2)*(b^(1/3)*x+2*(b*x^3+a)^(1/3))/b^(1/3)/x)*a^2-34*ln( 
(-b^(1/3)*x+(b*x^3+a)^(1/3))/x)*a^2+17*ln((b^(2/3)*x^2+b^(1/3)*(b*x^3+a)^( 
1/3)*x+(b*x^3+a)^(2/3))/x^2)*a^2)/b^(1/3)
 

Fricas [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 399, normalized size of antiderivative = 3.47 \[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=\left [\frac {51 \, \sqrt {\frac {1}{3}} a^{2} b \sqrt {\frac {\left (-b\right )^{\frac {1}{3}}}{b}} \log \left (3 \, b x^{3} - 3 \, {\left (b x^{3} + a\right )}^{\frac {1}{3}} \left (-b\right )^{\frac {2}{3}} x^{2} - 3 \, \sqrt {\frac {1}{3}} {\left (\left (-b\right )^{\frac {1}{3}} b x^{3} - {\left (b x^{3} + a\right )}^{\frac {1}{3}} b x^{2} + 2 \, {\left (b x^{3} + a\right )}^{\frac {2}{3}} \left (-b\right )^{\frac {2}{3}} x\right )} \sqrt {\frac {\left (-b\right )^{\frac {1}{3}}}{b}} + 2 \, a\right ) - 34 \, a^{2} \left (-b\right )^{\frac {2}{3}} \log \left (\frac {\left (-b\right )^{\frac {1}{3}} x + {\left (b x^{3} + a\right )}^{\frac {1}{3}}}{x}\right ) + 17 \, a^{2} \left (-b\right )^{\frac {2}{3}} \log \left (\frac {\left (-b\right )^{\frac {2}{3}} x^{2} - {\left (b x^{3} + a\right )}^{\frac {1}{3}} \left (-b\right )^{\frac {1}{3}} x + {\left (b x^{3} + a\right )}^{\frac {2}{3}}}{x^{2}}\right ) + 3 \, {\left (3 \, b^{2} x^{4} - 16 \, a b x\right )} {\left (b x^{3} + a\right )}^{\frac {2}{3}}}{54 \, b}, -\frac {102 \, \sqrt {\frac {1}{3}} a^{2} b \sqrt {-\frac {\left (-b\right )^{\frac {1}{3}}}{b}} \arctan \left (-\frac {\sqrt {\frac {1}{3}} {\left (\left (-b\right )^{\frac {1}{3}} x - 2 \, {\left (b x^{3} + a\right )}^{\frac {1}{3}}\right )} \sqrt {-\frac {\left (-b\right )^{\frac {1}{3}}}{b}}}{x}\right ) + 34 \, a^{2} \left (-b\right )^{\frac {2}{3}} \log \left (\frac {\left (-b\right )^{\frac {1}{3}} x + {\left (b x^{3} + a\right )}^{\frac {1}{3}}}{x}\right ) - 17 \, a^{2} \left (-b\right )^{\frac {2}{3}} \log \left (\frac {\left (-b\right )^{\frac {2}{3}} x^{2} - {\left (b x^{3} + a\right )}^{\frac {1}{3}} \left (-b\right )^{\frac {1}{3}} x + {\left (b x^{3} + a\right )}^{\frac {2}{3}}}{x^{2}}\right ) - 3 \, {\left (3 \, b^{2} x^{4} - 16 \, a b x\right )} {\left (b x^{3} + a\right )}^{\frac {2}{3}}}{54 \, b}\right ] \] Input:

integrate((-b*x^3+a)^2/(b*x^3+a)^(1/3),x, algorithm="fricas")
 

Output:

[1/54*(51*sqrt(1/3)*a^2*b*sqrt((-b)^(1/3)/b)*log(3*b*x^3 - 3*(b*x^3 + a)^( 
1/3)*(-b)^(2/3)*x^2 - 3*sqrt(1/3)*((-b)^(1/3)*b*x^3 - (b*x^3 + a)^(1/3)*b* 
x^2 + 2*(b*x^3 + a)^(2/3)*(-b)^(2/3)*x)*sqrt((-b)^(1/3)/b) + 2*a) - 34*a^2 
*(-b)^(2/3)*log(((-b)^(1/3)*x + (b*x^3 + a)^(1/3))/x) + 17*a^2*(-b)^(2/3)* 
log(((-b)^(2/3)*x^2 - (b*x^3 + a)^(1/3)*(-b)^(1/3)*x + (b*x^3 + a)^(2/3))/ 
x^2) + 3*(3*b^2*x^4 - 16*a*b*x)*(b*x^3 + a)^(2/3))/b, -1/54*(102*sqrt(1/3) 
*a^2*b*sqrt(-(-b)^(1/3)/b)*arctan(-sqrt(1/3)*((-b)^(1/3)*x - 2*(b*x^3 + a) 
^(1/3))*sqrt(-(-b)^(1/3)/b)/x) + 34*a^2*(-b)^(2/3)*log(((-b)^(1/3)*x + (b* 
x^3 + a)^(1/3))/x) - 17*a^2*(-b)^(2/3)*log(((-b)^(2/3)*x^2 - (b*x^3 + a)^( 
1/3)*(-b)^(1/3)*x + (b*x^3 + a)^(2/3))/x^2) - 3*(3*b^2*x^4 - 16*a*b*x)*(b* 
x^3 + a)^(2/3))/b]
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 3.08 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.05 \[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=\frac {a^{\frac {5}{3}} x \Gamma \left (\frac {1}{3}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{3}, \frac {1}{3} \\ \frac {4}{3} \end {matrix}\middle | {\frac {b x^{3} e^{i \pi }}{a}} \right )}}{3 \Gamma \left (\frac {4}{3}\right )} - \frac {2 a^{\frac {2}{3}} b x^{4} \Gamma \left (\frac {4}{3}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{3}, \frac {4}{3} \\ \frac {7}{3} \end {matrix}\middle | {\frac {b x^{3} e^{i \pi }}{a}} \right )}}{3 \Gamma \left (\frac {7}{3}\right )} + \frac {b^{2} x^{7} \Gamma \left (\frac {7}{3}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{3}, \frac {7}{3} \\ \frac {10}{3} \end {matrix}\middle | {\frac {b x^{3} e^{i \pi }}{a}} \right )}}{3 \sqrt [3]{a} \Gamma \left (\frac {10}{3}\right )} \] Input:

integrate((-b*x**3+a)**2/(b*x**3+a)**(1/3),x)
 

Output:

a**(5/3)*x*gamma(1/3)*hyper((1/3, 1/3), (4/3,), b*x**3*exp_polar(I*pi)/a)/ 
(3*gamma(4/3)) - 2*a**(2/3)*b*x**4*gamma(4/3)*hyper((1/3, 4/3), (7/3,), b* 
x**3*exp_polar(I*pi)/a)/(3*gamma(7/3)) + b**2*x**7*gamma(7/3)*hyper((1/3, 
7/3), (10/3,), b*x**3*exp_polar(I*pi)/a)/(3*a**(1/3)*gamma(10/3))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 436 vs. \(2 (88) = 176\).

Time = 0.12 (sec) , antiderivative size = 436, normalized size of antiderivative = 3.79 \[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx =\text {Too large to display} \] Input:

integrate((-b*x^3+a)^2/(b*x^3+a)^(1/3),x, algorithm="maxima")
 

Output:

-1/6*(2*sqrt(3)*arctan(1/3*sqrt(3)*(b^(1/3) + 2*(b*x^3 + a)^(1/3)/x)/b^(1/ 
3))/b^(1/3) - log(b^(2/3) + (b*x^3 + a)^(1/3)*b^(1/3)/x + (b*x^3 + a)^(2/3 
)/x^2)/b^(1/3) + 2*log(-b^(1/3) + (b*x^3 + a)^(1/3)/x)/b^(1/3))*a^2 - 1/9* 
(2*sqrt(3)*a*arctan(1/3*sqrt(3)*(b^(1/3) + 2*(b*x^3 + a)^(1/3)/x)/b^(1/3)) 
/b^(4/3) - a*log(b^(2/3) + (b*x^3 + a)^(1/3)*b^(1/3)/x + (b*x^3 + a)^(2/3) 
/x^2)/b^(4/3) + 2*a*log(-b^(1/3) + (b*x^3 + a)^(1/3)/x)/b^(4/3) - 6*(b*x^3 
 + a)^(2/3)*a/((b^2 - (b*x^3 + a)*b/x^3)*x^2))*a*b - 1/54*(4*sqrt(3)*a^2*a 
rctan(1/3*sqrt(3)*(b^(1/3) + 2*(b*x^3 + a)^(1/3)/x)/b^(1/3))/b^(7/3) - 2*a 
^2*log(b^(2/3) + (b*x^3 + a)^(1/3)*b^(1/3)/x + (b*x^3 + a)^(2/3)/x^2)/b^(7 
/3) + 4*a^2*log(-b^(1/3) + (b*x^3 + a)^(1/3)/x)/b^(7/3) - 3*(7*(b*x^3 + a) 
^(2/3)*a^2*b/x^2 - 4*(b*x^3 + a)^(5/3)*a^2/x^5)/(b^4 - 2*(b*x^3 + a)*b^3/x 
^3 + (b*x^3 + a)^2*b^2/x^6))*b^2
 

Giac [F]

\[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=\int { \frac {{\left (b x^{3} - a\right )}^{2}}{{\left (b x^{3} + a\right )}^{\frac {1}{3}}} \,d x } \] Input:

integrate((-b*x^3+a)^2/(b*x^3+a)^(1/3),x, algorithm="giac")
 

Output:

integrate((b*x^3 - a)^2/(b*x^3 + a)^(1/3), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=\int \frac {{\left (a-b\,x^3\right )}^2}{{\left (b\,x^3+a\right )}^{1/3}} \,d x \] Input:

int((a - b*x^3)^2/(a + b*x^3)^(1/3),x)
 

Output:

int((a - b*x^3)^2/(a + b*x^3)^(1/3), x)
 

Reduce [F]

\[ \int \frac {\left (a-b x^3\right )^2}{\sqrt [3]{a+b x^3}} \, dx=\left (\int \frac {x^{6}}{\left (b \,x^{3}+a \right )^{\frac {1}{3}}}d x \right ) b^{2}-2 \left (\int \frac {x^{3}}{\left (b \,x^{3}+a \right )^{\frac {1}{3}}}d x \right ) a b +\left (\int \frac {1}{\left (b \,x^{3}+a \right )^{\frac {1}{3}}}d x \right ) a^{2} \] Input:

int((-b*x^3+a)^2/(b*x^3+a)^(1/3),x)
 

Output:

int(x**6/(a + b*x**3)**(1/3),x)*b**2 - 2*int(x**3/(a + b*x**3)**(1/3),x)*a 
*b + int(1/(a + b*x**3)**(1/3),x)*a**2