# Formula for the first derivative of $\frac{x^a}{e^x}$

I had a homework problem to calculate the derivative of $$\frac{x}{e^x}$$ which I did, sucessfully but then I figured there would be a formula for $n^{th}$ derivative, considering how easy it was to find the first derivative. So I calculated a couple of more derivatives with values of $a$ increasing by one i.e. $x^2, x^3 \ldots$ and found the following formula:

$$f^{'}(x) = \frac{x^{n-1}(n-x)}{e^x}$$