Orientation of multiplying integrals Consider,

$$I = \int_{-\infty}^{\infty} e^{-x^2} dx$$

The trick is to multiply by $I$ again to get $I^2$ But they often write: 

$$I^2 = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-x^2 - y^2} dy\space dx$$

The issue is orientation.

$I$ is an integral, which is orientated in the $xy$ plane, and $x$ is the independent variable, y is the dependent variable.

When you consider the other one with $e^{-y^2}$, then $y$ is the independent variable and $x$ is the dependent variable. 

How does this work?
You want to think of $x$ and $y$ as two independent variables, and something else, say $z$, would be the dependent variable.

In the first integral, if you're thinking of $y$ as the dependent variable, rename it as $z$, and then add $y$ as a second independent variable.

Does that help?
Just an other solution (if you are interested by it):

We know that $$\frac{1}{\sqrt{2\pi}}\int_{-\infty }^\infty e^{\frac{-x^2}{2}}dx=1$$
(it's the normal law), therefore, if you set $u=\sqrt{2}x$, you get

$$1=\frac{1}{\sqrt{2\pi}}\int_{-\infty }^\infty e^{\frac{-x^2}{2}}dx=\frac{\sqrt 2}{\sqrt{2\pi}}\int_{-\infty }^\infty e^{-u^2}du\implies \int_{-\infty }^\infty e^{-u^2}du=\sqrt{\pi}$$