\(\int x \cot ^{-1}(e^x) \, dx\) [219]

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

Optimal result

Integrand size = 6, antiderivative size = 71 \[ \int x \cot ^{-1}\left (e^x\right ) \, dx=-\frac {1}{2} i x \operatorname {PolyLog}\left (2,-i e^{-x}\right )+\frac {1}{2} i x \operatorname {PolyLog}\left (2,i e^{-x}\right )-\frac {1}{2} i \operatorname {PolyLog}\left (3,-i e^{-x}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (3,i e^{-x}\right ) \]

[Out]

-1/2*I*x*polylog(2,-I/exp(x))+1/2*I*x*polylog(2,I/exp(x))-1/2*I*polylog(3,-I/exp(x))+1/2*I*polylog(3,I/exp(x))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {5252, 2611, 2320, 6724} \[ \int x \cot ^{-1}\left (e^x\right ) \, dx=-\frac {1}{2} i x \operatorname {PolyLog}\left (2,-i e^{-x}\right )+\frac {1}{2} i x \operatorname {PolyLog}\left (2,i e^{-x}\right )-\frac {1}{2} i \operatorname {PolyLog}\left (3,-i e^{-x}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (3,i e^{-x}\right ) \]

[In]

Int[x*ArcCot[E^x],x]

[Out]

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

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2611

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 5252

Int[ArcCot[(a_.) + (b_.)*(f_)^((c_.) + (d_.)*(x_))]*(x_)^(m_.), x_Symbol] :> Dist[I/2, Int[x^m*Log[1 - I/(a +
b*f^(c + d*x))], x], x] - Dist[I/2, Int[x^m*Log[1 + I/(a + b*f^(c + d*x))], x], x] /; FreeQ[{a, b, c, d, f}, x
] && IntegerQ[m] && m > 0

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.82 \[ \int x \cot ^{-1}\left (e^x\right ) \, dx=-\frac {1}{2} i \left (x \operatorname {PolyLog}\left (2,-i e^{-x}\right )-x \operatorname {PolyLog}\left (2,i e^{-x}\right )+\operatorname {PolyLog}\left (3,-i e^{-x}\right )-\operatorname {PolyLog}\left (3,i e^{-x}\right )\right ) \]

[In]

Integrate[x*ArcCot[E^x],x]

[Out]

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

Maple [A] (verified)

Time = 1.04 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.70

method result size
risch \(\frac {\pi \,x^{2}}{4}+\frac {i \operatorname {polylog}\left (2, i {\mathrm e}^{x}\right ) x}{2}-\frac {i \operatorname {polylog}\left (3, i {\mathrm e}^{x}\right )}{2}-\frac {i x \operatorname {polylog}\left (2, -i {\mathrm e}^{x}\right )}{2}+\frac {i \operatorname {polylog}\left (3, -i {\mathrm e}^{x}\right )}{2}\) \(50\)

[In]

int(x*arccot(exp(x)),x,method=_RETURNVERBOSE)

[Out]

1/4*Pi*x^2+1/2*I*polylog(2,I*exp(x))*x-1/2*I*polylog(3,I*exp(x))-1/2*I*x*polylog(2,-I*exp(x))+1/2*I*polylog(3,
-I*exp(x))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.92 \[ \int x \cot ^{-1}\left (e^x\right ) \, dx=\frac {1}{2} \, x^{2} \operatorname {arccot}\left (e^{x}\right ) - \frac {1}{4} i \, x^{2} \log \left (i \, e^{x} + 1\right ) + \frac {1}{4} i \, x^{2} \log \left (-i \, e^{x} + 1\right ) + \frac {1}{2} i \, x {\rm Li}_2\left (i \, e^{x}\right ) - \frac {1}{2} i \, x {\rm Li}_2\left (-i \, e^{x}\right ) - \frac {1}{2} i \, {\rm polylog}\left (3, i \, e^{x}\right ) + \frac {1}{2} i \, {\rm polylog}\left (3, -i \, e^{x}\right ) \]

[In]

integrate(x*arccot(exp(x)),x, algorithm="fricas")

[Out]

1/2*x^2*arccot(e^x) - 1/4*I*x^2*log(I*e^x + 1) + 1/4*I*x^2*log(-I*e^x + 1) + 1/2*I*x*dilog(I*e^x) - 1/2*I*x*di
log(-I*e^x) - 1/2*I*polylog(3, I*e^x) + 1/2*I*polylog(3, -I*e^x)

Sympy [F]

\[ \int x \cot ^{-1}\left (e^x\right ) \, dx=\int x \operatorname {acot}{\left (e^{x} \right )}\, dx \]

[In]

integrate(x*acot(exp(x)),x)

[Out]

Integral(x*acot(exp(x)), x)

Maxima [F]

\[ \int x \cot ^{-1}\left (e^x\right ) \, dx=\int { x \operatorname {arccot}\left (e^{x}\right ) \,d x } \]

[In]

integrate(x*arccot(exp(x)),x, algorithm="maxima")

[Out]

1/2*x^2*arctan(e^(-x)) + integrate(1/2*x^2*e^x/(e^(2*x) + 1), x)

Giac [F]

\[ \int x \cot ^{-1}\left (e^x\right ) \, dx=\int { x \operatorname {arccot}\left (e^{x}\right ) \,d x } \]

[In]

integrate(x*arccot(exp(x)),x, algorithm="giac")

[Out]

integrate(x*arccot(e^x), x)

Mupad [F(-1)]

Timed out. \[ \int x \cot ^{-1}\left (e^x\right ) \, dx=\int x\,\mathrm {acot}\left ({\mathrm {e}}^x\right ) \,d x \]

[In]

int(x*acot(exp(x)),x)

[Out]

int(x*acot(exp(x)), x)