\(\int \frac {1}{(1+\coth (x))^3} \, dx\) [67]

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

Optimal result

Integrand size = 6, antiderivative size = 36 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {x}{8}-\frac {1}{6 (1+\coth (x))^3}-\frac {1}{8 (1+\coth (x))^2}-\frac {1}{8 (1+\coth (x))} \]

[Out]

1/8*x-1/6/(1+coth(x))^3-1/8/(1+coth(x))^2-1/8/(1+coth(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3560, 8} \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {x}{8}-\frac {1}{8 (\coth (x)+1)}-\frac {1}{8 (\coth (x)+1)^2}-\frac {1}{6 (\coth (x)+1)^3} \]

[In]

Int[(1 + Coth[x])^(-3),x]

[Out]

x/8 - 1/(6*(1 + Coth[x])^3) - 1/(8*(1 + Coth[x])^2) - 1/(8*(1 + Coth[x]))

Rule 8

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

Rule 3560

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a*((a + b*Tan[c + d*x])^n/(2*b*d*n)), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{6 (1+\coth (x))^3}+\frac {1}{2} \int \frac {1}{(1+\coth (x))^2} \, dx \\ & = -\frac {1}{6 (1+\coth (x))^3}-\frac {1}{8 (1+\coth (x))^2}+\frac {1}{4} \int \frac {1}{1+\coth (x)} \, dx \\ & = -\frac {1}{6 (1+\coth (x))^3}-\frac {1}{8 (1+\coth (x))^2}-\frac {1}{8 (1+\coth (x))}+\frac {\int 1 \, dx}{8} \\ & = \frac {x}{8}-\frac {1}{6 (1+\coth (x))^3}-\frac {1}{8 (1+\coth (x))^2}-\frac {1}{8 (1+\coth (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {10+27 \tanh (x)+21 \tanh ^2(x)+3 \text {arctanh}(\tanh (x)) (1+\tanh (x))^3}{24 (1+\tanh (x))^3} \]

[In]

Integrate[(1 + Coth[x])^(-3),x]

[Out]

(10 + 27*Tanh[x] + 21*Tanh[x]^2 + 3*ArcTanh[Tanh[x]]*(1 + Tanh[x])^3)/(24*(1 + Tanh[x])^3)

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.64

method result size
risch \(\frac {x}{8}+\frac {3 \,{\mathrm e}^{-2 x}}{16}-\frac {3 \,{\mathrm e}^{-4 x}}{32}+\frac {{\mathrm e}^{-6 x}}{48}\) \(23\)
parallelrisch \(\frac {3 \tanh \left (x \right )^{3} x +\left (9 x +21\right ) \tanh \left (x \right )^{2}+\left (9 x +27\right ) \tanh \left (x \right )+3 x +10}{24 \left (1+\tanh \left (x \right )\right )^{3}}\) \(39\)
derivativedivides \(-\frac {1}{6 \left (1+\coth \left (x \right )\right )^{3}}-\frac {1}{8 \left (1+\coth \left (x \right )\right )^{2}}-\frac {1}{8 \left (1+\coth \left (x \right )\right )}+\frac {\ln \left (1+\coth \left (x \right )\right )}{16}-\frac {\ln \left (\coth \left (x \right )-1\right )}{16}\) \(40\)
default \(-\frac {1}{6 \left (1+\coth \left (x \right )\right )^{3}}-\frac {1}{8 \left (1+\coth \left (x \right )\right )^{2}}-\frac {1}{8 \left (1+\coth \left (x \right )\right )}+\frac {\ln \left (1+\coth \left (x \right )\right )}{16}-\frac {\ln \left (\coth \left (x \right )-1\right )}{16}\) \(40\)

[In]

int(1/(1+coth(x))^3,x,method=_RETURNVERBOSE)

[Out]

1/8*x+3/16*exp(-2*x)-3/32*exp(-4*x)+1/48*exp(-6*x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 86 vs. \(2 (28) = 56\).

Time = 0.24 (sec) , antiderivative size = 86, normalized size of antiderivative = 2.39 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {2 \, {\left (6 \, x + 1\right )} \cosh \left (x\right )^{3} + 6 \, {\left (6 \, x + 1\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} + 2 \, {\left (6 \, x - 1\right )} \sinh \left (x\right )^{3} + 3 \, {\left (2 \, {\left (6 \, x - 1\right )} \cosh \left (x\right )^{2} + 9\right )} \sinh \left (x\right ) + 9 \, \cosh \left (x\right )}{96 \, {\left (\cosh \left (x\right )^{3} + 3 \, \cosh \left (x\right )^{2} \sinh \left (x\right ) + 3 \, \cosh \left (x\right ) \sinh \left (x\right )^{2} + \sinh \left (x\right )^{3}\right )}} \]

[In]

integrate(1/(1+coth(x))^3,x, algorithm="fricas")

[Out]

1/96*(2*(6*x + 1)*cosh(x)^3 + 6*(6*x + 1)*cosh(x)*sinh(x)^2 + 2*(6*x - 1)*sinh(x)^3 + 3*(2*(6*x - 1)*cosh(x)^2
 + 9)*sinh(x) + 9*cosh(x))/(cosh(x)^3 + 3*cosh(x)^2*sinh(x) + 3*cosh(x)*sinh(x)^2 + sinh(x)^3)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (31) = 62\).

Time = 0.57 (sec) , antiderivative size = 182, normalized size of antiderivative = 5.06 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {3 x \tanh ^{3}{\left (x \right )}}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} + \frac {9 x \tanh ^{2}{\left (x \right )}}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} + \frac {9 x \tanh {\left (x \right )}}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} + \frac {3 x}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} + \frac {21 \tanh ^{2}{\left (x \right )}}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} + \frac {27 \tanh {\left (x \right )}}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} + \frac {10}{24 \tanh ^{3}{\left (x \right )} + 72 \tanh ^{2}{\left (x \right )} + 72 \tanh {\left (x \right )} + 24} \]

[In]

integrate(1/(1+coth(x))**3,x)

[Out]

3*x*tanh(x)**3/(24*tanh(x)**3 + 72*tanh(x)**2 + 72*tanh(x) + 24) + 9*x*tanh(x)**2/(24*tanh(x)**3 + 72*tanh(x)*
*2 + 72*tanh(x) + 24) + 9*x*tanh(x)/(24*tanh(x)**3 + 72*tanh(x)**2 + 72*tanh(x) + 24) + 3*x/(24*tanh(x)**3 + 7
2*tanh(x)**2 + 72*tanh(x) + 24) + 21*tanh(x)**2/(24*tanh(x)**3 + 72*tanh(x)**2 + 72*tanh(x) + 24) + 27*tanh(x)
/(24*tanh(x)**3 + 72*tanh(x)**2 + 72*tanh(x) + 24) + 10/(24*tanh(x)**3 + 72*tanh(x)**2 + 72*tanh(x) + 24)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.61 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {1}{8} \, x + \frac {3}{16} \, e^{\left (-2 \, x\right )} - \frac {3}{32} \, e^{\left (-4 \, x\right )} + \frac {1}{48} \, e^{\left (-6 \, x\right )} \]

[In]

integrate(1/(1+coth(x))^3,x, algorithm="maxima")

[Out]

1/8*x + 3/16*e^(-2*x) - 3/32*e^(-4*x) + 1/48*e^(-6*x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.67 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {1}{96} \, {\left (18 \, e^{\left (4 \, x\right )} - 9 \, e^{\left (2 \, x\right )} + 2\right )} e^{\left (-6 \, x\right )} + \frac {1}{8} \, x \]

[In]

integrate(1/(1+coth(x))^3,x, algorithm="giac")

[Out]

1/96*(18*e^(4*x) - 9*e^(2*x) + 2)*e^(-6*x) + 1/8*x

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.61 \[ \int \frac {1}{(1+\coth (x))^3} \, dx=\frac {x}{8}+\frac {3\,{\mathrm {e}}^{-2\,x}}{16}-\frac {3\,{\mathrm {e}}^{-4\,x}}{32}+\frac {{\mathrm {e}}^{-6\,x}}{48} \]

[In]

int(1/(coth(x) + 1)^3,x)

[Out]

x/8 + (3*exp(-2*x))/16 - (3*exp(-4*x))/32 + exp(-6*x)/48