I am trying to compute
$$ \begin{align*} \mathrm{E}[X^2] &= \lim_{t\to\infty} \int_{0}^{t} x^2 \frac{\lambda^rx^{r-1}\exp(-\lambda x)}{\Gamma (r)}dx \\[2em] &= \frac{\lambda^r}{\Gamma (r)} \lim_{t\to\infty} \int_{0}^{t} x^{r+1}\exp(-\lambda x)dx \end{align*} $$
I have tried integration by parts for the improper integral, but it is rather messy and does not match my numerical result when I fix $r$ and $\lambda$ to specific values. I am messing up somewhere and any help would be appreciated.