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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {272, 65, 209} \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {x^2-a^2}}{a}\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[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 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[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 {\tan ^{-1}\left (\frac {\sqrt {-a^2+x^2}}{a}\right )}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 22, normalized size = 1.00 \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {-a^2+x^2}}{a}\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[Sqrt[-a^2 + x^2]/a]/a

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 2.36, size = 35, normalized size = 1.59 \begin {gather*} \text {Piecewise}\left [\left \{\left \{\frac {I \text {ArcCosh}\left [\frac {a}{x}\right ]}{a},\text {Abs}\left [\frac {a^2}{x^2}\right ]>1\right \}\right \},-\frac {\text {ArcSin}\left [\frac {a}{x}\right ]}{a}\right ] \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[1/(x*Sqrt[x^2 - a^2]),x]')

[Out]

Piecewise[{{I ArcCosh[a / x] / a, Abs[a ^ 2 / x ^ 2] > 1}}, -ArcSin[a / x] / a]

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 41, normalized size = 1.86

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}}}\) \(41\)

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 = 0.35, size = 12, normalized size = 0.55 \begin {gather*} -\frac {\arcsin \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]

-arcsin(a/abs(x))/a

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 26, normalized size = 1.18 \begin {gather*} \frac {2 \, \arctan \left (-\frac {x - \sqrt {-a^{2} + x^{2}}}{a}\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]

2*arctan(-(x - sqrt(-a^2 + x^2))/a)/a

________________________________________________________________________________________

Sympy [A]
time = 0.46, size = 22, normalized size = 1.00 \begin {gather*} \begin {cases} \frac {i \operatorname {acosh}{\left (\frac {a}{x} \right )}}{a} & \text {for}\: \left |{\frac {a^{2}}{x^{2}}}\right | > 1 \\- \frac {\operatorname {asin}{\left (\frac {a}{x} \right )}}{a} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((I*acosh(a/x)/a, Abs(a**2/x**2) > 1), (-asin(a/x)/a, True))

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 23, normalized size = 1.05 \begin {gather*} \frac {\frac {1}{2}\cdot 2 \arctan \left (\frac {\sqrt {-a^{2}+x^{2}}}{a}\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]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________