<s>[INST] Integrate $\int_{-\infty}^{\infty}\frac{1}{2\pi}e^{(-\frac{1}{2}(\frac{x^2}{4}+4y^2))} dy$ I'm trying to integrate $\int_{-\infty}^{\infty}\frac{1}{2\pi}e^{(-\frac{1}{2}(\frac{x^2}{4}+4y^2))} dy$ using the fact that the integral of any normal PDF is 1. But I'm having trouble completing the square for $(\frac{x^2}{4} + 4y^2)$. Can anyone help me please? Thanks!
 [/INST] You don't need to complete a square. You only integrate over $y$, not $x$, so you treat $x$ as a constant.
$$ \int_{-\infty}^{\infty}\frac{1}{2\pi}e^{(-\frac{1}{2}(\frac{x^2}{4}+4y^2))} dy 
= \frac{1}{2\pi}e^{-\frac{x^2}{8}}\int_{-\infty}^{\infty}e^{-2y^2} dy. $$
Multiply and divide by the same factor that turns the integral into an integral over 
the PDF of a normal distribution with mean $0$ and variance $\frac{1}{4}$, since this integral is one:
$$ = \frac{1}{2\pi}e^{-\frac{x^2}{8}}\sqrt{2\pi\times\frac{1}{4}}\underbrace{\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\times\frac{1}{4}}}e^{-\frac{y^2}{2\times\frac{1}{4}}} dy}_{=1}
= \frac{1}{2\pi}e^{-\frac{x^2}{8}}\sqrt{2\pi\times\frac{1}{4}}
= \frac{1}{2\sqrt{2\pi}}e^{-\frac{x^2}{8}}.$$
</s>