Probably the most known way to solve $$I=\int_{-\infty}^{\infty} e^{-x^2} dx$$ Is considering $$I^2=\int_{\mathbb{R}^2}e^{-x^2-y^2}dxdy$$ My doubt is really basic and somehow I understand why it makes no sense, but I would like to know more expert opinions. The doubt is why we use another variable, the variable $y$, and not another variable $x$ so we could get the (wrong) integrand $e^{-x^2-x^2}=e^{-2x^2}$.
My thought is that in general in double integrals the variables are referred to two different sets $A$ and $B$ and so, even if $A=B$, we can't sum them because they are distinct objects of two sets; but I know too that integration variable are dummy variables and it is the same to consider $\int_a^b f(x)dx$ or $\int_a^b f(t)dt$ and sum them, even if in that case they are the same number.
Why is this wrong? Thanks.
Perhaps you would easily understand this if you compare with sums. Note that $ \sum\limits_{k=1}^{\infty} \frac 1 {2^{k}}=1$. Hence $( \sum\limits_{k=1}^{\infty} \frac 1 {2^{k}})^{2}=1$. But if you write $( \sum\limits_{k=1}^{\infty} \frac 1 {2^{k}})^{2}$ as $ \sum\limits_{k=1}^{\infty} \frac 1 {4^{k}}$ you would end up with $\frac {1/4} {1-1/4}=\frac 1 3$. So $ \sum\limits_{k=1}^{\infty} a_k^{2}=\sum_k a_k \sum_j a_j =\sum_{j,k} a_ja_k$ and not $\sum_k a_k a_k$.