Evaluating $\int_{-\infty}^{\infty}e^{-x^2}dx$ using polar coordinates. I need to express the following improper integral as a double integral of $x$ and $y$ and then, using polar coordinates, evaluate it.
$$I=\int_{-\infty}^{\infty}e^{-x^2}dx$$
Plotting it, we find a Gaussian centered at $x=0$ which tends to infinity to both sides. We can easily express it as a double integral :
$$I=\int_{0}^{1}\int_{-\infty}^{\infty}e^{-x^2}dxdy$$
Evaluating both using Wolfram Alpha gives $\sqrt{\pi}$, so it converges.
I know that $x=rcos(\theta)$ and that $dxdy=rdrd\theta$, but substituing this in the above integral and evaluating $\theta$ from $0$ to $2\pi$ and $r$ from $0$ to $\infty$ doesn't yield the correct answer. What's wrong here?
Thanks a lot !

You could try:
$$I^2=\left ( \int_{-\infty}^{\infty}e^{-x^2}\mathrm{d}x \right ) \left( \int_{-\infty}^{\infty}e^{-y^2}\mathrm{d}y \right) = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-(x^2+y^2)}\mathrm{d}x\ \mathrm{d}y$$
then use the polar coordinates to compute the double integral.
