Optimal. Leaf size=34 \[ -x+\frac {4 x}{\sqrt {5}}-\frac {8 \tanh ^{-1}\left (\frac {\cosh (x)}{2+\sqrt {5}+\sinh (x)}\right )}{\sqrt {5}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, 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 = {2814, 2736}
\begin {gather*} \frac {4 x}{\sqrt {5}}-x-\frac {8 \tanh ^{-1}\left (\frac {\cosh (x)}{\sinh (x)+\sqrt {5}+2}\right )}{\sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2736
Rule 2814
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.07, size = 28, normalized size = 0.82 \begin {gather*} -x-\frac {8 \tanh ^{-1}\left (\frac {1-2 \tanh \left (\frac {x}{2}\right )}{\sqrt {5}}\right )}{\sqrt {5}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 37, normalized size = 1.09
method | result | size |
risch | \(-x +\frac {4 \sqrt {5}\, \ln \left ({\mathrm e}^{x}+2-\sqrt {5}\right )}{5}-\frac {4 \sqrt {5}\, \ln \left ({\mathrm e}^{x}+2+\sqrt {5}\right )}{5}\) | \(33\) |
default | \(\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}\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 34, normalized size = 1.00 \begin {gather*} \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - e^{\left (-x\right )} + 2}{\sqrt {5} + e^{\left (-x\right )} - 2}\right ) - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.46, size = 42, normalized size = 1.24 \begin {gather*} \frac {4}{5} \, \sqrt {5} \log \left (-\frac {{\left (2 \, \sqrt {5} - 5\right )} \cosh \left (x\right ) - 2 \, {\left (\sqrt {5} - 2\right )} \sinh \left (x\right ) + \sqrt {5} - 2}{\sinh \left (x\right ) + 2}\right ) - x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.96, size = 51, normalized size = 1.50 \begin {gather*} - 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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 33, normalized size = 0.97 \begin {gather*} \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 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.59, size = 48, normalized size = 1.41 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________