\(\int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx\) [23]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 13, antiderivative size = 67 \[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\frac {x}{2}+\frac {1}{2} x^2 \cot ^{-1}(x)-\frac {1}{2} i \cot ^{-1}(x)^2-\frac {\arctan (x)}{2}+\cot ^{-1}(x) \log \left (\frac {2}{1+i x}\right )-\frac {1}{2} i \operatorname {PolyLog}\left (2,1-\frac {2}{1+i x}\right ) \] Output:

1/2*x+1/2*x^2*arccot(x)-1/2*I*arccot(x)^2-1/2*arctan(x)+arccot(x)*ln(2/(1+ 
I*x))-1/2*I*polylog(2,1-2/(1+I*x))
 

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.76 \[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\frac {1}{2} \left (x-i \cot ^{-1}(x)^2+\cot ^{-1}(x) \left (1+x^2+2 \log \left (1-e^{2 i \cot ^{-1}(x)}\right )\right )-i \operatorname {PolyLog}\left (2,e^{2 i \cot ^{-1}(x)}\right )\right ) \] Input:

Integrate[(x^3*ArcCot[x])/(1 + x^2),x]
 

Output:

(x - I*ArcCot[x]^2 + ArcCot[x]*(1 + x^2 + 2*Log[1 - E^((2*I)*ArcCot[x])]) 
- I*PolyLog[2, E^((2*I)*ArcCot[x])])/2
 

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.99, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {5452, 5362, 262, 216, 5456, 5380, 2849, 2752}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^3 \cot ^{-1}(x)}{x^2+1} \, dx\)

\(\Big \downarrow \) 5452

\(\displaystyle \int x \cot ^{-1}(x)dx-\int \frac {x \cot ^{-1}(x)}{x^2+1}dx\)

\(\Big \downarrow \) 5362

\(\displaystyle \frac {1}{2} \int \frac {x^2}{x^2+1}dx-\int \frac {x \cot ^{-1}(x)}{x^2+1}dx+\frac {1}{2} x^2 \cot ^{-1}(x)\)

\(\Big \downarrow \) 262

\(\displaystyle \frac {1}{2} \left (x-\int \frac {1}{x^2+1}dx\right )-\int \frac {x \cot ^{-1}(x)}{x^2+1}dx+\frac {1}{2} x^2 \cot ^{-1}(x)\)

\(\Big \downarrow \) 216

\(\displaystyle -\int \frac {x \cot ^{-1}(x)}{x^2+1}dx+\frac {1}{2} (x-\arctan (x))+\frac {1}{2} x^2 \cot ^{-1}(x)\)

\(\Big \downarrow \) 5456

\(\displaystyle \int \frac {\cot ^{-1}(x)}{i-x}dx+\frac {1}{2} (x-\arctan (x))+\frac {1}{2} x^2 \cot ^{-1}(x)-\frac {1}{2} i \cot ^{-1}(x)^2\)

\(\Big \downarrow \) 5380

\(\displaystyle \int \frac {\log \left (\frac {2}{i x+1}\right )}{x^2+1}dx+\frac {1}{2} (x-\arctan (x))+\frac {1}{2} x^2 \cot ^{-1}(x)-\frac {1}{2} i \cot ^{-1}(x)^2+\log \left (\frac {2}{1+i x}\right ) \cot ^{-1}(x)\)

\(\Big \downarrow \) 2849

\(\displaystyle -i \int \frac {\log \left (\frac {2}{i x+1}\right )}{1-\frac {2}{i x+1}}d\frac {1}{i x+1}+\frac {1}{2} (x-\arctan (x))+\frac {1}{2} x^2 \cot ^{-1}(x)-\frac {1}{2} i \cot ^{-1}(x)^2+\log \left (\frac {2}{1+i x}\right ) \cot ^{-1}(x)\)

\(\Big \downarrow \) 2752

\(\displaystyle \frac {1}{2} (x-\arctan (x))-\frac {1}{2} i \operatorname {PolyLog}\left (2,1-\frac {2}{i x+1}\right )+\frac {1}{2} x^2 \cot ^{-1}(x)-\frac {1}{2} i \cot ^{-1}(x)^2+\log \left (\frac {2}{1+i x}\right ) \cot ^{-1}(x)\)

Input:

Int[(x^3*ArcCot[x])/(1 + x^2),x]
 

Output:

(x^2*ArcCot[x])/2 - (I/2)*ArcCot[x]^2 + (x - ArcTan[x])/2 + ArcCot[x]*Log[ 
2/(1 + I*x)] - (I/2)*PolyLog[2, 1 - 2/(1 + I*x)]
 

Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 262
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) 
^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ 
(b*(m + 2*p + 1)))   Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b 
, c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c 
, 2, m, p, x]
 

rule 2752
Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLo 
g[2, 1 - c*x], x] /; FreeQ[{c, d, e}, x] && EqQ[e + c*d, 0]
 

rule 2849
Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Simp 
[-e/g   Subst[Int[Log[2*d*x]/(1 - 2*d*x), x], x, 1/(d + e*x)], x] /; FreeQ[ 
{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]
 

rule 5362
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] + Simp[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]
 

rule 5380
Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] 
 :> Simp[(-(a + b*ArcCot[c*x])^p)*(Log[2/(1 + e*(x/d))]/e), x] - Simp[b*c*( 
p/e)   Int[(a + b*ArcCot[c*x])^(p - 1)*(Log[2/(1 + e*(x/d))]/(1 + c^2*x^2)) 
, x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0 
]
 

rule 5452
Int[(((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e 
_.)*(x_)^2), x_Symbol] :> Simp[f^2/e   Int[(f*x)^(m - 2)*(a + b*ArcCot[c*x] 
)^p, x], x] - Simp[d*(f^2/e)   Int[(f*x)^(m - 2)*((a + b*ArcCot[c*x])^p/(d 
+ e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]
 

rule 5456
Int[(((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), 
x_Symbol] :> Simp[I*((a + b*ArcCot[c*x])^(p + 1)/(b*e*(p + 1))), x] - Simp[ 
1/(c*d)   Int[(a + b*ArcCot[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b, c, d, 
 e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 125 vs. \(2 (53 ) = 106\).

Time = 0.86 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.88

method result size
default \(\frac {x^{2} \operatorname {arccot}\left (x \right )}{2}-\frac {\operatorname {arccot}\left (x \right ) \ln \left (x^{2}+1\right )}{2}+\frac {x}{2}-\frac {\arctan \left (x \right )}{2}+\frac {i \left (\ln \left (x -i\right ) \ln \left (x^{2}+1\right )-\frac {\ln \left (x -i\right )^{2}}{2}-\operatorname {dilog}\left (-\frac {i \left (i+x \right )}{2}\right )-\ln \left (x -i\right ) \ln \left (-\frac {i \left (i+x \right )}{2}\right )\right )}{4}-\frac {i \left (\ln \left (i+x \right ) \ln \left (x^{2}+1\right )-\frac {\ln \left (i+x \right )^{2}}{2}-\operatorname {dilog}\left (\frac {i \left (x -i\right )}{2}\right )-\ln \left (i+x \right ) \ln \left (\frac {i \left (x -i\right )}{2}\right )\right )}{4}\) \(126\)
parts \(\frac {x^{2} \operatorname {arccot}\left (x \right )}{2}-\frac {\operatorname {arccot}\left (x \right ) \ln \left (x^{2}+1\right )}{2}+\frac {x}{2}-\frac {\arctan \left (x \right )}{2}+\frac {i \left (\ln \left (x -i\right ) \ln \left (x^{2}+1\right )-\frac {\ln \left (x -i\right )^{2}}{2}-\operatorname {dilog}\left (-\frac {i \left (i+x \right )}{2}\right )-\ln \left (x -i\right ) \ln \left (-\frac {i \left (i+x \right )}{2}\right )\right )}{4}-\frac {i \left (\ln \left (i+x \right ) \ln \left (x^{2}+1\right )-\frac {\ln \left (i+x \right )^{2}}{2}-\operatorname {dilog}\left (\frac {i \left (x -i\right )}{2}\right )-\ln \left (i+x \right ) \ln \left (\frac {i \left (x -i\right )}{2}\right )\right )}{4}\) \(126\)
risch \(\frac {\pi \,x^{2}}{4}+\frac {\pi }{4}-\frac {\pi \ln \left (x^{2}+1\right )}{4}+\frac {i \ln \left (-i x +1\right )^{2}}{8}-\frac {i \ln \left (\frac {1}{2}-\frac {i x}{2}\right ) \ln \left (i x +1\right )}{4}-\frac {i x^{2} \ln \left (-i x +1\right )}{4}+\frac {x}{2}+\frac {i \ln \left (\frac {1}{2}+\frac {i x}{2}\right ) \ln \left (-i x +1\right )}{4}-\frac {i \ln \left (-i x +1\right )}{4}+\frac {i \ln \left (i x +1\right ) x^{2}}{4}-\frac {i \operatorname {dilog}\left (\frac {1}{2}-\frac {i x}{2}\right )}{4}+\frac {i \ln \left (i x +1\right )}{4}+\frac {i \operatorname {dilog}\left (\frac {1}{2}+\frac {i x}{2}\right )}{4}-\frac {i \ln \left (i x +1\right )^{2}}{8}\) \(147\)

Input:

int(x^3*arccot(x)/(x^2+1),x,method=_RETURNVERBOSE)
 

Output:

1/2*x^2*arccot(x)-1/2*arccot(x)*ln(x^2+1)+1/2*x-1/2*arctan(x)+1/4*I*(ln(x- 
I)*ln(x^2+1)-1/2*ln(x-I)^2-dilog(-1/2*I*(I+x))-ln(x-I)*ln(-1/2*I*(I+x)))-1 
/4*I*(ln(I+x)*ln(x^2+1)-1/2*ln(I+x)^2-dilog(1/2*I*(x-I))-ln(I+x)*ln(1/2*I* 
(x-I)))
                                                                                    
                                                                                    
 

Fricas [F]

\[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\int { \frac {x^{3} \operatorname {arccot}\left (x\right )}{x^{2} + 1} \,d x } \] Input:

integrate(x^3*arccot(x)/(x^2+1),x, algorithm="fricas")
 

Output:

integral(x^3*arccot(x)/(x^2 + 1), x)
 

Sympy [F]

\[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\int \frac {x^{3} \operatorname {acot}{\left (x \right )}}{x^{2} + 1}\, dx \] Input:

integrate(x**3*acot(x)/(x**2+1),x)
 

Output:

Integral(x**3*acot(x)/(x**2 + 1), x)
 

Maxima [F]

\[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\int { \frac {x^{3} \operatorname {arccot}\left (x\right )}{x^{2} + 1} \,d x } \] Input:

integrate(x^3*arccot(x)/(x^2+1),x, algorithm="maxima")
 

Output:

integrate(x^3*arccot(x)/(x^2 + 1), x)
 

Giac [F]

\[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\int { \frac {x^{3} \operatorname {arccot}\left (x\right )}{x^{2} + 1} \,d x } \] Input:

integrate(x^3*arccot(x)/(x^2+1),x, algorithm="giac")
 

Output:

integrate(x^3*arccot(x)/(x^2 + 1), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\int \frac {x^3\,\mathrm {acot}\left (x\right )}{x^2+1} \,d x \] Input:

int((x^3*acot(x))/(x^2 + 1),x)
 

Output:

int((x^3*acot(x))/(x^2 + 1), x)
 

Reduce [F]

\[ \int \frac {x^3 \cot ^{-1}(x)}{1+x^2} \, dx=\int \frac {\mathit {acot} \left (x \right ) x^{3}}{x^{2}+1}d x \] Input:

int(x^3*acot(x)/(x^2+1),x)
 

Output:

int((acot(x)*x**3)/(x**2 + 1),x)