Optimal. Leaf size=58 \[ -\frac{1}{6} a x^2 \sqrt{1-\frac{a^2}{x^2}}-\frac{1}{6} a^3 \tanh ^{-1}\left (\sqrt{1-\frac{a^2}{x^2}}\right )+\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.036197, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.6, Rules used = {4833, 5220, 266, 51, 63, 208} \[ -\frac{1}{6} a x^2 \sqrt{1-\frac{a^2}{x^2}}-\frac{1}{6} a^3 \tanh ^{-1}\left (\sqrt{1-\frac{a^2}{x^2}}\right )+\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4833
Rule 5220
Rule 266
Rule 51
Rule 63
Rule 208
Rubi steps
\begin{align*} \int x^2 \cos ^{-1}\left (\frac{a}{x}\right ) \, dx &=\int x^2 \sec ^{-1}\left (\frac{x}{a}\right ) \, dx\\ &=\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right )-\frac{1}{3} a \int \frac{x}{\sqrt{1-\frac{a^2}{x^2}}} \, dx\\ &=\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right )+\frac{1}{6} a \operatorname{Subst}\left (\int \frac{1}{x^2 \sqrt{1-a^2 x}} \, dx,x,\frac{1}{x^2}\right )\\ &=-\frac{1}{6} a \sqrt{1-\frac{a^2}{x^2}} x^2+\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right )+\frac{1}{12} a^3 \operatorname{Subst}\left (\int \frac{1}{x \sqrt{1-a^2 x}} \, dx,x,\frac{1}{x^2}\right )\\ &=-\frac{1}{6} a \sqrt{1-\frac{a^2}{x^2}} x^2+\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right )-\frac{1}{6} a \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 )\\ &=-\frac{1}{6} a \sqrt{1-\frac{a^2}{x^2}} x^2+\frac{1}{3} x^3 \sec ^{-1}\left (\frac{x}{a}\right )-\frac{1}{6} a^3 \tanh ^{-1}\left (\sqrt{1-\frac{a^2}{x^2}}\right )\\ \end{align*}
Mathematica [A] time = 0.0505763, size = 61, normalized size = 1.05 \[ \frac{1}{3} x^3 \cos ^{-1}\left (\frac{a}{x}\right )-\frac{1}{6} a \left (x^2 \sqrt{1-\frac{a^2}{x^2}}+a^2 \log \left (x \left (\sqrt{1-\frac{a^2}{x^2}}+1\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.01, size = 56, normalized size = 1. \begin{align*} -{a}^{3} \left ( -{\frac{{x}^{3}}{3\,{a}^{3}}\arccos \left ({\frac{a}{x}} \right ) }+{\frac{{x}^{2}}{6\,{a}^{2}}\sqrt{1-{\frac{{a}^{2}}{{x}^{2}}}}}+{\frac{1}{6}{\it Artanh} \left ({\frac{1}{\sqrt{1-{\frac{{a}^{2}}{{x}^{2}}}}}} \right ) } \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.46236, size = 97, normalized size = 1.67 \begin{align*} \frac{1}{3} \, x^{3} \arccos \left (\frac{a}{x}\right ) - \frac{1}{12} \,{\left (a^{2} \log \left (\sqrt{-\frac{a^{2}}{x^{2}} + 1} + 1\right ) - a^{2} \log \left (\sqrt{-\frac{a^{2}}{x^{2}} + 1} - 1\right ) + 2 \, x^{2} \sqrt{-\frac{a^{2}}{x^{2}} + 1}\right )} a \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.53943, size = 207, normalized size = 3.57 \begin{align*} \frac{1}{6} \, a^{3} \log \left (x \sqrt{-\frac{a^{2} - x^{2}}{x^{2}}} - x\right ) - \frac{1}{6} \, a x^{2} \sqrt{-\frac{a^{2} - x^{2}}{x^{2}}} + \frac{1}{3} \,{\left (x^{3} - 1\right )} \arccos \left (\frac{a}{x}\right ) + \frac{2}{3} \, \arctan \left (\frac{x \sqrt{-\frac{a^{2} - x^{2}}{x^{2}}} - x}{a}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] time = 5.29622, size = 99, normalized size = 1.71 \begin{align*} - \frac{a \left (\begin{cases} \frac{a^{2} \operatorname{acosh}{\left (\frac{x}{a} \right )}}{2} + \frac{a x \sqrt{-1 + \frac{x^{2}}{a^{2}}}}{2} & \text{for}\: \frac{\left |{x^{2}}\right |}{\left |{a^{2}}\right |} > 1 \\- \frac{i a^{2} \operatorname{asin}{\left (\frac{x}{a} \right )}}{2} + \frac{i a x}{2 \sqrt{1 - \frac{x^{2}}{a^{2}}}} - \frac{i x^{3}}{2 a \sqrt{1 - \frac{x^{2}}{a^{2}}}} & \text{otherwise} \end{cases}\right )}{3} + \frac{x^{3} \operatorname{acos}{\left (\frac{a}{x} \right )}}{3} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.29039, size = 95, normalized size = 1.64 \begin{align*} \frac{1}{3} \, x^{3} \arccos \left (\frac{a}{x}\right ) - \frac{1}{12} \,{\left (a^{2} \log \left (a^{2}\right ) \mathrm{sgn}\left (x\right ) - \frac{2 \, a^{2} \log \left ({\left | -x + \sqrt{-a^{2} + x^{2}} \right |}\right )}{\mathrm{sgn}\left (x\right )} + \frac{2 \, \sqrt{-a^{2} + x^{2}} x}{\mathrm{sgn}\left (x\right )}\right )} a \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]