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

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 [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 96 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=b \sqrt {-c+d x} \sqrt {c+d x}-\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{2 x^2}-\frac {\left (2 b c^2-a d^2\right ) \arctan \left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{2 c} \] Output:

b*(d*x-c)^(1/2)*(d*x+c)^(1/2)-1/2*a*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^2-1/2*(- 
a*d^2+2*b*c^2)*arctan((d*x-c)^(1/2)*(d*x+c)^(1/2)/c)/c
 

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.77 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=\frac {\sqrt {-c+d x} \sqrt {c+d x} \left (-a+2 b x^2\right )}{2 x^2}+\left (-2 b c+\frac {a d^2}{c}\right ) \arctan \left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right ) \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.03, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {956, 112, 27, 103, 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 \frac {\left (a+b x^2\right ) \sqrt {d x-c} \sqrt {c+d x}}{x^3} \, dx\)

\(\Big \downarrow \) 956

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

\(\Big \downarrow \) 112

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 103

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

\(\Big \downarrow \) 218

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

Input:

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

Output:

(a*(-c + d*x)^(3/2)*(c + d*x)^(3/2))/(2*c^2*x^2) + ((2*b - (a*d^2)/c^2)*(S 
qrt[-c + d*x]*Sqrt[c + d*x] - c*ArcTan[(Sqrt[-c + d*x]*Sqrt[c + d*x])/c])) 
/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 103
Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_ 
))), x_] :> Simp[b*f   Subst[Int[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sq 
rt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[2*b*d 
*e - f*(b*c + a*d), 0]
 

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

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]
 

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

Time = 0.11 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.44

method result size
risch \(\frac {a \left (-d x +c \right ) \sqrt {d x +c}}{2 x^{2} \sqrt {d x -c}}-\frac {\left (\frac {\left (a \,d^{2}-2 b \,c^{2}\right ) \ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right )}{2 \sqrt {-c^{2}}}-b \sqrt {\left (d x -c \right ) \left (d x +c \right )}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d x -c}\, \sqrt {d x +c}}\) \(138\)
default \(-\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (\ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) a \,d^{2} x^{2}-2 \ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) b \,c^{2} x^{2}-2 b \,x^{2} \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}+\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\, a \right )}{2 \sqrt {d^{2} x^{2}-c^{2}}\, x^{2} \sqrt {-c^{2}}}\) \(182\)

Input:

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

Output:

1/2*a*(-d*x+c)*(d*x+c)^(1/2)/x^2/(d*x-c)^(1/2)-(1/2*(a*d^2-2*b*c^2)/(-c^2) 
^(1/2)*ln((-2*c^2+2*(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2))/x)-b*((d*x-c)*(d*x+c 
))^(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 = 85, normalized size of antiderivative = 0.89 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=-\frac {2 \, {\left (2 \, b c^{2} - a d^{2}\right )} x^{2} \arctan \left (-\frac {d x - \sqrt {d x + c} \sqrt {d x - c}}{c}\right ) - {\left (2 \, b c x^{2} - a c\right )} \sqrt {d x + c} \sqrt {d x - c}}{2 \, c x^{2}} \] Input:

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

Output:

-1/2*(2*(2*b*c^2 - a*d^2)*x^2*arctan(-(d*x - sqrt(d*x + c)*sqrt(d*x - c))/ 
c) - (2*b*c*x^2 - a*c)*sqrt(d*x + c)*sqrt(d*x - c))/(c*x^2)
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.02 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=b c \arcsin \left (\frac {c}{d {\left | x \right |}}\right ) - \frac {a d^{2} \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{2 \, c} + \sqrt {d^{2} x^{2} - c^{2}} b - \frac {\sqrt {d^{2} x^{2} - c^{2}} a d^{2}}{2 \, c^{2}} + \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} a}{2 \, c^{2} x^{2}} \] Input:

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

Output:

b*c*arcsin(c/(d*abs(x))) - 1/2*a*d^2*arcsin(c/(d*abs(x)))/c + sqrt(d^2*x^2 
 - c^2)*b - 1/2*sqrt(d^2*x^2 - c^2)*a*d^2/c^2 + 1/2*(d^2*x^2 - c^2)^(3/2)* 
a/(c^2*x^2)
 

Giac [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.64 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=\frac {\sqrt {d x + c} \sqrt {d x - c} b d + \frac {{\left (2 \, b c^{2} d - a d^{3}\right )} \arctan \left (\frac {{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}}{2 \, c}\right )}{c} + \frac {2 \, {\left (a d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{6} - 4 \, a c^{2} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}\right )}^{2}}}{d} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 10.37 (sec) , antiderivative size = 584, normalized size of antiderivative = 6.08 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=b\,\sqrt {-c}\,\sqrt {c}\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )-\frac {\frac {a\,\sqrt {-c}\,d^2}{32\,c^{3/2}}+\frac {a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{16\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {15\,a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{32\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}}{\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}}-b\,\sqrt {-c}\,\sqrt {c}\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )+\frac {a\,\sqrt {-c}\,d^2\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,c^{3/2}}-\frac {a\,\sqrt {-c}\,d^2\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )}{2\,c^{3/2}}-\frac {a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{32\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {8\,b\,\sqrt {-c}\,\sqrt {c}\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2\,\left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )} \] Input:

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

Output:

b*(-c)^(1/2)*c^(1/2)*log(((c + d*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - (d*x 
- c)^(1/2))^2 + 1) - ((a*(-c)^(1/2)*d^2)/(32*c^(3/2)) + (a*(-c)^(1/2)*d^2* 
((c + d*x)^(1/2) - c^(1/2))^2)/(16*c^(3/2)*((-c)^(1/2) - (d*x - c)^(1/2))^ 
2) - (15*a*(-c)^(1/2)*d^2*((c + d*x)^(1/2) - c^(1/2))^4)/(32*c^(3/2)*((-c) 
^(1/2) - (d*x - c)^(1/2))^4))/(((c + d*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - 
 (d*x - c)^(1/2))^2 + (2*((c + d*x)^(1/2) - c^(1/2))^4)/((-c)^(1/2) - (d*x 
 - c)^(1/2))^4 + ((c + d*x)^(1/2) - c^(1/2))^6/((-c)^(1/2) - (d*x - c)^(1/ 
2))^6) - b*(-c)^(1/2)*c^(1/2)*log(((c + d*x)^(1/2) - c^(1/2))/((-c)^(1/2) 
- (d*x - c)^(1/2))) + (a*(-c)^(1/2)*d^2*log(((c + d*x)^(1/2) - c^(1/2))/(( 
-c)^(1/2) - (d*x - c)^(1/2))))/(2*c^(3/2)) - (a*(-c)^(1/2)*d^2*log(((c + d 
*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - (d*x - c)^(1/2))^2 + 1))/(2*c^(3/2)) 
- (a*(-c)^(1/2)*d^2*((c + d*x)^(1/2) - c^(1/2))^2)/(32*c^(3/2)*((-c)^(1/2) 
 - (d*x - c)^(1/2))^2) - (8*b*(-c)^(1/2)*c^(1/2)*((c + d*x)^(1/2) - c^(1/2 
))^2)/(((-c)^(1/2) - (d*x - c)^(1/2))^2*(((c + d*x)^(1/2) - c^(1/2))^4/((- 
c)^(1/2) - (d*x - c)^(1/2))^4 - (2*((c + d*x)^(1/2) - c^(1/2))^2)/((-c)^(1 
/2) - (d*x - c)^(1/2))^2 + 1))
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.88 \[ \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx=\frac {2 \mathit {atan} \left (\frac {\sqrt {d x -c}+\sqrt {d x +c}-\sqrt {c}}{\sqrt {c}}\right ) a \,d^{2} x^{2}-4 \mathit {atan} \left (\frac {\sqrt {d x -c}+\sqrt {d x +c}-\sqrt {c}}{\sqrt {c}}\right ) b \,c^{2} x^{2}-2 \mathit {atan} \left (\frac {\sqrt {d x -c}+\sqrt {d x +c}+\sqrt {c}}{\sqrt {c}}\right ) a \,d^{2} x^{2}+4 \mathit {atan} \left (\frac {\sqrt {d x -c}+\sqrt {d x +c}+\sqrt {c}}{\sqrt {c}}\right ) b \,c^{2} x^{2}-\sqrt {d x +c}\, \sqrt {d x -c}\, a c +2 \sqrt {d x +c}\, \sqrt {d x -c}\, b c \,x^{2}}{2 c \,x^{2}} \] Input:

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

Output:

(2*atan((sqrt( - c + d*x) + sqrt(c + d*x) - sqrt(c))/sqrt(c))*a*d**2*x**2 
- 4*atan((sqrt( - c + d*x) + sqrt(c + d*x) - sqrt(c))/sqrt(c))*b*c**2*x**2 
 - 2*atan((sqrt( - c + d*x) + sqrt(c + d*x) + sqrt(c))/sqrt(c))*a*d**2*x** 
2 + 4*atan((sqrt( - c + d*x) + sqrt(c + d*x) + sqrt(c))/sqrt(c))*b*c**2*x* 
*2 - sqrt(c + d*x)*sqrt( - c + d*x)*a*c + 2*sqrt(c + d*x)*sqrt( - c + d*x) 
*b*c*x**2)/(2*c*x**2)