Answer
$\frac{-6}{e}+3$
Work Step by Step
Apply tabular integration, where $F(x)=x^2+1$ and $G(x)=e^{-x}$.
$$F(x) ...... G(x)\\x^2+1.....-e^{-x}\\ 2x........e^{-x}\\2..............-e^{-x}$$
which then yields that $$\int (x^2+1)e^{-x} \ dx=(-e^{-x})(x^2+1)-(2x)(e^{-x})+(2)(-e^{-x})$$
$$=e^{-x}(-x^2-2x-3)+C$$
Now evaluate for $x=0,1$
$$e^{-x}(-x^2-2x-3 \Big]^1_0=-\frac{6}{e}+3$$