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

Optimal. Leaf size=22 $\frac{\tan ^{-1}\left (\sqrt{2} \tanh (3 x+2)\right )}{3 \sqrt{2}}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0398909, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.087, Rules used = {3675, 203} $\frac{\tan ^{-1}\left (\sqrt{2} \tanh (3 x+2)\right )}{3 \sqrt{2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 203

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

Rubi steps

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

Mathematica [B]  time = 0.0781197, size = 47, normalized size = 2.14 $\frac{\tan ^{-1}\left (\frac{\left (3+2 e^4+3 e^8\right ) \tanh (3 x)+3 \left (e^8-1\right )}{4 \sqrt{2} e^4}\right )}{3 \sqrt{2}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

ArcTan[(3*(-1 + E^8) + (3 + 2*E^4 + 3*E^8)*Tanh[3*x])/(4*Sqrt[2]*E^4)]/(3*Sqrt[2])

________________________________________________________________________________________

Maple [B]  time = 0.066, size = 156, normalized size = 7.1 \begin{align*} -{\frac{\sqrt{6}}{6\,\sqrt{3}+6\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( 1+3/2\,x \right ) }{2\,\sqrt{3}+2\,\sqrt{2}}} \right ) }-{\frac{2}{6\,\sqrt{3}+6\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( 1+3/2\,x \right ) }{2\,\sqrt{3}+2\,\sqrt{2}}} \right ) }+{\frac{\sqrt{6}}{6\,\sqrt{3}-6\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( 1+3/2\,x \right ) }{2\,\sqrt{3}-2\,\sqrt{2}}} \right ) }-{\frac{2}{6\,\sqrt{3}-6\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( 1+3/2\,x \right ) }{2\,\sqrt{3}-2\,\sqrt{2}}} \right ) } \end{align*}

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

[In]

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

[Out]

-1/3*6^(1/2)/(2*3^(1/2)+2*2^(1/2))*arctan(2*tanh(1+3/2*x)/(2*3^(1/2)+2*2^(1/2)))-2/3/(2*3^(1/2)+2*2^(1/2))*arc
tan(2*tanh(1+3/2*x)/(2*3^(1/2)+2*2^(1/2)))+1/3*6^(1/2)/(2*3^(1/2)-2*2^(1/2))*arctan(2*tanh(1+3/2*x)/(2*3^(1/2)
-2*2^(1/2)))-2/3/(2*3^(1/2)-2*2^(1/2))*arctan(2*tanh(1+3/2*x)/(2*3^(1/2)-2*2^(1/2)))

________________________________________________________________________________________

Maxima [A]  time = 1.55416, size = 28, normalized size = 1.27 \begin{align*} -\frac{1}{6} \, \sqrt{2} \arctan \left (\frac{1}{4} \, \sqrt{2}{\left (3 \, e^{\left (-6 \, x - 4\right )} - 1\right )}\right ) \end{align*}

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

[In]

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

[Out]

-1/6*sqrt(2)*arctan(1/4*sqrt(2)*(3*e^(-6*x - 4) - 1))

________________________________________________________________________________________

Fricas [B]  time = 2.10787, size = 147, normalized size = 6.68 \begin{align*} -\frac{1}{6} \, \sqrt{2} \arctan \left (-\frac{\sqrt{2} \cosh \left (3 \, x + 2\right ) + 2 \, \sqrt{2} \sinh \left (3 \, x + 2\right )}{2 \,{\left (\cosh \left (3 \, x + 2\right ) - \sinh \left (3 \, x + 2\right )\right )}}\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

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

[In]

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

[Out]

Timed out