Optimal. Leaf size=27 \[ e^{-x} \left (-x (-4+2 x)+\frac {e^2 \left (-3+x^4\right )}{x}\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.19, antiderivative size = 116, normalized size of antiderivative = 4.30, number of steps used = 15, number of rules used = 5, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2199, 2194, 2177, 2178, 2176} \begin {gather*} e^{2-x} x^3+3 e^{2-x} x^2-\left (2+3 e^2\right ) e^{-x} x^2+6 e^{2-x} x+8 e^{-x} x-2 \left (2+3 e^2\right ) e^{-x} x+6 e^{2-x}+4 e^{-x}-2 \left (2+3 e^2\right ) e^{-x}-\frac {3 e^{2-x}}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (4 e^{-x}+\frac {3 e^{2-x}}{x^2}+\frac {3 e^{2-x}}{x}-8 e^{-x} x+e^{-x} \left (2+3 e^2\right ) x^2-e^{2-x} x^3\right ) \, dx\\ &=3 \int \frac {e^{2-x}}{x^2} \, dx+3 \int \frac {e^{2-x}}{x} \, dx+4 \int e^{-x} \, dx-8 \int e^{-x} x \, dx+\left (2+3 e^2\right ) \int e^{-x} x^2 \, dx-\int e^{2-x} x^3 \, dx\\ &=-4 e^{-x}-\frac {3 e^{2-x}}{x}+8 e^{-x} x-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3+3 e^2 \text {Ei}(-x)-3 \int \frac {e^{2-x}}{x} \, dx-3 \int e^{2-x} x^2 \, dx-8 \int e^{-x} \, dx+\left (2 \left (2+3 e^2\right )\right ) \int e^{-x} x \, dx\\ &=4 e^{-x}-\frac {3 e^{2-x}}{x}+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3-6 \int e^{2-x} x \, dx+\left (2 \left (2+3 e^2\right )\right ) \int e^{-x} \, dx\\ &=4 e^{-x}-2 e^{-x} \left (2+3 e^2\right )-\frac {3 e^{2-x}}{x}+6 e^{2-x} x+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3-6 \int e^{2-x} \, dx\\ &=6 e^{2-x}+4 e^{-x}-2 e^{-x} \left (2+3 e^2\right )-\frac {3 e^{2-x}}{x}+6 e^{2-x} x+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 27, normalized size = 1.00 \begin {gather*} \frac {e^{-x} \left (-2 (-2+x) x^2+e^2 \left (-3+x^4\right )\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 29, normalized size = 1.07 \begin {gather*} -\frac {{\left (2 \, x^{3} - 4 \, x^{2} - {\left (x^{4} - 3\right )} e^{2}\right )} e^{\left (-x\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 41, normalized size = 1.52 \begin {gather*} \frac {x^{4} e^{\left (-x + 2\right )} - 2 \, x^{3} e^{\left (-x\right )} + 4 \, x^{2} e^{\left (-x\right )} - 3 \, e^{\left (-x + 2\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 30, normalized size = 1.11
method | result | size |
gosper | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
norman | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
risch | \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) | \(30\) |
default | \(4 x \,{\mathrm e}^{-x}-2 x^{2} {\mathrm e}^{-x}+3 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{-x}}{x}+\expIntegralEi \left (1, x\right )\right )-3 \,{\mathrm e}^{2} \expIntegralEi \left (1, x\right )+3 \,{\mathrm e}^{2} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )-{\mathrm e}^{2} \left (-x^{3} {\mathrm e}^{-x}-3 x^{2} {\mathrm e}^{-x}-6 x \,{\mathrm e}^{-x}-6 \,{\mathrm e}^{-x}\right )\) | \(105\) |
meijerg | \(-4+4 \left (2 x +2\right ) {\mathrm e}^{-x}-4 \,{\mathrm e}^{-x}-{\mathrm e}^{2} \left (6-\frac {\left (4 x^{3}+12 x^{2}+24 x +24\right ) {\mathrm e}^{-x}}{4}\right )+\left (3 \,{\mathrm e}^{2}+2\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )-3 \,{\mathrm e}^{2} \expIntegralEi \left (1, x\right )+3 \,{\mathrm e}^{2} \left (\frac {-2 x +2}{2 x}-\frac {{\mathrm e}^{-x}}{x}+\expIntegralEi \left (1, x\right )+1-\frac {1}{x}\right )\) | \(112\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.47, size = 95, normalized size = 3.52 \begin {gather*} 3 \, {\rm Ei}\left (-x\right ) e^{2} + {\left (x^{3} e^{2} + 3 \, x^{2} e^{2} + 6 \, x e^{2} + 6 \, e^{2}\right )} e^{\left (-x\right )} - 3 \, {\left (x^{2} e^{2} + 2 \, x e^{2} + 2 \, e^{2}\right )} e^{\left (-x\right )} - 2 \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + 8 \, {\left (x + 1\right )} e^{\left (-x\right )} - 3 \, e^{2} \Gamma \left (-1, x\right ) - 4 \, e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.02, size = 31, normalized size = 1.15 \begin {gather*} -\frac {{\mathrm {e}}^{-x}\,\left (-{\mathrm {e}}^2\,x^4+2\,x^3-4\,x^2+3\,{\mathrm {e}}^2\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 26, normalized size = 0.96 \begin {gather*} \frac {\left (x^{4} e^{2} - 2 x^{3} + 4 x^{2} - 3 e^{2}\right ) e^{- x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________