In this link How to integrate $ \int x^n e^x dx$?
Has the following formula:
$$\int {x^n e^x dx} = \bigg[\sum\limits_{k = 0}^n {( - 1)^{n - k} \frac{{n!}}{{k!}}x^k } \bigg]e^x + C$$
I tried to evaluate $$\int_0^a {x^n e^x dx},$$ but there is a singularity at $x=0$. How we can fix this?
In this answer, an alternative form of the equation at the end is
$$ \int {x^n e^x dx} = \left[(-1)^n n! + \sum\limits_{k=1}^n {(-1)^{n - k} \frac{n!}{k!} x^k} \right]e^x + C. $$
Now you do not get $0^0$ when $x = 0.$
The "$x^0$" term in the original formula was always meant to be a constant, not actually the zero-th power of a variable. Look at the several examples for $n = 1,2,3,4,5$ before they are summarized in a general formula, and it should be quite obvious that this is how the formula is meant to be read.