Conisder Lusin's Theorem (Folland Chap 2 Ex 44):
If $f: [a,b] \rightarrow \mathbb{C}$ is Lebesgue measurable and $\epsilon > 0$, there is a compact subset $E \in [a,b]$ s.t. $\mu(E^C) < \epsilon$ and $f$ restricted to $E$ is continuous.
To prove this, I basically:
- Defined $E_k = \{x | x \in [a,b], |f(x)|<k\}$ and $f_k' = f \chi_{E_k}$. Then $f_k' \rightarrow f$ p.w.
- Approximated each $f_k'$ is a continuous function $f_k$ (one can show each $f_k'$ is $L^1$)
- $f_k \rightarrow f$ p.w. so in particular, $f_k \rightarrow f$ a.e
- By Egoroff's Theorem $\exists F \subset [a,b]$ s.t. $\mu(F) < \epsilon$ and $f_k \rightarrow f$ unifomly on $F^c$. Ergo $f$ is continuous on $F^C$
To complete, I think I can get a compact set by finding one inside $F^C$ because $F^C$ is Borel. But I really didn't use compactness in an essential way to obtain the conclusion. Am I missing something?
Let $f: [a,b]\to \mathbb{C}$ be Lebesgue measurable and $\epsilon > 0$. By theorem 2.26 we can build a sequence of continuous functions $\{g_n\}$ such that
$$g_n\to f \ \ \text{in} \ \ L^1$$
Then by Corollary 2.32 there is a sub-sequence $\{g_{n_j}\}$ of $\{g_n\}$ such that $g_{n_j}\to f$ almost everywhere. Now by Egoroff's theorem for any $\epsilon > 0$ there exists a set $F\subset [a,b]$ with $\mu(F) < \epsilon/2$ such that $g_{n_j}\to f$ uniformly on $F^{c}$.
Now by theorem 1.18, since $\mu([a,b]) < \infty$, there is $E$ compact subset of $[a,b]$ such that $E\subset F^c$ and
\begin{align*} \mu(E^c) &= \mu(F) + \mu(E^c\setminus F)\\ &= \mu(F) + \mu(E^c\cap F^c)\\ &= \mu(F) + \mu(F^c\setminus E)\\ &= \mu(F) + (\mu(F^c) - \mu(E))\\ &\leq \epsilon/2 + \epsilon/2\\ &= \epsilon \end{align*} Note since $E\subset F^c$ and $g_{n_j}\to f$ uniformly on $F^c$, we have that $g_{n_j}\to f$ uniformly on $E$. Since, for all $j$, $g_{n_j}$ is continuous, we have that $f$ is continuous on $E$, that is, $f|E$ is continuous.