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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0655491, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {371, 1398, 801, 635, 207, 260} \[ \log (x) \left (a^2+b^2 c\right )+4 a b \sqrt{c+d x}-4 a b \sqrt{c} \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )+b^2 d x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[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 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]

Rubi steps

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

Mathematica [A]  time = 0.166515, size = 79, normalized size = 1.39 \[ b \left (4 a \sqrt{c+d x}+b d x\right )+\left (a-b \sqrt{c}\right )^2 \log \left (\sqrt{c+d x}+\sqrt{c}\right )+\left (a+b \sqrt{c}\right )^2 \log \left (\sqrt{c}-\sqrt{c+d x}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 51, normalized size = 0.9 \begin{align*} \ln \left ( x \right ){b}^{2}c+{b}^{2}dx-4\,ab{\it Artanh} \left ({\frac{\sqrt{dx+c}}{\sqrt{c}}} \right ) \sqrt{c}+4\,ab\sqrt{dx+c}+\ln \left ( x \right ){a}^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.98312, size = 301, normalized size = 5.28 \begin{align*} \left [b^{2} d x + 2 \, a b \sqrt{c} \log \left (\frac{d x - 2 \, \sqrt{d x + c} \sqrt{c} + 2 \, c}{x}\right ) + 4 \, \sqrt{d x + c} a b +{\left (b^{2} c + a^{2}\right )} \log \left (x\right ), b^{2} d x + 4 \, a b \sqrt{-c} \arctan \left (\frac{\sqrt{d x + c} \sqrt{-c}}{c}\right ) + 4 \, \sqrt{d x + c} a b +{\left (b^{2} c + a^{2}\right )} \log \left (x\right )\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 18.6249, size = 65, normalized size = 1.14 \begin{align*} a^{2} \log{\left (x \right )} - 2 a b \left (- \frac{2 c \operatorname{atan}{\left (\frac{\sqrt{c + d x}}{\sqrt{- c}} \right )}}{\sqrt{- c}} - 2 \sqrt{c + d x}\right ) + b^{2} c \log{\left (x \right )} + b^{2} d x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.18772, size = 105, normalized size = 1.84 \begin{align*} -b^{2} c \log \left (-c\right ) + \frac{4 \, a b c \arctan \left (\frac{\sqrt{d x + c}}{\sqrt{-c}}\right )}{\sqrt{-c}} +{\left (d x + c\right )} b^{2} - a^{2} \log \left (-c\right ) + 4 \, \sqrt{d x + c} a b +{\left (b^{2} c + a^{2}\right )} \log \left (d x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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