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

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 14 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=\text {arctanh}\left (\frac {x}{\sqrt {a^2+x^2}}\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {223, 212} \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=\text {arctanh}\left (\frac {x}{\sqrt {a^2+x^2}}\right ) \]

[In]

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

[Out]

ArcTanh[x/Sqrt[a^2 + x^2]]

Rule 212

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

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(42\) vs. \(2(14)=28\).

Time = 0.00 (sec) , antiderivative size = 42, normalized size of antiderivative = 3.00 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=-\frac {1}{2} \log \left (1-\frac {x}{\sqrt {a^2+x^2}}\right )+\frac {1}{2} \log \left (1+\frac {x}{\sqrt {a^2+x^2}}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.93

method result size
default \(\ln \left (x +\sqrt {a^{2}+x^{2}}\right )\) \(13\)
pseudoelliptic \(\operatorname {arctanh}\left (\frac {\sqrt {a^{2}+x^{2}}}{x}\right )\) \(15\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.14 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=-\log \left (-x + \sqrt {a^{2} + x^{2}}\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.52 (sec) , antiderivative size = 3, normalized size of antiderivative = 0.21 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=\operatorname {asinh}{\left (\frac {x}{a} \right )} \]

[In]

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

[Out]

asinh(x/a)

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 6, normalized size of antiderivative = 0.43 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=\operatorname {arsinh}\left (\frac {x}{a}\right ) \]

[In]

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

[Out]

arcsinh(x/a)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (12) = 24\).

Time = 0.28 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.29 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=-\frac {1}{2} \, a^{2} \log \left (-x + \sqrt {a^{2} + x^{2}}\right ) + \frac {1}{2} \, \sqrt {a^{2} + x^{2}} x \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int \frac {1}{\sqrt {a^2+x^2}} \, dx=\ln \left (x+\sqrt {a^2+x^2}\right ) \]

[In]

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

[Out]

log(x + (a^2 + x^2)^(1/2))