Optimal. Leaf size=26 \[ e^x \left (3-e^x+\frac {1}{9} \left (2-\frac {2}{x}-x\right )\right ) x \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 49, normalized size of antiderivative = 1.88, number of steps used = 12, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {12, 2176, 2194, 2196} \begin {gather*} -\frac {1}{9} e^x x^2+\frac {29 e^x x}{9}-\frac {2 e^x}{9}+\frac {e^{2 x}}{2}-\frac {1}{2} e^{2 x} (2 x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{9} \int \left (e^{2 x} (-9-18 x)+e^x \left (27+27 x-x^2\right )\right ) \, dx\\ &=\frac {1}{9} \int e^{2 x} (-9-18 x) \, dx+\frac {1}{9} \int e^x \left (27+27 x-x^2\right ) \, dx\\ &=-\frac {1}{2} e^{2 x} (1+2 x)+\frac {1}{9} \int \left (27 e^x+27 e^x x-e^x x^2\right ) \, dx+\int e^{2 x} \, dx\\ &=\frac {e^{2 x}}{2}-\frac {1}{2} e^{2 x} (1+2 x)-\frac {1}{9} \int e^x x^2 \, dx+3 \int e^x \, dx+3 \int e^x x \, dx\\ &=3 e^x+\frac {e^{2 x}}{2}+3 e^x x-\frac {e^x x^2}{9}-\frac {1}{2} e^{2 x} (1+2 x)+\frac {2}{9} \int e^x x \, dx-3 \int e^x \, dx\\ &=\frac {e^{2 x}}{2}+\frac {29 e^x x}{9}-\frac {e^x x^2}{9}-\frac {1}{2} e^{2 x} (1+2 x)-\frac {2 \int e^x \, dx}{9}\\ &=-\frac {2 e^x}{9}+\frac {e^{2 x}}{2}+\frac {29 e^x x}{9}-\frac {e^x x^2}{9}-\frac {1}{2} e^{2 x} (1+2 x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 21, normalized size = 0.81 \begin {gather*} -\frac {1}{9} e^x \left (2+\left (-29+9 e^x\right ) x+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.97, size = 20, normalized size = 0.77 \begin {gather*} -x e^{\left (2 \, x\right )} - \frac {1}{9} \, {\left (x^{2} - 29 \, x + 2\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.29, size = 20, normalized size = 0.77 \begin {gather*} -x e^{\left (2 \, x\right )} - \frac {1}{9} \, {\left (x^{2} - 29 \, x + 2\right )} e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 23, normalized size = 0.88
method | result | size |
risch | \(-x \,{\mathrm e}^{2 x}+\frac {\left (-x^{2}+29 x -2\right ) {\mathrm e}^{x}}{9}\) | \(23\) |
default | \(-x \,{\mathrm e}^{2 x}+\frac {29 \,{\mathrm e}^{x} x}{9}-\frac {2 \,{\mathrm e}^{x}}{9}-\frac {{\mathrm e}^{x} x^{2}}{9}\) | \(25\) |
norman | \(-x \,{\mathrm e}^{2 x}+\frac {29 \,{\mathrm e}^{x} x}{9}-\frac {2 \,{\mathrm e}^{x}}{9}-\frac {{\mathrm e}^{x} x^{2}}{9}\) | \(25\) |
meijerg | \(\frac {2}{9}-\frac {{\mathrm e}^{2 x}}{2}+\frac {\left (-4 x +2\right ) {\mathrm e}^{2 x}}{4}+3 \,{\mathrm e}^{x}-\frac {\left (3 x^{2}-6 x +6\right ) {\mathrm e}^{x}}{27}-\frac {3 \left (-2 x +2\right ) {\mathrm e}^{x}}{2}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.55, size = 31, normalized size = 1.19 \begin {gather*} -x e^{\left (2 \, x\right )} - \frac {1}{9} \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 3 \, {\left (x - 1\right )} e^{x} + 3 \, e^{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.66, size = 17, normalized size = 0.65 \begin {gather*} -\frac {{\mathrm {e}}^x\,\left (9\,x\,{\mathrm {e}}^x-29\,x+x^2+2\right )}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 19, normalized size = 0.73 \begin {gather*} - x e^{2 x} + \frac {\left (- x^{2} + 29 x - 2\right ) e^{x}}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________