How to solve this integral: $\int_0^\infty x^a e^{-bx}dx$? [duplicate]
Hint: Use the change of variables $u=bx$ and then use the gamma function.
You can do this nicely using the Feynman trick: let $$I(y) = \int_0^\infty e^{yx}e^{-bx} dx$$ Compute this integral (for $y<b$ and $b\ge1$). Then $$\int_0^\infty x^ae^{-bx}dx=\left.\frac{d^a}{dy^a}\right|_{y=0}I(y) = -a!b^{-a-1}$$ I leave it to you to fill in the details (and to show that it is allowed to exchange the integral with the $a$ derivatives in $y$).
$$\int_0^\infty x^a e^{-bx}\,dx=\frac1{b^{a+1}}\int_0^\infty y^ae^{-y}\,dy =\frac{\Gamma(a+1)}{b^{a+1}}$$ where $\Gamma$ denotes the gamma function. The gamma function satisfies $$\Gamma(a+1)=a\Gamma(a)$$ and so for integers $n\ge0$, $$\Gamma(n+1)=n!.$$