3.1003 \(\int \text {sech}^4(x) (-1+\text {sech}^2(x))^2 \tanh (x) \, dx\)

Optimal. Leaf size=17 \[ \frac {\tanh ^6(x)}{6}-\frac {\tanh ^8(x)}{8} \]

[Out]

1/6*tanh(x)^6-1/8*tanh(x)^8

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4120, 2607, 14} \[ \frac {\tanh ^6(x)}{6}-\frac {\tanh ^8(x)}{8} \]

Antiderivative was successfully verified.

[In]

Int[Sech[x]^4*(-1 + Sech[x]^2)^2*Tanh[x],x]

[Out]

Tanh[x]^6/6 - Tanh[x]^8/8

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2607

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

Rule 4120

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[b^p, Int[ActivateTrig[u*tan[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \text {sech}^4(x) \left (-1+\text {sech}^2(x)\right )^2 \tanh (x) \, dx &=\int \text {sech}^4(x) \tanh ^5(x) \, dx\\ &=-\operatorname {Subst}\left (\int x^5 \left (1+x^2\right ) \, dx,x,i \tanh (x)\right )\\ &=-\operatorname {Subst}\left (\int \left (x^5+x^7\right ) \, dx,x,i \tanh (x)\right )\\ &=\frac {\tanh ^6(x)}{6}-\frac {\tanh ^8(x)}{8}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 25, normalized size = 1.47 \[ -\frac {1}{8} \text {sech}^8(x)+\frac {\text {sech}^6(x)}{3}-\frac {\text {sech}^4(x)}{4} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[x]^4*(-1 + Sech[x]^2)^2*Tanh[x],x]

[Out]

-1/4*Sech[x]^4 + Sech[x]^6/3 - Sech[x]^8/8

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 340, normalized size = 20.00 \[ -\frac {4 \, {\left (3 \, \cosh \relax (x)^{6} + 18 \, \cosh \relax (x) \sinh \relax (x)^{5} + 3 \, \sinh \relax (x)^{6} + {\left (45 \, \cosh \relax (x)^{2} - 4\right )} \sinh \relax (x)^{4} - 4 \, \cosh \relax (x)^{4} + 4 \, {\left (15 \, \cosh \relax (x)^{3} - 4 \, \cosh \relax (x)\right )} \sinh \relax (x)^{3} + {\left (45 \, \cosh \relax (x)^{4} - 24 \, \cosh \relax (x)^{2} + 13\right )} \sinh \relax (x)^{2} + 13 \, \cosh \relax (x)^{2} + 2 \, {\left (9 \, \cosh \relax (x)^{5} - 8 \, \cosh \relax (x)^{3} + 7 \, \cosh \relax (x)\right )} \sinh \relax (x) - 4\right )}}{3 \, {\left (\cosh \relax (x)^{10} + 10 \, \cosh \relax (x) \sinh \relax (x)^{9} + \sinh \relax (x)^{10} + {\left (45 \, \cosh \relax (x)^{2} + 8\right )} \sinh \relax (x)^{8} + 8 \, \cosh \relax (x)^{8} + 8 \, {\left (15 \, \cosh \relax (x)^{3} + 8 \, \cosh \relax (x)\right )} \sinh \relax (x)^{7} + {\left (210 \, \cosh \relax (x)^{4} + 224 \, \cosh \relax (x)^{2} + 29\right )} \sinh \relax (x)^{6} + 29 \, \cosh \relax (x)^{6} + 2 \, {\left (126 \, \cosh \relax (x)^{5} + 224 \, \cosh \relax (x)^{3} + 81 \, \cosh \relax (x)\right )} \sinh \relax (x)^{5} + {\left (210 \, \cosh \relax (x)^{6} + 560 \, \cosh \relax (x)^{4} + 435 \, \cosh \relax (x)^{2} + 64\right )} \sinh \relax (x)^{4} + 64 \, \cosh \relax (x)^{4} + 4 \, {\left (30 \, \cosh \relax (x)^{7} + 112 \, \cosh \relax (x)^{5} + 135 \, \cosh \relax (x)^{3} + 48 \, \cosh \relax (x)\right )} \sinh \relax (x)^{3} + {\left (45 \, \cosh \relax (x)^{8} + 224 \, \cosh \relax (x)^{6} + 435 \, \cosh \relax (x)^{4} + 384 \, \cosh \relax (x)^{2} + 98\right )} \sinh \relax (x)^{2} + 98 \, \cosh \relax (x)^{2} + 2 \, {\left (5 \, \cosh \relax (x)^{9} + 32 \, \cosh \relax (x)^{7} + 81 \, \cosh \relax (x)^{5} + 96 \, \cosh \relax (x)^{3} + 42 \, \cosh \relax (x)\right )} \sinh \relax (x) + 56\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^4*(-1+sech(x)^2)^2*tanh(x),x, algorithm="fricas")

[Out]

-4/3*(3*cosh(x)^6 + 18*cosh(x)*sinh(x)^5 + 3*sinh(x)^6 + (45*cosh(x)^2 - 4)*sinh(x)^4 - 4*cosh(x)^4 + 4*(15*co
sh(x)^3 - 4*cosh(x))*sinh(x)^3 + (45*cosh(x)^4 - 24*cosh(x)^2 + 13)*sinh(x)^2 + 13*cosh(x)^2 + 2*(9*cosh(x)^5
- 8*cosh(x)^3 + 7*cosh(x))*sinh(x) - 4)/(cosh(x)^10 + 10*cosh(x)*sinh(x)^9 + sinh(x)^10 + (45*cosh(x)^2 + 8)*s
inh(x)^8 + 8*cosh(x)^8 + 8*(15*cosh(x)^3 + 8*cosh(x))*sinh(x)^7 + (210*cosh(x)^4 + 224*cosh(x)^2 + 29)*sinh(x)
^6 + 29*cosh(x)^6 + 2*(126*cosh(x)^5 + 224*cosh(x)^3 + 81*cosh(x))*sinh(x)^5 + (210*cosh(x)^6 + 560*cosh(x)^4
+ 435*cosh(x)^2 + 64)*sinh(x)^4 + 64*cosh(x)^4 + 4*(30*cosh(x)^7 + 112*cosh(x)^5 + 135*cosh(x)^3 + 48*cosh(x))
*sinh(x)^3 + (45*cosh(x)^8 + 224*cosh(x)^6 + 435*cosh(x)^4 + 384*cosh(x)^2 + 98)*sinh(x)^2 + 98*cosh(x)^2 + 2*
(5*cosh(x)^9 + 32*cosh(x)^7 + 81*cosh(x)^5 + 96*cosh(x)^3 + 42*cosh(x))*sinh(x) + 56)

________________________________________________________________________________________

giac [B]  time = 0.12, size = 41, normalized size = 2.41 \[ -\frac {4 \, {\left (3 \, e^{\left (12 \, x\right )} - 4 \, e^{\left (10 \, x\right )} + 10 \, e^{\left (8 \, x\right )} - 4 \, e^{\left (6 \, x\right )} + 3 \, e^{\left (4 \, x\right )}\right )}}{3 \, {\left (e^{\left (2 \, x\right )} + 1\right )}^{8}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^4*(-1+sech(x)^2)^2*tanh(x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 20, normalized size = 1.18 \[ -\frac {\mathrm {sech}\relax (x )^{8}}{8}+\frac {\mathrm {sech}\relax (x )^{6}}{3}-\frac {\mathrm {sech}\relax (x )^{4}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(x)^4*(-1+sech(x)^2)^2*tanh(x),x)

[Out]

-1/8*sech(x)^8+1/3*sech(x)^6-1/4*sech(x)^4

________________________________________________________________________________________

maxima [B]  time = 0.30, size = 34, normalized size = 2.00 \[ -\frac {4}{{\left (e^{\left (-x\right )} + e^{x}\right )}^{4}} + \frac {64}{3 \, {\left (e^{\left (-x\right )} + e^{x}\right )}^{6}} - \frac {32}{{\left (e^{\left (-x\right )} + e^{x}\right )}^{8}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)^4*(-1+sech(x)^2)^2*tanh(x),x, algorithm="maxima")

[Out]

-4/(e^(-x) + e^x)^4 + 64/3/(e^(-x) + e^x)^6 - 32/(e^(-x) + e^x)^8

________________________________________________________________________________________

mupad [B]  time = 1.76, size = 375, normalized size = 22.06 \[ \frac {{\mathrm {e}}^{2\,x}-5\,{\mathrm {e}}^{4\,x}+10\,{\mathrm {e}}^{6\,x}-10\,{\mathrm {e}}^{8\,x}+5\,{\mathrm {e}}^{10\,x}-{\mathrm {e}}^{12\,x}}{8\,{\mathrm {e}}^{2\,x}+28\,{\mathrm {e}}^{4\,x}+56\,{\mathrm {e}}^{6\,x}+70\,{\mathrm {e}}^{8\,x}+56\,{\mathrm {e}}^{10\,x}+28\,{\mathrm {e}}^{12\,x}+8\,{\mathrm {e}}^{14\,x}+{\mathrm {e}}^{16\,x}+1}-\frac {\frac {20\,{\mathrm {e}}^{4\,x}}{7}-\frac {10\,{\mathrm {e}}^{2\,x}}{7}-\frac {50\,{\mathrm {e}}^{6\,x}}{21}+\frac {5\,{\mathrm {e}}^{8\,x}}{7}+\frac {5}{21}}{6\,{\mathrm {e}}^{2\,x}+15\,{\mathrm {e}}^{4\,x}+20\,{\mathrm {e}}^{6\,x}+15\,{\mathrm {e}}^{8\,x}+6\,{\mathrm {e}}^{10\,x}+{\mathrm {e}}^{12\,x}+1}-\frac {\frac {8\,{\mathrm {e}}^{2\,x}}{7}-\frac {10\,{\mathrm {e}}^{4\,x}}{7}+\frac {4\,{\mathrm {e}}^{6\,x}}{7}-\frac {2}{7}}{5\,{\mathrm {e}}^{2\,x}+10\,{\mathrm {e}}^{4\,x}+10\,{\mathrm {e}}^{6\,x}+5\,{\mathrm {e}}^{8\,x}+{\mathrm {e}}^{10\,x}+1}-\frac {\frac {10\,{\mathrm {e}}^{2\,x}}{7}-\frac {30\,{\mathrm {e}}^{4\,x}}{7}+\frac {40\,{\mathrm {e}}^{6\,x}}{7}-\frac {25\,{\mathrm {e}}^{8\,x}}{7}+\frac {6\,{\mathrm {e}}^{10\,x}}{7}-\frac {1}{7}}{7\,{\mathrm {e}}^{2\,x}+21\,{\mathrm {e}}^{4\,x}+35\,{\mathrm {e}}^{6\,x}+35\,{\mathrm {e}}^{8\,x}+21\,{\mathrm {e}}^{10\,x}+7\,{\mathrm {e}}^{12\,x}+{\mathrm {e}}^{14\,x}+1}-\frac {\frac {2\,{\mathrm {e}}^{2\,x}}{7}-\frac {5}{21}}{3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1}-\frac {1}{7\,\left (2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1\right )}-\frac {\frac {3\,{\mathrm {e}}^{4\,x}}{7}-\frac {5\,{\mathrm {e}}^{2\,x}}{7}+\frac {2}{7}}{4\,{\mathrm {e}}^{2\,x}+6\,{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(exp(2*x) - 5*exp(4*x) + 10*exp(6*x) - 10*exp(8*x) + 5*exp(10*x) - exp(12*x))/(8*exp(2*x) + 28*exp(4*x) + 56*e
xp(6*x) + 70*exp(8*x) + 56*exp(10*x) + 28*exp(12*x) + 8*exp(14*x) + exp(16*x) + 1) - ((20*exp(4*x))/7 - (10*ex
p(2*x))/7 - (50*exp(6*x))/21 + (5*exp(8*x))/7 + 5/21)/(6*exp(2*x) + 15*exp(4*x) + 20*exp(6*x) + 15*exp(8*x) +
6*exp(10*x) + exp(12*x) + 1) - ((8*exp(2*x))/7 - (10*exp(4*x))/7 + (4*exp(6*x))/7 - 2/7)/(5*exp(2*x) + 10*exp(
4*x) + 10*exp(6*x) + 5*exp(8*x) + exp(10*x) + 1) - ((10*exp(2*x))/7 - (30*exp(4*x))/7 + (40*exp(6*x))/7 - (25*
exp(8*x))/7 + (6*exp(10*x))/7 - 1/7)/(7*exp(2*x) + 21*exp(4*x) + 35*exp(6*x) + 35*exp(8*x) + 21*exp(10*x) + 7*
exp(12*x) + exp(14*x) + 1) - ((2*exp(2*x))/7 - 5/21)/(3*exp(2*x) + 3*exp(4*x) + exp(6*x) + 1) - 1/(7*(2*exp(2*
x) + exp(4*x) + 1)) - ((3*exp(4*x))/7 - (5*exp(2*x))/7 + 2/7)/(4*exp(2*x) + 6*exp(4*x) + 4*exp(6*x) + exp(8*x)
 + 1)

________________________________________________________________________________________

sympy [A]  time = 6.58, size = 19, normalized size = 1.12 \[ - \frac {\operatorname {sech}^{8}{\relax (x )}}{8} + \frac {\operatorname {sech}^{6}{\relax (x )}}{3} - \frac {\operatorname {sech}^{4}{\relax (x )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)**4*(-1+sech(x)**2)**2*tanh(x),x)

[Out]

-sech(x)**8/8 + sech(x)**6/3 - sech(x)**4/4

________________________________________________________________________________________