Integrating this tricky integrand What is a good way to solve the integral $2\int_{0}^{+\infty}x^{2}e^{-2\lambda x}.dx$
When I tried integration by parts I have some zero multiplied by infinity when evaluating the limit of integration.
Some help please
 A: Hint: 
Change variables with $u = 2\lambda x,$ to reduce to the usual form for the gamma function
$$2\int_{0}^{+\infty}x^{2}e^{-2\lambda x}\, dx= \frac{2}{8\lambda^3}\int_{0}^{+\infty}u^{2}e^{-u}\, du = \frac{1}{4\lambda^3}\Gamma(3)$$
Integration by parts should work by the way. Boundary terms like $u^2 e^{-u}$ go to $0$ as $u \to \infty.$
A: $$
\int_0^\infty x^2 \mathrm{e}^{-2\lambda x} dx
$$
We know that 
$$
\frac{\partial^2}{\partial \lambda^2}\mathrm{e}^{-2\lambda x} = 4x^2\mathrm{e}^{-2\lambda x}
$$
so we have
$$
\int_0^\infty x^2 \mathrm{e}^{-2\lambda x} dx = \int_0^\infty \frac{1}{4}\frac{\partial^2}{\partial \lambda^2}\mathrm{e}^{-2\lambda x} dx = \frac{1}{4}\frac{\partial^2}{\partial \lambda^2}\int_0^{\infty}\mathrm{e}^{-2\lambda x} dx
$$
this can work for a power of $n$ instead of $2$ as follows
$$
\int_0^\infty x^n \mathrm{e}^{-2\lambda x} dx = \frac{1}{2^n}\frac{\partial^n}{\partial \lambda^n}\int_0^{\infty}\mathrm{e}^{-2\lambda x} dx
$$
A: Even though the other answers contain fancy ways of calculating your integral, what you probably need is to realize that (assuming $\lambda>0$ which is needed for your integral to converge)
$$
\lim_{x\to+\infty}x^ke^{-2\lambda x}=0, \quad k\in\mathbb N.\tag{1}
$$
Using this, you can integrate by parts. I show the first step and leave the second integration by parts to you.
$$
\begin{aligned}
\int_0^{+\infty}2x^2e^{-2\lambda x}\,dx&=\Bigl[2x^2\frac{e^{-2\lambda x}}{-2\lambda}\Bigr]_0^{+\infty}-\int_0^{+\infty}4x\frac{e^{-2\lambda x}}{-2\lambda}\,dx\\
&=\frac{2}{\lambda}\int_0^{+\infty}xe^{-2\lambda x}\,dx.
\end{aligned}
$$
Note that the upper limit in the bracket term becomes zero because of the limit in $(1)$ with $k=2$.
