Calculate the integral: integral from 0 to 1 x^n e^-x dx
Calculate the integral: $\int_0^1 x^n e^{-x} \, dx$.
Explanation of Method
This integral is evaluated using integration by parts — in some cases applied repeatedly, or combined with itself to solve algebraically for the unknown integral.
We will use integration by parts repeatedly to find a general formula.
Step 1: Apply integration by parts
Let $u = x^n$, so $u' = nx^{n-1}$; and $dv = e^{-x} \, dx$, so $v = -e^{-x}$.
\[\int_0^1 x^n e^{-x} \, dx = \left[-x^n e^{-x}\right]_0^1 + n\int_0^1 x^{n-1} e^{-x} \, dx\]
Step 2: Evaluate the boundary term
\[\left[-x^n e^{-x}\right]_0^1 = -\frac{1}{e} - 0 = -\frac{1}{e}\]
Step 3: Establish a recurrence relation
Let $I_n = \int_0^1 x^n e^{-x} \, dx$. Then:
\[I_n = -\frac{1}{e} + n I_{n-1}\]
Step 4: Find the base case
\[I_0 = \int_0^1 e^{-x} \, dx = 1 - \frac{1}{e}\]
Step 5: Apply the recurrence relation
\[I_1 = -\frac{1}{e} + I_0 = 1 - \frac{2}{e}, \qquad I_2 = -\frac{1}{e} + 2I_1 = 2 - \frac{5}{e}, \qquad I_3 = -\frac{1}{e} + 3I_2 = 6 - \frac{16}{e}\]
Step 6: Find the general pattern
Unrolling the recurrence:
\[I_n = n! - \frac{n!}{e}\sum_{k=0}^n \frac{1}{k!}\]
Alternative approach: Connection to incomplete gamma function
The integral $\int_0^1 x^n e^{-x} \, dx$ is the lower incomplete gamma function $\gamma(n+1, 1)$, and using the series expansion:
\[\gamma(n+1, 1) = n! \left(1 - e^{-1}\sum_{k=0}^n \frac{1}{k!}\right)\]
Final answer:
\[\boxed{\int_0^1 x^n e^{-x} \, dx = n! - \frac{n!}{e}\sum_{k=0}^n \frac{1}{k!}}\]
Or equivalently:
\[\boxed{\int_0^1 x^n e^{-x} \, dx = n!\left(1 - e^{-1}\sum_{k=0}^n \frac{1}{k!}\right)}\]
Verification for small values:
For $n=0$: $I_0 = 1\left(1-\frac1e\right) = 1-\frac1e$. For $n=1$: $I_1 = 1\left(1-\frac1e(1+1)\right)=1-\frac2e$. For $n=2$: $I_2 = 2\left(1-\frac1e\left(1+1+\frac12\right)\right)=2-\frac5e$. All match Step 5.
Asymptotic behavior:
As $n \to \infty$, $\sum_{k=0}^n \frac{1}{k!} \to e$, so $\int_0^1 x^n e^{-x} \, dx \to n!(1-e^{-1}\cdot e)=0$. This makes sense because $x^n \to 0$ rapidly on $[0,1)$ as $n\to\infty$.
Result
Final answer:
\[\boxed{\int_0^1 x^n e^{-x} \, dx = n! - \frac{n!}{e}\sum_{k=0}^n \frac{1}{k!}}\]
Or equivalently:
\[\boxed{\int_0^1 x^n e^{-x} \, dx = n!\left(1 - e^{-1}\sum_{k=0}^n \frac{1}{k!}\right)}\]