Optimal. Leaf size=8 \[ 2 \tanh (x)-x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0418972, antiderivative size = 8, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {3171, 3175, 3767, 8} \[ 2 \tanh (x)-x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3171
Rule 3175
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \frac{1-\sinh ^2(x)}{1+\sinh ^2(x)} \, dx &=-x+2 \int \frac{1}{1+\sinh ^2(x)} \, dx\\ &=-x+2 \int \text{sech}^2(x) \, dx\\ &=-x+2 i \operatorname{Subst}(\int 1 \, dx,x,-i \tanh (x))\\ &=-x+2 \tanh (x)\\ \end{align*}
Mathematica [A] time = 0.0149371, size = 8, normalized size = 1. \[ 2 \tanh (x)-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.024, size = 34, normalized size = 4.3 \begin{align*} -\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) +\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) +4\,{\frac{\tanh \left ( x/2 \right ) }{ \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.06353, size = 19, normalized size = 2.38 \begin{align*} -x + \frac{4}{e^{\left (-2 \, x\right )} + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.17497, size = 54, normalized size = 6.75 \begin{align*} -\frac{{\left (x + 2\right )} \cosh \left (x\right ) - 2 \, \sinh \left (x\right )}{\cosh \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.71308, size = 41, normalized size = 5.12 \begin{align*} - \frac{x \tanh ^{2}{\left (\frac{x}{2} \right )}}{\tanh ^{2}{\left (\frac{x}{2} \right )} + 1} - \frac{x}{\tanh ^{2}{\left (\frac{x}{2} \right )} + 1} + \frac{4 \tanh{\left (\frac{x}{2} \right )}}{\tanh ^{2}{\left (\frac{x}{2} \right )} + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16762, size = 19, normalized size = 2.38 \begin{align*} -x - \frac{4}{e^{\left (2 \, x\right )} + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]