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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0781993, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, 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 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]

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

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.0152839, 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]

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

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 20, normalized size = 1.2 \begin{align*} -{\frac{ \left ({\rm sech} \left (x\right ) \right ) ^{8}}{8}}+{\frac{ \left ({\rm sech} \left (x\right ) \right ) ^{6}}{3}}-{\frac{ \left ({\rm sech} \left (x\right ) \right ) ^{4}}{4}} \end{align*}

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 = 1.02699, size = 46, normalized size = 2.71 \begin{align*} -\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}} \end{align*}

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

________________________________________________________________________________________

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

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)

________________________________________________________________________________________

Sympy [A]  time = 18.3691, size = 19, normalized size = 1.12 \begin{align*} - \frac{\operatorname{sech}^{8}{\left (x \right )}}{8} + \frac{\operatorname{sech}^{6}{\left (x \right )}}{3} - \frac{\operatorname{sech}^{4}{\left (x \right )}}{4} \end{align*}

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

________________________________________________________________________________________

Giac [B]  time = 1.13431, size = 55, normalized size = 3.24 \begin{align*} -\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}} \end{align*}

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