3.66 \(\int \frac{1}{(1+\coth (x))^2} \, dx\)

Optimal. Leaf size=26 \[ \frac{x}{4}-\frac{1}{4 (\coth (x)+1)}-\frac{1}{4 (\coth (x)+1)^2} \]

[Out]

x/4 - 1/(4*(1 + Coth[x])^2) - 1/(4*(1 + Coth[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0169901, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3479, 8} \[ \frac{x}{4}-\frac{1}{4 (\coth (x)+1)}-\frac{1}{4 (\coth (x)+1)^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/4 - 1/(4*(1 + Coth[x])^2) - 1/(4*(1 + Coth[x]))

Rule 3479

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]

Rule 8

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

Rubi steps

\begin{align*} \int \frac{1}{(1+\coth (x))^2} \, dx &=-\frac{1}{4 (1+\coth (x))^2}+\frac{1}{2} \int \frac{1}{1+\coth (x)} \, dx\\ &=-\frac{1}{4 (1+\coth (x))^2}-\frac{1}{4 (1+\coth (x))}+\frac{\int 1 \, dx}{4}\\ &=\frac{x}{4}-\frac{1}{4 (1+\coth (x))^2}-\frac{1}{4 (1+\coth (x))}\\ \end{align*}

Mathematica [A]  time = 0.0576583, size = 30, normalized size = 1.15 \[ \frac{1}{16} (4 x-4 \sinh (2 x)+\sinh (4 x)+4 \cosh (2 x)-\cosh (4 x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(4*x + 4*Cosh[2*x] - Cosh[4*x] - 4*Sinh[2*x] + Sinh[4*x])/16

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 32, normalized size = 1.2 \begin{align*} -{\frac{1}{4\, \left ( 1+{\rm coth} \left (x\right ) \right ) ^{2}}}-{\frac{1}{4+4\,{\rm coth} \left (x\right )}}+{\frac{\ln \left ( 1+{\rm coth} \left (x\right ) \right ) }{8}}-{\frac{\ln \left ({\rm coth} \left (x\right )-1 \right ) }{8}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4/(1+coth(x))^2-1/4/(1+coth(x))+1/8*ln(1+coth(x))-1/8*ln(coth(x)-1)

________________________________________________________________________________________

Maxima [A]  time = 1.02873, size = 22, normalized size = 0.85 \begin{align*} \frac{1}{4} \, x + \frac{1}{4} \, e^{\left (-2 \, x\right )} - \frac{1}{16} \, e^{\left (-4 \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*x + 1/4*e^(-2*x) - 1/16*e^(-4*x)

________________________________________________________________________________________

Fricas [B]  time = 2.39471, size = 173, normalized size = 6.65 \begin{align*} \frac{{\left (4 \, x - 1\right )} \cosh \left (x\right )^{2} + 2 \,{\left (4 \, x + 1\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (4 \, x - 1\right )} \sinh \left (x\right )^{2} + 4}{16 \,{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/16*((4*x - 1)*cosh(x)^2 + 2*(4*x + 1)*cosh(x)*sinh(x) + (4*x - 1)*sinh(x)^2 + 4)/(cosh(x)^2 + 2*cosh(x)*sinh
(x) + sinh(x)^2)

________________________________________________________________________________________

Sympy [B]  time = 0.990182, size = 88, normalized size = 3.38 \begin{align*} \frac{x \tanh ^{2}{\left (x \right )}}{4 \tanh ^{2}{\left (x \right )} + 8 \tanh{\left (x \right )} + 4} + \frac{2 x \tanh{\left (x \right )}}{4 \tanh ^{2}{\left (x \right )} + 8 \tanh{\left (x \right )} + 4} + \frac{x}{4 \tanh ^{2}{\left (x \right )} + 8 \tanh{\left (x \right )} + 4} + \frac{3 \tanh{\left (x \right )}}{4 \tanh ^{2}{\left (x \right )} + 8 \tanh{\left (x \right )} + 4} + \frac{2}{4 \tanh ^{2}{\left (x \right )} + 8 \tanh{\left (x \right )} + 4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*tanh(x)**2/(4*tanh(x)**2 + 8*tanh(x) + 4) + 2*x*tanh(x)/(4*tanh(x)**2 + 8*tanh(x) + 4) + x/(4*tanh(x)**2 + 8
*tanh(x) + 4) + 3*tanh(x)/(4*tanh(x)**2 + 8*tanh(x) + 4) + 2/(4*tanh(x)**2 + 8*tanh(x) + 4)

________________________________________________________________________________________

Giac [A]  time = 1.15641, size = 24, normalized size = 0.92 \begin{align*} \frac{1}{16} \,{\left (4 \, e^{\left (2 \, x\right )} - 1\right )} e^{\left (-4 \, x\right )} + \frac{1}{4} \, x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/16*(4*e^(2*x) - 1)*e^(-4*x) + 1/4*x