\(\int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx\) [100]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 25 \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=-\frac {2}{3} (1-\tanh (x))^3+\frac {1}{4} (1-\tanh (x))^4 \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3568, 45} \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=\frac {1}{4} (1-\tanh (x))^4-\frac {2}{3} (1-\tanh (x))^3 \]

[In]

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

[Out]

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

Rule 45

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, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

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

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.96 \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=\frac {1}{12} \tanh (x) \left (12-6 \tanh (x)-4 \tanh ^2(x)+3 \tanh ^3(x)\right ) \]

[In]

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

[Out]

(Tanh[x]*(12 - 6*Tanh[x] - 4*Tanh[x]^2 + 3*Tanh[x]^3))/12

Maple [A] (verified)

Time = 4.27 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76

method result size
risch \(-\frac {4 \left (4 \,{\mathrm e}^{2 x}+1\right )}{3 \left (1+{\mathrm e}^{2 x}\right )^{4}}\) \(19\)
parallelrisch \(-\frac {39}{100}+\frac {2 \tanh \left (x \right )}{3}+\frac {\tanh \left (x \right ) \operatorname {sech}\left (x \right )^{2}}{3}+\frac {\operatorname {sech}\left (x \right )^{4}}{4}\) \(21\)
derivativedivides \(\frac {\tanh \left (x \right )^{4}}{4}-\frac {\tanh \left (x \right )^{3}}{3}-\frac {\tanh \left (x \right )^{2}}{2}+\tanh \left (x \right )\) \(22\)
default \(\frac {\tanh \left (x \right )^{4}}{4}-\frac {\tanh \left (x \right )^{3}}{3}-\frac {\tanh \left (x \right )^{2}}{2}+\tanh \left (x \right )\) \(22\)

[In]

int(sech(x)^6/(1+tanh(x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 140 vs. \(2 (17) = 34\).

Time = 0.25 (sec) , antiderivative size = 140, normalized size of antiderivative = 5.60 \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=-\frac {4 \, {\left (5 \, \cosh \left (x\right ) + 3 \, \sinh \left (x\right )\right )}}{3 \, {\left (\cosh \left (x\right )^{7} + 7 \, \cosh \left (x\right ) \sinh \left (x\right )^{6} + \sinh \left (x\right )^{7} + {\left (21 \, \cosh \left (x\right )^{2} + 4\right )} \sinh \left (x\right )^{5} + 4 \, \cosh \left (x\right )^{5} + 5 \, {\left (7 \, \cosh \left (x\right )^{3} + 4 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{4} + {\left (35 \, \cosh \left (x\right )^{4} + 40 \, \cosh \left (x\right )^{2} + 6\right )} \sinh \left (x\right )^{3} + 6 \, \cosh \left (x\right )^{3} + {\left (21 \, \cosh \left (x\right )^{5} + 40 \, \cosh \left (x\right )^{3} + 18 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + {\left (7 \, \cosh \left (x\right )^{6} + 20 \, \cosh \left (x\right )^{4} + 18 \, \cosh \left (x\right )^{2} + 3\right )} \sinh \left (x\right ) + 5 \, \cosh \left (x\right )\right )}} \]

[In]

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

[Out]

-4/3*(5*cosh(x) + 3*sinh(x))/(cosh(x)^7 + 7*cosh(x)*sinh(x)^6 + sinh(x)^7 + (21*cosh(x)^2 + 4)*sinh(x)^5 + 4*c
osh(x)^5 + 5*(7*cosh(x)^3 + 4*cosh(x))*sinh(x)^4 + (35*cosh(x)^4 + 40*cosh(x)^2 + 6)*sinh(x)^3 + 6*cosh(x)^3 +
 (21*cosh(x)^5 + 40*cosh(x)^3 + 18*cosh(x))*sinh(x)^2 + (7*cosh(x)^6 + 20*cosh(x)^4 + 18*cosh(x)^2 + 3)*sinh(x
) + 5*cosh(x))

Sympy [F]

\[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=\int \frac {\operatorname {sech}^{6}{\left (x \right )}}{\tanh {\left (x \right )} + 1}\, dx \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (17) = 34\).

Time = 0.19 (sec) , antiderivative size = 93, normalized size of antiderivative = 3.72 \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=\frac {16 \, e^{\left (-2 \, x\right )}}{3 \, {\left (4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1\right )}} + \frac {8 \, e^{\left (-4 \, x\right )}}{4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1} + \frac {4}{3 \, {\left (4 \, e^{\left (-2 \, x\right )} + 6 \, e^{\left (-4 \, x\right )} + 4 \, e^{\left (-6 \, x\right )} + e^{\left (-8 \, x\right )} + 1\right )}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=-\frac {4 \, {\left (4 \, e^{\left (2 \, x\right )} + 1\right )}}{3 \, {\left (e^{\left (2 \, x\right )} + 1\right )}^{4}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {\text {sech}^6(x)}{1+\tanh (x)} \, dx=-\frac {4\,\left (4\,{\mathrm {e}}^{2\,x}+1\right )}{3\,{\left ({\mathrm {e}}^{2\,x}+1\right )}^4} \]

[In]

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

[Out]

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