# Normalization constant.

I have been trying to figure out how to find the normalization constant for the ground state harmonic oscillator wave function. So:

$$\int_{-\infty}^{\infty} {\psi_0}^2 (x) = 1$$

$${\psi_0}^2 (x) = A^2 e^{-2ax^2}$$

$$\int_{-\infty}^{\infty}A^2 e^{-2ax^2} = 1$$

$$A^2 \int_{-\infty}^{\infty}e^{-2ax^2} = 1$$ (Can I do this? I thought A to be a constant.)

Now when I try to integrate, I end up having trouble. I also have to do the first excited state as well and found someone else who asked for help with a similar problem (https://www.physicsforums.com/showthread.php?t=51706), but I want an answer that I can understand. Does anyone think I should just try going through the integration by parts and looking for an integral table to find the answer for both of these?