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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.19, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {899, 100, 27, 87, 73, 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 {\left (c+\frac {d}{x}\right )^2}{\left (a+\frac {b}{x}\right )^{3/2}} \, dx\)

\(\Big \downarrow \) 899

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

\(\Big \downarrow \) 100

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 87

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

Input:

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

Output:

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

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 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

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 899
Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol 
] :> -Subst[Int[(a + b/x^n)^p*((c + d/x^n)^q/x^2), x], x, 1/x] /; FreeQ[{a, 
 b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(181\) vs. \(2(74)=148\).

Time = 0.34 (sec) , antiderivative size = 182, normalized size of antiderivative = 2.17

method result size
risch \(\frac {c^{2} \left (a x +b \right )}{a^{2} \sqrt {\frac {a x +b}{x}}}+\frac {\left (\frac {2 \left (2 a^{2} d^{2}-4 a b c d +2 b^{2} c^{2}\right ) \sqrt {a \left (x +\frac {b}{a}\right )^{2}-b \left (x +\frac {b}{a}\right )}}{a b \left (x +\frac {b}{a}\right )}-\frac {3 b \,c^{2} \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right )}{\sqrt {a}}+4 \sqrt {a}\, c d \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right )\right ) \sqrt {x \left (a x +b \right )}}{2 a^{2} x \sqrt {\frac {a x +b}{x}}}\) \(182\)
default \(-\frac {\sqrt {\frac {a x +b}{x}}\, x \left (-4 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{3} b^{2} c d \,x^{2}-8 \left (x \left (a x +b \right )\right )^{\frac {3}{2}} a^{\frac {5}{2}} b c d -6 \sqrt {x \left (a x +b \right )}\, a^{\frac {5}{2}} b^{2} c^{2} x^{2}+4 \left (x \left (a x +b \right )\right )^{\frac {3}{2}} a^{\frac {3}{2}} b^{2} c^{2}-2 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{3} b^{2} d^{2} x -4 \sqrt {x \left (a x +b \right )}\, a^{\frac {7}{2}} b \,d^{2} x +8 \sqrt {x \left (a x +b \right )}\, a^{\frac {3}{2}} b^{3} c d -2 \sqrt {x \left (a x +b \right )}\, a^{\frac {9}{2}} d^{2} x^{2}-2 \sqrt {a \,x^{2}+b x}\, a^{\frac {9}{2}} d^{2} x^{2}-\ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{4} b \,d^{2} x^{2}+\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{4} b \,d^{2} x^{2}+3 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b^{3} c^{2} x^{2}+2 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{3} b^{2} d^{2} x +6 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a \,b^{4} c^{2} x -2 \sqrt {x \left (a x +b \right )}\, a^{\frac {5}{2}} b^{2} d^{2}-2 \sqrt {a \,x^{2}+b x}\, a^{\frac {5}{2}} b^{2} d^{2}-4 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a \,b^{4} c d -\ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b^{3} d^{2}+\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b^{3} d^{2}+4 \left (x \left (a x +b \right )\right )^{\frac {3}{2}} a^{\frac {7}{2}} d^{2}-6 \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b^{4} c^{2}-4 \sqrt {a \,x^{2}+b x}\, a^{\frac {7}{2}} b \,d^{2} x -8 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b^{3} c d x -12 \sqrt {x \left (a x +b \right )}\, a^{\frac {3}{2}} b^{3} c^{2} x +8 \sqrt {x \left (a x +b \right )}\, a^{\frac {7}{2}} b c d \,x^{2}+16 \sqrt {x \left (a x +b \right )}\, a^{\frac {5}{2}} b^{2} c d x +3 \ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) b^{5} c^{2}\right )}{2 a^{\frac {5}{2}} \sqrt {x \left (a x +b \right )}\, b^{2} \left (a x +b \right )^{2}}\) \(789\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

[-1/2*((3*b^3*c^2 - 4*a*b^2*c*d + (3*a*b^2*c^2 - 4*a^2*b*c*d)*x)*sqrt(a)*l 
og(2*a*x + 2*sqrt(a)*x*sqrt((a*x + b)/x) + b) - 2*(a^2*b*c^2*x^2 + (3*a*b^ 
2*c^2 - 4*a^2*b*c*d + 2*a^3*d^2)*x)*sqrt((a*x + b)/x))/(a^4*b*x + a^3*b^2) 
, ((3*b^3*c^2 - 4*a*b^2*c*d + (3*a*b^2*c^2 - 4*a^2*b*c*d)*x)*sqrt(-a)*arct 
an(sqrt(-a)*x*sqrt((a*x + b)/x)/(a*x + b)) + (a^2*b*c^2*x^2 + (3*a*b^2*c^2 
 - 4*a^2*b*c*d + 2*a^3*d^2)*x)*sqrt((a*x + b)/x))/(a^4*b*x + a^3*b^2)]
 

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 164 vs. \(2 (74) = 148\).

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (74) = 148\).

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

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

Output:

sqrt(a*x^2 + b*x)*c^2/(a^2*sgn(x)) + 1/2*(3*b*c^2 - 4*a*c*d)*log(abs(2*(sq 
rt(a)*x - sqrt(a*x^2 + b*x))*sqrt(a) + b))/(a^(5/2)*sgn(x)) - 1/2*(3*b^2*c 
^2*log(abs(b)) - 4*a*b*c*d*log(abs(b)) + 4*b^2*c^2 - 8*a*b*c*d + 4*a^2*d^2 
)*sgn(x)/(a^(5/2)*b) + 2*(sqrt(a)*b^2*c^2 - 2*a^(3/2)*b*c*d + a^(5/2)*d^2) 
/(((sqrt(a)*x - sqrt(a*x^2 + b*x))*sqrt(a) + b)*a^3*sgn(x))
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

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