Let $f$ be a function on $[a,b]$ whose set of discontinuities has measure zero. Show that $f$ is measurable. This questions comes from Royden Chapter 5 on page 106. I am able to answer the question if we add the assumption $f$ is bounded.
Assuming $f$ is not necessarily bounded, here is my idea.
Consider the set $A_c=\{x\in [a,b]  : f(x)<c\}$. We need to show that for each $c\in \mathbb{R}$ this set is measurable.
Now, if we consider $f|_{A_c}:A_c\mapsto \mathbb{R}$, then we can use the fact that a bounded function whose set of discontinuouties has measure zero must be Riemann integrable.
Then we can say, using boundedness, Riemann integrability on $A_c$ $\implies$ Lesbesgue Measurable on $A_c$ $\implies$ $f|_{A_c}$ is measurable on ${A_c}$.
In particular, $\{x\in A_c : f|_{A_c}(x)<c\}=\{x\in [a,b] : f(x)<c\}=A_c$ is measurable.
This concludes my attempt.
Does this seem reasonable?
 A: If it's true for bounded functions the result for unbounded functions follows.
For $B>0$ define $\psi_B:\Bbb C\to\Bbb C$ by $$\psi_B(z)=\begin{cases}z,&(|z|\le B),\\B\frac z{|z|},&(|z|>B).\end{cases}$$Let $$f_B=\psi_B\circ f.$$Now since $\psi_B$ is continuous, $f_B$ is continuous almost everywhere. And $|f_B|\le B$. So $f_B$ is measurable, and $f_B\to f$ almost everywhere as $B\to\infty$, so $f$ is measurable.
A: This seems like too much work, hopefully someone will provide a more succinct answer.
Let $E$ be the set of discontinuities. Write $f = f \cdot 1_E + f \cdot 1_{E^c}$.
Since $E$ is a null set and the Lebesgue measure is complete, it follows that $f \cdot 1_E$ is measurable, so we can concentrate on $g=f \cdot 1_{E^c}$.
Define $g_n(x) = \sup \{ g(y) | |x-y| < {1 \over n} \}$ and note that $g_n$ is lsc. and hence measurable. Let $h(x) = \lim_n g_n(x)$ and since $g_n \to h$ we see that $h$ is measurable.
If $x \in E^c$ we see that $h(x) = f(x)$ and since $h(x) = g(x)$ ae. (and the Lebesgue measure is complete) we can conclude that $g$ is measurable.
A: Let $C_{1}=\{x\in[a,b]\mid f\mbox{ is continuous at }x\}$ and $C_{2}=[a,b]\setminus C_{1}$.
Let $c\in\mathbb{R}$ be given and define $A=\{x\in[a,b]\mid f(x)<c\}$.
Note that $A\cap C_{2}$ is a subset of the Lebesgue measure-zero
set $C_{1}$, so $A\cap C_{2}$ is Lebesgue measurable.
Next, we go to show that $C_{1}$ is a $G_{\delta}$ subset of $[a,b]$. Let
$$
B_{n}=\{x\in[a,b]\mid\exists\delta>0\mbox{ s.t. }|f(s)-f(t)|<\frac{1}{n}\mbox{ whenever } s,t\in[a,b]\cap(x-\delta,x+\delta)\}.
$$
We assert that $B_{n}$ is an open subset of $[a,b]$ and that $C_{1}=\cap_{n}B_{n}$.
Let $x\in B_{n}$. Choose $\delta>0$ such that $|f(s)-f(t)|<\frac{1}{n}\mbox{ whenever } s,t\in[a,b]\cap(x-\delta,x+\delta).$ Let
$r=\delta/2$. Let $y\in[a,b]\cap(x-r,x+r)$ be arbitrary. Let $\delta'=\delta/4$.
Observe that $y-\delta'\geq x-r-\delta'>x-\delta$ and $y+\delta'\leq x+r+\delta'<x+\delta$.
It follows that $(y-\delta',y+\delta')\subseteq(x-\delta,x+\delta)$.
Hence, for any $s,t\in[a,b]\cap(y-\delta',y+\delta')$, we have $|f(s)-f(t)|<\frac{1}{n}$.
This shows that $y\in B_{n},$ so $[a,b]\cap(x-r,x+r)\subseteq B_{n}$.
Therefore, $B_{n}$ is an open subset of $[a,b]$.
That $C_{1}\subseteq\cap_{n}B_{n}$ follows from the definition of
continuity (and triangle inequality). To prove the reverse inclusion,
let $x\in\cap_{n}B_{n}$. Let $\varepsilon>0$ be given. Choose $n$
such that $\frac{1}{n}<\varepsilon$. Since $x\in B_{n}$, we can
choose $\delta>0$ such that $|f(s)-f(t)|<\frac{1}{n}\mbox{ whenever } s,t\in[a,b]\cap(x-\delta,x+\delta).$
In particular, for any $t\in[a,b]\cap(x-\delta,x+\delta)$, we have
that $|f(x)-f(t)|<\frac{1}{n}<\varepsilon$. Therefore $x\in C_{1}$.
This shows that $\cap_{n}B_{n}\subseteq C_{1}$.
Let $g=f\mid_{C_{1}}$, the restriction of $f$ on $C_{1}$, then
$g$ is a continuous function. Therefore, $g^{-1}\left((-\infty,c)\right)$
is an open subset of $C_{1}$ (with respect to the relative topology).
Choose an open set $U\subseteq\mathbb{R}$ such that $g^{-1}\left((-\infty,c)\right)=U\cap C_{1}$.
On the other hand, notice that $g^{-1}\left((-\infty,c)\right)=A\cap C_{1}$.
Therefore $A\cap C_{1}=U\cap C_{1}$, which is Lebesbue measurable.
Finally, $A=(A\cap C_{1})\cup(A\cap C_{2})$, which is Lebesgue measurable.
