Optimal. Leaf size=18 \[ -x+\frac {1}{2} \log \left (1-e^{4 x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2320, 457, 78}
\begin {gather*} \frac {1}{2} \log \left (1-e^{4 x}\right )-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 457
Rule 2320
Rubi steps
\begin {align*} \int \frac {e^{-2 x}+e^{2 x}}{-e^{-2 x}+e^{2 x}} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {-1-x^2}{x \left (1-x^2\right )} \, dx,x,e^{2 x}\right )\\ &=\frac {1}{4} \text {Subst}\left (\int \frac {-1-x}{(1-x) x} \, dx,x,e^{4 x}\right )\\ &=\frac {1}{4} \text {Subst}\left (\int \left (\frac {2}{-1+x}-\frac {1}{x}\right ) \, dx,x,e^{4 x}\right )\\ &=-x+\frac {1}{2} \log \left (1-e^{4 x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(39\) vs. \(2(18)=36\).
time = 0.04, size = 39, normalized size = 2.17 \begin {gather*} -\log \left (e^x\right )+\frac {1}{2} \log \left (-1+e^x\right )+\frac {1}{2} \log \left (1+e^x\right )+\frac {1}{2} \log \left (1+e^{2 x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 30, normalized size = 1.67
method | result | size |
risch | \(x +\frac {\ln \left ({\mathrm e}^{-4 x}-1\right )}{2}\) | \(12\) |
norman | \(x +\frac {\ln \left (-1+{\mathrm e}^{-2 x}\right )}{2}+\frac {\ln \left ({\mathrm e}^{-2 x}+1\right )}{2}\) | \(21\) |
default | \(\frac {\ln \left (1+{\mathrm e}^{x}\right )}{2}-\ln \left ({\mathrm e}^{x}\right )+\frac {\ln \left (-1+{\mathrm e}^{x}\right )}{2}+\frac {\ln \left (1+{\mathrm e}^{2 x}\right )}{2}\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 14, normalized size = 0.78 \begin {gather*} \frac {1}{2} \, \log \left (e^{\left (2 \, x\right )} - e^{\left (-2 \, x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 13, normalized size = 0.72 \begin {gather*} -x + \frac {1}{2} \, \log \left (e^{\left (4 \, x\right )} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 12, normalized size = 0.67 \begin {gather*} x + \frac {\log {\left (-1 + e^{- 4 x} \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.93, size = 14, normalized size = 0.78 \begin {gather*} -x + \frac {1}{2} \, \log \left ({\left | e^{\left (4 \, x\right )} - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.34, size = 22, normalized size = 1.22 \begin {gather*} \frac {\ln \left ({\mathrm {e}}^{2\,x}-1\right )}{2}-x+\frac {\ln \left ({\mathrm {e}}^{2\,x}+1\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________