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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F(-1)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 15, antiderivative size = 229 \[ \int (e+f x)^2 \cot ^{-1}(\coth (a+b x)) \, dx=\frac {(e+f x)^3 \cot ^{-1}(\coth (a+b x))}{3 f}-\frac {(e+f x)^3 \arctan \left (e^{2 a+2 b x}\right )}{3 f}+\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}-\frac {i f (e+f x) \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right )}{4 b^2}+\frac {i f (e+f x) \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right )}{4 b^2}+\frac {i f^2 \operatorname {PolyLog}\left (4,-i e^{2 a+2 b x}\right )}{8 b^3}-\frac {i f^2 \operatorname {PolyLog}\left (4,i e^{2 a+2 b x}\right )}{8 b^3} \] Output:

1/3*(f*x+e)^3*arccot(coth(b*x+a))/f-1/3*(f*x+e)^3*arctan(exp(2*b*x+2*a))/f 
+1/4*I*(f*x+e)^2*polylog(2,-I*exp(2*b*x+2*a))/b-1/4*I*(f*x+e)^2*polylog(2, 
I*exp(2*b*x+2*a))/b-1/4*I*f*(f*x+e)*polylog(3,-I*exp(2*b*x+2*a))/b^2+1/4*I 
*f*(f*x+e)*polylog(3,I*exp(2*b*x+2*a))/b^2+1/8*I*f^2*polylog(4,-I*exp(2*b* 
x+2*a))/b^3-1/8*I*f^2*polylog(4,I*exp(2*b*x+2*a))/b^3
 

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 375, normalized size of antiderivative = 1.64 \[ \int (e+f x)^2 \cot ^{-1}(\coth (a+b x)) \, dx=\frac {1}{3} x \left (3 e^2+3 e f x+f^2 x^2\right ) \cot ^{-1}(\coth (a+b x))-\frac {i \left (12 b^3 e^2 x \log \left (1-i e^{2 (a+b x)}\right )+12 b^3 e f x^2 \log \left (1-i e^{2 (a+b x)}\right )+4 b^3 f^2 x^3 \log \left (1-i e^{2 (a+b x)}\right )-12 b^3 e^2 x \log \left (1+i e^{2 (a+b x)}\right )-12 b^3 e f x^2 \log \left (1+i e^{2 (a+b x)}\right )-4 b^3 f^2 x^3 \log \left (1+i e^{2 (a+b x)}\right )-6 b^2 (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 (a+b x)}\right )+6 b^2 (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 (a+b x)}\right )+6 b e f \operatorname {PolyLog}\left (3,-i e^{2 (a+b x)}\right )+6 b f^2 x \operatorname {PolyLog}\left (3,-i e^{2 (a+b x)}\right )-6 b e f \operatorname {PolyLog}\left (3,i e^{2 (a+b x)}\right )-6 b f^2 x \operatorname {PolyLog}\left (3,i e^{2 (a+b x)}\right )-3 f^2 \operatorname {PolyLog}\left (4,-i e^{2 (a+b x)}\right )+3 f^2 \operatorname {PolyLog}\left (4,i e^{2 (a+b x)}\right )\right )}{24 b^3} \] Input:

Integrate[(e + f*x)^2*ArcCot[Coth[a + b*x]],x]
 

Output:

(x*(3*e^2 + 3*e*f*x + f^2*x^2)*ArcCot[Coth[a + b*x]])/3 - ((I/24)*(12*b^3* 
e^2*x*Log[1 - I*E^(2*(a + b*x))] + 12*b^3*e*f*x^2*Log[1 - I*E^(2*(a + b*x) 
)] + 4*b^3*f^2*x^3*Log[1 - I*E^(2*(a + b*x))] - 12*b^3*e^2*x*Log[1 + I*E^( 
2*(a + b*x))] - 12*b^3*e*f*x^2*Log[1 + I*E^(2*(a + b*x))] - 4*b^3*f^2*x^3* 
Log[1 + I*E^(2*(a + b*x))] - 6*b^2*(e + f*x)^2*PolyLog[2, (-I)*E^(2*(a + b 
*x))] + 6*b^2*(e + f*x)^2*PolyLog[2, I*E^(2*(a + b*x))] + 6*b*e*f*PolyLog[ 
3, (-I)*E^(2*(a + b*x))] + 6*b*f^2*x*PolyLog[3, (-I)*E^(2*(a + b*x))] - 6* 
b*e*f*PolyLog[3, I*E^(2*(a + b*x))] - 6*b*f^2*x*PolyLog[3, I*E^(2*(a + b*x 
))] - 3*f^2*PolyLog[4, (-I)*E^(2*(a + b*x))] + 3*f^2*PolyLog[4, I*E^(2*(a 
+ b*x))]))/b^3
 

Rubi [A] (verified)

Time = 0.84 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.10, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {5709, 3042, 4668, 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 (e+f x)^2 \cot ^{-1}(\coth (a+b x)) \, dx\)

\(\Big \downarrow \) 5709

\(\displaystyle \frac {(e+f x)^3 \cot ^{-1}(\coth (a+b x))}{3 f}-\frac {b \int (e+f x)^3 \text {sech}(2 a+2 b x)dx}{3 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {(e+f x)^3 \cot ^{-1}(\coth (a+b x))}{3 f}-\frac {b \int (e+f x)^3 \csc \left (2 i a+2 i b x+\frac {\pi }{2}\right )dx}{3 f}\)

\(\Big \downarrow \) 4668

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

\(\Big \downarrow \) 3011

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

\(\Big \downarrow \) 7163

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

\(\Big \downarrow \) 2720

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

\(\Big \downarrow \) 7143

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

Input:

Int[(e + f*x)^2*ArcCot[Coth[a + b*x]],x]
 

Output:

((e + f*x)^3*ArcCot[Coth[a + b*x]])/(3*f) - (b*(((e + f*x)^3*ArcTan[E^(2*a 
 + 2*b*x)])/b + (((3*I)/2)*f*(-1/2*((e + f*x)^2*PolyLog[2, (-I)*E^(2*a + 2 
*b*x)])/b + (f*(((e + f*x)*PolyLog[3, (-I)*E^(2*a + 2*b*x)])/(2*b) - (f*Po 
lyLog[4, (-I)*E^(2*a + 2*b*x)])/(4*b^2)))/b))/b - (((3*I)/2)*f*(-1/2*((e + 
 f*x)^2*PolyLog[2, I*E^(2*a + 2*b*x)])/b + (f*(((e + f*x)*PolyLog[3, I*E^( 
2*a + 2*b*x)])/(2*b) - (f*PolyLog[4, I*E^(2*a + 2*b*x)])/(4*b^2)))/b))/b)) 
/(3*f)
 

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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4668
Int[csc[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_ 
))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^((-I)*e + f*fz*x)/E^( 
I*k*Pi)]/(f*fz*I)), x] + (-Simp[d*(m/(f*fz*I))   Int[(c + d*x)^(m - 1)*Log[ 
1 - E^((-I)*e + f*fz*x)/E^(I*k*Pi)], x], x] + Simp[d*(m/(f*fz*I))   Int[(c 
+ d*x)^(m - 1)*Log[1 + E^((-I)*e + f*fz*x)/E^(I*k*Pi)], x], x]) /; FreeQ[{c 
, d, e, f, fz}, x] && IntegerQ[2*k] && IGtQ[m, 0]
 

rule 5709
Int[ArcCot[Coth[(a_.) + (b_.)*(x_)]]*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] 
:> Simp[(e + f*x)^(m + 1)*(ArcCot[Coth[a + b*x]]/(f*(m + 1))), x] - Simp[b/ 
(f*(m + 1))   Int[(e + f*x)^(m + 1)*Sech[2*a + 2*b*x], x], x] /; FreeQ[{a, 
b, e, f}, x] && IGtQ[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]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 8.70 (sec) , antiderivative size = 2668, normalized size of antiderivative = 11.65

method result size
risch \(\text {Expression too large to display}\) \(2668\)

Input:

int((f*x+e)^2*arccot(coth(b*x+a)),x,method=_RETURNVERBOSE)
 

Output:

1/8*I*f^2*polylog(4,-I*exp(2*b*x+2*a))/b^3+1/6*I*(f*x+e)^3/f*ln(exp(2*b*x+ 
2*a)+I)+1/12*Pi*(csgn(I*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))*csgn((1-I)* 
(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))+csgn((1-I)*(exp(2*b*x+2*a)+I)/(exp( 
2*b*x+2*a)-1))^2-csgn(I*(exp(2*b*x+2*a)-I))*csgn(I/(exp(2*b*x+2*a)-1))*csg 
n(I*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))+csgn(I*(exp(2*b*x+2*a)-I))*csgn 
(I*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))^2+csgn(I*(exp(2*b*x+2*a)+I))*csg 
n(I/(exp(2*b*x+2*a)-1))*csgn(I*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))-csgn 
(I*(exp(2*b*x+2*a)+I))*csgn(I*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))^2-csg 
n(I*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))*csgn((1+I)*(exp(2*b*x+2*a)-I)/( 
exp(2*b*x+2*a)-1))+csgn((1+I)*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))^2+csg 
n(I/(exp(2*b*x+2*a)-1))*csgn(I*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))^2-cs 
gn(I/(exp(2*b*x+2*a)-1))*csgn(I*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))^2-c 
sgn(I*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))^3+csgn(I*(exp(2*b*x+2*a)-I)/( 
exp(2*b*x+2*a)-1))*csgn((1+I)*(exp(2*b*x+2*a)-I)/(exp(2*b*x+2*a)-1))^2+csg 
n(I*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))^3-csgn(I*(exp(2*b*x+2*a)+I)/(ex 
p(2*b*x+2*a)-1))*csgn((1-I)*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))^2-csgn( 
(1-I)*(exp(2*b*x+2*a)+I)/(exp(2*b*x+2*a)-1))^3-csgn((1+I)*(exp(2*b*x+2*a)- 
I)/(exp(2*b*x+2*a)-1))^3+1)*(f*x+e)^3/f-1/8*I*f^2*polylog(4,I*exp(2*b*x+2* 
a))/b^3-I*f/b^2*a^2*e*ln(1+exp(b*x+a)*(-1)^(3/4))-I*f/b^2*a^2*e*ln(1-exp(b 
*x+a)*(-1)^(3/4))-I*f/b^2*a*e*dilog(1+exp(b*x+a)*(-1)^(3/4))-I*f/b^2*a*...
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1002 vs. \(2 (180) = 360\).

Time = 0.19 (sec) , antiderivative size = 1002, normalized size of antiderivative = 4.38 \[ \int (e+f x)^2 \cot ^{-1}(\coth (a+b x)) \, dx=\text {Too large to display} \] Input:

integrate((f*x+e)^2*arccot(coth(b*x+a)),x, algorithm="fricas")
 

Output:

1/6*(-6*I*f^2*polylog(4, 1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 
6*I*f^2*polylog(4, -1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) + 6*I*f 
^2*polylog(4, 1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) + 6*I*f^2*po 
lylog(4, -1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) + 2*(b^3*f^2*x^3 
 + 3*b^3*e*f*x^2 + 3*b^3*e^2*x)*arctan(sinh(b*x + a)/cosh(b*x + a)) - 3*(I 
*b^2*f^2*x^2 + 2*I*b^2*e*f*x + I*b^2*e^2)*dilog(1/2*sqrt(4*I)*(cosh(b*x + 
a) + sinh(b*x + a))) - 3*(I*b^2*f^2*x^2 + 2*I*b^2*e*f*x + I*b^2*e^2)*dilog 
(-1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 3*(-I*b^2*f^2*x^2 - 2*I 
*b^2*e*f*x - I*b^2*e^2)*dilog(1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a 
))) - 3*(-I*b^2*f^2*x^2 - 2*I*b^2*e*f*x - I*b^2*e^2)*dilog(-1/2*sqrt(-4*I) 
*(cosh(b*x + a) + sinh(b*x + a))) + (-I*b^3*f^2*x^3 - 3*I*b^3*e*f*x^2 - 3* 
I*b^3*e^2*x - 3*I*a*b^2*e^2 + 3*I*a^2*b*e*f - I*a^3*f^2)*log(1/2*sqrt(4*I) 
*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (-I*b^3*f^2*x^3 - 3*I*b^3*e*f*x^2 
- 3*I*b^3*e^2*x - 3*I*a*b^2*e^2 + 3*I*a^2*b*e*f - I*a^3*f^2)*log(-1/2*sqrt 
(4*I)*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (I*b^3*f^2*x^3 + 3*I*b^3*e*f* 
x^2 + 3*I*b^3*e^2*x + 3*I*a*b^2*e^2 - 3*I*a^2*b*e*f + I*a^3*f^2)*log(1/2*s 
qrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (I*b^3*f^2*x^3 + 3*I*b^3* 
e*f*x^2 + 3*I*b^3*e^2*x + 3*I*a*b^2*e^2 - 3*I*a^2*b*e*f + I*a^3*f^2)*log(- 
1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a)) + 1) + (3*I*a*b^2*e^2 - 3*I 
*a^2*b*e*f + I*a^3*f^2)*log(I*sqrt(4*I) + 2*cosh(b*x + a) + 2*sinh(b*x ...
 

Sympy [F]

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

integrate((f*x+e)**2*acot(coth(b*x+a)),x)
 

Output:

Integral((e + f*x)**2*acot(coth(a + b*x)), x)
 

Maxima [F]

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

integrate((f*x+e)^2*arccot(coth(b*x+a)),x, algorithm="maxima")
 

Output:

1/3*(f^2*x^3 + 3*e*f*x^2 + 3*e^2*x)*arctan((e^(2*b*x + 2*a) - 1)/(e^(2*b*x 
 + 2*a) + 1)) - integrate(2/3*(b*f^2*x^3*e^(2*a) + 3*b*e*f*x^2*e^(2*a) + 3 
*b*e^2*x*e^(2*a))*e^(2*b*x)/(e^(4*b*x + 4*a) + 1), x)
 

Giac [F(-1)]

Timed out. \[ \int (e+f x)^2 \cot ^{-1}(\coth (a+b x)) \, dx=\text {Timed out} \] Input:

integrate((f*x+e)^2*arccot(coth(b*x+a)),x, algorithm="giac")
 

Output:

Timed out
 

Mupad [F(-1)]

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

int(acot(coth(a + b*x))*(e + f*x)^2,x)
                                                                                    
                                                                                    
 

Output:

int(acot(coth(a + b*x))*(e + f*x)^2, x)
 

Reduce [F]

\[ \int (e+f x)^2 \cot ^{-1}(\coth (a+b x)) \, dx=\left (\int \mathit {acot} \left (\coth \left (b x +a \right )\right )d x \right ) e^{2}+\left (\int \mathit {acot} \left (\coth \left (b x +a \right )\right ) x^{2}d x \right ) f^{2}+2 \left (\int \mathit {acot} \left (\coth \left (b x +a \right )\right ) x d x \right ) e f \] Input:

int((f*x+e)^2*acot(coth(b*x+a)),x)
 

Output:

int(acot(coth(a + b*x)),x)*e**2 + int(acot(coth(a + b*x))*x**2,x)*f**2 + 2 
*int(acot(coth(a + b*x))*x,x)*e*f