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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 54, 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, 833, 649, 213, 266} \begin {gather*} -\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-((a + b*Sqrt[c + d*x])^2/x) - (2*a*b*d*ArcTanh[Sqrt[c + d*x]/Sqrt[c]])/Sqrt[c] + b^2*d*Log[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 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

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 649

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

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x)^(m
 - 1)*(a + c*x^2)^(p + 1)*((a*(e*f + d*g) - (c*d*f - a*e*g)*x)/(2*a*c*(p + 1))), x] - Dist[1/(2*a*c*(p + 1)),
Int[(d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^2*f*(2*p + 3) + e*(a*e*g*m - c*
d*f*(m + 2*p + 2))*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, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

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^2} \, dx &=d \text {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2}{(-c+x)^2} \, dx,x,c+d x\right )\\ &=(2 d) \text {Subst}\left (\int \frac {x (a+b x)^2}{\left (-c+x^2\right )^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {d \text {Subst}\left (\int \frac {-2 a b c-2 b^2 c x}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )}{c}\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}+(2 a b d) \text {Subst}\left (\int \frac {1}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )+\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {x}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\left (a+b \sqrt {c+d x}\right )^2}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 64, normalized size = 1.19 \begin {gather*} -\frac {a^2+b^2 c+2 a b \sqrt {c+d x}}{x}-\frac {2 a b d \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{\sqrt {c}}+b^2 d \log (-d x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.30, size = 63, normalized size = 1.17

method result size
default \(b^{2} \left (-\frac {c}{x}+d \ln \left (x \right )\right )+4 a b d \left (-\frac {\sqrt {d x +c}}{2 d x}-\frac {\arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{2 \sqrt {c}}\right )-\frac {a^{2}}{x}\) \(63\)
derivativedivides \(2 d \left (-\frac {a b \sqrt {d x +c}+\frac {b^{2} c}{2}+\frac {a^{2}}{2}}{d x}+b \left (\frac {b \ln \left (-d x \right )}{2}-\frac {a \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{\sqrt {c}}\right )\right )\) \(64\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 73, normalized size = 1.35 \begin {gather*} {\left (b^{2} \log \left (d x\right ) + \frac {a b \log \left (\frac {\sqrt {d x + c} - \sqrt {c}}{\sqrt {d x + c} + \sqrt {c}}\right )}{\sqrt {c}} - \frac {b^{2} c + 2 \, \sqrt {d x + c} a b + a^{2}}{d x}\right )} d \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[(b^2*c*d*x*log(x) + a*b*sqrt(c)*d*x*log((d*x - 2*sqrt(d*x + c)*sqrt(c) + 2*c)/x) - b^2*c^2 - 2*sqrt(d*x + c)*
a*b*c - a^2*c)/(c*x), (b^2*c*d*x*log(x) + 2*a*b*sqrt(-c)*d*x*arctan(sqrt(d*x + c)*sqrt(-c)/c) - b^2*c^2 - 2*sq
rt(d*x + c)*a*b*c - a^2*c)/(c*x)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (49) = 98\).
time = 35.46, size = 139, normalized size = 2.57 \begin {gather*} - \frac {a^{2}}{x} - a b c d \sqrt {\frac {1}{c^{3}}} \log {\left (- c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} + a b c d \sqrt {\frac {1}{c^{3}}} \log {\left (c^{2} \sqrt {\frac {1}{c^{3}}} + \sqrt {c + d x} \right )} + \frac {4 a b d \operatorname {atan}{\left (\frac {\sqrt {c + d x}}{\sqrt {- c}} \right )}}{\sqrt {- c}} - \frac {2 a b \sqrt {c + d x}}{x} - \frac {b^{2} c}{x} + b^{2} d \log {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 131, normalized size = 2.43 \begin {gather*} b\,d\,\ln \left (2\,b\,d\,\left (b+\frac {a}{\sqrt {c}}\right )\,\sqrt {c+d\,x}-2\,b^2\,d\,\sqrt {c+d\,x}-2\,a\,b\,d\right )\,\left (b+\frac {a}{\sqrt {c}}\right )-\frac {a^2\,d+b^2\,c\,d+2\,a\,b\,d\,\sqrt {c+d\,x}}{d\,x}+b\,d\,\ln \left (2\,b\,d\,\left (b-\frac {a}{\sqrt {c}}\right )\,\sqrt {c+d\,x}-2\,b^2\,d\,\sqrt {c+d\,x}-2\,a\,b\,d\right )\,\left (b-\frac {a}{\sqrt {c}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________