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.05, antiderivative size = 5, normalized size of antiderivative = 1.00, 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 verified.

[In]

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

[Out]

ArcTan[1 + Tanh[x]]

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

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

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.04, size = 0, normalized size = 0.00 \[ \int \frac {\text {sech}^2(x)}{2+2 \tanh (x)+\tanh ^2(x)} \, dx \]

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

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 23, normalized size = 4.60 \[ -\arctan \left (-\frac {3 \, \cosh \relax (x) + 2 \, \sinh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) \]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 9, normalized size = 1.80 \[ \arctan \left (\frac {5}{2} \, e^{\left (2 \, x\right )} + \frac {1}{2}\right ) \]

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

________________________________________________________________________________________

maple [C]  time = 0.24, size = 42, normalized size = 8.40 \[ \frac {i \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (1-i\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{2}-\frac {i \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (1+i\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{2} \]

Verification 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.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}\relax (x)^{2}}{\tanh \relax (x)^{2} + 2 \, \tanh \relax (x) + 2}\,{d x} \]

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

________________________________________________________________________________________

mupad [B]  time = 1.66, size = 9, normalized size = 1.80 \[ \mathrm {atan}\left (\frac {5\,{\mathrm {e}}^{2\,x}}{2}+\frac {1}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan((5*exp(2*x))/2 + 1/2)

________________________________________________________________________________________

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

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

________________________________________________________________________________________