Optimal. Leaf size=22 \[ -\frac {1}{2} e^{-2 x}+\frac {e^{2 x}}{2}+2 x \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {2320, 272, 45}
\begin {gather*} 2 x-\frac {e^{-2 x}}{2}+\frac {e^{2 x}}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 2320
Rubi steps
\begin {align*} \int \left (e^{-x}+e^x\right )^2 \, dx &=\text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^3} \, dx,x,e^x\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {(1+x)^2}{x^2} \, dx,x,e^{2 x}\right )\\ &=\frac {1}{2} \text {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.02, size = 23, normalized size = 1.05 \begin {gather*} \frac {1}{2} e^{-2 x} \left (-1+e^{4 x}\right )+\log \left (e^{2 x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.01, size = 17, normalized size = 0.77
method | result | size |
default | \(2 x -\frac {{\mathrm e}^{-2 x}}{2}+\frac {{\mathrm e}^{2 x}}{2}\) | \(17\) |
risch | \(2 x -\frac {{\mathrm e}^{-2 x}}{2}+\frac {{\mathrm e}^{2 x}}{2}\) | \(17\) |
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.30, size = 16, normalized size = 0.73 \begin {gather*} 2 \, x + \frac {1}{2} \, e^{\left (2 \, x\right )} - \frac {1}{2} \, e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 19, normalized size = 0.86 \begin {gather*} \frac {1}{2} \, {\left (4 \, x e^{\left (2 \, x\right )} + e^{\left (4 \, x\right )} - 1\right )} e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.03, size = 17, normalized size = 0.77 \begin {gather*} 2 x + \frac {e^{2 x}}{2} - \frac {e^{- 2 x}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.90, size = 24, normalized size = 1.09 \begin {gather*} -\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 )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.58, size = 8, normalized size = 0.36 \begin {gather*} 2\,x+\mathrm {sinh}\left (2\,x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________