My book made the interesting claim that, if $x=\varphi(u)$ is our u-sub function, the technique of substitution will only hold if:
- It is a bijection onto the domain of integration (this makes sense)
- It is continuously differentiable
- Its derivative is nowhere zero on the interior
We will be using the Riemann integral here. I am unsure if $2)$ can be weakened, or if $3$ is strictly necessary - even though I pretty much buy the book's argument, I have heard conditions $2,3$ nowhere else before so I want to check with the community if this is accurate. The book is Courant's Differential and Integral Calculus - it's good, but not 100% rigorous!
Their argument, paraprashed:
Take $I_x=[a,b]\subset\Bbb R$. Suppose there exists some $\varphi:I_u\to I_x$ which is a bijection and $I_u$ is compact. In the Riemann integral $\int_a^b f(x)\,dx$, we can substitute, taking the tagged partitions in $x,u$ as $(x_n,t_n),(u_n,s_n)$: $$\begin{align}\int_{I_x}f(x)\,dx=\sum f(t_n)(x_{n+1}-x_n)\overset{1}{=}&\sum (f\circ\varphi)(s_n)(\varphi(u_{n+1})-\varphi(u_n))\\\overset{2}{=}&\sum(f\circ\varphi)(s_n)\cdot\varphi'(\xi_n)(u_{n+1}-u_n)\\\overset{3}{\to}&\int_{I_u}(f\circ\varphi)(u)\cdot\varphi'(u)\,du\end{align}$$ Step $1$ required $\varphi$ to be a bijection; step $2$ required $\varphi$ to be differentiable on each $(u_{n+1},u_n)$, and step $3$ required $f\circ\varphi$, $\varphi'$ to both be integrable, and for $\varphi'$to be continuous as its mean value $\xi$ needs to be squeezed to the same tagged value $s_n$, by definition of Riemann integral.
Now I am aware that if I take $2,3$, the Inverse Function Theorem guarantees that $\varphi$ is indeed a bijection and that all is well. However, in the analysis of the Riemann sum, we only require that $\varphi'(\xi)$ is non-zero; the way I see it, we could still have some point inside $I_u$ where $\varphi'$ is zero, and just make a choice of partition such that this is never the mean value - this works, right? I know that if the points where $\varphi$ has $0$ derivative are maxima or minima we lose invertibility, but if it is a point of inflection then, as far as I know, we can still have it as an invertible function. Yes, its inverse would not be differentiable at that point, but we surely don't care as only $\varphi$ is involved in the integration - right?
I'm also wondering if condition $2$ can be weakened - in the Riemann integral I believe we can choose our partitions, so perhaps it would be possible to make a choice of partition $s_n$ (with $\varphi(s_n)=t_n$) such that $s_n=\xi_n$, and the continuity of $\varphi'$ could be relaxed.
What actually are the needed conditions? And if Courant is completely correct, I'd appreciate it if someone could correct my overthinking here!
Side-note: I have not studied Lebesgue integration all that much - does U-sub still work there?
I haven't thought your thinking through completely but u-sub is essentially a special case of the (Jacobi) transformation theorem:
Let $\Omega \subseteq \Bbb R^n$ be an open set and $\phi : \Omega \to \phi(\Omega) \subseteq \Bbb R^n$ a diffeomorphism. Then $f$ is integrable on $\phi(\Omega)$ iff $x \mapsto f(\phi(x)) |\det(J_\phi(x))|$ is integrable on $\Omega$ and in this case we have $$ \int_{\phi(\Omega)}f(x) dx = \int_\Omega f(\phi(x)) |\det{J_\phi(x)}| dx $$ where $J_\phi(x)$ denotes the jacobian matrix of $\phi$.
A diffeomorphism is a bijection which is everywhere continuously differentiable with continuously differentiable inverse. Regular u-sub is the $\Bbb R$ case of this theorem.
The theorem doesn't have a standalone article on the English wikipedia, but it's listed under the integration by substitution article (https://en.wikipedia.org/wiki/Integration_by_substitution#Substitution_for_multiple_variables) along with other generalizations and how the situation looks for the Lebesgue integral.
Taking this into account: your conclusion that $\phi'$ may be $0$ at some point is correct - this is the generalization via Sard's theorem. You may also relax the condition that $\phi'$ is continuous - but this brings with it the new condition of $\phi^{-1}$ being continuous (and having to exist).