Optimal. Leaf size=22 \[ -2 x-\frac {e^{-2 x}}{2}+\frac {e^{2 x}}{2} \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2282, 266, 43} \[ -2 x-\frac {e^{-2 x}}{2}+\frac {e^{2 x}}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 266
Rule 2282
Rubi steps
\begin {align*} \int \left (-e^{-x}+e^x\right )^2 \, dx &=\operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x^3} \, dx,x,e^x\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {(1-x)^2}{x^2} \, dx,x,e^{2 x}\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (1+\frac {1}{x^2}-\frac {2}{x}\right ) \, dx,x,e^{2 x}\right )\\ &=-\frac {1}{2} e^{-2 x}+\frac {e^{2 x}}{2}-2 x\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 22, normalized size = 1.00 \[ -2 x-\frac {e^{-2 x}}{2}+\frac {e^{2 x}}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (-e^{-x}+e^x\right )^2 \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.75, size = 21, normalized size = 0.95 \[ -\frac {1}{2} \, {\left (4 \, x e^{\left (2 \, x\right )} - e^{\left (4 \, x\right )} + 1\right )} e^{\left (-2 \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.58, size = 24, normalized size = 1.09 \[ \frac {1}{2} \, {\left (2 \, e^{\left (2 \, x\right )} - 1\right )} e^{\left (-2 \, x\right )} - 2 \, x + \frac {1}{2} \, e^{\left (2 \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 17, normalized size = 0.77
method | result | size |
risch | \(-2 x +\frac {{\mathrm e}^{2 x}}{2}-\frac {{\mathrm e}^{-2 x}}{2}\) | \(17\) |
derivativedivides | \(\frac {{\mathrm e}^{2 x}}{2}-2 \ln \left ({\mathrm e}^{x}\right )-\frac {{\mathrm e}^{-2 x}}{2}\) | \(19\) |
default | \(\frac {{\mathrm e}^{2 x}}{2}-2 \ln \left ({\mathrm e}^{x}\right )-\frac {{\mathrm e}^{-2 x}}{2}\) | \(19\) |
norman | \(\left (-\frac {1}{2}+\frac {{\mathrm e}^{4 x}}{2}-2 x \,{\mathrm e}^{2 x}\right ) {\mathrm e}^{-2 x}\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.52, size = 16, normalized size = 0.73 \[ -2 \, x + \frac {1}{2} \, e^{\left (2 \, x\right )} - \frac {1}{2} \, e^{\left (-2 \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 8, normalized size = 0.36 \[ \mathrm {sinh}\left (2\,x\right )-2\,x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 17, normalized size = 0.77 \[ - 2 x + \frac {e^{2 x}}{2} - \frac {e^{- 2 x}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________