\(\int x \coth ^3(a+b x) \, dx\) [13]

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

Optimal result

Integrand size = 10, antiderivative size = 82 \[ \int x \coth ^3(a+b x) \, dx=\frac {x}{2 b}-\frac {x^2}{2}-\frac {\coth (a+b x)}{2 b^2}-\frac {x \coth ^2(a+b x)}{2 b}+\frac {x \log \left (1-e^{2 (a+b x)}\right )}{b}+\frac {\operatorname {PolyLog}\left (2,e^{2 (a+b x)}\right )}{2 b^2} \] Output:

1/2*x/b-1/2*x^2-1/2*coth(b*x+a)/b^2-1/2*x*coth(b*x+a)^2/b+x*ln(1-exp(2*b*x 
+2*a))/b+1/2*polylog(2,exp(2*b*x+2*a))/b^2
 

Mathematica [A] (verified)

Time = 0.94 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.60 \[ \int x \coth ^3(a+b x) \, dx=\frac {1}{2} \left (-\frac {2 x^2}{-1+e^{2 a}}+x^2 \coth (a)-\frac {x \text {csch}^2(a+b x)}{b}+\frac {2 x \log \left (1-e^{-a-b x}\right )}{b}+\frac {2 x \log \left (1+e^{-a-b x}\right )}{b}-\frac {2 \operatorname {PolyLog}\left (2,-e^{-a-b x}\right )}{b^2}-\frac {2 \operatorname {PolyLog}\left (2,e^{-a-b x}\right )}{b^2}+\frac {\text {csch}(a) \text {csch}(a+b x) \sinh (b x)}{b^2}\right ) \] Input:

Integrate[x*Coth[a + b*x]^3,x]
 

Output:

((-2*x^2)/(-1 + E^(2*a)) + x^2*Coth[a] - (x*Csch[a + b*x]^2)/b + (2*x*Log[ 
1 - E^(-a - b*x)])/b + (2*x*Log[1 + E^(-a - b*x)])/b - (2*PolyLog[2, -E^(- 
a - b*x)])/b^2 - (2*PolyLog[2, E^(-a - b*x)])/b^2 + (Csch[a]*Csch[a + b*x] 
*Sinh[b*x])/b^2)/2
 

Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 0.54 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.37, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.400, Rules used = {3042, 26, 4203, 25, 26, 3042, 25, 26, 3954, 24, 4201, 2620, 2715, 2838}

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 \coth ^3(a+b x) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int i x \tan \left (i a+i b x+\frac {\pi }{2}\right )^3dx\)

\(\Big \downarrow \) 26

\(\displaystyle i \int x \tan \left (\frac {1}{2} (2 i a+\pi )+i b x\right )^3dx\)

\(\Big \downarrow \) 4203

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 26

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

\(\Big \downarrow \) 3042

\(\displaystyle i \left (-i \int -i x \tan \left (i a+i b x+\frac {\pi }{2}\right )dx-\frac {i \int -\tan \left (i a+i b x+\frac {\pi }{2}\right )^2dx}{2 b}+\frac {i x \coth ^2(a+b x)}{2 b}\right )\)

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 26

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

\(\Big \downarrow \) 3954

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

\(\Big \downarrow \) 24

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

\(\Big \downarrow \) 4201

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

\(\Big \downarrow \) 2620

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

\(\Big \downarrow \) 2715

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

\(\Big \downarrow \) 2838

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

Input:

Int[x*Coth[a + b*x]^3,x]
 

Output:

I*((I/2)*x^2 + ((I/2)*x*Coth[a + b*x]^2)/b + ((I/2)*(-x + Coth[a + b*x]/b) 
)/b - (2*I)*((x*Log[1 + E^(2*a - I*Pi + 2*b*x)])/(2*b) + PolyLog[2, -E^(2* 
a - I*Pi + 2*b*x)]/(4*b^2)))
 

Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 26
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a])   I 
nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
 

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

rule 2715
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] 
:> Simp[1/(d*e*n*Log[F])   Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) 
))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
 

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3954
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d 
*x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2   Int[(b*Tan[c + d*x])^(n - 2), x] 
, x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
 

rule 4201
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (Complex[0, fz_])*(f_.)*(x_)], x 
_Symbol] :> Simp[(-I)*((c + d*x)^(m + 1)/(d*(m + 1))), x] + Simp[2*I   Int[ 
(c + d*x)^m*(E^(2*((-I)*e + f*fz*x))/(1 + E^(2*((-I)*e + f*fz*x)))), x], x] 
 /; FreeQ[{c, d, e, f, fz}, x] && IGtQ[m, 0]
 

rule 4203
Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symb 
ol] :> Simp[b*(c + d*x)^m*((b*Tan[e + f*x])^(n - 1)/(f*(n - 1))), x] + (-Si 
mp[b*d*(m/(f*(n - 1)))   Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1), x] 
, x] - Simp[b^2   Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; Free 
Q[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 0]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(163\) vs. \(2(72)=144\).

Time = 0.05 (sec) , antiderivative size = 164, normalized size of antiderivative = 2.00

method result size
risch \(-\frac {x^{2}}{2}-\frac {2 x \,{\mathrm e}^{2 b x +2 a} b +{\mathrm e}^{2 b x +2 a}-1}{b^{2} \left ({\mathrm e}^{2 b x +2 a}-1\right )^{2}}-\frac {2 a x}{b}-\frac {a^{2}}{b^{2}}+\frac {\ln \left (1+{\mathrm e}^{b x +a}\right ) x}{b}+\frac {\operatorname {polylog}\left (2, -{\mathrm e}^{b x +a}\right )}{b^{2}}+\frac {\ln \left (1-{\mathrm e}^{b x +a}\right ) x}{b}+\frac {\ln \left (1-{\mathrm e}^{b x +a}\right ) a}{b^{2}}+\frac {\operatorname {polylog}\left (2, {\mathrm e}^{b x +a}\right )}{b^{2}}-\frac {a \ln \left ({\mathrm e}^{b x +a}-1\right )}{b^{2}}+\frac {2 a \ln \left ({\mathrm e}^{b x +a}\right )}{b^{2}}\) \(164\)

Input:

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

Output:

-1/2*x^2-(2*x*exp(2*b*x+2*a)*b+exp(2*b*x+2*a)-1)/b^2/(exp(2*b*x+2*a)-1)^2- 
2/b*a*x-1/b^2*a^2+1/b*ln(1+exp(b*x+a))*x+1/b^2*polylog(2,-exp(b*x+a))+1/b* 
ln(1-exp(b*x+a))*x+1/b^2*ln(1-exp(b*x+a))*a+1/b^2*polylog(2,exp(b*x+a))-1/ 
b^2*a*ln(exp(b*x+a)-1)+2/b^2*a*ln(exp(b*x+a))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 975 vs. \(2 (71) = 142\).

Time = 0.12 (sec) , antiderivative size = 975, normalized size of antiderivative = 11.89 \[ \int x \coth ^3(a+b x) \, dx=\text {Too large to display} \] Input:

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

Output:

-1/2*((b^2*x^2 - 2*a^2)*cosh(b*x + a)^4 + 4*(b^2*x^2 - 2*a^2)*cosh(b*x + a 
)*sinh(b*x + a)^3 + (b^2*x^2 - 2*a^2)*sinh(b*x + a)^4 + b^2*x^2 - 2*(b^2*x 
^2 - 2*a^2 - 2*b*x - 1)*cosh(b*x + a)^2 - 2*(b^2*x^2 - 3*(b^2*x^2 - 2*a^2) 
*cosh(b*x + a)^2 - 2*a^2 - 2*b*x - 1)*sinh(b*x + a)^2 - 2*a^2 - 2*(cosh(b* 
x + a)^4 + 4*cosh(b*x + a)*sinh(b*x + a)^3 + sinh(b*x + a)^4 + 2*(3*cosh(b 
*x + a)^2 - 1)*sinh(b*x + a)^2 - 2*cosh(b*x + a)^2 + 4*(cosh(b*x + a)^3 - 
cosh(b*x + a))*sinh(b*x + a) + 1)*dilog(cosh(b*x + a) + sinh(b*x + a)) - 2 
*(cosh(b*x + a)^4 + 4*cosh(b*x + a)*sinh(b*x + a)^3 + sinh(b*x + a)^4 + 2* 
(3*cosh(b*x + a)^2 - 1)*sinh(b*x + a)^2 - 2*cosh(b*x + a)^2 + 4*(cosh(b*x 
+ a)^3 - cosh(b*x + a))*sinh(b*x + a) + 1)*dilog(-cosh(b*x + a) - sinh(b*x 
 + a)) - 2*(b*x*cosh(b*x + a)^4 + 4*b*x*cosh(b*x + a)*sinh(b*x + a)^3 + b* 
x*sinh(b*x + a)^4 - 2*b*x*cosh(b*x + a)^2 + 2*(3*b*x*cosh(b*x + a)^2 - b*x 
)*sinh(b*x + a)^2 + b*x + 4*(b*x*cosh(b*x + a)^3 - b*x*cosh(b*x + a))*sinh 
(b*x + a))*log(cosh(b*x + a) + sinh(b*x + a) + 1) + 2*(a*cosh(b*x + a)^4 + 
 4*a*cosh(b*x + a)*sinh(b*x + a)^3 + a*sinh(b*x + a)^4 - 2*a*cosh(b*x + a) 
^2 + 2*(3*a*cosh(b*x + a)^2 - a)*sinh(b*x + a)^2 + 4*(a*cosh(b*x + a)^3 - 
a*cosh(b*x + a))*sinh(b*x + a) + a)*log(cosh(b*x + a) + sinh(b*x + a) - 1) 
 - 2*((b*x + a)*cosh(b*x + a)^4 + 4*(b*x + a)*cosh(b*x + a)*sinh(b*x + a)^ 
3 + (b*x + a)*sinh(b*x + a)^4 - 2*(b*x + a)*cosh(b*x + a)^2 + 2*(3*(b*x + 
a)*cosh(b*x + a)^2 - b*x - a)*sinh(b*x + a)^2 + b*x + 4*((b*x + a)*cosh...
 

Sympy [F]

\[ \int x \coth ^3(a+b x) \, dx=\int x \coth ^{3}{\left (a + b x \right )}\, dx \] Input:

integrate(x*coth(b*x+a)**3,x)
 

Output:

Integral(x*coth(a + b*x)**3, x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 149 vs. \(2 (71) = 142\).

Time = 0.09 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.82 \[ \int x \coth ^3(a+b x) \, dx=-x^{2} + \frac {b^{2} x^{2} e^{\left (4 \, b x + 4 \, a\right )} + b^{2} x^{2} - 2 \, {\left (b^{2} x^{2} e^{\left (2 \, a\right )} + 2 \, b x e^{\left (2 \, a\right )} + e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )} + 2}{2 \, {\left (b^{2} e^{\left (4 \, b x + 4 \, a\right )} - 2 \, b^{2} e^{\left (2 \, b x + 2 \, a\right )} + b^{2}\right )}} + \frac {b x \log \left (e^{\left (b x + a\right )} + 1\right ) + {\rm Li}_2\left (-e^{\left (b x + a\right )}\right )}{b^{2}} + \frac {b x \log \left (-e^{\left (b x + a\right )} + 1\right ) + {\rm Li}_2\left (e^{\left (b x + a\right )}\right )}{b^{2}} \] Input:

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

Output:

-x^2 + 1/2*(b^2*x^2*e^(4*b*x + 4*a) + b^2*x^2 - 2*(b^2*x^2*e^(2*a) + 2*b*x 
*e^(2*a) + e^(2*a))*e^(2*b*x) + 2)/(b^2*e^(4*b*x + 4*a) - 2*b^2*e^(2*b*x + 
 2*a) + b^2) + (b*x*log(e^(b*x + a) + 1) + dilog(-e^(b*x + a)))/b^2 + (b*x 
*log(-e^(b*x + a) + 1) + dilog(e^(b*x + a)))/b^2
 

Giac [F]

\[ \int x \coth ^3(a+b x) \, dx=\int { x \coth \left (b x + a\right )^{3} \,d x } \] Input:

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

Output:

integrate(x*coth(b*x + a)^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int x \coth ^3(a+b x) \, dx=\int x\,{\mathrm {coth}\left (a+b\,x\right )}^3 \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int x \coth ^3(a+b x) \, dx=\frac {16 e^{4 b x +4 a} \left (\int \frac {x}{e^{6 b x +6 a}-3 e^{4 b x +4 a}+3 e^{2 b x +2 a}-1}d x \right ) b^{2}+6 e^{4 b x +4 a} \mathrm {log}\left (e^{b x +a}-1\right )+6 e^{4 b x +4 a} \mathrm {log}\left (e^{b x +a}+1\right )+4 e^{4 b x +4 a} b^{2} x^{2}-12 e^{4 b x +4 a} b x -3 e^{4 b x +4 a}-32 e^{2 b x +2 a} \left (\int \frac {x}{e^{6 b x +6 a}-3 e^{4 b x +4 a}+3 e^{2 b x +2 a}-1}d x \right ) b^{2}-12 e^{2 b x +2 a} \mathrm {log}\left (e^{b x +a}-1\right )-12 e^{2 b x +2 a} \mathrm {log}\left (e^{b x +a}+1\right )-8 e^{2 b x +2 a} b^{2} x^{2}+16 \left (\int \frac {x}{e^{6 b x +6 a}-3 e^{4 b x +4 a}+3 e^{2 b x +2 a}-1}d x \right ) b^{2}+6 \,\mathrm {log}\left (e^{b x +a}-1\right )+6 \,\mathrm {log}\left (e^{b x +a}+1\right )+4 b^{2} x^{2}+3}{8 b^{2} \left (e^{4 b x +4 a}-2 e^{2 b x +2 a}+1\right )} \] Input:

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

Output:

(16*e**(4*a + 4*b*x)*int(x/(e**(6*a + 6*b*x) - 3*e**(4*a + 4*b*x) + 3*e**( 
2*a + 2*b*x) - 1),x)*b**2 + 6*e**(4*a + 4*b*x)*log(e**(a + b*x) - 1) + 6*e 
**(4*a + 4*b*x)*log(e**(a + b*x) + 1) + 4*e**(4*a + 4*b*x)*b**2*x**2 - 12* 
e**(4*a + 4*b*x)*b*x - 3*e**(4*a + 4*b*x) - 32*e**(2*a + 2*b*x)*int(x/(e** 
(6*a + 6*b*x) - 3*e**(4*a + 4*b*x) + 3*e**(2*a + 2*b*x) - 1),x)*b**2 - 12* 
e**(2*a + 2*b*x)*log(e**(a + b*x) - 1) - 12*e**(2*a + 2*b*x)*log(e**(a + b 
*x) + 1) - 8*e**(2*a + 2*b*x)*b**2*x**2 + 16*int(x/(e**(6*a + 6*b*x) - 3*e 
**(4*a + 4*b*x) + 3*e**(2*a + 2*b*x) - 1),x)*b**2 + 6*log(e**(a + b*x) - 1 
) + 6*log(e**(a + b*x) + 1) + 4*b**2*x**2 + 3)/(8*b**2*(e**(4*a + 4*b*x) - 
 2*e**(2*a + 2*b*x) + 1))