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 !