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*ArcTanh[(3 + 2*Tanh[x])/Sqrt[17]])/Sqrt[17]

________________________________________________________________________________________

Rubi [A]  time = 0.124094, antiderivative size = 20, normalized size of antiderivative = 1., 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 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]

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{\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.0291272, size = 0, normalized size = 0. \[ \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]

________________________________________________________________________________________

Maple [B]  time = 0.069, size = 63, normalized size = 3.2 \begin{align*}{\frac{\sqrt{17}}{17}\ln \left ( \sqrt{17}\tanh \left ({\frac{x}{2}} \right ) +2\, \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-3\,\tanh \left ( x/2 \right ) +2 \right ) }-{\frac{\sqrt{17}}{17}\ln \left ( -\sqrt{17}\tanh \left ({\frac{x}{2}} \right ) +2\, \left ( \tanh \left ( x/2 \right ) \right ) ^{2}-3\,\tanh \left ( x/2 \right ) +2 \right ) } \end{align*}

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., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}\left (x\right )^{2}}{\operatorname{sech}\left (x\right )^{2} - 3 \, \tanh \left (x\right ) + 1}\,{d x} \end{align*}

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)

________________________________________________________________________________________

Fricas [B]  time = 2.35321, size = 244, normalized size = 12.2 \begin{align*} \frac{1}{17} \, \sqrt{17} \log \left (\frac{3 \,{\left (\sqrt{17} - 5\right )} \cosh \left (x\right )^{2} - 2 \,{\left (3 \, \sqrt{17} - 11\right )} \cosh \left (x\right ) \sinh \left (x\right ) + 3 \,{\left (\sqrt{17} - 5\right )} \sinh \left (x\right )^{2} - 2 \, \sqrt{17} + 6}{\cosh \left (x\right )^{2} - 6 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2} + 3}\right ) \end{align*}

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

________________________________________________________________________________________

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

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)

________________________________________________________________________________________

Giac [B]  time = 1.15557, size = 47, normalized size = 2.35 \begin{align*} -\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 ) \end{align*}

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