Optimal. Leaf size=8 \[ -x+2 \tanh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 8, normalized size of antiderivative = 1.00, 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 = {3250, 3254,
3852, 8} \begin {gather*} 2 \tanh (x)-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3250
Rule 3254
Rule 3852
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 \text {Subst}(\int 1 \, dx,x,-i \tanh (x))\\ &=-x+2 \tanh (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 8, normalized size = 1.00 \begin {gather*} -x+2 \tanh (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(33\) vs.
\(2(8)=16\).
time = 0.76, size = 34, normalized size = 4.25
method | result | size |
risch | \(-x -\frac {4}{1+{\mathrm e}^{2 x}}\) | \(15\) |
default | \(\frac {4 \tanh \left (\frac {x}{2}\right )}{\tanh ^{2}\left (\frac {x}{2}\right )+1}-\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 14, normalized size = 1.75 \begin {gather*} -x + \frac {4}{e^{\left (-2 \, x\right )} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 17 vs.
\(2 (8) = 16\).
time = 0.35, size = 17, normalized size = 2.12 \begin {gather*} -\frac {{\left (x + 2\right )} \cosh \left (x\right ) - 2 \, \sinh \left (x\right )}{\cosh \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 41 vs.
\(2 (5) = 10\).
time = 0.43, size = 41, normalized size = 5.12 \begin {gather*} - \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 14, normalized size = 1.75 \begin {gather*} -x - \frac {4}{e^{\left (2 \, x\right )} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 14, normalized size = 1.75 \begin {gather*} -x-\frac {4}{{\mathrm {e}}^{2\,x}+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________