Optimal. Leaf size=18 \[ 6+x-e^{4-x} x (-2+3 x) \]
[Out]
________________________________________________________________________________________
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 = {6874, 2227,
2225, 2207} \begin {gather*} -3 e^{4-x} x^2+2 e^{4-x} x+x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2207
Rule 2225
Rule 2227
Rule 6874
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.07, 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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(61\) vs.
\(2(19)=38\).
time = 0.02, size = 62, normalized size = 3.44
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] Leaf count of result is larger than twice the leaf count of optimal. 45 vs.
\(2 (17) = 34\).
time = 0.25, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.45, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.04, 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]
________________________________________________________________________________________
Giac [A]
time = 0.42, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________