3.110 \(\int \frac{\text{sech}^2(x)}{1+\coth (x)} \, dx\)

Optimal. Leaf size=15 \[ \tanh (x)-\log (\tanh (x))-\log (\coth (x)+1) \]

[Out]

-Log[1 + Coth[x]] - Log[Tanh[x]] + Tanh[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0411416, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3516, 44} \[ \tanh (x)-\log (\tanh (x))-\log (\coth (x)+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-Log[1 + Coth[x]] - Log[Tanh[x]] + Tanh[x]

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\text{sech}^2(x)}{1+\coth (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{x^2 (1+x)} \, dx,x,\coth (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{x^2}-\frac{1}{x}+\frac{1}{1+x}\right ) \, dx,x,\coth (x)\right )\\ &=-\log (1+\coth (x))-\log (\tanh (x))+\tanh (x)\\ \end{align*}

Mathematica [A]  time = 0.0296206, size = 9, normalized size = 0.6 \[ -x+\tanh (x)+\log (\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x + Log[Cosh[x]] + Tanh[x]

________________________________________________________________________________________

Maple [B]  time = 0.028, size = 36, normalized size = 2.4 \begin{align*} -2\,\ln \left ( \tanh \left ( x/2 \right ) +1 \right ) +2\,{\frac{\tanh \left ( x/2 \right ) }{ \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1}}+\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*ln(tanh(1/2*x)+1)+2*tanh(1/2*x)/(tanh(1/2*x)^2+1)+ln(tanh(1/2*x)^2+1)

________________________________________________________________________________________

Maxima [A]  time = 1.56431, size = 24, normalized size = 1.6 \begin{align*} \frac{2}{e^{\left (-2 \, x\right )} + 1} + \log \left (e^{\left (-2 \, x\right )} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/(e^(-2*x) + 1) + log(e^(-2*x) + 1)

________________________________________________________________________________________

Fricas [B]  time = 2.6983, size = 269, normalized size = 17.93 \begin{align*} -\frac{2 \, x \cosh \left (x\right )^{2} + 4 \, x \cosh \left (x\right ) \sinh \left (x\right ) + 2 \, x \sinh \left (x\right )^{2} -{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1\right )} \log \left (\frac{2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) + 2 \, x + 2}{\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}^{2}{\left (x \right )}}{\coth{\left (x \right )} + 1}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sech(x)**2/(coth(x) + 1), x)

________________________________________________________________________________________

Giac [A]  time = 1.18812, size = 36, normalized size = 2.4 \begin{align*} -2 \, x - \frac{e^{\left (2 \, x\right )} + 3}{e^{\left (2 \, x\right )} + 1} + \log \left (e^{\left (2 \, x\right )} + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x - (e^(2*x) + 3)/(e^(2*x) + 1) + log(e^(2*x) + 1)