Optimal. Leaf size=19 \[ 4 e^{-x} x \left (-\frac {1}{4-e}+x\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.12, antiderivative size = 52, normalized size of antiderivative = 2.74, number of steps used = 16, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 2196, 2194, 2176} \begin {gather*} -\frac {4 e^{1-x} x^2}{4-e}+\frac {16 e^{-x} x^2}{4-e}-\frac {4 e^{-x} x}{4-e} \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 {\int e^{-x} \left (4-36 x+16 x^2+e \left (8 x-4 x^2\right )\right ) \, dx}{-4+e}\\ &=\frac {\int \left (4 e^{-x}-36 e^{-x} x-4 e^{1-x} (-2+x) x+16 e^{-x} x^2\right ) \, dx}{-4+e}\\ &=-\frac {4 \int e^{-x} \, dx}{4-e}+\frac {4 \int e^{1-x} (-2+x) x \, dx}{4-e}-\frac {16 \int e^{-x} x^2 \, dx}{4-e}+\frac {36 \int e^{-x} x \, dx}{4-e}\\ &=\frac {4 e^{-x}}{4-e}-\frac {36 e^{-x} x}{4-e}+\frac {16 e^{-x} x^2}{4-e}+\frac {4 \int \left (-2 e^{1-x} x+e^{1-x} x^2\right ) \, dx}{4-e}-\frac {32 \int e^{-x} x \, dx}{4-e}+\frac {36 \int e^{-x} \, dx}{4-e}\\ &=-\frac {32 e^{-x}}{4-e}-\frac {4 e^{-x} x}{4-e}+\frac {16 e^{-x} x^2}{4-e}+\frac {4 \int e^{1-x} x^2 \, dx}{4-e}-\frac {8 \int e^{1-x} x \, dx}{4-e}-\frac {32 \int e^{-x} \, dx}{4-e}\\ &=\frac {8 e^{1-x} x}{4-e}-\frac {4 e^{-x} x}{4-e}-\frac {4 e^{1-x} x^2}{4-e}+\frac {16 e^{-x} x^2}{4-e}-\frac {8 \int e^{1-x} \, dx}{4-e}+\frac {8 \int e^{1-x} x \, dx}{4-e}\\ &=\frac {8 e^{1-x}}{4-e}-\frac {4 e^{-x} x}{4-e}-\frac {4 e^{1-x} x^2}{4-e}+\frac {16 e^{-x} x^2}{4-e}+\frac {8 \int e^{1-x} \, dx}{4-e}\\ &=-\frac {4 e^{-x} x}{4-e}-\frac {4 e^{1-x} x^2}{4-e}+\frac {16 e^{-x} x^2}{4-e}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 20, normalized size = 1.05 \begin {gather*} \frac {4 e^{-x} x (1+(-4+e) x)}{-4+e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 25, normalized size = 1.32 \begin {gather*} \frac {4 \, {\left (x^{2} e - 4 \, x^{2} + x\right )} e^{\left (-x\right )}}{e - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.22, size = 34, normalized size = 1.79 \begin {gather*} \frac {4 \, {\left (x^{2} e^{\left (-x + 1\right )} - {\left (4 \, x^{2} - x\right )} e^{\left (-x\right )}\right )}}{e - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 21, normalized size = 1.11
method | result | size |
norman | \(\left (4 x^{2}+\frac {4 x}{{\mathrm e}-4}\right ) {\mathrm e}^{-x}\) | \(21\) |
gosper | \(\frac {4 x \left (x \,{\mathrm e}-4 x +1\right ) {\mathrm e}^{-x}}{{\mathrm e}-4}\) | \(23\) |
risch | \(\frac {\left (4 x^{2} {\mathrm e}-16 x^{2}+4 x \right ) {\mathrm e}^{-x}}{{\mathrm e}-4}\) | \(28\) |
default | \(\frac {4 x \,{\mathrm e}^{-x}-16 x^{2} {\mathrm e}^{-x}+8 \,{\mathrm e} \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )-4 \,{\mathrm e} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )}{{\mathrm e}-4}\) | \(70\) |
meijerg | \(\frac {4-4 \,{\mathrm e}^{-x}}{{\mathrm e}-4}+\frac {\left (-4 \,{\mathrm e}+16\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )}{{\mathrm e}-4}+\frac {\left (8 \,{\mathrm e}-36\right ) \left (1-\frac {\left (2 x +2\right ) {\mathrm e}^{-x}}{2}\right )}{{\mathrm e}-4}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.37, size = 72, normalized size = 3.79 \begin {gather*} \frac {4 \, {\left ({\left (x^{2} e + 2 \, x e + 2 \, e\right )} e^{\left (-x\right )} - 4 \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - 2 \, {\left (x e + e\right )} e^{\left (-x\right )} + 9 \, {\left (x + 1\right )} e^{\left (-x\right )} - e^{\left (-x\right )}\right )}}{e - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 22, normalized size = 1.16 \begin {gather*} \frac {4\,x\,{\mathrm {e}}^{-x}\,\left (x\,\mathrm {e}-4\,x+1\right )}{\mathrm {e}-4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 24, normalized size = 1.26 \begin {gather*} \frac {\left (- 16 x^{2} + 4 e x^{2} + 4 x\right ) e^{- x}}{-4 + e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________