I am trying to understand the following for the gamma distribution:
$$E[X^2] = \frac{ \alpha(\alpha+1)}{\lambda^2}$$
I've been looking at the reasoning for $E[X]$ to make sense of what could be happening, for instance:
$$E[X] = \int_{0}^{\infty}\frac{\lambda^\alpha}{\Gamma(\alpha)}x\cdot x^{\alpha-1}e^{-\lambda x}dx$$ $$=\frac{\lambda^\alpha}{\Gamma(\alpha)}\int_{0}^{\infty}x^{\alpha-1+1}e^{-\lambda x}dx $$ $$=\frac{\lambda^\alpha}{\Gamma(\alpha)}\cdot \frac{\Gamma(\alpha+1)}{\lambda^{\alpha+1}} = \frac{\alpha}{\lambda}$$
I can't make sense of what is happening to the second line where the integral drops out to become $$\int_{0}^{\infty}x^{\alpha-1+1}e^{-\lambda x}dx =\frac{\Gamma(\alpha+1)}{\lambda^{\alpha+1}}$$ I figure understanding this point would help with understanding the reasoning behind $E[X^2]$.
Thank you!