3.9.8 \(\int \frac {1}{\cosh ^2(x)+\sinh ^2(x)} \, dx\) [808]

Optimal. Leaf size=3 \[ \text {ArcTan}(\tanh (x)) \]

[Out]

arctan(tanh(x))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 3, normalized size of antiderivative = 1.00, 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 = {209} \begin {gather*} \text {ArcTan}(\tanh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[Tanh[x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 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 &=\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tanh (x)\right )\\ &=\tan ^{-1}(\tanh (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 3, normalized size = 1.00 \begin {gather*} \text {ArcTan}(\tanh (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[Tanh[x]]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(71\) vs. \(2(3)=6\).
time = 1.39, size = 72, normalized size = 24.00

method result size
risch \(\frac {i \ln \left ({\mathrm e}^{2 x}+i\right )}{2}-\frac {i \ln \left ({\mathrm e}^{2 x}-i\right )}{2}\) \(24\)
default \(-\frac {\left (2+\sqrt {2}\right ) \sqrt {2}\, \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right )}{2+2 \sqrt {2}}\right )}{2+2 \sqrt {2}}-\frac {\left (-2+\sqrt {2}\right ) \sqrt {2}\, \arctan \left (\frac {2 \tanh \left (\frac {x}{2}\right )}{-2+2 \sqrt {2}}\right )}{-2+2 \sqrt {2}}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (3) = 6\).
time = 0.46, size = 35, normalized size = 11.67 \begin {gather*} \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 {gather*}

Verification 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] Leaf count of result is larger than twice the leaf count of optimal. 19 vs. \(2 (3) = 6\).
time = 0.41, size = 19, normalized size = 6.33 \begin {gather*} -\arctan \left (-\frac {\cosh \left (x\right ) + \sinh \left (x\right )}{\cosh \left (x\right ) - \sinh \left (x\right )}\right ) \end {gather*}

Verification 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] Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (3) = 6\).
time = 3.72, size = 172, normalized size = 57.33 \begin {gather*} \frac {47321 \sqrt {3 - 2 \sqrt {2}} \operatorname {atan}{\left (\frac {\tanh {\left (\frac {x}{2} \right )}}{\sqrt {3 - 2 \sqrt {2}}} \right )}}{13860 \sqrt {2} + 19601} + \frac {33461 \sqrt {2} \sqrt {3 - 2 \sqrt {2}} \operatorname {atan}{\left (\frac {\tanh {\left (\frac {x}{2} \right )}}{\sqrt {3 - 2 \sqrt {2}}} \right )}}{13860 \sqrt {2} + 19601} - \frac {5741 \sqrt {2} \sqrt {2 \sqrt {2} + 3} \operatorname {atan}{\left (\frac {\tanh {\left (\frac {x}{2} \right )}}{\sqrt {2 \sqrt {2} + 3}} \right )}}{13860 \sqrt {2} + 19601} - \frac {8119 \sqrt {2 \sqrt {2} + 3} \operatorname {atan}{\left (\frac {\tanh {\left (\frac {x}{2} \right )}}{\sqrt {2 \sqrt {2} + 3}} \right )}}{13860 \sqrt {2} + 19601} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

47321*sqrt(3 - 2*sqrt(2))*atan(tanh(x/2)/sqrt(3 - 2*sqrt(2)))/(13860*sqrt(2) + 19601) + 33461*sqrt(2)*sqrt(3 -
 2*sqrt(2))*atan(tanh(x/2)/sqrt(3 - 2*sqrt(2)))/(13860*sqrt(2) + 19601) - 5741*sqrt(2)*sqrt(2*sqrt(2) + 3)*ata
n(tanh(x/2)/sqrt(2*sqrt(2) + 3))/(13860*sqrt(2) + 19601) - 8119*sqrt(2*sqrt(2) + 3)*atan(tanh(x/2)/sqrt(2*sqrt
(2) + 3))/(13860*sqrt(2) + 19601)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 5, normalized size = 1.67 \begin {gather*} \arctan \left (e^{\left (2 \, x\right )}\right ) \end {gather*}

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

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 5, normalized size = 1.67 \begin {gather*} \mathrm {atan}\left ({\mathrm {e}}^{2\,x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(exp(2*x))

________________________________________________________________________________________