3.1.12 \(\int \sec ^{-1}(\frac {a}{x}) \, dx\) [12]

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

[Out]

x*arccos(x/a)-a*(1-x^2/a^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5372, 4716, 267} \begin {gather*} x \text {ArcCos}\left (\frac {x}{a}\right )-a \sqrt {1-\frac {x^2}{a^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcSec[a/x],x]

[Out]

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

Rule 267

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

Rule 4716

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + b*ArcCos[c*x])^n, x] + Dist[b*c*n, Int[
x*((a + b*ArcCos[c*x])^(n - 1)/Sqrt[1 - c^2*x^2]), x], x] /; FreeQ[{a, b, c}, x] && GtQ[n, 0]

Rule 5372

Int[ArcSec[(c_.)/((a_.) + (b_.)*(x_)^(n_.))]^(m_.)*(u_.), x_Symbol] :> Int[u*ArcCos[a/c + b*(x^n/c)]^m, x] /;
FreeQ[{a, b, c, n, m}, x]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[ArcSec[a/x],x]

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(50\) vs. \(2(24)=48\).
time = 0.72, size = 51, normalized size = 1.96

method result size
derivativedivides \(-a \left (-\frac {x \,\mathrm {arcsec}\left (\frac {a}{x}\right )}{a}+\frac {x^{2} \left (\frac {a^{2}}{x^{2}}-1\right )}{\sqrt {\frac {\left (\frac {a^{2}}{x^{2}}-1\right ) x^{2}}{a^{2}}}\, a^{2}}\right )\) \(51\)
default \(-a \left (-\frac {x \,\mathrm {arcsec}\left (\frac {a}{x}\right )}{a}+\frac {x^{2} \left (\frac {a^{2}}{x^{2}}-1\right )}{\sqrt {\frac {\left (\frac {a^{2}}{x^{2}}-1\right ) x^{2}}{a^{2}}}\, a^{2}}\right )\) \(51\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arcsec(a/x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 24, normalized size = 0.92 \begin {gather*} x \operatorname {arcsec}\left (\frac {a}{x}\right ) - a \sqrt {-\frac {x^{2}}{a^{2}} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arcsec(a/x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 2.28, size = 27, normalized size = 1.04 \begin {gather*} x \operatorname {arcsec}\left (\frac {a}{x}\right ) - x \sqrt {\frac {a^{2} - x^{2}}{x^{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arcsec(a/x),x, algorithm="fricas")

[Out]

x*arcsec(a/x) - x*sqrt((a^2 - x^2)/x^2)

________________________________________________________________________________________

Sympy [A]
time = 0.10, size = 22, normalized size = 0.85 \begin {gather*} \begin {cases} - a \sqrt {1 - \frac {x^{2}}{a^{2}}} + x \operatorname {asec}{\left (\frac {a}{x} \right )} & \text {for}\: a \neq 0 \\\tilde {\infty } x & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(asec(a/x),x)

[Out]

Piecewise((-a*sqrt(1 - x**2/a**2) + x*asec(a/x), Ne(a, 0)), (zoo*x, True))

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 28, normalized size = 1.08 \begin {gather*} a {\left (\frac {x \arccos \left (\frac {x}{a}\right )}{a} - \sqrt {-\frac {x^{2}}{a^{2}} + 1}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arcsec(a/x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(acos(x/a),x)

[Out]

x*acos(x/a) - a*(1 - x^2/a^2)^(1/2)

________________________________________________________________________________________