What am I doing wrong when integrating this? $$\int_0^{\infty} r^2 e^{\frac{-r^2}{2}} \, dr$$ I used integration by parts and set $u=r^2$ and $dv=e^{\frac{-r^2}{2}}dr$ and I get $$-re^{\frac{-r^2}{2}}+\frac{2e^{\frac{-r^2}{2}}}{-r} \Bigg|_0^{\infty}$$ but when I plug in the bounds I get $(0-0)-(0-\text{undefined})$? The answer key shows $\sqrt{\frac{\pi}{2}}$ and I even checked it on wolfram and got $\sqrt{\frac{\pi}{2}}$.
What did I do wrong?