Optimal. Leaf size=22 \[ 2 x-\frac{e^{-2 x}}{2}+\frac{e^{2 x}}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0181731, antiderivative size = 22, normalized size of antiderivative = 1., 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 = {2282, 266, 43} \[ 2 x-\frac{e^{-2 x}}{2}+\frac{e^{2 x}}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 266
Rule 43
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.012073, size = 20, normalized size = 0.91 \[ \frac{1}{2} \left (4 x-e^{-2 x}+e^{2 x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 17, normalized size = 0.8 \begin{align*} 2\,x-{\frac{1}{2\, \left ({{\rm e}^{x}} \right ) ^{2}}}+{\frac{ \left ({{\rm e}^{x}} \right ) ^{2}}{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.968346, size = 22, normalized size = 1. \begin{align*} 2 \, x + \frac{1}{2} \, e^{\left (2 \, x\right )} - \frac{1}{2} \, e^{\left (-2 \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.737353, size = 57, normalized size = 2.59 \begin{align*} \frac{1}{2} \,{\left (4 \, x e^{\left (2 \, x\right )} + e^{\left (4 \, x\right )} - 1\right )} e^{\left (-2 \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.099853, size = 17, normalized size = 0.77 \begin{align*} 2 x + \frac{e^{2 x}}{2} - \frac{e^{- 2 x}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2042, size = 32, normalized size = 1.45 \begin{align*} -\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]