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

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

Optimal result

Integrand size = 31, antiderivative size = 120 \[ \int \frac {x^2 \left (a+b x^2\right )}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=-\frac {\left (\frac {a}{c^2}+\frac {b}{d^2}\right ) x^3}{\sqrt {-c+d x} \sqrt {c+d x}}+\frac {\left (3 b c^2+2 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{2 c^2 d^4}+\frac {\left (3 b c^2+2 a d^2\right ) \text {arctanh}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{d^5} \] Output:

-(a/c^2+b/d^2)*x^3/(d*x-c)^(1/2)/(d*x+c)^(1/2)+1/2*(2*a*d^2+3*b*c^2)*x*(d* 
x-c)^(1/2)*(d*x+c)^(1/2)/c^2/d^4+(2*a*d^2+3*b*c^2)*arctanh((d*x-c)^(1/2)/( 
d*x+c)^(1/2))/d^5
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.90 \[ \int \frac {x^2 \left (a+b x^2\right )}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {-3 b c^2 d x-2 a d^3 x+b d^3 x^3+2 \left (3 b c^2+2 a d^2\right ) \sqrt {-c+d x} \sqrt {c+d x} \text {arctanh}\left (\frac {\sqrt {c+d x}}{\sqrt {-c+d x}}\right )}{2 d^5 \sqrt {-c+d x} \sqrt {c+d x}} \] Input:

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

Output:

(-3*b*c^2*d*x - 2*a*d^3*x + b*d^3*x^3 + 2*(3*b*c^2 + 2*a*d^2)*Sqrt[-c + d* 
x]*Sqrt[c + d*x]*ArcTanh[Sqrt[c + d*x]/Sqrt[-c + d*x]])/(2*d^5*Sqrt[-c + d 
*x]*Sqrt[c + d*x])
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.11, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {960, 100, 27, 87, 45, 221}

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

\(\Big \downarrow \) 960

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

\(\Big \downarrow \) 100

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 87

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

\(\Big \downarrow \) 45

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

\(\Big \downarrow \) 221

\(\displaystyle \frac {1}{2} \left (2 a+\frac {3 b c^2}{d^2}\right ) \left (\frac {\frac {2 \text {arctanh}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{d^2}-\frac {\sqrt {d x-c}}{d^2 \sqrt {c+d x}}}{d}-\frac {c}{d^3 \sqrt {d x-c} \sqrt {c+d x}}\right )+\frac {b x^3}{2 d^2 \sqrt {d x-c} \sqrt {c+d x}}\)

Input:

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

Output:

(b*x^3)/(2*d^2*Sqrt[-c + d*x]*Sqrt[c + d*x]) + ((2*a + (3*b*c^2)/d^2)*(-(c 
/(d^3*Sqrt[-c + d*x]*Sqrt[c + d*x])) + (-(Sqrt[-c + d*x]/(d^2*Sqrt[c + d*x 
])) + (2*ArcTanh[Sqrt[-c + d*x]/Sqrt[c + d*x]])/d^2)/d))/2
 

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 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 87
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[(-(b*e - a*f))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p 
+ 1)*(c*f - d*e))), x] - Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p 
+ 1)))/(f*(p + 1)*(c*f - d*e))   Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] 
/; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || Intege 
rQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ[p, n]))))
 

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

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 960
Int[((e_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.) 
*(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*(e*x)^( 
m + 1)*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(b1*b2*e*(m + n 
*(p + 1) + 1))), x] - Simp[(a1*a2*d*(m + 1) - b1*b2*c*(m + n*(p + 1) + 1))/ 
(b1*b2*(m + n*(p + 1) + 1))   Int[(e*x)^m*(a1 + b1*x^(n/2))^p*(a2 + b2*x^(n 
/2))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, d, e, m, n, p}, x] && EqQ[non2, 
 n/2] && EqQ[a2*b1 + a1*b2, 0] && NeQ[m + n*(p + 1) + 1, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(250\) vs. \(2(106)=212\).

Time = 0.12 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.09

method result size
risch \(-\frac {b x \left (-d x +c \right ) \sqrt {d x +c}}{2 d^{4} \sqrt {d x -c}}+\frac {\left (-\frac {\left (a \,d^{2}+b \,c^{2}\right ) \sqrt {d^{2} \left (x -\frac {c}{d}\right )^{2}+2 c d \left (x -\frac {c}{d}\right )}}{d^{2} \left (x -\frac {c}{d}\right )}+\frac {2 a \,d^{2} \ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right )}{\sqrt {d^{2}}}+\frac {3 b \,c^{2} \ln \left (\frac {d^{2} x}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-c^{2}}\right )}{\sqrt {d^{2}}}-\frac {\left (a \,d^{2}+b \,c^{2}\right ) \sqrt {d^{2} \left (x +\frac {c}{d}\right )^{2}-2 c d \left (x +\frac {c}{d}\right )}}{d^{2} \left (x +\frac {c}{d}\right )}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{2 d^{4} \sqrt {d x -c}\, \sqrt {d x +c}}\) \(251\)
default \(-\frac {\left (-\operatorname {csgn}\left (d \right ) b \,d^{3} x^{3} \sqrt {d^{2} x^{2}-c^{2}}-2 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) a \,d^{4} x^{2}-3 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) b \,c^{2} d^{2} x^{2}+2 \,\operatorname {csgn}\left (d \right ) d^{3} \sqrt {d^{2} x^{2}-c^{2}}\, a x +3 \,\operatorname {csgn}\left (d \right ) d \sqrt {d^{2} x^{2}-c^{2}}\, b \,c^{2} x +2 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) a \,c^{2} d^{2}+3 \ln \left (\left (\sqrt {d^{2} x^{2}-c^{2}}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) b \,c^{4}\right ) \operatorname {csgn}\left (d \right )}{2 \sqrt {d x -c}\, \sqrt {d^{2} x^{2}-c^{2}}\, \sqrt {d x +c}\, d^{5}}\) \(255\)

Input:

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

Output:

-1/2*b*x*(-d*x+c)*(d*x+c)^(1/2)/d^4/(d*x-c)^(1/2)+1/2/d^4*(-(a*d^2+b*c^2)/ 
d^2/(x-c/d)*(d^2*(x-c/d)^2+2*c*d*(x-c/d))^(1/2)+2*a*d^2*ln(d^2*x/(d^2)^(1/ 
2)+(d^2*x^2-c^2)^(1/2))/(d^2)^(1/2)+3*b*c^2*ln(d^2*x/(d^2)^(1/2)+(d^2*x^2- 
c^2)^(1/2))/(d^2)^(1/2)-(a*d^2+b*c^2)/d^2/(x+c/d)*(d^2*(x+c/d)^2-2*c*d*(x+ 
c/d))^(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.09 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.32 \[ \int \frac {x^2 \left (a+b x^2\right )}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {2 \, b c^{4} + 2 \, a c^{2} d^{2} - 2 \, {\left (b c^{2} d^{2} + a d^{4}\right )} x^{2} + {\left (b d^{3} x^{3} - {\left (3 \, b c^{2} d + 2 \, a d^{3}\right )} x\right )} \sqrt {d x + c} \sqrt {d x - c} + {\left (3 \, b c^{4} + 2 \, a c^{2} d^{2} - {\left (3 \, b c^{2} d^{2} + 2 \, a d^{4}\right )} x^{2}\right )} \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right )}{2 \, {\left (d^{7} x^{2} - c^{2} d^{5}\right )}} \] Input:

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

Output:

1/2*(2*b*c^4 + 2*a*c^2*d^2 - 2*(b*c^2*d^2 + a*d^4)*x^2 + (b*d^3*x^3 - (3*b 
*c^2*d + 2*a*d^3)*x)*sqrt(d*x + c)*sqrt(d*x - c) + (3*b*c^4 + 2*a*c^2*d^2 
- (3*b*c^2*d^2 + 2*a*d^4)*x^2)*log(-d*x + sqrt(d*x + c)*sqrt(d*x - c)))/(d 
^7*x^2 - c^2*d^5)
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.15 \[ \int \frac {x^2 \left (a+b x^2\right )}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {b x^{3}}{2 \, \sqrt {d^{2} x^{2} - c^{2}} d^{2}} - \frac {3 \, b c^{2} x}{2 \, \sqrt {d^{2} x^{2} - c^{2}} d^{4}} - \frac {a x}{\sqrt {d^{2} x^{2} - c^{2}} d^{2}} + \frac {3 \, b c^{2} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{2 \, d^{5}} + \frac {a \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{d^{3}} \] Input:

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

Output:

1/2*b*x^3/(sqrt(d^2*x^2 - c^2)*d^2) - 3/2*b*c^2*x/(sqrt(d^2*x^2 - c^2)*d^4 
) - a*x/(sqrt(d^2*x^2 - c^2)*d^2) + 3/2*b*c^2*log(2*d^2*x + 2*sqrt(d^2*x^2 
 - c^2)*d)/d^5 + a*log(2*d^2*x + 2*sqrt(d^2*x^2 - c^2)*d)/d^3
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.22 \[ \int \frac {x^2 \left (a+b x^2\right )}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {\sqrt {d x + c} {\left ({\left (d x + c\right )} {\left (\frac {{\left (d x + c\right )} b}{d^{5}} - \frac {3 \, b c}{d^{5}}\right )} + \frac {b c^{2} d^{15} - a d^{17}}{d^{20}}\right )}}{2 \, \sqrt {d x - c}} - \frac {{\left (3 \, b c^{2} + 2 \, a d^{2}\right )} \log \left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}{2 \, d^{5}} - \frac {2 \, {\left (b c^{3} + a c d^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2} + 2 \, c\right )} d^{5}} \] Input:

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

Output:

1/2*sqrt(d*x + c)*((d*x + c)*((d*x + c)*b/d^5 - 3*b*c/d^5) + (b*c^2*d^15 - 
 a*d^17)/d^20)/sqrt(d*x - c) - 1/2*(3*b*c^2 + 2*a*d^2)*log((sqrt(d*x + c) 
- sqrt(d*x - c))^2)/d^5 - 2*(b*c^3 + a*c*d^2)/(((sqrt(d*x + c) - sqrt(d*x 
- c))^2 + 2*c)*d^5)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 285, normalized size of antiderivative = 2.38 \[ \int \frac {x^2 \left (a+b x^2\right )}{(-c+d x)^{3/2} (c+d x)^{3/2}} \, dx=\frac {16 \sqrt {d x -c}\, \mathrm {log}\left (\frac {\sqrt {d x -c}+\sqrt {d x +c}}{\sqrt {c}\, \sqrt {2}}\right ) a c \,d^{2}+16 \sqrt {d x -c}\, \mathrm {log}\left (\frac {\sqrt {d x -c}+\sqrt {d x +c}}{\sqrt {c}\, \sqrt {2}}\right ) a \,d^{3} x +24 \sqrt {d x -c}\, \mathrm {log}\left (\frac {\sqrt {d x -c}+\sqrt {d x +c}}{\sqrt {c}\, \sqrt {2}}\right ) b \,c^{3}+24 \sqrt {d x -c}\, \mathrm {log}\left (\frac {\sqrt {d x -c}+\sqrt {d x +c}}{\sqrt {c}\, \sqrt {2}}\right ) b \,c^{2} d x -8 \sqrt {d x -c}\, a c \,d^{2}-8 \sqrt {d x -c}\, a \,d^{3} x -9 \sqrt {d x -c}\, b \,c^{3}-9 \sqrt {d x -c}\, b \,c^{2} d x -8 \sqrt {d x +c}\, a \,d^{3} x -12 \sqrt {d x +c}\, b \,c^{2} d x +4 \sqrt {d x +c}\, b \,d^{3} x^{3}}{8 \sqrt {d x -c}\, d^{5} \left (d x +c \right )} \] Input:

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

Output:

(16*sqrt( - c + d*x)*log((sqrt( - c + d*x) + sqrt(c + d*x))/(sqrt(c)*sqrt( 
2)))*a*c*d**2 + 16*sqrt( - c + d*x)*log((sqrt( - c + d*x) + sqrt(c + d*x)) 
/(sqrt(c)*sqrt(2)))*a*d**3*x + 24*sqrt( - c + d*x)*log((sqrt( - c + d*x) + 
 sqrt(c + d*x))/(sqrt(c)*sqrt(2)))*b*c**3 + 24*sqrt( - c + d*x)*log((sqrt( 
 - c + d*x) + sqrt(c + d*x))/(sqrt(c)*sqrt(2)))*b*c**2*d*x - 8*sqrt( - c + 
 d*x)*a*c*d**2 - 8*sqrt( - c + d*x)*a*d**3*x - 9*sqrt( - c + d*x)*b*c**3 - 
 9*sqrt( - c + d*x)*b*c**2*d*x - 8*sqrt(c + d*x)*a*d**3*x - 12*sqrt(c + d* 
x)*b*c**2*d*x + 4*sqrt(c + d*x)*b*d**3*x**3)/(8*sqrt( - c + d*x)*d**5*(c + 
 d*x))