If $f: \mathbb{R} \rightarrow \mathbb{R}$ is Lebesgue measurable, prove that there exists a Borel measurable function $g$ s.t. $f = g$ a.e. If $f: \mathbb{R} \rightarrow \mathbb{R}$ is Lebesgue measurable, prove that there exists a Borel measurable function $g$ s.t. $f = g$ a.e. 
Consider the four cases.
Let $f = \chi_E$, where E is a measurable set.
Let $f = \sum_{i=1}^{n}{a_i\chi_{E_i}}$
Let $f$ be a non-negative measurable function. There exists a simple function $S_n$ s.t. $\lim_{n \rightarrow \infty}{S_n} = f$
Let $f$ be any measurable function, $f = f^+ + f^-$
I have proven the first case.
There exists a set $F$ that is a countable union of closed sets contained in E, therefore F is Borel measurable and the $m(E\setminus F)=0$ If I set $g(x) = \chi_F$. Then $$ m(\{x : f \neq g\}) \leq m(E \setminus F) = 0 $$ Therefore $f = g$ a.e.
My trouble is working on the next three cases.
 A: Hint for the second part: as you showed in the first part, for each $i$ there is a Borel set $F_i \subset E_i$ with $m(E_i \setminus F_i) =0$.  Take $g = \sum_{i=1}^n a_i \chi_{F_i}$.  Now show that $f=g$ a.e.
A: for the second part: Suppose $E_i$ are disjoint. For every $E_i$ there is an $F_i$ as in part one: $F_i$ borel subset of $E_i$ and $m(E_i\backslash F_i)=0$ . Take $g=∑_{i = 1}^na_iχ_{F_i}$. For every $x$ there exists $j$ such that $x ∈ E_j$ but $x ∉ E_i$ for every $i ≠ j$. Therefore $x ∉ Fi$ for every $i ≠ j$. if $f(x)≠g(x)$ then $x ∈ E_j\backslash F_j$. Therefore $\{x/f(x)≠g(x)\} ⊆ ∪(E_i\backslash F_i)$ and thus $\mu(\{x/f(x)≠g(x)\}) ≤ ∑_{i = 1}^n\mu(E_i\backslash F_i)=0$.
for the third part: there exist $f_n$ simple lebesgue functions such that $f=\lim_{n \to \infty}f_n$. From second part, for every $f_n$ there exists $g_n$ borel funtion such that $\mu(\{f_n≠g_n\})=0$. Let $g=\lim_{n \to \infty}g_n$.  If $f(x)≠g(x)$ then $\lim_{n \to \infty} f_n(x)≠ \lim_{n \to \infty} g_n(x)$ and thus there exists $n$ such that $f_n(x)≠g_n(x)$. Therefore $$\{\frac{x}{f(x)}≠g(x)\}⊆∪\{\frac{x}{f_n(x)}≠g_n(x)\} => \mu({\frac{x}{f(x)}≠g(x)})≤∑_{i = 1}^n\mu({\frac{x}{f_n(x)}≠g_n(x)})=0$$
for the last part, $f=f_++f_−$ . from third part there exists $g_+$ anf $g_-$ borel functions such that $\mu(f_+≠g_+)=0$ , $\mu(f_-≠g_-)=0$. Let $g=g_+-g_-$ . Then $$f(x)≠g(x) \implies f_+(x)-f_-(x)≠g_+(x)-g_-(x) \implies
f_+(x)≠g_+(x)\text{ or }f_-(x)≠g-(x)$$. Therefore $$\{\frac{x}{f(x)}≠g(x)\}⊆\{\frac{x}{f_+(x)}≠g_+(x)\}∪\{\frac{x}{f_-(x)}≠g_-(x)\} \\ \implies \mu\{\frac{x}{f(x)}≠g(x)\}≤ \mu\{\frac{x}{f_+(x)}≠g_+(x)\} +\mu\{\frac{x}{f_-(x)}≠g_-(x)\} =0$$
