\(\int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx\) [249]

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

Optimal result

Integrand size = 23, antiderivative size = 144 \[ \int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx=\frac {c^3 x \sqrt {c-d x} \sqrt {c+d x}}{8 d^2}-\frac {c^2 (c-d x)^{3/2} (c+d x)^{3/2}}{12 d^3}-\frac {c (c-d x)^{3/2} (c+d x)^{5/2}}{4 d^3}+\frac {(c-d x)^{5/2} (c+d x)^{5/2}}{5 d^3}+\frac {c^5 \arctan \left (\frac {\sqrt {c+d x}}{\sqrt {c-d x}}\right )}{4 d^3} \] Output:

1/8*c^3*x*(-d*x+c)^(1/2)*(d*x+c)^(1/2)/d^2-1/12*c^2*(-d*x+c)^(3/2)*(d*x+c) 
^(3/2)/d^3-1/4*c*(-d*x+c)^(3/2)*(d*x+c)^(5/2)/d^3+1/5*(-d*x+c)^(5/2)*(d*x+ 
c)^(5/2)/d^3+1/4*c^5*arctan((d*x+c)^(1/2)/(-d*x+c)^(1/2))/d^3
 

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.74 \[ \int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx=\frac {\frac {\sqrt {c-d x} \left (-16 c^5-31 c^4 d x-23 c^3 d^2 x^2+22 c^2 d^3 x^3+54 c d^4 x^4+24 d^5 x^5\right )}{\sqrt {c+d x}}-30 c^5 \arctan \left (\frac {\sqrt {c-d x}}{\sqrt {c+d x}}\right )}{120 d^3} \] Input:

Integrate[x^2*Sqrt[c - d*x]*(c + d*x)^(3/2),x]
 

Output:

((Sqrt[c - d*x]*(-16*c^5 - 31*c^4*d*x - 23*c^3*d^2*x^2 + 22*c^2*d^3*x^3 + 
54*c*d^4*x^4 + 24*d^5*x^5))/Sqrt[c + d*x] - 30*c^5*ArcTan[Sqrt[c - d*x]/Sq 
rt[c + d*x]])/(120*d^3)
 

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.05, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {101, 25, 27, 59, 59, 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 \sqrt {c-d x} (c+d x)^{3/2} \, dx\)

\(\Big \downarrow \) 101

\(\displaystyle -\frac {\int -c \sqrt {c-d x} (c+d x)^{5/2}dx}{5 d^2}-\frac {x (c-d x)^{3/2} (c+d x)^{5/2}}{5 d^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int c \sqrt {c-d x} (c+d x)^{5/2}dx}{5 d^2}-\frac {x (c-d x)^{3/2} (c+d x)^{5/2}}{5 d^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {c \int \sqrt {c-d x} (c+d x)^{5/2}dx}{5 d^2}-\frac {x (c-d x)^{3/2} (c+d x)^{5/2}}{5 d^2}\)

\(\Big \downarrow \) 59

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

\(\Big \downarrow \) 59

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

\(\Big \downarrow \) 40

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

\(\Big \downarrow \) 45

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

\(\Big \downarrow \) 218

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

Input:

Int[x^2*Sqrt[c - d*x]*(c + d*x)^(3/2),x]
 

Output:

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

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.25 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.88

method result size
risch \(-\frac {\left (-24 x^{4} d^{4}-30 c \,x^{3} d^{3}+8 c^{2} x^{2} d^{2}+15 c^{3} x d +16 c^{4}\right ) \sqrt {-x d +c}\, \sqrt {x d +c}}{120 d^{3}}+\frac {c^{5} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right ) \sqrt {\left (-x d +c \right ) \left (x d +c \right )}}{8 d^{2} \sqrt {d^{2}}\, \sqrt {-x d +c}\, \sqrt {x d +c}}\) \(127\)
default \(-\frac {\sqrt {-x d +c}\, \sqrt {x d +c}\, \left (-24 \,\operatorname {csgn}\left (d \right ) d^{4} x^{4} \sqrt {-d^{2} x^{2}+c^{2}}-30 \,\operatorname {csgn}\left (d \right ) c \,d^{3} x^{3} \sqrt {-d^{2} x^{2}+c^{2}}+8 \,\operatorname {csgn}\left (d \right ) c^{2} d^{2} x^{2} \sqrt {-d^{2} x^{2}+c^{2}}+15 \sqrt {-d^{2} x^{2}+c^{2}}\, \operatorname {csgn}\left (d \right ) c^{3} d x +16 \,\operatorname {csgn}\left (d \right ) c^{4} \sqrt {-d^{2} x^{2}+c^{2}}-15 \arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right ) c^{5}\right ) \operatorname {csgn}\left (d \right )}{120 d^{3} \sqrt {-d^{2} x^{2}+c^{2}}}\) \(183\)

Input:

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

Output:

-1/120*(-24*d^4*x^4-30*c*d^3*x^3+8*c^2*d^2*x^2+15*c^3*d*x+16*c^4)/d^3*(-d* 
x+c)^(1/2)*(d*x+c)^(1/2)+1/8*c^5/d^2/(d^2)^(1/2)*arctan((d^2)^(1/2)*x/(-d^ 
2*x^2+c^2)^(1/2))*((-d*x+c)*(d*x+c))^(1/2)/(-d*x+c)^(1/2)/(d*x+c)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.67 \[ \int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx=-\frac {30 \, c^{5} \arctan \left (\frac {\sqrt {d x + c} \sqrt {-d x + c} - c}{d x}\right ) - {\left (24 \, d^{4} x^{4} + 30 \, c d^{3} x^{3} - 8 \, c^{2} d^{2} x^{2} - 15 \, c^{3} d x - 16 \, c^{4}\right )} \sqrt {d x + c} \sqrt {-d x + c}}{120 \, d^{3}} \] Input:

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

Output:

-1/120*(30*c^5*arctan((sqrt(d*x + c)*sqrt(-d*x + c) - c)/(d*x)) - (24*d^4* 
x^4 + 30*c*d^3*x^3 - 8*c^2*d^2*x^2 - 15*c^3*d*x - 16*c^4)*sqrt(d*x + c)*sq 
rt(-d*x + c))/d^3
 

Sympy [F]

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

integrate(x**2*(-d*x+c)**(1/2)*(d*x+c)**(3/2),x)
 

Output:

Integral(x**2*sqrt(c - d*x)*(c + d*x)**(3/2), x)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.72 \[ \int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx=\frac {c^{5} \arcsin \left (\frac {d x}{c}\right )}{8 \, d^{3}} + \frac {\sqrt {-d^{2} x^{2} + c^{2}} c^{3} x}{8 \, d^{2}} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} x^{2}}{5 \, d} - \frac {{\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} c x}{4 \, d^{2}} - \frac {2 \, {\left (-d^{2} x^{2} + c^{2}\right )}^{\frac {3}{2}} c^{2}}{15 \, d^{3}} \] Input:

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

Output:

1/8*c^5*arcsin(d*x/c)/d^3 + 1/8*sqrt(-d^2*x^2 + c^2)*c^3*x/d^2 - 1/5*(-d^2 
*x^2 + c^2)^(3/2)*x^2/d - 1/4*(-d^2*x^2 + c^2)^(3/2)*c*x/d^2 - 2/15*(-d^2* 
x^2 + c^2)^(3/2)*c^2/d^3
 

Giac [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.58 \[ \int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx=\frac {90 \, c^{5} \arcsin \left (\frac {\sqrt {2} \sqrt {d x + c}}{2 \, \sqrt {c}}\right ) + 20 \, {\left (6 \, c^{3} \arcsin \left (\frac {\sqrt {2} \sqrt {d x + c}}{2 \, \sqrt {c}}\right ) + {\left ({\left (2 \, d x - 5 \, c\right )} {\left (d x + c\right )} + 9 \, c^{2}\right )} \sqrt {d x + c} \sqrt {-d x + c}\right )} c^{2} + {\left (195 \, c^{4} - {\left (295 \, c^{3} - 2 \, {\left (3 \, {\left (4 \, d x - 17 \, c\right )} {\left (d x + c\right )} + 133 \, c^{2}\right )} {\left (d x + c\right )}\right )} {\left (d x + c\right )}\right )} \sqrt {d x + c} \sqrt {-d x + c} - 10 \, {\left (18 \, c^{4} \arcsin \left (\frac {\sqrt {2} \sqrt {d x + c}}{2 \, \sqrt {c}}\right ) + {\left (39 \, c^{3} - {\left (2 \, {\left (3 \, d x - 10 \, c\right )} {\left (d x + c\right )} + 43 \, c^{2}\right )} {\left (d x + c\right )}\right )} \sqrt {d x + c} \sqrt {-d x + c}\right )} c}{120 \, d^{3}} \] Input:

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

Output:

1/120*(90*c^5*arcsin(1/2*sqrt(2)*sqrt(d*x + c)/sqrt(c)) + 20*(6*c^3*arcsin 
(1/2*sqrt(2)*sqrt(d*x + c)/sqrt(c)) + ((2*d*x - 5*c)*(d*x + c) + 9*c^2)*sq 
rt(d*x + c)*sqrt(-d*x + c))*c^2 + (195*c^4 - (295*c^3 - 2*(3*(4*d*x - 17*c 
)*(d*x + c) + 133*c^2)*(d*x + c))*(d*x + c))*sqrt(d*x + c)*sqrt(-d*x + c) 
- 10*(18*c^4*arcsin(1/2*sqrt(2)*sqrt(d*x + c)/sqrt(c)) + (39*c^3 - (2*(3*d 
*x - 10*c)*(d*x + c) + 43*c^2)*(d*x + c))*sqrt(d*x + c)*sqrt(-d*x + c))*c) 
/d^3
 

Mupad [F(-1)]

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

int(x^2*(c + d*x)^(3/2)*(c - d*x)^(1/2),x)
 

Output:

int(x^2*(c + d*x)^(3/2)*(c - d*x)^(1/2), x)
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.92 \[ \int x^2 \sqrt {c-d x} (c+d x)^{3/2} \, dx=\frac {-30 \mathit {asin} \left (\frac {\sqrt {-d x +c}}{\sqrt {c}\, \sqrt {2}}\right ) c^{5}-16 \sqrt {d x +c}\, \sqrt {-d x +c}\, c^{4}-15 \sqrt {d x +c}\, \sqrt {-d x +c}\, c^{3} d x -8 \sqrt {d x +c}\, \sqrt {-d x +c}\, c^{2} d^{2} x^{2}+30 \sqrt {d x +c}\, \sqrt {-d x +c}\, c \,d^{3} x^{3}+24 \sqrt {d x +c}\, \sqrt {-d x +c}\, d^{4} x^{4}}{120 d^{3}} \] Input:

int(x^2*(-d*x+c)^(1/2)*(d*x+c)^(3/2),x)
 

Output:

( - 30*asin(sqrt(c - d*x)/(sqrt(c)*sqrt(2)))*c**5 - 16*sqrt(c + d*x)*sqrt( 
c - d*x)*c**4 - 15*sqrt(c + d*x)*sqrt(c - d*x)*c**3*d*x - 8*sqrt(c + d*x)* 
sqrt(c - d*x)*c**2*d**2*x**2 + 30*sqrt(c + d*x)*sqrt(c - d*x)*c*d**3*x**3 
+ 24*sqrt(c + d*x)*sqrt(c - d*x)*d**4*x**4)/(120*d**3)