TITLE: $\int^\infty_0\frac{x^2e^{-x/y}}y\,dx$
QUESTION [6 upvotes]: I've come across a rather difficult expression to integrate.
$$\int^\infty_0\frac{x^2e^{-x/y}}y\,dx$$
Is there an easy way to solve this? I've solved it manually which involved multiple u-subs and integration by parts, and took up a decent amount of my time. This comes from a probability textbook so I doubt they want me to spend so much time solving an integral. 
The final answer should be $2y^2$.

REPLY [10 votes]: Let us define $z = x/y$, so $dz=dx/y$. Hence, we need to compute the following integration:
$$y^2 \int_0^{\infty} z^2 e^{-z} dz = y^2 \Gamma(3)=2y^2.$$
The definition of the $\Gamma$ function:
$$\Gamma (n) = \int_0^{\infty} z^{n-1} e^{-z} dz,$$
and
$$\Gamma (n) = (n-1) \Gamma(n-1)=(n-1)!.$$