### 3.985 $$\int \frac{\text{sech}^2(x)}{2+2 \tanh (x)+\tanh ^2(x)} \, dx$$

Optimal. Leaf size=5 $\tan ^{-1}(\tanh (x)+1)$

[Out]

ArcTan[1 + Tanh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0491681, antiderivative size = 5, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.176, Rules used = {4342, 617, 204} $\tan ^{-1}(\tanh (x)+1)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

ArcTan[1 + Tanh[x]]

Rule 4342

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^2, x_Symbol] :> With[{d = FreeFactors[Tan[c*(a + b*x)], x]}, Dist[d/
(b*c), Subst[Int[SubstFor[1, Tan[c*(a + b*x)]/d, u, x], x], x, Tan[c*(a + b*x)]/d], x] /; FunctionOfQ[Tan[c*(a
+ b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && NonsumQ[u] && (EqQ[F, Sec] || EqQ[F, sec])

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

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

Rubi steps

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

Mathematica [F]  time = 0.0386977, size = 0, normalized size = 0. $\int \frac{\text{sech}^2(x)}{2+2 \tanh (x)+\tanh ^2(x)} \, dx$

Veriﬁcation is Not applicable to the result.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C]  time = 0.059, size = 42, normalized size = 8.4 \begin{align*}{\frac{i}{2}}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+ \left ( 1-i \right ) \tanh \left ({\frac{x}{2}} \right ) +1 \right ) -{\frac{i}{2}}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+ \left ( 1+i \right ) \tanh \left ({\frac{x}{2}} \right ) +1 \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 2.0324, size = 74, normalized size = 14.8 \begin{align*} -\arctan \left (-\frac{3 \, \cosh \left (x\right ) + 2 \, \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(-(3*cosh(x) + 2*sinh(x))/(cosh(x) - sinh(x)))

________________________________________________________________________________________

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

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(x)**2/(2+2*tanh(x)+tanh(x)**2),x)

[Out]

Integral(sech(x)**2/(tanh(x)**2 + 2*tanh(x) + 2), x)

________________________________________________________________________________________

Giac [A]  time = 1.16817, size = 12, normalized size = 2.4 \begin{align*} \arctan \left (\frac{5}{2} \, e^{\left (2 \, x\right )} + \frac{1}{2}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(5/2*e^(2*x) + 1/2)