Optimal. Leaf size=27 \[ \frac {(2-x) \left (e^x+\frac {3}{x}-x\right ) x^2}{9 e^3} \]
________________________________________________________________________________________
Rubi [B] time = 0.09, antiderivative size = 63, normalized size of antiderivative = 2.33, number of steps used = 14, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 1594, 2196, 2176, 2194} \begin {gather*} \frac {x^4}{9 e^3}-\frac {1}{9} e^{x-3} x^3-\frac {2 x^3}{9 e^3}+\frac {2}{9} e^{x-3} x^2-\frac {x^2}{3 e^3}+\frac {2 x}{3 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1594
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \left (6-6 x-6 x^2+4 x^3+e^x \left (4 x-x^2-x^3\right )\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}+\frac {\int e^x \left (4 x-x^2-x^3\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}+\frac {\int e^x x \left (4-x-x^2\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}+\frac {\int \left (4 e^x x-e^x x^2-e^x x^3\right ) \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}-\frac {2 x^3}{9 e^3}+\frac {x^4}{9 e^3}-\frac {\int e^x x^2 \, dx}{9 e^3}-\frac {\int e^x x^3 \, dx}{9 e^3}+\frac {4 \int e^x x \, dx}{9 e^3}\\ &=\frac {2 x}{3 e^3}+\frac {4}{9} e^{-3+x} x-\frac {x^2}{3 e^3}-\frac {1}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}+\frac {2 \int e^x x \, dx}{9 e^3}+\frac {\int e^x x^2 \, dx}{3 e^3}-\frac {4 \int e^x \, dx}{9 e^3}\\ &=-\frac {4}{9} e^{-3+x}+\frac {2 x}{3 e^3}+\frac {2}{3} e^{-3+x} x-\frac {x^2}{3 e^3}+\frac {2}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}-\frac {2 \int e^x \, dx}{9 e^3}-\frac {2 \int e^x x \, dx}{3 e^3}\\ &=-\frac {2}{3} e^{-3+x}+\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}+\frac {2}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}+\frac {2 \int e^x \, dx}{3 e^3}\\ &=\frac {2 x}{3 e^3}-\frac {x^2}{3 e^3}+\frac {2}{9} e^{-3+x} x^2-\frac {2 x^3}{9 e^3}-\frac {1}{9} e^{-3+x} x^3+\frac {x^4}{9 e^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 22, normalized size = 0.81 \begin {gather*} \frac {(-2+x) x \left (-3-e^x x+x^2\right )}{9 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 34, normalized size = 1.26 \begin {gather*} \frac {1}{9} \, {\left (x^{4} - 2 \, x^{3} - 3 \, x^{2} - {\left (x^{3} - 2 \, x^{2}\right )} e^{x} + 6 \, x\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.50, size = 34, normalized size = 1.26 \begin {gather*} \frac {1}{9} \, {\left (x^{4} - 2 \, x^{3} - 3 \, x^{2} - {\left (x^{3} - 2 \, x^{2}\right )} e^{x} + 6 \, x\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 38, normalized size = 1.41
method | result | size |
default | \(\frac {{\mathrm e}^{-3} \left (6 x +2 \,{\mathrm e}^{x} x^{2}-{\mathrm e}^{x} x^{3}-3 x^{2}-2 x^{3}+x^{4}\right )}{9}\) | \(38\) |
risch | \(\frac {{\mathrm e}^{-3} x^{4}}{9}-\frac {2 \,{\mathrm e}^{-3} x^{3}}{9}-\frac {x^{2} {\mathrm e}^{-3}}{3}+\frac {2 \,{\mathrm e}^{-3} x}{3}+\frac {\left (-x^{3}+2 x^{2}\right ) {\mathrm e}^{x -3}}{9}\) | \(45\) |
norman | \(\frac {2 \,{\mathrm e}^{-3} x}{3}-\frac {x^{2} {\mathrm e}^{-3}}{3}-\frac {2 \,{\mathrm e}^{-3} x^{3}}{9}+\frac {{\mathrm e}^{-3} x^{4}}{9}+\frac {2 x^{2} {\mathrm e}^{-3} {\mathrm e}^{x}}{9}-\frac {{\mathrm e}^{-3} x^{3} {\mathrm e}^{x}}{9}\) | \(58\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.36, size = 34, normalized size = 1.26 \begin {gather*} \frac {1}{9} \, {\left (x^{4} - 2 \, x^{3} - 3 \, x^{2} - {\left (x^{3} - 2 \, x^{2}\right )} e^{x} + 6 \, x\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 19, normalized size = 0.70 \begin {gather*} -\frac {x\,{\mathrm {e}}^{-3}\,\left (x-2\right )\,\left (x\,{\mathrm {e}}^x-x^2+3\right )}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.14, size = 51, normalized size = 1.89 \begin {gather*} \frac {x^{4}}{9 e^{3}} - \frac {2 x^{3}}{9 e^{3}} - \frac {x^{2}}{3 e^{3}} + \frac {2 x}{3 e^{3}} + \frac {\left (- x^{3} + 2 x^{2}\right ) e^{x}}{9 e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________