TITLE: How do "Dummy Variables" work?
QUESTION [8 upvotes]: I do not understand how dummy variables work in math. 
Suppose we have:
$$I_1 = \int_{0}^{\infty} e^{-x^2} dx$$
How is this equivalent to:
$$I_2 = \int_{0}^{\infty} e^{-y^2} dy$$
How does this dummy variable system work? 
Since $y$ is the dependent variable for $I_1$ How can $y$ itself be and independent variable for $I_2$
??
Thanks!

REPLY [2 votes]: IMO this can be understood much better by writing it out in a proper context-free way, rather than standard mathematical notation. The integration symbol $\int_0^\infty$ is basically a higher-order-function, taking a real function1 and returning a single number.
$$
  \int\limits_0^\infty : (\mathbb{R}\to \mathbb{R}) \to \mathbb{R}.
$$
Now, people keep saying stuff like "$\sin(x)$ is a function..." but really this is incorrect. $\sin(x)$ is, for any value of $x$, just a single real number. What's a function is $\sin$ itself, i.e. not applied to anything. For instance,
$$
  \int\limits_0^\pi \sin = 2
$$
would be quite a reasonable statement. OTOH, it's nonsense to write
$$
  \int\limits_{-\infty}^0 e^x = 1
$$
because $e^x$ is not a function.
Trouble is, most functions you need to integrate won't have a predefined name. You can't thus write "the function itself" directly, but have to specify those results of the function for general inputs, in form of some algebraic expression. You know, the equation-definitions
$$
  f(x) = e^{-x^2}.
$$
Here it should be quite clear that the $x$ symbol is just an arbitrary choice – it's something you use to signify "anything you can put into the function", and $f(y) = e^{-y^2}$ says obviously exactly the same thing.
Always having to give functions a name before integrating would be tedious, so we have "shortcut syntax" to define an "anonymous function" and use it right away. You can thus think of the $\mathrm{d}x$ symbol much as a lambda function.

1In fact, more accurately and generally, a differential form.
2Again, that's not all there is to it since $\mathrm{d}x$ really is a differential form.