### 3.186 $$\int \frac{1}{x \sqrt{a^2+2 a b x+b^2 x^2}} \, dx$$

Optimal. Leaf size=68 $\frac{\log (x) (a+b x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{(a+b x) \log (a+b x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0215129, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.167, Rules used = {646, 36, 29, 31} $\frac{\log (x) (a+b x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{(a+b x) \log (a+b x)}{a \sqrt{a^2+2 a b x+b^2 x^2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 646

Int[((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(a + b*x + c*x^2)^Fra
cPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b,
c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && NeQ[2*c*d - b*e, 0]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rubi steps

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

Mathematica [A]  time = 0.0097142, size = 31, normalized size = 0.46 $\frac{(a+b x) (\log (x)-\log (a+b x))}{a \sqrt{(a+b x)^2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.194, size = 30, normalized size = 0.4 \begin{align*}{\frac{ \left ( bx+a \right ) \left ( \ln \left ( x \right ) -\ln \left ( bx+a \right ) \right ) }{a}{\frac{1}{\sqrt{ \left ( bx+a \right ) ^{2}}}}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.65685, size = 38, normalized size = 0.56 \begin{align*} -\frac{\log \left (b x + a\right ) - \log \left (x\right )}{a} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(log(b*x + a) - log(x))/a

________________________________________________________________________________________

Sympy [A]  time = 0.532106, size = 10, normalized size = 0.15 \begin{align*} \frac{\log{\left (x \right )} - \log{\left (\frac{a}{b} + x \right )}}{a} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(log(x) - log(a/b + x))/a

________________________________________________________________________________________

Giac [A]  time = 1.27777, size = 38, normalized size = 0.56 \begin{align*} -{\left (\frac{\log \left ({\left | b x + a \right |}\right )}{a} - \frac{\log \left ({\left | x \right |}\right )}{a}\right )} \mathrm{sgn}\left (b x + a\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(log(abs(b*x + a))/a - log(abs(x))/a)*sgn(b*x + a)