3.9.19 \(\int \frac {1}{(\text {sech}^2(x)-\tanh ^2(x))^3} \, dx\) [819]

3.9.19.1 Optimal result
3.9.19.2 Mathematica [C] (warning: unable to verify)
3.9.19.3 Rubi [A] (verified)
3.9.19.4 Maple [A] (verified)
3.9.19.5 Fricas [B] (verification not implemented)
3.9.19.6 Sympy [F]
3.9.19.7 Maxima [B] (verification not implemented)
3.9.19.8 Giac [A] (verification not implemented)
3.9.19.9 Mupad [B] (verification not implemented)

3.9.19.1 Optimal result

Integrand size = 13, antiderivative size = 54 \[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=-x+\frac {7 \text {arctanh}\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 )} \]

output
-x+7/8*arctanh(2^(1/2)*tanh(x))*2^(1/2)+1/2*tanh(x)/(1-2*tanh(x)^2)^2-1/4* 
tanh(x)/(1-2*tanh(x)^2)
 
3.9.19.2 Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 4.75 (sec) , antiderivative size = 765, normalized size of antiderivative = 14.17 \[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=\frac {\text {sech}(x) \left (-7 \text {arctanh}\left (\frac {\sqrt {(-1-i) (i+\sinh (x))}}{\sqrt {(1+i)-(1-i) \sinh (x)}}\right ) (-3+\cosh (2 x))^2 \sqrt {(2+2 i)-(2-2 i) \sinh (x)} \sqrt {(-1-i) (i+\sinh (x))}+7 (-1)^{3/4} \text {arctanh}\left (\frac {(-1)^{3/4} \sqrt {(-1-i) (i+\sinh (x))}}{\sqrt {(1+i)-(1-i) \sinh (x)}}\right ) (-3+\cosh (2 x))^2 \sqrt {(2+2 i)-(2-2 i) \sinh (x)} \sqrt {(-1-i) (i+\sinh (x))}+4 \left (2 \sqrt {2} \sinh (x)+8 \sqrt {2} \sinh ^3(x)+6 \sqrt {2} \sinh ^5(x)+(7-i) \sqrt {1+i} \arcsin \left (\frac {1}{2} \sqrt {1+i} \sqrt {(-1-i) (i+\sinh (x))}\right ) \sqrt {1+i \sinh (x)} \sqrt {(-1-i) (i+\sinh (x))}-(14-2 i) \sqrt {1+i} \arcsin \left (\frac {1}{2} \sqrt {1+i} \sqrt {(-1-i) (i+\sinh (x))}\right ) \sqrt {1+i \sinh (x)} \sinh ^2(x) \sqrt {(-1-i) (i+\sinh (x))}+(7-i) \sqrt {1+i} \arcsin \left (\frac {1}{2} \sqrt {1+i} \sqrt {(-1-i) (i+\sinh (x))}\right ) \sqrt {1+i \sinh (x)} \sinh ^4(x) \sqrt {(-1-i) (i+\sinh (x))}+\left (\frac {7}{4}+\frac {i}{4}\right ) \sqrt {-1+i} \text {arcsinh}\left (\frac {1}{2} \sqrt {-1+i} \sqrt {(1-i) (i+\sinh (x))}\right ) (-3+\cosh (2 x))^2 \sqrt {1+i \sinh (x)} \sqrt {(1-i) (i+\sinh (x))}-(7+7 i) \text {arctanh}\left (\frac {(1+i) \sqrt {(1-i) (i+\sinh (x))}}{\sqrt {2} \sqrt {(1+i) (-i+\sinh (x))}}\right ) \sqrt {(1+i) (-i+\sinh (x))} \sqrt {(1-i) (i+\sinh (x))}+\frac {7 \text {arctanh}\left (\frac {\sqrt {(1-i) (i+\sinh (x))}}{\sqrt {(1+i) (-i+\sinh (x))}}\right ) (-3+\cosh (2 x))^2 \sqrt {(1+i) (-i+\sinh (x))} \sqrt {(1-i) (i+\sinh (x))}}{2 \sqrt {2}}+(14+14 i) \text {arctanh}\left (\frac {(1+i) \sqrt {(1-i) (i+\sinh (x))}}{\sqrt {2} \sqrt {(1+i) (-i+\sinh (x))}}\right ) \sinh ^2(x) \sqrt {(1+i) (-i+\sinh (x))} \sqrt {(1-i) (i+\sinh (x))}-(7+7 i) \text {arctanh}\left (\frac {(1+i) \sqrt {(1-i) (i+\sinh (x))}}{\sqrt {2} \sqrt {(1+i) (-i+\sinh (x))}}\right ) \sinh ^4(x) \sqrt {(1+i) (-i+\sinh (x))} \sqrt {(1-i) (i+\sinh (x))}\right )\right )}{8 \sqrt {2} (-3+\cosh (2 x))^2} \]

input
Integrate[(Sech[x]^2 - Tanh[x]^2)^(-3),x]
 
output
(Sech[x]*(-7*ArcTanh[Sqrt[(-1 - I)*(I + Sinh[x])]/Sqrt[(1 + I) - (1 - I)*S 
inh[x]]]*(-3 + Cosh[2*x])^2*Sqrt[(2 + 2*I) - (2 - 2*I)*Sinh[x]]*Sqrt[(-1 - 
 I)*(I + Sinh[x])] + 7*(-1)^(3/4)*ArcTanh[((-1)^(3/4)*Sqrt[(-1 - I)*(I + S 
inh[x])])/Sqrt[(1 + I) - (1 - I)*Sinh[x]]]*(-3 + Cosh[2*x])^2*Sqrt[(2 + 2* 
I) - (2 - 2*I)*Sinh[x]]*Sqrt[(-1 - I)*(I + Sinh[x])] + 4*(2*Sqrt[2]*Sinh[x 
] + 8*Sqrt[2]*Sinh[x]^3 + 6*Sqrt[2]*Sinh[x]^5 + (7 - I)*Sqrt[1 + I]*ArcSin 
[(Sqrt[1 + I]*Sqrt[(-1 - I)*(I + Sinh[x])])/2]*Sqrt[1 + I*Sinh[x]]*Sqrt[(- 
1 - I)*(I + Sinh[x])] - (14 - 2*I)*Sqrt[1 + I]*ArcSin[(Sqrt[1 + I]*Sqrt[(- 
1 - I)*(I + Sinh[x])])/2]*Sqrt[1 + I*Sinh[x]]*Sinh[x]^2*Sqrt[(-1 - I)*(I + 
 Sinh[x])] + (7 - I)*Sqrt[1 + I]*ArcSin[(Sqrt[1 + I]*Sqrt[(-1 - I)*(I + Si 
nh[x])])/2]*Sqrt[1 + I*Sinh[x]]*Sinh[x]^4*Sqrt[(-1 - I)*(I + Sinh[x])] + ( 
7/4 + I/4)*Sqrt[-1 + I]*ArcSinh[(Sqrt[-1 + I]*Sqrt[(1 - I)*(I + Sinh[x])]) 
/2]*(-3 + Cosh[2*x])^2*Sqrt[1 + I*Sinh[x]]*Sqrt[(1 - I)*(I + Sinh[x])] - ( 
7 + 7*I)*ArcTanh[((1 + I)*Sqrt[(1 - I)*(I + Sinh[x])])/(Sqrt[2]*Sqrt[(1 + 
I)*(-I + Sinh[x])])]*Sqrt[(1 + I)*(-I + Sinh[x])]*Sqrt[(1 - I)*(I + Sinh[x 
])] + (7*ArcTanh[Sqrt[(1 - I)*(I + Sinh[x])]/Sqrt[(1 + I)*(-I + Sinh[x])]] 
*(-3 + Cosh[2*x])^2*Sqrt[(1 + I)*(-I + Sinh[x])]*Sqrt[(1 - I)*(I + Sinh[x] 
)])/(2*Sqrt[2]) + (14 + 14*I)*ArcTanh[((1 + I)*Sqrt[(1 - I)*(I + Sinh[x])] 
)/(Sqrt[2]*Sqrt[(1 + I)*(-I + Sinh[x])])]*Sinh[x]^2*Sqrt[(1 + I)*(-I + Sin 
h[x])]*Sqrt[(1 - I)*(I + Sinh[x])] - (7 + 7*I)*ArcTanh[((1 + I)*Sqrt[(1...
 
3.9.19.3 Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.19, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3042, 4889, 316, 27, 402, 397, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\left (\tan (i x)^2+\sec (i x)^2\right )^3}dx\)

\(\Big \downarrow \) 4889

\(\displaystyle \int \frac {1}{\left (1-2 \tanh ^2(x)\right )^3 \left (1-\tanh ^2(x)\right )}d\tanh (x)\)

\(\Big \downarrow \) 316

\(\displaystyle \frac {1}{4} \int \frac {2 \left (1-3 \tanh ^2(x)\right )}{\left (1-2 \tanh ^2(x)\right )^2 \left (1-\tanh ^2(x)\right )}d\tanh (x)+\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{2} \int \frac {1-3 \tanh ^2(x)}{\left (1-2 \tanh ^2(x)\right )^2 \left (1-\tanh ^2(x)\right )}d\tanh (x)+\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2}\)

\(\Big \downarrow \) 402

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int \frac {\tanh ^2(x)+3}{\left (1-2 \tanh ^2(x)\right ) \left (1-\tanh ^2(x)\right )}d\tanh (x)-\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )}\right )+\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (7 \int \frac {1}{1-2 \tanh ^2(x)}d\tanh (x)-4 \int \frac {1}{1-\tanh ^2(x)}d\tanh (x)\right )-\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )}\right )+\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (\frac {7 \text {arctanh}\left (\sqrt {2} \tanh (x)\right )}{\sqrt {2}}-4 \text {arctanh}(\tanh (x))\right )-\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )}\right )+\frac {\tanh (x)}{2 \left (1-2 \tanh ^2(x)\right )^2}\)

input
Int[(Sech[x]^2 - Tanh[x]^2)^(-3),x]
 
output
Tanh[x]/(2*(1 - 2*Tanh[x]^2)^2) + ((-4*ArcTanh[Tanh[x]] + (7*ArcTanh[Sqrt[ 
2]*Tanh[x]])/Sqrt[2])/2 - Tanh[x]/(2*(1 - 2*Tanh[x]^2)))/2
 

3.9.19.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

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

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

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

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4889
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors 
[Tan[v], x]}, Simp[d/Coefficient[v, x, 1]   Subst[Int[SubstFor[1/(1 + d^2*x 
^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /;  !FalseQ[v] && FunctionOfQ[N 
onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] &&  !MatchQ[ 
u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I 
ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
 
3.9.19.4 Maple [A] (verified)

Time = 210.08 (sec) , antiderivative size = 2, normalized size of antiderivative = 0.04

method result size
parallelrisch \(0\) \(2\)
risch \(-x +\frac {17 \,{\mathrm e}^{6 x}-57 \,{\mathrm e}^{4 x}+19 \,{\mathrm e}^{2 x}-3}{2 \left ({\mathrm e}^{4 x}-6 \,{\mathrm e}^{2 x}+1\right )^{2}}+\frac {7 \sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+2 \sqrt {2}-3\right )}{16}-\frac {7 \sqrt {2}\, \ln \left ({\mathrm e}^{2 x}-3-2 \sqrt {2}\right )}{16}\) \(75\)
default \(-\frac {2 \left (-\frac {\tanh \left (\frac {x}{2}\right )^{3}}{8}+\frac {\tanh \left (\frac {x}{2}\right )^{2}}{8}-\frac {5 \tanh \left (\frac {x}{2}\right )}{8}+\frac {1}{8}\right )}{\left (\tanh \left (\frac {x}{2}\right )^{2}+2 \tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {7 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )+2\right ) \sqrt {2}}{4}\right )}{8}-\ln \left (1+\tanh \left (\frac {x}{2}\right )\right )-\frac {2 \left (-\frac {\tanh \left (\frac {x}{2}\right )^{3}}{8}-\frac {\tanh \left (\frac {x}{2}\right )^{2}}{8}-\frac {5 \tanh \left (\frac {x}{2}\right )}{8}-\frac {1}{8}\right )}{\left (\tanh \left (\frac {x}{2}\right )^{2}-2 \tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {7 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )-2\right ) \sqrt {2}}{4}\right )}{8}+\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )\) \(140\)

input
int(1/(sech(x)^2-tanh(x)^2)^3,x,method=_RETURNVERBOSE)
 
output
0
 
3.9.19.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 717 vs. \(2 (44) = 88\).

Time = 0.28 (sec) , antiderivative size = 717, normalized size of antiderivative = 13.28 \[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=\text {Too large to display} \]

input
integrate(1/(sech(x)^2-tanh(x)^2)^3,x, algorithm="fricas")
 
output
-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*cos 
h(x)^3 - 3*(24*x + 17)*cosh(x))*sinh(x)^5 + 152*(4*x + 3)*cosh(x)^4 + 8*(1 
40*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 + 1 
14*(4*x + 3)*cosh(x)^2 - 24*x - 19)*sinh(x)^2 - 7*(sqrt(2)*cosh(x)^8 + 8*s 
qrt(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*sqr 
t(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*sqrt(2)*cosh(x)^4 + 8*(7*sqrt(2)*cosh(x)^5 - 3 
0*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*(sqrt(2)*cosh(x)^7 - 9*sqrt(2)*cosh(x)^5 + 19*sqr 
t(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)*sin 
h(x)^2 - 2*sqrt(2) + 3)/(cosh(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))*s 
inh(x) + 16*x + 24)/(cosh(x)^8 + 8*cosh(x)*sinh(x)^7 + sinh(x)^8 + 4*(7*co 
sh(x)^2 - 3)*sinh(x)^6 - 12*cosh(x)^6 + 8*(7*cosh(x)^3 - 9*cosh(x))*sin...
 
3.9.19.6 Sympy [F]

\[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=\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 \]

input
integrate(1/(sech(x)**2-tanh(x)**2)**3,x)
 
output
Integral(1/((-tanh(x) + sech(x))**3*(tanh(x) + sech(x))**3), x)
 
3.9.19.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 114 vs. \(2 (44) = 88\).

Time = 0.28 (sec) , antiderivative size = 114, normalized size of antiderivative = 2.11 \[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=\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 )}} \]

input
integrate(1/(sech(x)^2-tanh(x)^2)^3,x, algorithm="maxima")
 
output
7/16*sqrt(2)*log(-(sqrt(2) - e^(-x) + 1)/(sqrt(2) + e^(-x) - 1)) - 7/16*sq 
rt(2)*log(-(sqrt(2) - e^(-x) - 1)/(sqrt(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)
 
3.9.19.8 Giac [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.43 \[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=-\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}} \]

input
integrate(1/(sech(x)^2-tanh(x)^2)^3,x, algorithm="giac")
 
output
-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
 
3.9.19.9 Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 114, normalized size of antiderivative = 2.11 \[ \int \frac {1}{\left (\text {sech}^2(x)-\tanh ^2(x)\right )^3} \, dx=\frac {136\,{\mathrm {e}}^{2\,x}-24}{38\,{\mathrm {e}}^{4\,x}-12\,{\mathrm {e}}^{2\,x}-12\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{8\,x}+1}-x-\frac {7\,\sqrt {2}\,\ln \left (7\,{\mathrm {e}}^{2\,x}-\frac {7\,\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}-4\right )}{16}\right )}{16}+\frac {7\,\sqrt {2}\,\ln \left (7\,{\mathrm {e}}^{2\,x}+\frac {7\,\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}-4\right )}{16}\right )}{16}+\frac {\frac {17\,{\mathrm {e}}^{2\,x}}{2}+\frac {45}{2}}{{\mathrm {e}}^{4\,x}-6\,{\mathrm {e}}^{2\,x}+1} \]

input
int(1/(1/cosh(x)^2 - tanh(x)^2)^3,x)
 
output
(136*exp(2*x) - 24)/(38*exp(4*x) - 12*exp(2*x) - 12*exp(6*x) + exp(8*x) + 
1) - x - (7*2^(1/2)*log(7*exp(2*x) - (7*2^(1/2)*(12*exp(2*x) - 4))/16))/16 
 + (7*2^(1/2)*log(7*exp(2*x) + (7*2^(1/2)*(12*exp(2*x) - 4))/16))/16 + ((1 
7*exp(2*x))/2 + 45/2)/(exp(4*x) - 6*exp(2*x) + 1)