### 3.808 $$\int \frac{1}{\cosh ^2(x)+\sinh ^2(x)} \, dx$$

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

[Out]

ArcTan[Tanh[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.0172277, antiderivative size = 3, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.091, Rules used = {203} $\tan ^{-1}(\tanh (x))$

Antiderivative was successfully veriﬁed.

[In]

Int[(Cosh[x]^2 + Sinh[x]^2)^(-1),x]

[Out]

ArcTan[Tanh[x]]

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{1}{\cosh ^2(x)+\sinh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tanh (x)\right )\\ &=\tan ^{-1}(\tanh (x))\\ \end{align*}

Mathematica [A]  time = 0.0047023, size = 3, normalized size = 1. $\tan ^{-1}(\tanh (x))$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(Cosh[x]^2 + Sinh[x]^2)^(-1),x]

[Out]

ArcTan[Tanh[x]]

________________________________________________________________________________________

Maple [B]  time = 0.039, size = 116, normalized size = 38.7 \begin{align*} -2\,{\frac{\sqrt{2}}{2+2\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( x/2 \right ) }{2+2\,\sqrt{2}}} \right ) }-2\,{\frac{1}{2+2\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( x/2 \right ) }{2+2\,\sqrt{2}}} \right ) }+2\,{\frac{\sqrt{2}}{-2+2\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( x/2 \right ) }{-2+2\,\sqrt{2}}} \right ) }-2\,{\frac{1}{-2+2\,\sqrt{2}}\arctan \left ( 2\,{\frac{\tanh \left ( x/2 \right ) }{-2+2\,\sqrt{2}}} \right ) } \end{align*}

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

[In]

int(1/(cosh(x)^2+sinh(x)^2),x)

[Out]

-2*2^(1/2)/(2+2*2^(1/2))*arctan(2*tanh(1/2*x)/(2+2*2^(1/2)))-2/(2+2*2^(1/2))*arctan(2*tanh(1/2*x)/(2+2*2^(1/2)
))+2*2^(1/2)/(-2+2*2^(1/2))*arctan(2*tanh(1/2*x)/(-2+2*2^(1/2)))-2/(-2+2*2^(1/2))*arctan(2*tanh(1/2*x)/(-2+2*2
^(1/2)))

________________________________________________________________________________________

Maxima [B]  time = 1.61923, size = 47, normalized size = 15.67 \begin{align*} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} + 2 \, e^{\left (-x\right )}\right )}\right ) - \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} - 2 \, e^{\left (-x\right )}\right )}\right ) \end{align*}

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

[In]

integrate(1/(cosh(x)^2+sinh(x)^2),x, algorithm="maxima")

[Out]

arctan(1/2*sqrt(2)*(sqrt(2) + 2*e^(-x))) - arctan(-1/2*sqrt(2)*(sqrt(2) - 2*e^(-x)))

________________________________________________________________________________________

Fricas [B]  time = 2.29802, size = 69, normalized size = 23. \begin{align*} -\arctan \left (-\frac{\cosh \left (x\right ) + \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(1/(cosh(x)^2+sinh(x)^2),x, algorithm="fricas")

[Out]

-arctan(-(cosh(x) + sinh(x))/(cosh(x) - sinh(x)))

________________________________________________________________________________________

Sympy [B]  time = 11.3414, size = 117, normalized size = 39. \begin{align*} \frac{\operatorname{atan}{\left (\frac{\tanh{\left (\frac{x}{2} \right )}}{\sqrt{3 - 2 \sqrt{2}}} \right )}}{\sqrt{3 - 2 \sqrt{2}} + \sqrt{2} \sqrt{3 - 2 \sqrt{2}}} - \frac{\sqrt{3 - 2 \sqrt{2}} \sqrt{2 \sqrt{2} + 3} \operatorname{atan}{\left (\frac{\tanh{\left (\frac{x}{2} \right )}}{\sqrt{2 \sqrt{2} + 3}} \right )}}{\sqrt{3 - 2 \sqrt{2}} + \sqrt{2} \sqrt{3 - 2 \sqrt{2}}} \end{align*}

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

[In]

integrate(1/(cosh(x)**2+sinh(x)**2),x)

[Out]

atan(tanh(x/2)/sqrt(3 - 2*sqrt(2)))/(sqrt(3 - 2*sqrt(2)) + sqrt(2)*sqrt(3 - 2*sqrt(2))) - sqrt(3 - 2*sqrt(2))*
sqrt(2*sqrt(2) + 3)*atan(tanh(x/2)/sqrt(2*sqrt(2) + 3))/(sqrt(3 - 2*sqrt(2)) + sqrt(2)*sqrt(3 - 2*sqrt(2)))

________________________________________________________________________________________

Giac [A]  time = 1.10793, size = 7, normalized size = 2.33 \begin{align*} \arctan \left (e^{\left (2 \, x\right )}\right ) \end{align*}

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

[In]

integrate(1/(cosh(x)^2+sinh(x)^2),x, algorithm="giac")

[Out]

arctan(e^(2*x))