Why can I make a non-injective variable substitution?
I was using integration by substitution to solve this fairly simple indefinite integral:
$$\int xe^{x^2}~dx$$
I simply made the substitution $$x^2=t$$ $$dt=2x~dx$$ But it occurred to me that I don't actually understand how this is possible, because the substitution I made is not injective! In this case the integral is indefinite, but what if I were trying to integrate over some interval? Couldn't a non-injective substitution destroy important information - for example, eliminating signs if I square a variable - or something like that, thus giving the wrong answer?
Solution 1:
The point is that for definite integrals you just need your substitution to be "piecewise injective", since you can split your integrals in finitely many parts on which your piecewise injective substitution is injective. For instance, the substitution $x^2 = t$ is injective if you restrict $x$ to $[0,\infty[$ or $]-\infty,0]$, so essentially you can use this change of variables everywhere. Same goes with any polynomial substitution $t = p(x)$ ; the polynomial $p'(x)$ has finitely many zeros, hence the derivative of $p(x)$ can change sign only finitely many times, thus is piecewise injective.