Proving the $u$-substitution formula for Lebesgue integrals Following the proof at Wikipedia, I'm trying to verify the proof of the substitution rule for integrals under the (fairly simple) assumptions that $\phi:[a,b]\to(c,d)$ is continuous on $[a,b]$ and $\phi':(a,b)\to\Bbb C$ is defined and continuous, and $f:(c,d)\to\Bbb C$ is continuous.
Since $\phi$ is a continuous function on a closed interval, its image is compact, so we can shrink the range a bit to $\phi:[a,b]\to(c',d')$ where $[c',d']\subseteq(c,d)$. Now define $F:[c',d']\to\Bbb C$ by $F(u)=\int_{c'}^uf(u)\,du$. Then FTC part one gives $F'=f\upharpoonright(c',d')$, and the chain rule gives $(F\circ\phi)'(x)=f(\phi(x))\phi'(x)$ for all $x\in(a,b)$. All is well and good so far, but next I'm supposed to apply FTC part two on this function, and my assumptions aren't good enough to do this.
The idea is to write $$\int_a^b f(\phi(x))\phi'(x)\,dx=\int_a^b(F\circ\phi)'(x)=F(\phi(b))-F(\phi(a))=\int_{\phi(a)}^{\phi(b)}f(u)\,du,$$ but the middle step there is the application of FTC part two to $F\circ\phi$, and for me the statement of FTC part two requires that $F\circ\phi:[a,b]\to\Bbb C$ is continuous (good), $(F\circ\phi)':(a,b)\to\Bbb C$ is continuous (also fine), and $(F\circ\phi)'$ is integrable. This last one is proven by appealing to the fact that $(F\circ\phi)'$ is continuous on a closed interval, but in fact this is not true - it is instead continuous only on the open interval $(a,b)$; it is necessarily not defined at $a,b$ because $a$ and $b$ are not interior points of $[a,b]$, the domain of definition of $F\circ\phi$.
I don't see how this can be interpreted as anything other than a hole in the proof. How do you plug it (preferably without adding any more assumptions to the theorem)? Note that these are Lebesgue integrals throughout, but I don't think it matters at this point, since the functions are nice enough that even Riemann integrals can do this one.
 A: In the generality stated by you, the theorem fails. One has to assume
that
$$
\int_{a}^{b}\left|\phi'\left(x\right)\right|\, dx<\infty.
$$
To see that the statement can fail without this assumption, consider
the function $f\equiv1$ and
$$
\phi:\left[0,1\right]\rightarrow\left(-3,3\right),x\mapsto x^{2}\cdot\sin\left(\frac{1}{x^{2}}\right).
$$
It is easy to see that $\phi$ is differentiable on the whole interval
$\left[0,1\right]$ (use the definition at $0$) with
$$
\phi'\left(x\right)=2x\cdot\sin\left(\frac{1}{x^{2}}\right)-2\cdot\frac{\cos\left(\frac{1}{x^{2}}\right)}{x}.
$$
If your substitution rule was true, the integral
$$
\int_{a}^{b}f\left(\phi\left(x\right)\right)\cdot\phi'\left(x\right)\, dx=\int_{0}^{1}\phi'\left(x\right)\, dx
$$
would have to exist as a Lebesgue-integral (i.e. the integral $\int_{0}^{1}\left|\phi'\left(x\right)\right|\, dx$
has to be finite). As $x\mapsto2x\sin\left(\frac{1}{x^{2}}\right)\in L^{1}\left(\left[0,1\right]\right)$
(it is even continuous), this amounts to
$$
\int_{0}^{1}\left|\frac{\cos\left(\frac{1}{x^{2}}\right)}{x}\right|\, dx<\infty.
$$
Using the diffeomorphism $\psi:\left(0,1\right)\to\left(0,\infty\right),x\mapsto\frac{1}{x}$
with $\left|\psi'\left(x\right)\right|=\frac{1}{x^{2}}$, we can use
the change of variables formula for Lebesgue integrals to conclude
\begin{eqnarray*}
\int_{0}^{1}\left|\frac{\cos\left(\frac{1}{x^{2}}\right)}{x}\right|\, dx & = & \int_{0}^{1}\left|\psi'\left(x\right)\right|\cdot\frac{\left|\cos\left(\left(\psi\left(x\right)\right)^{2}\right)\right|}{\psi\left(x\right)}\, dx\\
 & = & \int_{0}^{\infty}\frac{\left|\cos\left(\omega^{2}\right)\right|}{\omega}\, d\omega.
\end{eqnarray*}
Because $\cos$ is continuous and $2\pi$-periodic with $\cos\left(0\right)=1$,
there is some $C>0$ and some $\delta\in\left(0,2\pi\right)$ with
$$
\left|\cos\left(\gamma\right)\right|\geq C\qquad\text{ for }\gamma\in\left[2\pi n,\delta+2\pi n\right]
$$
for each $n\in\mathbb{N}$. But $\omega^{2}\in\left[2\pi n,\delta+2\pi n\right]$
for $\omega\in\left[\sqrt{2\pi n},\sqrt{\delta+2\pi n}\right]$. As
the intervals $\left[\sqrt{2\pi n},\sqrt{\delta+2\pi n}\right]$ are
disjoint and because of
$$
\frac{1}{\omega}\geq\frac{1}{\sqrt{\delta+2\pi n}}
$$
for $\omega\in\left[\sqrt{2\pi n},\sqrt{\delta+2\pi n}\right]$, we
get
$$
\int_{0}^{\infty}\frac{\left|\cos\left(\omega^{2}\right)\right|}{\omega}\, d\omega\geq C\cdot\sum_{n\in\mathbb{N}}\frac{\sqrt{\delta+2\pi n}-\sqrt{2\pi n}}{\sqrt{\delta+2\pi n}}.\qquad\left(\dagger\right)
$$
Using the mean value theorem, we see
\begin{eqnarray*}
\frac{\sqrt{\delta+2\pi n}-\sqrt{2\pi n}}{\sqrt{\delta+2\pi n}} & = & \frac{1}{2}\cdot\frac{1}{\sqrt{\xi}}\cdot\frac{\left(\delta+2\pi n\right)-2\pi n}{\sqrt{\delta+2\pi n}}\\
 & \geq & \frac{1}{2}\cdot\frac{\delta}{\sqrt{\delta+2\pi n}\sqrt{\delta+2\pi n}}\\
 & = & \frac{1}{2}\cdot\frac{\delta}{\delta+2\pi n}.
\end{eqnarray*}
By comparing with the harmonic series, we see that the series in $\left(\dagger\right)$
diverges.
