Optimal. Leaf size=27 \[ x \sec ^{-1}\left (\frac {x}{a}\right )-a \tanh ^{-1}\left (\sqrt {1-\frac {a^2}{x^2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.833, Rules used = {4833, 5214, 266, 63, 208} \[ x \sec ^{-1}\left (\frac {x}{a}\right )-a \tanh ^{-1}\left (\sqrt {1-\frac {a^2}{x^2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 208
Rule 266
Rule 4833
Rule 5214
Rubi steps
\begin {align*} \int \cos ^{-1}\left (\frac {a}{x}\right ) \, dx &=\int \sec ^{-1}\left (\frac {x}{a}\right ) \, dx\\ &=x \sec ^{-1}\left (\frac {x}{a}\right )-a \int \frac {1}{\sqrt {1-\frac {a^2}{x^2}} x} \, dx\\ &=x \sec ^{-1}\left (\frac {x}{a}\right )+\frac {1}{2} a \operatorname {Subst}\left (\int \frac {1}{x \sqrt {1-a^2 x}} \, dx,x,\frac {1}{x^2}\right )\\ &=x \sec ^{-1}\left (\frac {x}{a}\right )-\frac {\operatorname {Subst}\left (\int \frac {1}{\frac {1}{a^2}-\frac {x^2}{a^2}} \, dx,x,\sqrt {1-\frac {a^2}{x^2}}\right )}{a}\\ &=x \sec ^{-1}\left (\frac {x}{a}\right )-a \tanh ^{-1}\left (\sqrt {1-\frac {a^2}{x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.11, size = 84, normalized size = 3.11 \[ x \cos ^{-1}\left (\frac {a}{x}\right )-\frac {a \sqrt {x^2-a^2} \left (\log \left (\frac {x}{\sqrt {x^2-a^2}}+1\right )-\log \left (1-\frac {x}{\sqrt {x^2-a^2}}\right )\right )}{2 x \sqrt {1-\frac {a^2}{x^2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.48, size = 65, normalized size = 2.41 \[ {\left (x - 1\right )} \arccos \left (\frac {a}{x}\right ) + a \log \left (x \sqrt {-\frac {a^{2} - x^{2}}{x^{2}}} - x\right ) + 2 \, \arctan \left (\frac {x \sqrt {-\frac {a^{2} - x^{2}}{x^{2}}} - x}{a}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 55, normalized size = 2.04 \[ -\frac {a^{2} {\left (\log \left (\sqrt {-\frac {a^{2}}{x^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {a^{2}}{x^{2}} + 1} + 1\right )\right )} - 2 \, a x \arccos \left (\frac {a}{x}\right )}{2 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 30, normalized size = 1.11 \[ -a \left (-\frac {x \arccos \left (\frac {a}{x}\right )}{a}+\arctanh \left (\frac {1}{\sqrt {1-\frac {a^{2}}{x^{2}}}}\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 45, normalized size = 1.67 \[ -\frac {1}{2} \, a {\left (\log \left (\sqrt {-\frac {a^{2}}{x^{2}} + 1} + 1\right ) - \log \left (\sqrt {-\frac {a^{2}}{x^{2}} + 1} - 1\right )\right )} + x \arccos \left (\frac {a}{x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.57, size = 28, normalized size = 1.04 \[ x\,\mathrm {acos}\left (\frac {a}{x}\right )-a\,\mathrm {sign}\relax (x)\,\ln \left (x+\sqrt {x^2-a^2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.71, size = 27, normalized size = 1.00 \[ - a \left (\begin {cases} \operatorname {acosh}{\left (\frac {x}{a} \right )} & \text {for}\: \left |{\frac {x^{2}}{a^{2}}}\right | > 1 \\- i \operatorname {asin}{\left (\frac {x}{a} \right )} & \text {otherwise} \end {cases}\right ) + x \operatorname {acos}{\left (\frac {a}{x} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________