3.819 \(\int \frac{1}{(\text{sech}^2(x)-\tanh ^2(x))^3} \, dx\)

Optimal. Leaf size=54 \[ -x+\frac{7 \tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )}{4 \sqrt{2}}-\frac{\tanh (x)}{4 \left (1-2 \tanh ^2(x)\right )}+\frac{\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2} \]

[Out]

-x + (7*ArcTanh[Sqrt[2]*Tanh[x]])/(4*Sqrt[2]) + Tanh[x]/(2*(1 - 2*Tanh[x]^2)^2) - Tanh[x]/(4*(1 - 2*Tanh[x]^2)
)

________________________________________________________________________________________

Rubi [A]  time = 0.0642893, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {414, 527, 522, 206} \[ -x+\frac{7 \tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )}{4 \sqrt{2}}-\frac{\tanh (x)}{4 \left (1-2 \tanh ^2(x)\right )}+\frac{\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(Sech[x]^2 - Tanh[x]^2)^(-3),x]

[Out]

-x + (7*ArcTanh[Sqrt[2]*Tanh[x]])/(4*Sqrt[2]) + Tanh[x]/(2*(1 - 2*Tanh[x]^2)^2) - Tanh[x]/(4*(1 - 2*Tanh[x]^2)
)

Rule 414

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*x*(a + b*x^n)^(p + 1)*(
c + d*x^n)^(q + 1))/(a*n*(p + 1)*(b*c - a*d)), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1)*
(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomial
Q[a, b, c, d, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

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

Mathematica [A]  time = 0.191805, size = 66, normalized size = 1.22 \[ \frac{-76 x-2 \sinh (2 x)+3 \sinh (4 x)+48 x \cosh (2 x)-4 x \cosh (4 x)+7 \sqrt{2} (\cosh (2 x)-3)^2 \tanh ^{-1}\left (\sqrt{2} \tanh (x)\right )}{8 (\cosh (2 x)-3)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sech[x]^2 - Tanh[x]^2)^(-3),x]

[Out]

(-76*x + 7*Sqrt[2]*ArcTanh[Sqrt[2]*Tanh[x]]*(-3 + Cosh[2*x])^2 + 48*x*Cosh[2*x] - 4*x*Cosh[4*x] - 2*Sinh[2*x]
+ 3*Sinh[4*x])/(8*(-3 + Cosh[2*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.058, size = 140, normalized size = 2.6 \begin{align*} -\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) +\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) -2\,{\frac{-1/8\, \left ( \tanh \left ( x/2 \right ) \right ) ^{3}+1/8\, \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-5/8\,\tanh \left ( x/2 \right ) +1/8}{ \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+2\,\tanh \left ( x/2 \right ) -1 \right ) ^{2}}}+{\frac{7\,\sqrt{2}}{8}{\it Artanh} \left ({\frac{\sqrt{2}}{4} \left ( 2\,\tanh \left ( x/2 \right ) +2 \right ) } \right ) }-2\,{\frac{-1/8\, \left ( \tanh \left ( x/2 \right ) \right ) ^{3}-1/8\, \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-5/8\,\tanh \left ( x/2 \right ) -1/8}{ \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-2\,\tanh \left ( x/2 \right ) -1 \right ) ^{2}}}+{\frac{7\,\sqrt{2}}{8}{\it Artanh} \left ({\frac{\sqrt{2}}{4} \left ( 2\,\tanh \left ( x/2 \right ) -2 \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sech(x)^2-tanh(x)^2)^3,x)

[Out]

-ln(tanh(1/2*x)+1)+ln(tanh(1/2*x)-1)-2*(-1/8*tanh(1/2*x)^3+1/8*tanh(1/2*x)^2-5/8*tanh(1/2*x)+1/8)/(tanh(1/2*x)
^2+2*tanh(1/2*x)-1)^2+7/8*2^(1/2)*arctanh(1/4*(2*tanh(1/2*x)+2)*2^(1/2))-2*(-1/8*tanh(1/2*x)^3-1/8*tanh(1/2*x)
^2-5/8*tanh(1/2*x)-1/8)/(tanh(1/2*x)^2-2*tanh(1/2*x)-1)^2+7/8*2^(1/2)*arctanh(1/4*(2*tanh(1/2*x)-2)*2^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 1.68986, size = 154, normalized size = 2.85 \begin{align*} \frac{7}{16} \, \sqrt{2} \log \left (-\frac{\sqrt{2} - e^{\left (-x\right )} + 1}{\sqrt{2} + e^{\left (-x\right )} - 1}\right ) - \frac{7}{16} \, \sqrt{2} \log \left (-\frac{\sqrt{2} - e^{\left (-x\right )} - 1}{\sqrt{2} + e^{\left (-x\right )} + 1}\right ) - x + \frac{19 \, e^{\left (-2 \, x\right )} - 57 \, e^{\left (-4 \, x\right )} + 17 \, e^{\left (-6 \, x\right )} - 3}{2 \,{\left (12 \, e^{\left (-2 \, x\right )} - 38 \, e^{\left (-4 \, x\right )} + 12 \, e^{\left (-6 \, x\right )} - e^{\left (-8 \, x\right )} - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)^2-tanh(x)^2)^3,x, algorithm="maxima")

[Out]

7/16*sqrt(2)*log(-(sqrt(2) - e^(-x) + 1)/(sqrt(2) + e^(-x) - 1)) - 7/16*sqrt(2)*log(-(sqrt(2) - e^(-x) - 1)/(s
qrt(2) + e^(-x) + 1)) - x + 1/2*(19*e^(-2*x) - 57*e^(-4*x) + 17*e^(-6*x) - 3)/(12*e^(-2*x) - 38*e^(-4*x) + 12*
e^(-6*x) - e^(-8*x) - 1)

________________________________________________________________________________________

Fricas [B]  time = 2.13029, size = 2365, normalized size = 43.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)^2-tanh(x)^2)^3,x, algorithm="fricas")

[Out]

-1/16*(16*x*cosh(x)^8 + 128*x*cosh(x)*sinh(x)^7 + 16*x*sinh(x)^8 - 8*(24*x + 17)*cosh(x)^6 + 8*(56*x*cosh(x)^2
 - 24*x - 17)*sinh(x)^6 + 16*(56*x*cosh(x)^3 - 3*(24*x + 17)*cosh(x))*sinh(x)^5 + 152*(4*x + 3)*cosh(x)^4 + 8*
(140*x*cosh(x)^4 - 15*(24*x + 17)*cosh(x)^2 + 76*x + 57)*sinh(x)^4 + 32*(28*x*cosh(x)^5 - 5*(24*x + 17)*cosh(x
)^3 + 19*(4*x + 3)*cosh(x))*sinh(x)^3 - 8*(24*x + 19)*cosh(x)^2 + 8*(56*x*cosh(x)^6 - 15*(24*x + 17)*cosh(x)^4
 + 114*(4*x + 3)*cosh(x)^2 - 24*x - 19)*sinh(x)^2 - 7*(sqrt(2)*cosh(x)^8 + 8*sqrt(2)*cosh(x)*sinh(x)^7 + sqrt(
2)*sinh(x)^8 + 4*(7*sqrt(2)*cosh(x)^2 - 3*sqrt(2))*sinh(x)^6 - 12*sqrt(2)*cosh(x)^6 + 8*(7*sqrt(2)*cosh(x)^3 -
 9*sqrt(2)*cosh(x))*sinh(x)^5 + 2*(35*sqrt(2)*cosh(x)^4 - 90*sqrt(2)*cosh(x)^2 + 19*sqrt(2))*sinh(x)^4 + 38*sq
rt(2)*cosh(x)^4 + 8*(7*sqrt(2)*cosh(x)^5 - 30*sqrt(2)*cosh(x)^3 + 19*sqrt(2)*cosh(x))*sinh(x)^3 + 4*(7*sqrt(2)
*cosh(x)^6 - 45*sqrt(2)*cosh(x)^4 + 57*sqrt(2)*cosh(x)^2 - 3*sqrt(2))*sinh(x)^2 - 12*sqrt(2)*cosh(x)^2 + 8*(sq
rt(2)*cosh(x)^7 - 9*sqrt(2)*cosh(x)^5 + 19*sqrt(2)*cosh(x)^3 - 3*sqrt(2)*cosh(x))*sinh(x) + sqrt(2))*log(-(3*(
2*sqrt(2) - 3)*cosh(x)^2 - 4*(3*sqrt(2) - 4)*cosh(x)*sinh(x) + 3*(2*sqrt(2) - 3)*sinh(x)^2 - 2*sqrt(2) + 3)/(c
osh(x)^2 + sinh(x)^2 - 3)) + 16*(8*x*cosh(x)^7 - 3*(24*x + 17)*cosh(x)^5 + 38*(4*x + 3)*cosh(x)^3 - (24*x + 19
)*cosh(x))*sinh(x) + 16*x + 24)/(cosh(x)^8 + 8*cosh(x)*sinh(x)^7 + sinh(x)^8 + 4*(7*cosh(x)^2 - 3)*sinh(x)^6 -
 12*cosh(x)^6 + 8*(7*cosh(x)^3 - 9*cosh(x))*sinh(x)^5 + 2*(35*cosh(x)^4 - 90*cosh(x)^2 + 19)*sinh(x)^4 + 38*co
sh(x)^4 + 8*(7*cosh(x)^5 - 30*cosh(x)^3 + 19*cosh(x))*sinh(x)^3 + 4*(7*cosh(x)^6 - 45*cosh(x)^4 + 57*cosh(x)^2
 - 3)*sinh(x)^2 - 12*cosh(x)^2 + 8*(cosh(x)^7 - 9*cosh(x)^5 + 19*cosh(x)^3 - 3*cosh(x))*sinh(x) + 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (- \tanh{\left (x \right )} + \operatorname{sech}{\left (x \right )}\right )^{3} \left (\tanh{\left (x \right )} + \operatorname{sech}{\left (x \right )}\right )^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)**2-tanh(x)**2)**3,x)

[Out]

Integral(1/((-tanh(x) + sech(x))**3*(tanh(x) + sech(x))**3), x)

________________________________________________________________________________________

Giac [A]  time = 1.1718, size = 104, normalized size = 1.93 \begin{align*} -\frac{7}{16} \, \sqrt{2} \log \left (\frac{{\left | -4 \, \sqrt{2} + 2 \, e^{\left (2 \, x\right )} - 6 \right |}}{{\left | 4 \, \sqrt{2} + 2 \, e^{\left (2 \, x\right )} - 6 \right |}}\right ) - x + \frac{17 \, e^{\left (6 \, x\right )} - 57 \, e^{\left (4 \, x\right )} + 19 \, e^{\left (2 \, x\right )} - 3}{2 \,{\left (e^{\left (4 \, x\right )} - 6 \, e^{\left (2 \, x\right )} + 1\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(sech(x)^2-tanh(x)^2)^3,x, algorithm="giac")

[Out]

-7/16*sqrt(2)*log(abs(-4*sqrt(2) + 2*e^(2*x) - 6)/abs(4*sqrt(2) + 2*e^(2*x) - 6)) - x + 1/2*(17*e^(6*x) - 57*e
^(4*x) + 19*e^(2*x) - 3)/(e^(4*x) - 6*e^(2*x) + 1)^2