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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 299, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {5294, 4265, 2611, 6744, 2320, 6724} \[ \int (e+f x)^3 \cot ^{-1}(\coth (a+b x)) \, dx=-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}-\frac {3 i f^3 \operatorname {PolyLog}\left (5,-i e^{2 a+2 b x}\right )}{16 b^4}+\frac {3 i f^3 \operatorname {PolyLog}\left (5,i e^{2 a+2 b x}\right )}{16 b^4}+\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,-i e^{2 a+2 b x}\right )}{8 b^3}-\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,i e^{2 a+2 b x}\right )}{8 b^3}-\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right )}{8 b^2}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}+\frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f} \]

[In]

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

[Out]

((e + f*x)^4*ArcCot[Coth[a + b*x]])/(4*f) - ((e + f*x)^4*ArcTan[E^(2*a + 2*b*x)])/(4*f) + ((I/4)*(e + f*x)^3*P
olyLog[2, (-I)*E^(2*a + 2*b*x)])/b - ((I/4)*(e + f*x)^3*PolyLog[2, I*E^(2*a + 2*b*x)])/b - (((3*I)/8)*f*(e + f
*x)^2*PolyLog[3, (-I)*E^(2*a + 2*b*x)])/b^2 + (((3*I)/8)*f*(e + f*x)^2*PolyLog[3, I*E^(2*a + 2*b*x)])/b^2 + ((
(3*I)/8)*f^2*(e + f*x)*PolyLog[4, (-I)*E^(2*a + 2*b*x)])/b^3 - (((3*I)/8)*f^2*(e + f*x)*PolyLog[4, I*E^(2*a +
2*b*x)])/b^3 - (((3*I)/16)*f^3*PolyLog[5, (-I)*E^(2*a + 2*b*x)])/b^4 + (((3*I)/16)*f^3*PolyLog[5, I*E^(2*a + 2
*b*x)])/b^4

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 4265

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] + (-Dist[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] + Dist[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 5294

Int[ArcCot[Coth[(a_.) + (b_.)*(x_)]]*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^(m + 1)*(ArcCot[C
oth[a + b*x]]/(f*(m + 1))), x] - Dist[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 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]

Rule 6744

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] - Dist[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]

Rubi steps \begin{align*} \text {integral}& = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {b \int (e+f x)^4 \text {sech}(2 a+2 b x) \, dx}{4 f} \\ & = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}+\frac {1}{2} i \int (e+f x)^3 \log \left (1-i e^{2 a+2 b x}\right ) \, dx-\frac {1}{2} i \int (e+f x)^3 \log \left (1+i e^{2 a+2 b x}\right ) \, dx \\ & = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}-\frac {(3 i f) \int (e+f x)^2 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right ) \, dx}{4 b}+\frac {(3 i f) \int (e+f x)^2 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right ) \, dx}{4 b} \\ & = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}-\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right )}{8 b^2}+\frac {\left (3 i f^2\right ) \int (e+f x) \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right ) \, dx}{4 b^2}-\frac {\left (3 i f^2\right ) \int (e+f x) \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right ) \, dx}{4 b^2} \\ & = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}-\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,-i e^{2 a+2 b x}\right )}{8 b^3}-\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,i e^{2 a+2 b x}\right )}{8 b^3}-\frac {\left (3 i f^3\right ) \int \operatorname {PolyLog}\left (4,-i e^{2 a+2 b x}\right ) \, dx}{8 b^3}+\frac {\left (3 i f^3\right ) \int \operatorname {PolyLog}\left (4,i e^{2 a+2 b x}\right ) \, dx}{8 b^3} \\ & = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}-\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,-i e^{2 a+2 b x}\right )}{8 b^3}-\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,i e^{2 a+2 b x}\right )}{8 b^3}-\frac {\left (3 i f^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(4,-i x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{16 b^4}+\frac {\left (3 i f^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(4,i x)}{x} \, dx,x,e^{2 a+2 b x}\right )}{16 b^4} \\ & = \frac {(e+f x)^4 \cot ^{-1}(\coth (a+b x))}{4 f}-\frac {(e+f x)^4 \arctan \left (e^{2 a+2 b x}\right )}{4 f}+\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 a+2 b x}\right )}{4 b}-\frac {i (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 a+2 b x}\right )}{4 b}-\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,-i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f (e+f x)^2 \operatorname {PolyLog}\left (3,i e^{2 a+2 b x}\right )}{8 b^2}+\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,-i e^{2 a+2 b x}\right )}{8 b^3}-\frac {3 i f^2 (e+f x) \operatorname {PolyLog}\left (4,i e^{2 a+2 b x}\right )}{8 b^3}-\frac {3 i f^3 \operatorname {PolyLog}\left (5,-i e^{2 a+2 b x}\right )}{16 b^4}+\frac {3 i f^3 \operatorname {PolyLog}\left (5,i e^{2 a+2 b x}\right )}{16 b^4} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(600\) vs. \(2(299)=598\).

Time = 0.22 (sec) , antiderivative size = 600, normalized size of antiderivative = 2.01 \[ \int (e+f x)^3 \cot ^{-1}(\coth (a+b x)) \, dx=\frac {1}{4} x \left (4 e^3+6 e^2 f x+4 e f^2 x^2+f^3 x^3\right ) \cot ^{-1}(\coth (a+b x))-\frac {i \left (8 b^4 e^3 x \log \left (1-i e^{2 (a+b x)}\right )+12 b^4 e^2 f x^2 \log \left (1-i e^{2 (a+b x)}\right )+8 b^4 e f^2 x^3 \log \left (1-i e^{2 (a+b x)}\right )+2 b^4 f^3 x^4 \log \left (1-i e^{2 (a+b x)}\right )-8 b^4 e^3 x \log \left (1+i e^{2 (a+b x)}\right )-12 b^4 e^2 f x^2 \log \left (1+i e^{2 (a+b x)}\right )-8 b^4 e f^2 x^3 \log \left (1+i e^{2 (a+b x)}\right )-2 b^4 f^3 x^4 \log \left (1+i e^{2 (a+b x)}\right )-4 b^3 (e+f x)^3 \operatorname {PolyLog}\left (2,-i e^{2 (a+b x)}\right )+4 b^3 (e+f x)^3 \operatorname {PolyLog}\left (2,i e^{2 (a+b x)}\right )+6 b^2 e^2 f \operatorname {PolyLog}\left (3,-i e^{2 (a+b x)}\right )+12 b^2 e f^2 x \operatorname {PolyLog}\left (3,-i e^{2 (a+b x)}\right )+6 b^2 f^3 x^2 \operatorname {PolyLog}\left (3,-i e^{2 (a+b x)}\right )-6 b^2 e^2 f \operatorname {PolyLog}\left (3,i e^{2 (a+b x)}\right )-12 b^2 e f^2 x \operatorname {PolyLog}\left (3,i e^{2 (a+b x)}\right )-6 b^2 f^3 x^2 \operatorname {PolyLog}\left (3,i e^{2 (a+b x)}\right )-6 b e f^2 \operatorname {PolyLog}\left (4,-i e^{2 (a+b x)}\right )-6 b f^3 x \operatorname {PolyLog}\left (4,-i e^{2 (a+b x)}\right )+6 b e f^2 \operatorname {PolyLog}\left (4,i e^{2 (a+b x)}\right )+6 b f^3 x \operatorname {PolyLog}\left (4,i e^{2 (a+b x)}\right )+3 f^3 \operatorname {PolyLog}\left (5,-i e^{2 (a+b x)}\right )-3 f^3 \operatorname {PolyLog}\left (5,i e^{2 (a+b x)}\right )\right )}{16 b^4} \]

[In]

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

[Out]

(x*(4*e^3 + 6*e^2*f*x + 4*e*f^2*x^2 + f^3*x^3)*ArcCot[Coth[a + b*x]])/4 - ((I/16)*(8*b^4*e^3*x*Log[1 - I*E^(2*
(a + b*x))] + 12*b^4*e^2*f*x^2*Log[1 - I*E^(2*(a + b*x))] + 8*b^4*e*f^2*x^3*Log[1 - I*E^(2*(a + b*x))] + 2*b^4
*f^3*x^4*Log[1 - I*E^(2*(a + b*x))] - 8*b^4*e^3*x*Log[1 + I*E^(2*(a + b*x))] - 12*b^4*e^2*f*x^2*Log[1 + I*E^(2
*(a + b*x))] - 8*b^4*e*f^2*x^3*Log[1 + I*E^(2*(a + b*x))] - 2*b^4*f^3*x^4*Log[1 + I*E^(2*(a + b*x))] - 4*b^3*(
e + f*x)^3*PolyLog[2, (-I)*E^(2*(a + b*x))] + 4*b^3*(e + f*x)^3*PolyLog[2, I*E^(2*(a + b*x))] + 6*b^2*e^2*f*Po
lyLog[3, (-I)*E^(2*(a + b*x))] + 12*b^2*e*f^2*x*PolyLog[3, (-I)*E^(2*(a + b*x))] + 6*b^2*f^3*x^2*PolyLog[3, (-
I)*E^(2*(a + b*x))] - 6*b^2*e^2*f*PolyLog[3, I*E^(2*(a + b*x))] - 12*b^2*e*f^2*x*PolyLog[3, I*E^(2*(a + b*x))]
 - 6*b^2*f^3*x^2*PolyLog[3, I*E^(2*(a + b*x))] - 6*b*e*f^2*PolyLog[4, (-I)*E^(2*(a + b*x))] - 6*b*f^3*x*PolyLo
g[4, (-I)*E^(2*(a + b*x))] + 6*b*e*f^2*PolyLog[4, I*E^(2*(a + b*x))] + 6*b*f^3*x*PolyLog[4, I*E^(2*(a + b*x))]
 + 3*f^3*PolyLog[5, (-I)*E^(2*(a + b*x))] - 3*f^3*PolyLog[5, I*E^(2*(a + b*x))]))/b^4

Maple [C] (warning: unable to verify)

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

Time = 33.25 (sec) , antiderivative size = 3570, normalized size of antiderivative = 11.94

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

[In]

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

[Out]

3/16*I*f^3*polylog(5,I*exp(2*b*x+2*a))/b^4-3/16*I*f^3*polylog(5,-I*exp(2*b*x+2*a))/b^4+3/2*I*f/b*e^2*ln(1+I*ex
p(2*b*x+2*a))*a*x+3/2*I*f^2/b^2*a^2*e*ln(1+exp(b*x+a)*(-1)^(3/4))*x+3/2*I*f^2/b^2*a^2*e*ln(1-exp(b*x+a)*(-1)^(
3/4))*x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/
2))+3/2*I*f/b^2*a*e^2*dilog(((-I)^(1/2)-exp(b*x+a))/(-I)^(1/2))+3/2*I*f/b^2*a*e^2*dilog(((-I)^(1/2)+exp(b*x+a)
)/(-I)^(1/2))+1/2*I*f^3/b^3*a^3*ln(((-I)^(1/2)-exp(b*x+a))/(-I)^(1/2))*x+1/2*I*f^3/b^3*a^3*ln(((-I)^(1/2)+exp(
b*x+a))/(-I)^(1/2))*x-3/4*I*f^2/b*e*polylog(2,I*exp(2*b*x+2*a))*x^2+3/4*I*f^2/b^3*e*polylog(2,I*exp(2*b*x+2*a)
)*a^2+3/4*I*f^2/b^2*e*polylog(3,I*exp(2*b*x+2*a))*x-3/4*I*f/b^2*e^2*ln(1-I*exp(2*b*x+2*a))*a^2

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. 1460 vs. \(2 (236) = 472\).

Time = 0.33 (sec) , antiderivative size = 1460, normalized size of antiderivative = 4.88 \[ \int (e+f x)^3 \cot ^{-1}(\coth (a+b x)) \, dx=\text {Too large to display} \]

[In]

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

[Out]

1/8*(24*I*f^3*polylog(5, 1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) + 24*I*f^3*polylog(5, -1/2*sqrt(4*I)*(
cosh(b*x + a) + sinh(b*x + a))) - 24*I*f^3*polylog(5, 1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 24*I*f
^3*polylog(5, -1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) + 2*(b^4*f^3*x^4 + 4*b^4*e*f^2*x^3 + 6*b^4*e^2*
f*x^2 + 4*b^4*e^3*x)*arctan(sinh(b*x + a)/cosh(b*x + a)) - 4*(I*b^3*f^3*x^3 + 3*I*b^3*e*f^2*x^2 + 3*I*b^3*e^2*
f*x + I*b^3*e^3)*dilog(1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x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*log(-1/2*sqrt(-4*I)*(cosh(b*x + a) +
 sinh(b*x + a)) + 1) + (4*I*a*b^3*e^3 - 6*I*a^2*b^2*e^2*f + 4*I*a^3*b*e*f^2 - I*a^4*f^3)*log(I*sqrt(4*I) + 2*c
osh(b*x + a) + 2*sinh(b*x + a)) + (4*I*a*b^3*e^3 - 6*I*a^2*b^2*e^2*f + 4*I*a^3*b*e*f^2 - I*a^4*f^3)*log(-I*sqr
t(4*I) + 2*cosh(b*x + a) + 2*sinh(b*x + a)) + (-4*I*a*b^3*e^3 + 6*I*a^2*b^2*e^2*f - 4*I*a^3*b*e*f^2 + I*a^4*f^
3)*log(I*sqrt(-4*I) + 2*cosh(b*x + a) + 2*sinh(b*x + a)) + (-4*I*a*b^3*e^3 + 6*I*a^2*b^2*e^2*f - 4*I*a^3*b*e*f
^2 + I*a^4*f^3)*log(-I*sqrt(-4*I) + 2*cosh(b*x + a) + 2*sinh(b*x + a)) - 24*(I*b*f^3*x + I*b*e*f^2)*polylog(4,
 1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 24*(I*b*f^3*x + I*b*e*f^2)*polylog(4, -1/2*sqrt(4*I)*(cosh(b
*x + a) + sinh(b*x + a))) - 24*(-I*b*f^3*x - I*b*e*f^2)*polylog(4, 1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x +
a))) - 24*(-I*b*f^3*x - I*b*e*f^2)*polylog(4, -1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 12*(-I*b^2*f^
3*x^2 - 2*I*b^2*e*f^2*x - I*b^2*e^2*f)*polylog(3, 1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 12*(-I*b^2*
f^3*x^2 - 2*I*b^2*e*f^2*x - I*b^2*e^2*f)*polylog(3, -1/2*sqrt(4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 12*(I*b^
2*f^3*x^2 + 2*I*b^2*e*f^2*x + I*b^2*e^2*f)*polylog(3, 1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))) - 12*(I*
b^2*f^3*x^2 + 2*I*b^2*e*f^2*x + I*b^2*e^2*f)*polylog(3, -1/2*sqrt(-4*I)*(cosh(b*x + a) + sinh(b*x + a))))/b^4

Sympy [F]

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

[In]

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

[Out]

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

Maxima [F]

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

[In]

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

[Out]

1/4*(f^3*x^4 + 4*e*f^2*x^3 + 6*e^2*f*x^2 + 4*e^3*x)*arctan((e^(2*b*x + 2*a) - 1)/(e^(2*b*x + 2*a) + 1)) - inte
grate(1/2*(b*f^3*x^4*e^(2*a) + 4*b*e*f^2*x^3*e^(2*a) + 6*b*e^2*f*x^2*e^(2*a) + 4*b*e^3*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)^3 \cot ^{-1}(\coth (a+b x)) \, dx=\text {Timed out} \]

[In]

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

[Out]

Timed out

Mupad [F(-1)]

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

[In]

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

[Out]

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