Optimal. Leaf size=28 \[ \frac {1}{5} \left (3+e^{-x} \left (4+x \left (-1+\frac {x}{2}-x \log (3)\right )\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 46, normalized size of antiderivative = 1.64, number of steps used = 16, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {12, 2196, 2194, 2176} \begin {gather*} \frac {1}{10} e^{-x} x^2-\frac {1}{5} e^{-x} x^2 \log (3)-\frac {e^{-x} x}{5}+\frac {4 e^{-x}}{5} \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 {1}{10} \int e^{-x} \left (-10+4 x-x^2+\left (-4 x+2 x^2\right ) \log (3)\right ) \, dx\\ &=\frac {1}{10} \int \left (-10 e^{-x}+4 e^{-x} x-e^{-x} x^2+2 e^{-x} (-2+x) x \log (3)\right ) \, dx\\ &=-\left (\frac {1}{10} \int e^{-x} x^2 \, dx\right )+\frac {2}{5} \int e^{-x} x \, dx+\frac {1}{5} \log (3) \int e^{-x} (-2+x) x \, dx-\int e^{-x} \, dx\\ &=e^{-x}-\frac {2 e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2-\frac {1}{5} \int e^{-x} x \, dx+\frac {2}{5} \int e^{-x} \, dx+\frac {1}{5} \log (3) \int \left (-2 e^{-x} x+e^{-x} x^2\right ) \, dx\\ &=\frac {3 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2-\frac {1}{5} \int e^{-x} \, dx+\frac {1}{5} \log (3) \int e^{-x} x^2 \, dx-\frac {1}{5} (2 \log (3)) \int e^{-x} x \, dx\\ &=\frac {4 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2+\frac {2}{5} e^{-x} x \log (3)-\frac {1}{5} e^{-x} x^2 \log (3)-\frac {1}{5} (2 \log (3)) \int e^{-x} \, dx+\frac {1}{5} (2 \log (3)) \int e^{-x} x \, dx\\ &=\frac {4 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2+\frac {2}{5} e^{-x} \log (3)-\frac {1}{5} e^{-x} x^2 \log (3)+\frac {1}{5} (2 \log (3)) \int e^{-x} \, dx\\ &=\frac {4 e^{-x}}{5}-\frac {e^{-x} x}{5}+\frac {1}{10} e^{-x} x^2-\frac {1}{5} e^{-x} x^2 \log (3)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 23, normalized size = 0.82 \begin {gather*} \frac {1}{10} e^{-x} \left (8-2 x-x^2 (-1+\log (9))\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 23, normalized size = 0.82 \begin {gather*} -\frac {1}{10} \, {\left (2 \, x^{2} \log \relax (3) - x^{2} + 2 \, x - 8\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 = 23, normalized size = 0.82 \begin {gather*} -\frac {1}{10} \, {\left (2 \, x^{2} \log \relax (3) - x^{2} + 2 \, x - 8\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 21, normalized size = 0.75
method | result | size |
norman | \(\left (\frac {4}{5}+\left (-\frac {\ln \relax (3)}{5}+\frac {1}{10}\right ) x^{2}-\frac {x}{5}\right ) {\mathrm e}^{-x}\) | \(21\) |
risch | \(\frac {\left (-2 x^{2} \ln \relax (3)+x^{2}-2 x +8\right ) {\mathrm e}^{-x}}{10}\) | \(22\) |
gosper | \(-\frac {\left (2 x^{2} \ln \relax (3)-x^{2}+2 x -8\right ) {\mathrm e}^{-x}}{10}\) | \(24\) |
default | \(\frac {4 \,{\mathrm e}^{-x}}{5}-\frac {x \,{\mathrm e}^{-x}}{5}+\frac {x^{2} {\mathrm e}^{-x}}{10}-\frac {{\mathrm e}^{-x} x^{2} \ln \relax (3)}{5}\) | \(35\) |
meijerg | \(-1+{\mathrm e}^{-x}+\frac {\left (2 \ln \relax (3)-1\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )}{10}+\frac {\left (-4 \ln \relax (3)+4\right ) \left (1-\frac {\left (2 x +2\right ) {\mathrm e}^{-x}}{2}\right )}{10}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.37, size = 55, normalized size = 1.96 \begin {gather*} -\frac {1}{5} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} \log \relax (3) + \frac {2}{5} \, {\left (x + 1\right )} e^{\left (-x\right )} \log \relax (3) + \frac {1}{10} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - \frac {2}{5} \, {\left (x + 1\right )} e^{\left (-x\right )} + e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.05, size = 22, normalized size = 0.79 \begin {gather*} -\frac {{\mathrm {e}}^{-x}\,\left (2\,x+x^2\,\ln \relax (9)-x^2-8\right )}{10} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 20, normalized size = 0.71 \begin {gather*} \frac {\left (- 2 x^{2} \log {\relax (3 )} + x^{2} - 2 x + 8\right ) e^{- x}}{10} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________