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

Optimal. Leaf size=20 \[ \frac {2 \tanh ^{-1}\left (\frac {2 \tanh (x)+3}{\sqrt {17}}\right )}{\sqrt {17}} \]

[Out]

2/17*arctanh(1/17*(3+2*tanh(x))*17^(1/2))*17^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {618, 206} \[ \frac {2 \tanh ^{-1}\left (\frac {2 \tanh (x)+3}{\sqrt {17}}\right )}{\sqrt {17}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*ArcTanh[(3 + 2*Tanh[x])/Sqrt[17]])/Sqrt[17]

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

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [F]  time = 0.03, size = 0, normalized size = 0.00 \[ \int \frac {\text {sech}^2(x)}{1+\text {sech}^2(x)-3 \tanh (x)} \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 67, normalized size = 3.35 \[ \frac {1}{17} \, \sqrt {17} \log \left (\frac {3 \, {\left (\sqrt {17} - 5\right )} \cosh \relax (x)^{2} - 2 \, {\left (3 \, \sqrt {17} - 11\right )} \cosh \relax (x) \sinh \relax (x) + 3 \, {\left (\sqrt {17} - 5\right )} \sinh \relax (x)^{2} - 2 \, \sqrt {17} + 6}{\cosh \relax (x)^{2} - 6 \, \cosh \relax (x) \sinh \relax (x) + \sinh \relax (x)^{2} + 3}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/17*sqrt(17)*log((3*(sqrt(17) - 5)*cosh(x)^2 - 2*(3*sqrt(17) - 11)*cosh(x)*sinh(x) + 3*(sqrt(17) - 5)*sinh(x)
^2 - 2*sqrt(17) + 6)/(cosh(x)^2 - 6*cosh(x)*sinh(x) + sinh(x)^2 + 3))

________________________________________________________________________________________

giac [B]  time = 0.12, size = 35, normalized size = 1.75 \[ -\frac {1}{17} \, \sqrt {17} \log \left (\frac {{\left | -\sqrt {17} + 2 \, e^{\left (2 \, x\right )} - 3 \right |}}{{\left | \sqrt {17} + 2 \, e^{\left (2 \, x\right )} - 3 \right |}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/17*sqrt(17)*log(abs(-sqrt(17) + 2*e^(2*x) - 3)/abs(sqrt(17) + 2*e^(2*x) - 3))

________________________________________________________________________________________

maple [B]  time = 0.33, size = 63, normalized size = 3.15 \[ -\frac {\sqrt {17}\, \ln \left (-\sqrt {17}\, \tanh \left (\frac {x}{2}\right )+2 \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-3 \tanh \left (\frac {x}{2}\right )+2\right )}{17}+\frac {\sqrt {17}\, \ln \left (\sqrt {17}\, \tanh \left (\frac {x}{2}\right )+2 \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-3 \tanh \left (\frac {x}{2}\right )+2\right )}{17} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}\relax (x)^{2}}{\operatorname {sech}\relax (x)^{2} - 3 \, \tanh \relax (x) + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.79, size = 50, normalized size = 2.50 \[ -\frac {\sqrt {17}\,\left (\ln \left (2\,{\mathrm {e}}^{2\,x}-\frac {\sqrt {17}\,\left (6\,{\mathrm {e}}^{2\,x}+8\right )}{17}\right )-\ln \left (2\,{\mathrm {e}}^{2\,x}+\frac {\sqrt {17}\,\left (6\,{\mathrm {e}}^{2\,x}+8\right )}{17}\right )\right )}{17} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(17^(1/2)*(log(2*exp(2*x) - (17^(1/2)*(6*exp(2*x) + 8))/17) - log(2*exp(2*x) + (17^(1/2)*(6*exp(2*x) + 8))/17
)))/17

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}^{2}{\relax (x )}}{- 3 \tanh {\relax (x )} + \operatorname {sech}^{2}{\relax (x )} + 1}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________