Optimal. Leaf size=18 \[ 6+x-e^{4-x} x (-2+3 x) \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 24, normalized size of antiderivative = 1.33, number of steps used = 10, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6742, 2196, 2194, 2176} \begin {gather*} -3 e^{4-x} x^2+2 e^{4-x} x+x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2194
Rule 2196
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (1+e^{4-x} \left (2-8 x+3 x^2\right )\right ) \, dx\\ &=x+\int e^{4-x} \left (2-8 x+3 x^2\right ) \, dx\\ &=x+\int \left (2 e^{4-x}-8 e^{4-x} x+3 e^{4-x} x^2\right ) \, dx\\ &=x+2 \int e^{4-x} \, dx+3 \int e^{4-x} x^2 \, dx-8 \int e^{4-x} x \, dx\\ &=-2 e^{4-x}+x+8 e^{4-x} x-3 e^{4-x} x^2+6 \int e^{4-x} x \, dx-8 \int e^{4-x} \, dx\\ &=6 e^{4-x}+x+2 e^{4-x} x-3 e^{4-x} x^2+6 \int e^{4-x} \, dx\\ &=x+2 e^{4-x} x-3 e^{4-x} x^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 23, normalized size = 1.28 \begin {gather*} x+e^{-x} \left (2 e^4 x-3 e^4 x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 24, normalized size = 1.33 \begin {gather*} -{\left ({\left (3 \, x^{2} - 2 \, x\right )} e^{4} - x e^{x}\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 19, normalized size = 1.06 \begin {gather*} -{\left (3 \, x^{2} - 2 \, x\right )} e^{\left (-x + 4\right )} + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 21, normalized size = 1.17
method | result | size |
risch | \(x +\left (-3 x^{2} {\mathrm e}^{4}+2 x \,{\mathrm e}^{4}\right ) {\mathrm e}^{-x}\) | \(21\) |
norman | \(\left ({\mathrm e}^{x} x +2 x \,{\mathrm e}^{4}-3 x^{2} {\mathrm e}^{4}\right ) {\mathrm e}^{-x}\) | \(27\) |
default | \(x -2 \,{\mathrm e}^{-x} {\mathrm e}^{4}-8 \,{\mathrm e}^{4} \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )+3 \,{\mathrm e}^{4} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )\) | \(62\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.36, size = 45, normalized size = 2.50 \begin {gather*} -3 \, {\left (x^{2} e^{4} + 2 \, x e^{4} + 2 \, e^{4}\right )} e^{\left (-x\right )} + 8 \, {\left (x e^{4} + e^{4}\right )} e^{\left (-x\right )} + x - 2 \, e^{\left (-x + 4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 22, normalized size = 1.22 \begin {gather*} x+2\,x\,{\mathrm {e}}^{4-x}-3\,x^2\,{\mathrm {e}}^{4-x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 19, normalized size = 1.06 \begin {gather*} x + \left (- 3 x^{2} e^{4} + 2 x e^{4}\right ) e^{- x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________