Apparent discrepancy between change of variables in one versus multiple dimensions. My freshman calculus book gives the change of variables formula in one dimension and then eight chapters later gives it in $n$ dimensions.  But when it generalizes to $n$ dimensions it requires the transformation between domains be invertible.  But in one dimension there's no such restriction.  
So my question is, since it's not necessary for one dimension why is it necessary for higher dimensions?  And if it's not necessary, what is the general statement?
Thanks in advance for any insights.
 A: My point here is that in some cases (like the situation 3 below) we do need a substitution to be injective even in one dimensional case. Comparison to a multidimensional case follows in update.
There may be several situations to apply a change of variables to
$$
\int f(x)\,dx.
$$


*

*We introduce $x=g(t)$, i.e. the old variable $x$ is a function of the new one. In this case, it is easy to apply the chain rule to get $dx=g'(t)\,dt$ and
$$
\int f(x)\,dx=\int f(g(t))\cdot g'(t)\,dt.
$$
Here $\phi$ can be any $C^1$ function, no problem at all. But this situation is quite rare, more often we would like opposite, namely, to substitute some expression in $x$ as $t$, i.e. $t=h(x)$. The question is: what would we need of $h$?

*Assume that we are lucky and the integral looks (almost) like
$$
\int f(h(x))\cdot h'(x)\,dx.
$$
Then no problem again, just pick $t=h(x)$, that is, apply the case 1 backwards. For example,
$$
\int\frac{x}{1+x^2}\,dx=\Bigl[t=1+x^2, dt=2x\,dx\Bigr]=\frac12\int\frac1t\,dt.
$$

*A general situation when we are not that lucky and have no $h'(x)$. For example,
$$
\int\frac{x^2}{1+x^2}\,dx.
$$
(Of course, we do not need any substitution here to calculate the integral, but my point is to illustrate the problem with substitution). Let's assume that we would like to make the same substitution as above, i.e. $t=x^2+1$. We can easily substitute the numerator by $t$, even the denominator is easy to get as $x^2=t-1$. The problem is to express $dx$ in terms of $dt$. If we derivate as above $t=x^2+1$ $\Rightarrow$ $dt=2x\,dx$ $\Rightarrow$ $dx=\frac{dt}{2x}$, we see that we cannot get rid of $x$ completely, so we cannot finish substitution. The only way to finish the substitution in this situation is to express $x$ as a function of $t$, i.e. solve for $x$, and to do that we need the substitution to be injective (invertible) in that region for $x$ we are working in. For example, for positive $x$ we get $x=\sqrt{t-1}$ $\Rightarrow$ $dx=\frac{dt}{2\sqrt{t-1}}$ and
$$
\int \frac{t-1}{t}\frac{dt}{2\sqrt{t-1}}=\frac12\int \frac{\sqrt{t-1}}{t}\,dt.
$$
(Well, the integral did not become easier, so the substitution is useless, but the point here was to discuss why we need injectivity).


In general, to do substition $t=h(x)$, i.e. the new variable is a function of the old one, in the integral
$$
\int f(x)\,dx
$$
we need the change of variables to be injective (in the interval for $x$).

UPDATE: To compare to a multidimensional case we can look again at the situation 1 above where we say that the substitution $x=g(t)$ can be any $C^1$ function. However, not all $C^1$ function would work for us. For example, we want to calculate the integral
$$
\int_3^5 f(x)\,dx
$$
and will try a substitution $x=g(t)$ for $t\in[0,2]$. All textbooks give us readily that
$$
\int_{g(0)}^{g(2)}f(x)\,dx=\int_0^2 f(g(t))\cdot g'(t)\,dt.
$$
Clearly, we have to consider only those $g$ that make $g(0)=3$ and $g(2)=5$, all others are not going to work. Assume we get one such $g$ and it is not injective. It is growing from $g(0)=3$ to $g(1)=8$ and then decreasing to $g(2)=5$, meaning that $g'(t)>0$ on $[0,1]$ and $g'(t)<0$ on $[1,2]$. The relation $dx=g'(t)dt$ tells us that to keep positive interval lengths for $x$ we have to consider negative lengths for intervals in $t$ on $[1,2]$. If one would like to avoid dealing with signed measures and having negative lengths then one had to split the interval $[0,2]$ into two: from $0$ to $1$ and from $1$ to $2$, and to work with $dx=|g'(t)|dt$, but then the change of variables would look like
$$
\int_3^5 f(x)z\,dx=\int_3^8 f(x)z\,dx+\int_8^5 f(x)z\,dx=
\int_0^1 f(g(t))|g'(t)|\,dt-\int_1^2 f(g(t))|g'(t)|\,dt.
$$
Hence, if we split the integral into several parts so that in each part the change of variables is injective then we can forget about negative lengths and stay within the simple particular case. This is what happens in multidimensional case where we want to avoid signed measures and prefer to deal with positive areas, volumes etc. So we assume that the substitution is injective to prevent overlapping (like the interval $[5,8]$ above) and use the scaling factor (the absolute value of the Jacobian determinant) that corresponds to $|g'(t)|$ in the example.
A: I'll try a quick answer: the correct statement of the theorem about changing variables in integrals always requires invertibility. Why? Because we are working with definite integrals. We want to pass from an integral over a domain to another integral over a different domain, and it is natural to require that the two domains should look essentially the same. In particular we cannot allow points to appear twice or more times after the change of variables.
Moreover, for technical reasons, the change of variables must be sufficiently smooth, and then its "derivative" must be invertible.
In one dimension the derivative is a number, and a number is "invertible" if and only if it is different than zero. So, in one dimension a change of variables is a bijective map between two intervals, and its continuous derivative should never vanish. Hence the derivative has always the same sign: if positive it preserves the orientation, if negative it reverses the orientation.
Be careful that some authors call integration by substitution a rather different formula; it amounts to the inverse of the chain rule: since
$$
D(F \circ \phi) = DF D\phi,
$$
then
$$
\int DF(\phi(t)) D\phi(t)\, dt = F\circ\phi.
$$
This formula is correct, but it deals with antiderivatives. If you want a formula for Riemann integrals, then you must be sure that $\phi$ maps an interval to an interval in a 1-1 manner, without singularities. Hence $\phi$ is usually assumed to be a differentiable and strictly monotone function.
