3.1.53 \(\int \frac {1}{x \sqrt {a^2+x^2}} \, dx\) [53]

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

[Out]

-arctanh((a^2+x^2)^(1/2)/a)/a

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {272, 65, 213} \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\sqrt {a^2+x^2}}{a}\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-(ArcTanh[Sqrt[a^2 + x^2]/a]/a)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, 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 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(49\) vs. \(2(21)=42\).
time = 0.03, size = 49, normalized size = 2.33 \begin {gather*} -\frac {\log \left (a+\sqrt {a^2+x^2}\right )}{2 a}+\frac {\log \left (-a^2+a \sqrt {a^2+x^2}\right )}{2 a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 35, normalized size = 1.67

method result size
default \(-\frac {\ln \left (\frac {2 a^{2}+2 \sqrt {a^{2}}\, \sqrt {a^{2}+x^{2}}}{x}\right )}{\sqrt {a^{2}}}\) \(35\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x/(a^2+x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 1.96, size = 12, normalized size = 0.57 \begin {gather*} -\frac {\operatorname {arsinh}\left (\frac {a}{{\left | x \right |}}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arcsinh(a/abs(x))/a

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (19) = 38\).
time = 0.74, size = 40, normalized size = 1.90 \begin {gather*} -\frac {\log \left (a - x + \sqrt {a^{2} + x^{2}}\right ) - \log \left (-a - x + \sqrt {a^{2} + x^{2}}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(log(a - x + sqrt(a^2 + x^2)) - log(-a - x + sqrt(a^2 + x^2)))/a

________________________________________________________________________________________

Sympy [A]
time = 0.43, size = 7, normalized size = 0.33 \begin {gather*} - \frac {\operatorname {asinh}{\left (\frac {a}{x} \right )}}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-asinh(a/x)/a

________________________________________________________________________________________

Giac [A]
time = 0.88, size = 37, normalized size = 1.76 \begin {gather*} -\frac {\log \left (a + \sqrt {a^{2} + x^{2}}\right )}{2 \, a} + \frac {\log \left (-a + \sqrt {a^{2} + x^{2}}\right )}{2 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*log(a + sqrt(a^2 + x^2))/a + 1/2*log(-a + sqrt(a^2 + x^2))/a

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 26, normalized size = 1.24 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {a^2+x^2}}{\sqrt {-a^2}}\right )}{\sqrt {-a^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan((a^2 + x^2)^(1/2)/(-a^2)^(1/2))/(-a^2)^(1/2)

________________________________________________________________________________________