3.623 \(\int \frac {(a+b \sqrt {c+d x})^2}{x^2} \, dx\)

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.07, 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 = {371, 1398, 819, 635, 207, 260} \[ -\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) \]

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 207

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

Rule 260

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 371

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 635

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 819

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 1398

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 \operatorname {Subst}\left (\int \frac {\left (a+b \sqrt {x}\right )^2}{(-c+x)^2} \, dx,x,c+d x\right )\\ &=(2 d) \operatorname {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 \operatorname {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) \operatorname {Subst}\left (\int \frac {1}{-c+x^2} \, dx,x,\sqrt {c+d x}\right )+\left (2 b^2 d\right ) \operatorname {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 [B]  time = 0.20, size = 161, normalized size = 2.98 \[ \frac {\sqrt {c} \left (a^4+2 a^3 b \sqrt {c+d x}-2 a b^3 c \sqrt {c+d x}-b^4 c (c+2 d x)\right )+b d x \left (a+b \sqrt {c}\right ) \left (a-b \sqrt {c}\right )^2 \log \left (\sqrt {c+d x}+\sqrt {c}\right )+b d x \left (b \sqrt {c}-a\right ) \left (a+b \sqrt {c}\right )^2 \log \left (\sqrt {c}-\sqrt {c+d x}\right )}{\sqrt {c} x \left (b^2 c-a^2\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 147, normalized size = 2.72 \[ \left [\frac {b^{2} c d x \log \relax (x) + 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 \relax (x) + 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 ] \]

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)]

________________________________________________________________________________________

giac [A]  time = 0.44, size = 80, normalized size = 1.48 \[ \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} \]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 60, normalized size = 1.11 \[ b^{2} d \ln \relax (x )-\frac {2 a b d \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{\sqrt {c}}-\frac {b^{2} c}{x}-\frac {a^{2}}{x}-\frac {2 \sqrt {d x +c}\, a b}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.97, size = 73, normalized size = 1.35 \[ {\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 \]

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

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 131, normalized size = 2.43 \[ 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 ) \]

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))

________________________________________________________________________________________

sympy [B]  time = 87.77, size = 139, normalized size = 2.57 \[ - \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 {\relax (x )} \]

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)

________________________________________________________________________________________