3.10 \(\int x^2 \sec ^{-1}(\frac{a}{x}) \, dx\)

Optimal. Leaf size=56 \[ \frac{1}{9} a^3 \left (1-\frac{x^2}{a^2}\right )^{3/2}-\frac{1}{3} a^3 \sqrt{1-\frac{x^2}{a^2}}+\frac{1}{3} x^3 \cos ^{-1}\left (\frac{x}{a}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0424593, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {5264, 4628, 266, 43} \[ \frac{1}{9} a^3 \left (1-\frac{x^2}{a^2}\right )^{3/2}-\frac{1}{3} a^3 \sqrt{1-\frac{x^2}{a^2}}+\frac{1}{3} x^3 \cos ^{-1}\left (\frac{x}{a}\right ) \]

Antiderivative was successfully verified.

[In]

Int[x^2*ArcSec[a/x],x]

[Out]

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

Rule 5264

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]

Rule 4628

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

Rule 266

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]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

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

Mathematica [A]  time = 0.0387233, size = 42, normalized size = 0.75 \[ \frac{1}{3} x^3 \sec ^{-1}\left (\frac{a}{x}\right )-\frac{1}{9} a \left (2 a^2+x^2\right ) \sqrt{1-\frac{x^2}{a^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*ArcSec[a/x],x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.175, size = 66, normalized size = 1.2 \begin{align*} -{a}^{3} \left ( -{\frac{{x}^{3}}{3\,{a}^{3}}{\rm arcsec} \left ({\frac{a}{x}}\right )}+{\frac{{x}^{4}}{9\,{a}^{4}} \left ( -1+{\frac{{a}^{2}}{{x}^{2}}} \right ) \left ( 2\,{\frac{{a}^{2}}{{x}^{2}}}+1 \right ){\frac{1}{\sqrt{{\frac{{x}^{2}}{{a}^{2}} \left ( -1+{\frac{{a}^{2}}{{x}^{2}}} \right ) }}}}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*arcsec(a/x),x)

[Out]

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

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.46903, size = 88, normalized size = 1.57 \begin{align*} \frac{1}{3} \, x^{3} \operatorname{arcsec}\left (\frac{a}{x}\right ) - \frac{1}{9} \,{\left (2 \, a^{2} x + x^{3}\right )} \sqrt{\frac{a^{2} - x^{2}}{x^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*asec(a/x),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.08763, size = 63, normalized size = 1.12 \begin{align*} \frac{1}{3} \, x^{3} \arccos \left (\frac{x}{a}\right ) - \frac{2}{9} \, a^{3} \sqrt{-\frac{x^{2}}{a^{2}} + 1} - \frac{1}{9} \, a x^{2} \sqrt{-\frac{x^{2}}{a^{2}} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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