Given $f(x) = x^n e^{-x}$, show that $\int_0^1 f(x)\, dx$ is equal to a given expression. Consider the function:
$$f : \mathbb{R} \rightarrow \mathbb{R} \hspace{2cm} f(x) = x^n e^{-x}$$
I have to show the following:
$$\int_0^1 f(x) dx = n! \bigg [ 1 - \dfrac{1}{e} \bigg ( 1 + \dfrac{1}{1!} + \dfrac{1}{2!} + \dfrac{1}{3!} + ... + \dfrac{1}{n!} \bigg ) \bigg ]$$
I used the notation:
$$I_n = \int_0^1 f(x)dx$$
And by integrating by parts I got the recurrence formula:
$$I_n = - \dfrac{1}{e} + n \cdot I_{n - 1}$$
But I don't have any idea as to how I could show what is asked.

My intuition first goes to repeated substitution:
$$ \begin{split}
I_n &= - \frac 1 e + n\left(-\frac 1e + (n-1) \left(-\frac 1e+\dots\right) \right) \\ &= -\frac 1e - \frac n e - \frac{n(n-1)}e - \dots - \frac{n(n-1)\cdots (2)}e + n! I_0.
\end{split}$$
Direct computation of $I_0$ and collecting $n!$ results in the formula you want.
Otherwise, you may show that the closed formula satisfies the recursion and be done by the axiom of induction.
