Optimal. Leaf size=34 \[ \frac {4 x}{\sqrt {5}}-x-\frac {8 \tanh ^{-1}\left (\frac {\cosh (x)}{\sinh (x)+\sqrt {5}+2}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2735, 2657} \[ \frac {4 x}{\sqrt {5}}-x-\frac {8 \tanh ^{-1}\left (\frac {\cosh (x)}{\sinh (x)+\sqrt {5}+2}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2657
Rule 2735
Rubi steps
\begin {align*} \int \frac {2-\sinh (x)}{2+\sinh (x)} \, dx &=-x+4 \int \frac {1}{2+\sinh (x)} \, dx\\ &=-x+\frac {4 x}{\sqrt {5}}-\frac {8 \tanh ^{-1}\left (\frac {\cosh (x)}{2+\sqrt {5}+\sinh (x)}\right )}{\sqrt {5}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 28, normalized size = 0.82 \[ -x-\frac {8 \tanh ^{-1}\left (\frac {1-2 \tanh \left (\frac {x}{2}\right )}{\sqrt {5}}\right )}{\sqrt {5}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 42, normalized size = 1.24 \[ \frac {4}{5} \, \sqrt {5} \log \left (-\frac {{\left (2 \, \sqrt {5} - 5\right )} \cosh \relax (x) - 2 \, {\left (\sqrt {5} - 2\right )} \sinh \relax (x) + \sqrt {5} - 2}{\sinh \relax (x) + 2}\right ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 33, normalized size = 0.97 \[ \frac {4}{5} \, \sqrt {5} \log \left (\frac {{\left | -2 \, \sqrt {5} + 2 \, e^{x} + 4 \right |}}{2 \, {\left (\sqrt {5} + e^{x} + 2\right )}}\right ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 37, normalized size = 1.09 \[ \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )-\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )+\frac {8 \sqrt {5}\, \arctanh \left (\frac {\left (2 \tanh \left (\frac {x}{2}\right )-1\right ) \sqrt {5}}{5}\right )}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 34, normalized size = 1.00 \[ \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - e^{\left (-x\right )} + 2}{\sqrt {5} + e^{\left (-x\right )} - 2}\right ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.59, size = 48, normalized size = 1.41 \[ \frac {4\,\sqrt {5}\,\ln \left (-8\,{\mathrm {e}}^x-\frac {4\,\sqrt {5}\,\left (4\,{\mathrm {e}}^x-2\right )}{5}\right )}{5}-x-\frac {4\,\sqrt {5}\,\ln \left (\frac {4\,\sqrt {5}\,\left (4\,{\mathrm {e}}^x-2\right )}{5}-8\,{\mathrm {e}}^x\right )}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.71, size = 51, normalized size = 1.50 \[ - x + \frac {4 \sqrt {5} \log {\left (\tanh {\left (\frac {x}{2} \right )} - \frac {1}{2} + \frac {\sqrt {5}}{2} \right )}}{5} - \frac {4 \sqrt {5} \log {\left (\tanh {\left (\frac {x}{2} \right )} - \frac {\sqrt {5}}{2} - \frac {1}{2} \right )}}{5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________