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

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

[Out]

ln(1+tanh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 5, normalized size of antiderivative = 1.00, 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 31

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

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.00, size = 7, normalized size = 1.40 \[ x-\log (\cosh (x)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x - Log[Cosh[x]]

________________________________________________________________________________________

fricas [B]  time = 0.57, size = 20, normalized size = 4.00 \[ 2 \, x - \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) \]

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)))

________________________________________________________________________________________

giac [B]  time = 0.11, size = 13, normalized size = 2.60 \[ 2 \, x - \log \left (e^{\left (2 \, x\right )} + 1\right ) \]

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)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 6, normalized size = 1.20 \[ \ln \left (1+\tanh \relax (x )\right ) \]

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 = 0.31, size = 5, normalized size = 1.00 \[ \log \left (\tanh \relax (x) + 1\right ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 1.05, size = 13, normalized size = 2.60 \[ 2\,x-\ln \left ({\mathrm {e}}^{2\,x}+1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(x)^2*(tanh(x) + 1)),x)

[Out]

2*x - log(exp(2*x) + 1)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}^{2}{\relax (x )}}{\tanh {\relax (x )} + 1}\, dx \]

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)

________________________________________________________________________________________