Optimal. Leaf size=22 \[ \frac {e x (1+x)+\left (-e^x+x\right )^2}{2+e} \]
________________________________________________________________________________________
Rubi [B] time = 0.03, antiderivative size = 61, normalized size of antiderivative = 2.77, number of steps used = 5, number of rules used = 3, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {12, 2194, 2176} \begin {gather*} \frac {x^2}{2+e}+\frac {e (2 x+1)^2}{4 (2+e)}-\frac {2 e^x (x+1)}{2+e}+\frac {2 e^x}{2+e}+\frac {e^{2 x}}{2+e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2194
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \left (2 e^{2 x}+e^x (-2-2 x)+2 x+e (1+2 x)\right ) \, dx}{2+e}\\ &=\frac {x^2}{2+e}+\frac {e (1+2 x)^2}{4 (2+e)}+\frac {\int e^x (-2-2 x) \, dx}{2+e}+\frac {2 \int e^{2 x} \, dx}{2+e}\\ &=\frac {e^{2 x}}{2+e}+\frac {x^2}{2+e}-\frac {2 e^x (1+x)}{2+e}+\frac {e (1+2 x)^2}{4 (2+e)}+\frac {2 \int e^x \, dx}{2+e}\\ &=\frac {2 e^x}{2+e}+\frac {e^{2 x}}{2+e}+\frac {x^2}{2+e}-\frac {2 e^x (1+x)}{2+e}+\frac {e (1+2 x)^2}{4 (2+e)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 29, normalized size = 1.32 \begin {gather*} \frac {e^{2 x}+e x-2 e^x x+x^2+e x^2}{2+e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 28, normalized size = 1.27 \begin {gather*} \frac {x^{2} + {\left (x^{2} + x\right )} e - 2 \, x e^{x} + e^{\left (2 \, x\right )}}{e + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.44, size = 28, normalized size = 1.27 \begin {gather*} \frac {x^{2} + {\left (x^{2} + x\right )} e - 2 \, x e^{x} + e^{\left (2 \, x\right )}}{e + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 29, normalized size = 1.32
method | result | size |
default | \(\frac {-2 \,{\mathrm e}^{x} x +\left (x^{2}+x \right ) {\mathrm e}+x^{2}+{\mathrm e}^{2 x}}{{\mathrm e}+2}\) | \(29\) |
norman | \(\frac {{\mathrm e}^{2 x}}{{\mathrm e}+2}+\frac {\left (1+{\mathrm e}\right ) x^{2}}{{\mathrm e}+2}+\frac {{\mathrm e} x}{{\mathrm e}+2}-\frac {2 x \,{\mathrm e}^{x}}{{\mathrm e}+2}\) | \(48\) |
risch | \(\frac {x^{2} {\mathrm e}}{{\mathrm e}+2}+\frac {{\mathrm e} x}{{\mathrm e}+2}+\frac {x^{2}}{{\mathrm e}+2}-\frac {2 x \,{\mathrm e}^{x}}{{\mathrm e}+2}+\frac {{\mathrm e}^{2 x}}{{\mathrm e}+2}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 28, normalized size = 1.27 \begin {gather*} \frac {x^{2} + {\left (x^{2} + x\right )} e - 2 \, x e^{x} + e^{\left (2 \, x\right )}}{e + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 29, normalized size = 1.32 \begin {gather*} \frac {{\mathrm {e}}^{2\,x}+x\,\mathrm {e}-2\,x\,{\mathrm {e}}^x+x^2\,\left (\mathrm {e}+1\right )}{\mathrm {e}+2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.14, size = 58, normalized size = 2.64 \begin {gather*} \frac {x^{2} \left (1 + e\right )}{2 + e} + \frac {e x}{2 + e} + \frac {\left (- 2 e x - 4 x\right ) e^{x} + \left (2 + e\right ) e^{2 x}}{4 + e^{2} + 4 e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________