I have this integral : $\displaystyle\int_0^∞ x^2 \exp(-2kx)\,dx$
now, integrating by parts ($x^2$ as first function and $\exp(-2kx)$ as second),
\begin{align} I & = \int_0^∞ x^2 \exp(-2kx)\,dx \\[6pt] & = \frac{x^2 \exp (-2kx)}{-2k} - \int_0^∞ \frac{2x \exp(-2kx)}{-2k} \,dx \\[6pt] & = \frac{x^2 \exp (-2kx)}{-2k} + \left[ \frac{x \exp(-2kx)}{-2k} - \int_0^∞\frac{\exp (-2kx)}{-2k}\,dx\right] \\[6pt] & = \left.\frac{x^2 \exp (-2kx)}{-2k} + \frac{x \exp(-2kx)}{-2k} + \frac{\exp (-2kx)}{-2k} \right|_0^∞ \\[6pt] & = \left.\frac{\exp(-2kx) (x^2 + x + 1)}{-2k} \right|_0^∞ \end{align}
now how to solve this? have i done the integral right? suggest some other ways if possible.
Assuming $k\in\mathbb{R}^+$ we have:
$$ I_k = \int_{0}^{+\infty} x^2 e^{-2k x}\,dx = \frac{1}{(2k)^3}\int_{0}^{+\infty} z^2 e^{-z}\,dz = \frac{2}{8k^3} = \color{red}{\frac{1}{4k^3}}.$$
The integral appearing in the middle term is just the integral defining a value of the $\Gamma$ function :
$$ \forall n\in\mathbb{N},\qquad \int_{0}^{+\infty} x^n e^{-x}\,dx = n!.$$