\(\int x^2 \cot ^{-1}(a x) \, dx\) [4]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 39 \[ \int x^2 \cot ^{-1}(a x) \, dx=\frac {x^2}{6 a}+\frac {1}{3} x^3 \cot ^{-1}(a x)-\frac {\log \left (1+a^2 x^2\right )}{6 a^3} \]

[Out]

1/6*x^2/a+1/3*x^3*arccot(a*x)-1/6*ln(a^2*x^2+1)/a^3

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {4947, 272, 45} \[ \int x^2 \cot ^{-1}(a x) \, dx=-\frac {\log \left (a^2 x^2+1\right )}{6 a^3}+\frac {1}{3} x^3 \cot ^{-1}(a x)+\frac {x^2}{6 a} \]

[In]

Int[x^2*ArcCot[a*x],x]

[Out]

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

Rule 45

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

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 4947

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

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} x^3 \cot ^{-1}(a x)+\frac {1}{3} a \int \frac {x^3}{1+a^2 x^2} \, dx \\ & = \frac {1}{3} x^3 \cot ^{-1}(a x)+\frac {1}{6} a \text {Subst}\left (\int \frac {x}{1+a^2 x} \, dx,x,x^2\right ) \\ & = \frac {1}{3} x^3 \cot ^{-1}(a x)+\frac {1}{6} a \text {Subst}\left (\int \left (\frac {1}{a^2}-\frac {1}{a^2 \left (1+a^2 x\right )}\right ) \, dx,x,x^2\right ) \\ & = \frac {x^2}{6 a}+\frac {1}{3} x^3 \cot ^{-1}(a x)-\frac {\log \left (1+a^2 x^2\right )}{6 a^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00 \[ \int x^2 \cot ^{-1}(a x) \, dx=\frac {x^2}{6 a}+\frac {1}{3} x^3 \cot ^{-1}(a x)-\frac {\log \left (1+a^2 x^2\right )}{6 a^3} \]

[In]

Integrate[x^2*ArcCot[a*x],x]

[Out]

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

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.95

method result size
parallelrisch \(-\frac {-2 a^{3} x^{3} \operatorname {arccot}\left (a x \right )-a^{2} x^{2}+\ln \left (a^{2} x^{2}+1\right )}{6 a^{3}}\) \(37\)
derivativedivides \(\frac {\frac {a^{3} x^{3} \operatorname {arccot}\left (a x \right )}{3}+\frac {a^{2} x^{2}}{6}-\frac {\ln \left (a^{2} x^{2}+1\right )}{6}}{a^{3}}\) \(38\)
default \(\frac {\frac {a^{3} x^{3} \operatorname {arccot}\left (a x \right )}{3}+\frac {a^{2} x^{2}}{6}-\frac {\ln \left (a^{2} x^{2}+1\right )}{6}}{a^{3}}\) \(38\)
parts \(\frac {x^{3} \operatorname {arccot}\left (a x \right )}{3}+\frac {a \left (\frac {x^{2}}{2 a^{2}}-\frac {\ln \left (a^{2} x^{2}+1\right )}{2 a^{4}}\right )}{3}\) \(38\)
risch \(\frac {i x^{3} \ln \left (i a x +1\right )}{6}-\frac {i x^{3} \ln \left (-i a x +1\right )}{6}+\frac {\pi \,x^{3}}{6}+\frac {x^{2}}{6 a}-\frac {\ln \left (-a^{2} x^{2}-1\right )}{6 a^{3}}\) \(60\)

[In]

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

[Out]

-1/6*(-2*a^3*x^3*arccot(a*x)-a^2*x^2+ln(a^2*x^2+1))/a^3

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.95 \[ \int x^2 \cot ^{-1}(a x) \, dx=\frac {2 \, a^{3} x^{3} \operatorname {arccot}\left (a x\right ) + a^{2} x^{2} - \log \left (a^{2} x^{2} + 1\right )}{6 \, a^{3}} \]

[In]

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

[Out]

1/6*(2*a^3*x^3*arccot(a*x) + a^2*x^2 - log(a^2*x^2 + 1))/a^3

Sympy [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.95 \[ \int x^2 \cot ^{-1}(a x) \, dx=\begin {cases} \frac {x^{3} \operatorname {acot}{\left (a x \right )}}{3} + \frac {x^{2}}{6 a} - \frac {\log {\left (a^{2} x^{2} + 1 \right )}}{6 a^{3}} & \text {for}\: a \neq 0 \\\frac {\pi x^{3}}{6} & \text {otherwise} \end {cases} \]

[In]

integrate(x**2*acot(a*x),x)

[Out]

Piecewise((x**3*acot(a*x)/3 + x**2/(6*a) - log(a**2*x**2 + 1)/(6*a**3), Ne(a, 0)), (pi*x**3/6, True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int x^2 \cot ^{-1}(a x) \, dx=\frac {1}{3} \, x^{3} \operatorname {arccot}\left (a x\right ) + \frac {1}{6} \, a {\left (\frac {x^{2}}{a^{2}} - \frac {\log \left (a^{2} x^{2} + 1\right )}{a^{4}}\right )} \]

[In]

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

[Out]

1/3*x^3*arccot(a*x) + 1/6*a*(x^2/a^2 - log(a^2*x^2 + 1)/a^4)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.64 \[ \int x^2 \cot ^{-1}(a x) \, dx=\frac {1}{6} \, {\left (\frac {2 \, x^{3} \arctan \left (\frac {1}{a x}\right )}{a} - \frac {x^{2} {\left (\frac {1}{a^{2} x^{2}} - 1\right )}}{a^{2}} - \frac {\log \left (\frac {1}{a^{2} x^{2}} + 1\right )}{a^{4}} + \frac {\log \left (\frac {1}{a^{2} x^{2}}\right )}{a^{4}}\right )} a \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.81 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.26 \[ \int x^2 \cot ^{-1}(a x) \, dx=\left \{\begin {array}{cl} \frac {\pi \,x^3}{6} & \text {\ if\ \ }a=0\\ \frac {\frac {x^2}{2}-\frac {\ln \left (a^2\,x^2+1\right )}{2\,a^2}}{3\,a}+\frac {x^3\,\mathrm {acot}\left (a\,x\right )}{3} & \text {\ if\ \ }a\neq 0 \end {array}\right . \]

[In]

int(x^2*acot(a*x),x)

[Out]

piecewise(a == 0, (x^3*pi)/6, a ~= 0, (x^2/2 - log(a^2*x^2 + 1)/(2*a^2))/(3*a) + (x^3*acot(a*x))/3)