3.3.23 \(\int x^2 \cot ^{-1}(e^{a+b x}) \, dx\) [223]

3.3.23.1 Optimal result
3.3.23.2 Mathematica [A] (verified)
3.3.23.3 Rubi [A] (verified)
3.3.23.4 Maple [B] (verified)
3.3.23.5 Fricas [A] (verification not implemented)
3.3.23.6 Sympy [F]
3.3.23.7 Maxima [F]
3.3.23.8 Giac [F]
3.3.23.9 Mupad [F(-1)]

3.3.23.1 Optimal result

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

output
-1/2*I*x^2*polylog(2,-I*exp(-b*x-a))/b+1/2*I*x^2*polylog(2,I*exp(-b*x-a))/ 
b-I*x*polylog(3,-I*exp(-b*x-a))/b^2+I*x*polylog(3,I*exp(-b*x-a))/b^2-I*pol 
ylog(4,-I*exp(-b*x-a))/b^3+I*polylog(4,I*exp(-b*x-a))/b^3
 
3.3.23.2 Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.88 \[ \int x^2 \cot ^{-1}\left (e^{a+b x}\right ) \, dx=-\frac {i \left (b^2 x^2 \operatorname {PolyLog}\left (2,-i e^{-a-b x}\right )-b^2 x^2 \operatorname {PolyLog}\left (2,i e^{-a-b x}\right )+2 \left (b x \operatorname {PolyLog}\left (3,-i e^{-a-b x}\right )-b x \operatorname {PolyLog}\left (3,i e^{-a-b x}\right )+\operatorname {PolyLog}\left (4,-i e^{-a-b x}\right )-\operatorname {PolyLog}\left (4,i e^{-a-b x}\right )\right )\right )}{2 b^3} \]

input
Integrate[x^2*ArcCot[E^(a + b*x)],x]
 
output
((-1/2*I)*(b^2*x^2*PolyLog[2, (-I)*E^(-a - b*x)] - b^2*x^2*PolyLog[2, I*E^ 
(-a - b*x)] + 2*(b*x*PolyLog[3, (-I)*E^(-a - b*x)] - b*x*PolyLog[3, I*E^(- 
a - b*x)] + PolyLog[4, (-I)*E^(-a - b*x)] - PolyLog[4, I*E^(-a - b*x)])))/ 
b^3
 
3.3.23.3 Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.05, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {5667, 3011, 7163, 2720, 7143}

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 x^2 \cot ^{-1}\left (e^{a+b x}\right ) \, dx\)

\(\Big \downarrow \) 5667

\(\displaystyle \frac {1}{2} i \int x^2 \log \left (1-i e^{-a-b x}\right )dx-\frac {1}{2} i \int x^2 \log \left (1+i e^{-a-b x}\right )dx\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,i e^{-a-b x}\right )}{b}-\frac {2 \int x \operatorname {PolyLog}\left (2,i e^{-a-b x}\right )dx}{b}\right )-\frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,-i e^{-a-b x}\right )}{b}-\frac {2 \int x \operatorname {PolyLog}\left (2,-i e^{-a-b x}\right )dx}{b}\right )\)

\(\Big \downarrow \) 7163

\(\displaystyle \frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,i e^{-a-b x}\right )}{b}-\frac {2 \left (\frac {\int \operatorname {PolyLog}\left (3,i e^{-a-b x}\right )dx}{b}-\frac {x \operatorname {PolyLog}\left (3,i e^{-a-b x}\right )}{b}\right )}{b}\right )-\frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,-i e^{-a-b x}\right )}{b}-\frac {2 \left (\frac {\int \operatorname {PolyLog}\left (3,-i e^{-a-b x}\right )dx}{b}-\frac {x \operatorname {PolyLog}\left (3,-i e^{-a-b x}\right )}{b}\right )}{b}\right )\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,i e^{-a-b x}\right )}{b}-\frac {2 \left (-\frac {\int e^{a+b x} \operatorname {PolyLog}\left (3,i e^{-a-b x}\right )de^{-a-b x}}{b^2}-\frac {x \operatorname {PolyLog}\left (3,i e^{-a-b x}\right )}{b}\right )}{b}\right )-\frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,-i e^{-a-b x}\right )}{b}-\frac {2 \left (-\frac {\int e^{a+b x} \operatorname {PolyLog}\left (3,-i e^{-a-b x}\right )de^{-a-b x}}{b^2}-\frac {x \operatorname {PolyLog}\left (3,-i e^{-a-b x}\right )}{b}\right )}{b}\right )\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,i e^{-a-b x}\right )}{b}-\frac {2 \left (-\frac {\operatorname {PolyLog}\left (4,i e^{-a-b x}\right )}{b^2}-\frac {x \operatorname {PolyLog}\left (3,i e^{-a-b x}\right )}{b}\right )}{b}\right )-\frac {1}{2} i \left (\frac {x^2 \operatorname {PolyLog}\left (2,-i e^{-a-b x}\right )}{b}-\frac {2 \left (-\frac {\operatorname {PolyLog}\left (4,-i e^{-a-b x}\right )}{b^2}-\frac {x \operatorname {PolyLog}\left (3,-i e^{-a-b x}\right )}{b}\right )}{b}\right )\)

input
Int[x^2*ArcCot[E^(a + b*x)],x]
 
output
(-1/2*I)*((x^2*PolyLog[2, (-I)*E^(-a - b*x)])/b - (2*(-((x*PolyLog[3, (-I) 
*E^(-a - b*x)])/b) - PolyLog[4, (-I)*E^(-a - b*x)]/b^2))/b) + (I/2)*((x^2* 
PolyLog[2, I*E^(-a - b*x)])/b - (2*(-((x*PolyLog[3, I*E^(-a - b*x)])/b) - 
PolyLog[4, I*E^(-a - b*x)]/b^2))/b)
 

3.3.23.3.1 Defintions of rubi rules used

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{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 3011
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] + Simp[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 5667
Int[ArcCot[(a_.) + (b_.)*(f_)^((c_.) + (d_.)*(x_))]*(x_)^(m_.), x_Symbol] : 
> Simp[I/2   Int[x^m*Log[1 - I/(a + b*f^(c + d*x))], x], x] - Simp[I/2   In 
t[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 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> 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]
 

rule 7163
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. 
)*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a 
+ b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F]))   Int[(e + f*x) 
^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c 
, d, e, f, n, p}, x] && GtQ[m, 0]
 
3.3.23.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 412 vs. \(2 (129 ) = 258\).

Time = 0.80 (sec) , antiderivative size = 413, normalized size of antiderivative = 2.74

method result size
risch \(\frac {i \ln \left (-i \left ({\mathrm e}^{b x +a}+i\right )\right ) a^{3}}{2 b^{3}}+\frac {\pi \,x^{3}}{6}+\frac {i \ln \left (1+i {\mathrm e}^{b x +a}\right ) a^{2} x}{2 b^{2}}-\frac {i \operatorname {polylog}\left (3, i {\mathrm e}^{b x +a}\right ) x}{b^{2}}-\frac {i \ln \left (1-i {\mathrm e}^{b x +a}\right ) a^{3}}{2 b^{3}}+\frac {i \operatorname {polylog}\left (3, -i {\mathrm e}^{b x +a}\right ) x}{b^{2}}+\frac {i \operatorname {polylog}\left (4, i {\mathrm e}^{b x +a}\right )}{b^{3}}+\frac {i \ln \left (-i \left ({\mathrm e}^{b x +a}+i\right )\right ) x \,a^{2}}{2 b^{2}}-\frac {i \ln \left (1-i {\mathrm e}^{b x +a}\right ) x \,a^{2}}{2 b^{2}}-\frac {i \operatorname {polylog}\left (2, -i {\mathrm e}^{b x +a}\right ) x^{2}}{2 b}+\frac {i a^{3} \ln \left (1+i {\mathrm e}^{b x +a}\right )}{2 b^{3}}-\frac {i \ln \left (-i \left (-{\mathrm e}^{b x +a}+i\right )\right ) a^{2} x}{2 b^{2}}-\frac {i \ln \left (-i \left (-{\mathrm e}^{b x +a}+i\right )\right ) a^{3}}{2 b^{3}}+\frac {i \operatorname {polylog}\left (2, -i {\mathrm e}^{b x +a}\right ) a^{2}}{2 b^{3}}-\frac {i \operatorname {polylog}\left (2, i {\mathrm e}^{b x +a}\right ) a^{2}}{2 b^{3}}+\frac {i \operatorname {dilog}\left (-i {\mathrm e}^{b x +a}\right ) a^{2}}{2 b^{3}}-\frac {i \operatorname {polylog}\left (4, -i {\mathrm e}^{b x +a}\right )}{b^{3}}+\frac {i \operatorname {dilog}\left (-i \left ({\mathrm e}^{b x +a}+i\right )\right ) a^{2}}{2 b^{3}}+\frac {i \operatorname {polylog}\left (2, i {\mathrm e}^{b x +a}\right ) x^{2}}{2 b}+\frac {i \ln \left (-i {\mathrm e}^{b x +a}\right ) \ln \left (-i \left (-{\mathrm e}^{b x +a}+i\right )\right ) a^{2}}{2 b^{3}}\) \(413\)

input
int(x^2*arccot(exp(b*x+a)),x,method=_RETURNVERBOSE)
 
output
1/2*I/b^3*ln(-I*(exp(b*x+a)+I))*a^3+1/6*Pi*x^3+1/2*I/b^2*ln(1+I*exp(b*x+a) 
)*a^2*x-I/b^2*polylog(3,I*exp(b*x+a))*x-1/2*I/b^3*ln(1-I*exp(b*x+a))*a^3+I 
/b^2*polylog(3,-I*exp(b*x+a))*x+I/b^3*polylog(4,I*exp(b*x+a))+1/2*I/b^2*ln 
(-I*(exp(b*x+a)+I))*x*a^2-1/2*I/b^2*ln(1-I*exp(b*x+a))*x*a^2-1/2*I/b*polyl 
og(2,-I*exp(b*x+a))*x^2+1/2*I/b^3*a^3*ln(1+I*exp(b*x+a))-1/2*I/b^2*ln(-I*( 
-exp(b*x+a)+I))*a^2*x-1/2*I/b^3*ln(-I*(-exp(b*x+a)+I))*a^3+1/2*I/b^3*polyl 
og(2,-I*exp(b*x+a))*a^2-1/2*I/b^3*polylog(2,I*exp(b*x+a))*a^2+1/2*I/b^3*di 
log(-I*exp(b*x+a))*a^2-I*polylog(4,-I*exp(b*x+a))/b^3+1/2*I/b^3*dilog(-I*( 
exp(b*x+a)+I))*a^2+1/2*I/b*polylog(2,I*exp(b*x+a))*x^2+1/2*I/b^3*ln(-I*exp 
(b*x+a))*ln(-I*(-exp(b*x+a)+I))*a^2
 
3.3.23.5 Fricas [A] (verification not implemented)

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

input
integrate(x^2*arccot(exp(b*x+a)),x, algorithm="fricas")
 
output
1/6*(2*b^3*x^3*arccot(e^(b*x + a)) + 3*I*b^2*x^2*dilog(I*e^(b*x + a)) - 3* 
I*b^2*x^2*dilog(-I*e^(b*x + a)) - I*a^3*log(e^(b*x + a) + I) + I*a^3*log(e 
^(b*x + a) - I) - 6*I*b*x*polylog(3, I*e^(b*x + a)) + 6*I*b*x*polylog(3, - 
I*e^(b*x + a)) + (-I*b^3*x^3 - I*a^3)*log(I*e^(b*x + a) + 1) + (I*b^3*x^3 
+ I*a^3)*log(-I*e^(b*x + a) + 1) + 6*I*polylog(4, I*e^(b*x + a)) - 6*I*pol 
ylog(4, -I*e^(b*x + a)))/b^3
 
3.3.23.6 Sympy [F]

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

input
integrate(x**2*acot(exp(b*x+a)),x)
 
output
Integral(x**2*acot(exp(a)*exp(b*x)), x)
 
3.3.23.7 Maxima [F]

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

input
integrate(x^2*arccot(exp(b*x+a)),x, algorithm="maxima")
 
output
1/3*x^3*arctan(e^(-b*x - a)) + b*integrate(1/3*x^3*e^(b*x + a)/(e^(2*b*x + 
 2*a) + 1), x)
 
3.3.23.8 Giac [F]

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

input
integrate(x^2*arccot(exp(b*x+a)),x, algorithm="giac")
 
output
integrate(x^2*arccot(e^(b*x + a)), x)
 
3.3.23.9 Mupad [F(-1)]

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

input
int(x^2*acot(exp(a + b*x)),x)
 
output
int(x^2*acot(exp(a + b*x)), x)