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

Optimal. Leaf size=11 \[ \tanh (x)-\frac {\tanh ^2(x)}{2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3487} \[ \tanh (x)-\frac {\tanh ^2(x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Tanh[x] - Tanh[x]^2/2

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}^4(x)}{1+\tanh (x)} \, dx &=\operatorname {Subst}(\int (1-x) \, dx,x,\tanh (x))\\ &=\tanh (x)-\frac {\tanh ^2(x)}{2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 11, normalized size = 1.00 \[ \tanh (x)+\frac {\text {sech}^2(x)}{2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Sech[x]^2/2 + Tanh[x]

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 53, normalized size = 4.82 \[ -\frac {2}{\cosh \relax (x)^{4} + 4 \, \cosh \relax (x) \sinh \relax (x)^{3} + \sinh \relax (x)^{4} + 2 \, {\left (3 \, \cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 2 \, \cosh \relax (x)^{2} + 4 \, {\left (\cosh \relax (x)^{3} + \cosh \relax (x)\right )} \sinh \relax (x) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 10, normalized size = 0.91 \[ -\frac {2}{{\left (e^{\left (2 \, x\right )} + 1\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^4/(1+tanh(x)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.08, size = 34, normalized size = 3.09 \[ -\frac {2 \left (-\left (\tanh ^{3}\left (\frac {x}{2}\right )\right )+\tanh ^{2}\left (\frac {x}{2}\right )-\tanh \left (\frac {x}{2}\right )\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.31, size = 37, normalized size = 3.36 \[ \frac {4 \, e^{\left (-2 \, x\right )}}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} + \frac {2}{2 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.04, size = 16, normalized size = 1.45 \[ -\frac {2}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/(2*exp(2*x) + exp(4*x) + 1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________