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

Optimal. Leaf size=80 \[ -\frac {b d \left (b c+a \sqrt {c+d x}\right )}{2 c x}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}+\frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {378, 1412, 835, 12, 653, 213} \begin {gather*} \frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}-\frac {b d \left (a \sqrt {c+d x}+b c\right )}{2 c x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 213

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

Rule 378

Int[((a_) + (b_.)*(v_)^(n_))^(p_.)*(x_)^(m_.), x_Symbol] :> With[{c = Coefficient[v, x, 0], d = Coefficient[v,
 x, 1]}, Dist[1/d^(m + 1), Subst[Int[SimplifyIntegrand[(x - c)^m*(a + b*x^n)^p, x], x], x, v], x] /; NeQ[c, 0]
] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && IntegerQ[m]

Rule 653

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*e - c*d*x)/(2*a*c*(p + 1)))*(a + c*x
^2)^(p + 1), x] + Dist[d*((2*p + 3)/(2*a*(p + 1))), Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x]
&& LtQ[p, -1] && NeQ[p, -3/2]

Rule 835

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^m*(
a + c*x^2)^(p + 1)*((a*g - c*f*x)/(2*a*c*(p + 1))), x] - Dist[1/(2*a*c*(p + 1)), Int[(d + e*x)^(m - 1)*(a + c*
x^2)^(p + 1)*Simp[a*e*g*m - c*d*f*(2*p + 3) - c*e*f*(m + 2*p + 3)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x
] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 1412

Int[((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, D
ist[g, Subst[Int[x^(g - 1)*(d + e*x^(g*n))^q*(a + c*x^(2*g*n))^p, x], x, x^(1/g)], x]] /; FreeQ[{a, c, d, e, p
, q}, x] && EqQ[n2, 2*n] && FractionQ[n]

Rubi steps

\begin {align*} \int \frac {\left (a+b \sqrt {c+d x}\right )^2}{x^3} \, dx &=d^2 \text {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2}{(-c+x)^3} \, dx,x,c+d x\right )\\ &=\left (2 d^2\right ) \text {Subst}\left (\int \frac {x (a+b x)^2}{\left (-c+x^2\right )^3} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}-\frac {d^2 \text {Subst}\left (\int -\frac {2 b c (a+b x)}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )}{2 c}\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}+\left (b d^2\right ) \text {Subst}\left (\int \frac {a+b x}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {b d \left (b c+a \sqrt {c+d x}\right )}{2 c x}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}-\frac {\left (a b d^2\right ) \text {Subst}\left (\int \frac {1}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )}{2 c}\\ &=-\frac {b d \left (b c+a \sqrt {c+d x}\right )}{2 c x}-\frac {\left (a+b \sqrt {c+d x}\right )^2}{2 x^2}+\frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.17, size = 77, normalized size = 0.96 \begin {gather*} -\frac {a^2 c+a b \sqrt {c+d x} (2 c+d x)+b^2 c (c+2 d x)}{2 c x^2}+\frac {a b d^2 \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{2 c^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.31, size = 82, normalized size = 1.02

method result size
derivativedivides \(2 d^{2} \left (-\frac {\frac {a b \left (d x +c \right )^{\frac {3}{2}}}{4 c}+\frac {\left (d x +c \right ) b^{2}}{2}+\frac {a b \sqrt {d x +c}}{4}-\frac {b^{2} c}{4}+\frac {a^{2}}{4}}{d^{2} x^{2}}+\frac {a b \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{4 c^{\frac {3}{2}}}\right )\) \(81\)
default \(b^{2} \left (-\frac {c}{2 x^{2}}-\frac {d}{x}\right )+4 a b \,d^{2} \left (-\frac {\frac {\left (d x +c \right )^{\frac {3}{2}}}{8 c}+\frac {\sqrt {d x +c}}{8}}{d^{2} x^{2}}+\frac {\arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{8 c^{\frac {3}{2}}}\right )-\frac {a^{2}}{2 x^{2}}\) \(82\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 113, normalized size = 1.41 \begin {gather*} -\frac {1}{4} \, {\left (\frac {a b \log \left (\frac {\sqrt {d x + c} - \sqrt {c}}{\sqrt {d x + c} + \sqrt {c}}\right )}{c^{\frac {3}{2}}} + \frac {2 \, {\left (2 \, {\left (d x + c\right )} b^{2} c - b^{2} c^{2} + {\left (d x + c\right )}^{\frac {3}{2}} a b + \sqrt {d x + c} a b c + a^{2} c\right )}}{{\left (d x + c\right )}^{2} c - 2 \, {\left (d x + c\right )} c^{2} + c^{3}}\right )} d^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 181, normalized size = 2.26 \begin {gather*} \left [\frac {a b \sqrt {c} d^{2} x^{2} \log \left (\frac {d x + 2 \, \sqrt {d x + c} \sqrt {c} + 2 \, c}{x}\right ) - 4 \, b^{2} c^{2} d x - 2 \, b^{2} c^{3} - 2 \, a^{2} c^{2} - 2 \, {\left (a b c d x + 2 \, a b c^{2}\right )} \sqrt {d x + c}}{4 \, c^{2} x^{2}}, -\frac {a b \sqrt {-c} d^{2} x^{2} \arctan \left (\frac {\sqrt {d x + c} \sqrt {-c}}{c}\right ) + 2 \, b^{2} c^{2} d x + b^{2} c^{3} + a^{2} c^{2} + {\left (a b c d x + 2 \, a b c^{2}\right )} \sqrt {d x + c}}{2 \, c^{2} x^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[1/4*(a*b*sqrt(c)*d^2*x^2*log((d*x + 2*sqrt(d*x + c)*sqrt(c) + 2*c)/x) - 4*b^2*c^2*d*x - 2*b^2*c^3 - 2*a^2*c^2
 - 2*(a*b*c*d*x + 2*a*b*c^2)*sqrt(d*x + c))/(c^2*x^2), -1/2*(a*b*sqrt(-c)*d^2*x^2*arctan(sqrt(d*x + c)*sqrt(-c
)/c) + 2*b^2*c^2*d*x + b^2*c^3 + a^2*c^2 + (a*b*c*d*x + 2*a*b*c^2)*sqrt(d*x + c))/(c^2*x^2)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 292 vs. \(2 (68) = 136\).
time = 114.49, size = 292, normalized size = 3.65 \begin {gather*} - \frac {a^{2}}{2 x^{2}} - \frac {20 a b c^{2} d^{2} \sqrt {c + d x}}{- 8 c^{4} - 16 c^{3} d x + 8 c^{2} \left (c + d x\right )^{2}} + \frac {12 a b c d^{2} \left (c + d x\right )^{\frac {3}{2}}}{- 8 c^{4} - 16 c^{3} d x + 8 c^{2} \left (c + d x\right )^{2}} + \frac {3 a b c d^{2} \sqrt {\frac {1}{c^{5}}} \log {\left (- c^{3} \sqrt {\frac {1}{c^{5}}} + \sqrt {c + d x} \right )}}{4} - \frac {3 a b c d^{2} \sqrt {\frac {1}{c^{5}}} \log {\left (c^{3} \sqrt {\frac {1}{c^{5}}} + \sqrt {c + d x} \right )}}{4} - a b d^{2} \sqrt {\frac {1}{c^{3}}} \log {\left (- c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} + a b d^{2} \sqrt {\frac {1}{c^{3}}} \log {\left (c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} - \frac {2 a b d \sqrt {c + d x}}{c x} - \frac {b^{2} c}{2 x^{2}} - \frac {b^{2} d}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 3.00, size = 105, normalized size = 1.31 \begin {gather*} -\frac {\frac {a b d^{3} \arctan \left (\frac {\sqrt {d x + c}}{\sqrt {-c}}\right )}{\sqrt {-c} c} + \frac {2 \, {\left (d x + c\right )} b^{2} c d^{3} - b^{2} c^{2} d^{3} + {\left (d x + c\right )}^{\frac {3}{2}} a b d^{3} + \sqrt {d x + c} a b c d^{3} + a^{2} c d^{3}}{c d^{2} x^{2}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.40, size = 80, normalized size = 1.00 \begin {gather*} \frac {a\,b\,d^2\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}}{\sqrt {c}}\right )}{2\,c^{3/2}}-\frac {b^2\,c}{2\,x^2}-\frac {b^2\,d}{x}-\frac {a\,b\,\sqrt {c+d\,x}}{2\,x^2}-\frac {a\,b\,{\left (c+d\,x\right )}^{3/2}}{2\,c\,x^2}-\frac {a^2}{2\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________