\(\int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx\) [104]

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

Optimal result

Integrand size = 26, antiderivative size = 141 \[ \int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx=-\frac {a^4 c x \sqrt {a+b x} \sqrt {a c-b c x}}{16 b^2}+\frac {1}{8} a^2 c x^3 \sqrt {a+b x} \sqrt {a c-b c x}+\frac {1}{6} x^3 (a+b x)^{3/2} (a c-b c x)^{3/2}+\frac {a^6 c^{3/2} \arctan \left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {a c-b c x}}\right )}{8 b^3} \] Output:

-1/16*a^4*c*x*(b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/b^2+1/8*a^2*c*x^3*(b*x+a)^( 
1/2)*(-b*c*x+a*c)^(1/2)+1/6*x^3*(b*x+a)^(3/2)*(-b*c*x+a*c)^(3/2)+1/8*a^6*c 
^(3/2)*arctan(c^(1/2)*(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2))/b^3
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.73 \[ \int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx=\frac {(c (a-b x))^{3/2} \left (b x \sqrt {a-b x} \sqrt {a+b x} \left (-3 a^4+14 a^2 b^2 x^2-8 b^4 x^4\right )+6 a^6 \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )\right )}{48 b^3 (a-b x)^{3/2}} \] Input:

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

Output:

((c*(a - b*x))^(3/2)*(b*x*Sqrt[a - b*x]*Sqrt[a + b*x]*(-3*a^4 + 14*a^2*b^2 
*x^2 - 8*b^4*x^4) + 6*a^6*ArcTan[Sqrt[a + b*x]/Sqrt[a - b*x]]))/(48*b^3*(a 
 - b*x)^(3/2))
 

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.06, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {101, 25, 27, 40, 40, 45, 218}

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 x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx\)

\(\Big \downarrow \) 101

\(\displaystyle -\frac {\int -a^2 c (a+b x)^{3/2} (a c-b c x)^{3/2}dx}{6 b^2 c}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int a^2 c (a+b x)^{3/2} (a c-b c x)^{3/2}dx}{6 b^2 c}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {a^2 \int (a+b x)^{3/2} (a c-b c x)^{3/2}dx}{6 b^2}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a^2 \left (\frac {3}{4} a^2 c \int \sqrt {a+b x} \sqrt {a c-b c x}dx+\frac {1}{4} x (a+b x)^{3/2} (a c-b c x)^{3/2}\right )}{6 b^2}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a^2 \left (\frac {3}{4} a^2 c \left (\frac {1}{2} a^2 c \int \frac {1}{\sqrt {a+b x} \sqrt {a c-b c x}}dx+\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}\right )+\frac {1}{4} x (a+b x)^{3/2} (a c-b c x)^{3/2}\right )}{6 b^2}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

\(\Big \downarrow \) 45

\(\displaystyle \frac {a^2 \left (\frac {3}{4} a^2 c \left (a^2 c \int \frac {1}{\frac {c (a+b x) b}{a c-b c x}+b}d\frac {\sqrt {a+b x}}{\sqrt {a c-b c x}}+\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}\right )+\frac {1}{4} x (a+b x)^{3/2} (a c-b c x)^{3/2}\right )}{6 b^2}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {a^2 \left (\frac {3}{4} a^2 c \left (\frac {a^2 \sqrt {c} \arctan \left (\frac {\sqrt {c} \sqrt {a+b x}}{\sqrt {a c-b c x}}\right )}{b}+\frac {1}{2} x \sqrt {a+b x} \sqrt {a c-b c x}\right )+\frac {1}{4} x (a+b x)^{3/2} (a c-b c x)^{3/2}\right )}{6 b^2}-\frac {x (a+b x)^{5/2} (a c-b c x)^{5/2}}{6 b^2 c}\)

Input:

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

Output:

-1/6*(x*(a + b*x)^(5/2)*(a*c - b*c*x)^(5/2))/(b^2*c) + (a^2*((x*(a + b*x)^ 
(3/2)*(a*c - b*c*x)^(3/2))/4 + (3*a^2*c*((x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x 
])/2 + (a^2*Sqrt[c]*ArcTan[(Sqrt[c]*Sqrt[a + b*x])/Sqrt[a*c - b*c*x]])/b)) 
/4))/(6*b^2)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 40
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[x* 
(a + b*x)^m*((c + d*x)^m/(2*m + 1)), x] + Simp[2*a*c*(m/(2*m + 1))   Int[(a 
 + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[ 
b*c + a*d, 0] && IGtQ[m + 1/2, 0]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 101
Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^( 
p_), x_] :> Simp[b*(a + b*x)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + 
 p + 3))), x] + Simp[1/(d*f*(n + p + 3))   Int[(c + d*x)^n*(e + f*x)^p*Simp 
[a^2*d*f*(n + p + 3) - b*(b*c*e + a*(d*e*(n + 1) + c*f*(p + 1))) + b*(a*d*f 
*(n + p + 4) - b*(d*e*(n + 2) + c*f*(p + 2)))*x, x], x], x] /; FreeQ[{a, b, 
 c, d, e, f, n, p}, x] && NeQ[n + p + 3, 0]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 
Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.01

method result size
risch \(-\frac {x \left (8 b^{4} x^{4}-14 a^{2} b^{2} x^{2}+3 a^{4}\right ) \left (-b x +a \right ) \sqrt {b x +a}\, c^{2}}{48 b^{2} \sqrt {-c \left (b x -a \right )}}+\frac {a^{6} \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right ) \sqrt {-\left (b x +a \right ) c \left (b x -a \right )}\, c^{2}}{16 b^{2} \sqrt {b^{2} c}\, \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) \(142\)
default \(\frac {\sqrt {b x +a}\, \sqrt {c \left (-b x +a \right )}\, c \left (-8 b^{4} x^{5} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+14 a^{2} b^{2} x^{3} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+3 \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{6} c -3 \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}\, a^{4} x \right )}{48 b^{2} \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {b^{2} c}}\) \(174\)

Input:

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

Output:

-1/48*x*(8*b^4*x^4-14*a^2*b^2*x^2+3*a^4)/b^2*(-b*x+a)*(b*x+a)^(1/2)/(-c*(b 
*x-a))^(1/2)*c^2+1/16*a^6/b^2/(b^2*c)^(1/2)*arctan((b^2*c)^(1/2)*x/(-b^2*c 
*x^2+a^2*c)^(1/2))*(-(b*x+a)*c*(b*x-a))^(1/2)/(b*x+a)^(1/2)/(-c*(b*x-a))^( 
1/2)*c^2
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.54 \[ \int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx=\left [\frac {3 \, a^{6} \sqrt {-c} c \log \left (2 \, b^{2} c x^{2} + 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {-c} x - a^{2} c\right ) - 2 \, {\left (8 \, b^{5} c x^{5} - 14 \, a^{2} b^{3} c x^{3} + 3 \, a^{4} b c x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{96 \, b^{3}}, -\frac {3 \, a^{6} c^{\frac {3}{2}} \arctan \left (\frac {\sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {c} x}{b^{2} c x^{2} - a^{2} c}\right ) + {\left (8 \, b^{5} c x^{5} - 14 \, a^{2} b^{3} c x^{3} + 3 \, a^{4} b c x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{48 \, b^{3}}\right ] \] Input:

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

Output:

[1/96*(3*a^6*sqrt(-c)*c*log(2*b^2*c*x^2 + 2*sqrt(-b*c*x + a*c)*sqrt(b*x + 
a)*b*sqrt(-c)*x - a^2*c) - 2*(8*b^5*c*x^5 - 14*a^2*b^3*c*x^3 + 3*a^4*b*c*x 
)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b^3, -1/48*(3*a^6*c^(3/2)*arctan(sqrt( 
-b*c*x + a*c)*sqrt(b*x + a)*b*sqrt(c)*x/(b^2*c*x^2 - a^2*c)) + (8*b^5*c*x^ 
5 - 14*a^2*b^3*c*x^3 + 3*a^4*b*c*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a))/b^3]
 

Sympy [F]

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

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

Output:

Integral(x**2*(-c*(-a + b*x))**(3/2)*(a + b*x)**(3/2), x)
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.70 \[ \int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx=\frac {a^{6} c^{\frac {3}{2}} \arcsin \left (\frac {b x}{a}\right )}{16 \, b^{3}} + \frac {\sqrt {-b^{2} c x^{2} + a^{2} c} a^{4} c x}{16 \, b^{2}} + \frac {{\left (-b^{2} c x^{2} + a^{2} c\right )}^{\frac {3}{2}} a^{2} x}{24 \, b^{2}} - \frac {{\left (-b^{2} c x^{2} + a^{2} c\right )}^{\frac {5}{2}} x}{6 \, b^{2} c} \] Input:

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

Output:

1/16*a^6*c^(3/2)*arcsin(b*x/a)/b^3 + 1/16*sqrt(-b^2*c*x^2 + a^2*c)*a^4*c*x 
/b^2 + 1/24*(-b^2*c*x^2 + a^2*c)^(3/2)*a^2*x/b^2 - 1/6*(-b^2*c*x^2 + a^2*c 
)^(5/2)*x/(b^2*c)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 457 vs. \(2 (113) = 226\).

Time = 0.49 (sec) , antiderivative size = 457, normalized size of antiderivative = 3.24 \[ \int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx=-\frac {40 \, {\left (\frac {6 \, a^{3} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left ({\left (2 \, b x - 5 \, a\right )} {\left (b x + a\right )} + 9 \, a^{2}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} a^{3} c - 10 \, {\left (\frac {18 \, a^{4} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left (39 \, a^{3} - {\left (2 \, {\left (3 \, b x - 10 \, a\right )} {\left (b x + a\right )} + 43 \, a^{2}\right )} {\left (b x + a\right )}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} a^{2} c - 2 \, {\left (\frac {90 \, a^{5} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left (195 \, a^{4} - {\left (295 \, a^{3} - 2 \, {\left (3 \, {\left (4 \, b x - 17 \, a\right )} {\left (b x + a\right )} + 133 \, a^{2}\right )} {\left (b x + a\right )}\right )} {\left (b x + a\right )}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} a c + {\left (\frac {150 \, a^{6} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left (405 \, a^{5} - {\left (745 \, a^{4} - 2 \, {\left (451 \, a^{3} - {\left (4 \, {\left (5 \, b x - 26 \, a\right )} {\left (b x + a\right )} + 321 \, a^{2}\right )} {\left (b x + a\right )}\right )} {\left (b x + a\right )}\right )} {\left (b x + a\right )}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} c}{240 \, b^{3}} \] Input:

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

Output:

-1/240*(40*(6*a^3*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 
2*a*c)))/sqrt(-c) - ((2*b*x - 5*a)*(b*x + a) + 9*a^2)*sqrt(-(b*x + a)*c + 
2*a*c)*sqrt(b*x + a))*a^3*c - 10*(18*a^4*c*log(abs(-sqrt(b*x + a)*sqrt(-c) 
 + sqrt(-(b*x + a)*c + 2*a*c)))/sqrt(-c) - (39*a^3 - (2*(3*b*x - 10*a)*(b* 
x + a) + 43*a^2)*(b*x + a))*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*a^2* 
c - 2*(90*a^5*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a* 
c)))/sqrt(-c) - (195*a^4 - (295*a^3 - 2*(3*(4*b*x - 17*a)*(b*x + a) + 133* 
a^2)*(b*x + a))*(b*x + a))*sqrt(-(b*x + a)*c + 2*a*c)*sqrt(b*x + a))*a*c + 
 (150*a^6*c*log(abs(-sqrt(b*x + a)*sqrt(-c) + sqrt(-(b*x + a)*c + 2*a*c))) 
/sqrt(-c) - (405*a^5 - (745*a^4 - 2*(451*a^3 - (4*(5*b*x - 26*a)*(b*x + a) 
 + 321*a^2)*(b*x + a))*(b*x + a))*(b*x + a))*sqrt(-(b*x + a)*c + 2*a*c)*sq 
rt(b*x + a))*c)/b^3
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.68 \[ \int x^2 (a+b x)^{3/2} (a c-b c x)^{3/2} \, dx=\frac {\sqrt {c}\, c \left (-6 \mathit {asin} \left (\frac {\sqrt {-b x +a}}{\sqrt {a}\, \sqrt {2}}\right ) a^{6}-3 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{4} b x +14 \sqrt {b x +a}\, \sqrt {-b x +a}\, a^{2} b^{3} x^{3}-8 \sqrt {b x +a}\, \sqrt {-b x +a}\, b^{5} x^{5}\right )}{48 b^{3}} \] Input:

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

Output:

(sqrt(c)*c*( - 6*asin(sqrt(a - b*x)/(sqrt(a)*sqrt(2)))*a**6 - 3*sqrt(a + b 
*x)*sqrt(a - b*x)*a**4*b*x + 14*sqrt(a + b*x)*sqrt(a - b*x)*a**2*b**3*x**3 
 - 8*sqrt(a + b*x)*sqrt(a - b*x)*b**5*x**5))/(48*b**3)