\(\int x^2 \arccos (\frac {a}{x}) \, dx\) [53]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 10, antiderivative size = 58 \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=-\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 \text {arctanh}\left (\sqrt {1-\frac {a^2}{x^2}}\right ) \]

[Out]

1/3*x^3*arcsec(x/a)-1/6*a^3*arctanh((1-a^2/x^2)^(1/2))-1/6*a*x^2*(1-a^2/x^2)^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {4917, 5328, 272, 44, 65, 214} \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=-\frac {1}{6} a x^2 \sqrt {1-\frac {a^2}{x^2}}-\frac {1}{6} a^3 \text {arctanh}\left (\sqrt {1-\frac {a^2}{x^2}}\right )+\frac {1}{3} x^3 \sec ^{-1}\left (\frac {x}{a}\right ) \]

[In]

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

[Out]

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

Rule 44

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

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 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

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

Rule 4917

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

Rule 5328

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

Rubi steps \begin{align*} \text {integral}& = \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 \text {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 \text {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 \text {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 \text {arctanh}\left (\sqrt {1-\frac {a^2}{x^2}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.05 \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=\frac {1}{3} x^3 \arccos \left (\frac {a}{x}\right )-\frac {1}{6} a \left (\sqrt {1-\frac {a^2}{x^2}} x^2+a^2 \log \left (\left (1+\sqrt {1-\frac {a^2}{x^2}}\right ) x\right )\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.97

method result size
derivativedivides \(-a^{3} \left (-\frac {x^{3} \arccos \left (\frac {a}{x}\right )}{3 a^{3}}+\frac {x^{2} \sqrt {1-\frac {a^{2}}{x^{2}}}}{6 a^{2}}+\frac {\operatorname {arctanh}\left (\frac {1}{\sqrt {1-\frac {a^{2}}{x^{2}}}}\right )}{6}\right )\) \(56\)
default \(-a^{3} \left (-\frac {x^{3} \arccos \left (\frac {a}{x}\right )}{3 a^{3}}+\frac {x^{2} \sqrt {1-\frac {a^{2}}{x^{2}}}}{6 a^{2}}+\frac {\operatorname {arctanh}\left (\frac {1}{\sqrt {1-\frac {a^{2}}{x^{2}}}}\right )}{6}\right )\) \(56\)
parts \(\frac {x^{3} \arccos \left (\frac {a}{x}\right )}{3}-\frac {a \sqrt {-a^{2}+x^{2}}\, \left (a^{2} \ln \left (x +\sqrt {-a^{2}+x^{2}}\right )+x \sqrt {-a^{2}+x^{2}}\right )}{6 \sqrt {-\frac {a^{2}-x^{2}}{x^{2}}}\, x}\) \(78\)

[In]

int(x^2*arccos(a/x),x,method=_RETURNVERBOSE)

[Out]

-a^3*(-1/3/a^3*x^3*arccos(a/x)+1/6/a^2*x^2*(1-a^2/x^2)^(1/2)+1/6*arctanh(1/(1-a^2/x^2)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.60 \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=\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 ) \]

[In]

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

[Out]

1/6*a^3*log(x*sqrt(-(a^2 - x^2)/x^2) - x) - 1/6*a*x^2*sqrt(-(a^2 - x^2)/x^2) + 1/3*(x^3 - 1)*arccos(a/x) + 2/3
*arctan((x*sqrt(-(a^2 - x^2)/x^2) - x)/a)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.86 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.64 \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=- \frac {a \left (\begin {cases} \frac {a^{2} \operatorname {acosh}{\left (\frac {x}{a} \right )}}{2} - \frac {a x}{2 \sqrt {-1 + \frac {x^{2}}{a^{2}}}} + \frac {x^{3}}{2 a \sqrt {-1 + \frac {x^{2}}{a^{2}}}} & \text {for}\: \left |{\frac {x^{2}}{a^{2}}}\right | > 1 \\- \frac {i a^{2} \operatorname {asin}{\left (\frac {x}{a} \right )}}{2} + \frac {i a x \sqrt {1 - \frac {x^{2}}{a^{2}}}}{2} & \text {otherwise} \end {cases}\right )}{3} + \frac {x^{3} \operatorname {acos}{\left (\frac {a}{x} \right )}}{3} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.24 \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=\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 \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.33 \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=-\frac {a^{4} {\left (\frac {2 \, x^{2} \sqrt {-\frac {a^{2}}{x^{2}} + 1}}{a^{2}} + \log \left (\sqrt {-\frac {a^{2}}{x^{2}} + 1} + 1\right ) - \log \left (-\sqrt {-\frac {a^{2}}{x^{2}} + 1} + 1\right )\right )} - 4 \, a x^{3} \arccos \left (\frac {a}{x}\right )}{12 \, a} \]

[In]

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

[Out]

-1/12*(a^4*(2*x^2*sqrt(-a^2/x^2 + 1)/a^2 + log(sqrt(-a^2/x^2 + 1) + 1) - log(-sqrt(-a^2/x^2 + 1) + 1)) - 4*a*x
^3*arccos(a/x))/a

Mupad [F(-1)]

Timed out. \[ \int x^2 \arccos \left (\frac {a}{x}\right ) \, dx=\int x^2\,\mathrm {acos}\left (\frac {a}{x}\right ) \,d x \]

[In]

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

[Out]

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