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

Optimal. Leaf size=5 \[ \log (\tanh (x)+1) \]

[Out]

Log[1 + Tanh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0334008, antiderivative size = 5, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3487, 31} \[ \log (\tanh (x)+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[1 + Tanh[x]]

Rule 3487

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

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

Mathematica [A]  time = 0.0038613, size = 7, normalized size = 1.4 \[ x-\log (\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x - Log[Cosh[x]]

________________________________________________________________________________________

Maple [A]  time = 0.018, size = 6, normalized size = 1.2 \begin{align*} \ln \left ( 1+\tanh \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

ln(1+tanh(x))

________________________________________________________________________________________

Maxima [A]  time = 1.16682, size = 7, normalized size = 1.4 \begin{align*} \log \left (\tanh \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(tanh(x) + 1)

________________________________________________________________________________________

Fricas [B]  time = 2.31621, size = 57, normalized size = 11.4 \begin{align*} 2 \, x - \log \left (\frac{2 \, \cosh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x - log(2*cosh(x)/(cosh(x) - sinh(x)))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.26671, size = 18, normalized size = 3.6 \begin{align*} 2 \, x - \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+tanh(x)),x, algorithm="giac")

[Out]

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