Separate continuity implies measurability Suppose $f$(x,y) is a function on $\mathbb{R}^{2}$ that is separately continuous: for each fixed variable, $f$ is continuous in the other variable. Prove that $f$ is measurable on $\mathbb{R}^{2}$.
There is also a hint: Approximate $f$ in the variable $x$ by piecewise-linear functions $f_n$ so that $f_n$ $\rightarrow$ $f$ pointwise.
I don't get how to prove the problem via this hint, or is there any other approach?
 A: Hint: take $f_{m,n}(x,y):=f\left(\frac{\lfloor mx\rfloor}n,\frac{\lfloor ny\rfloor}n\right)$, where $\lfloor t\rfloor$ is the greatest integer lower than $t$. As $f_{m,n}$ takes only countably many values, it's measurable. 
A: Inspired by Cardona's answer: Showing a function of two variables is measurable, I share my answer:
Construct $f_n(x,y)=f(k/n,y)$, where $x\in[k/n,(k+1)/n$.It can be proved that $lim_{n\to\infty}f_n(x,y)=f(x,y)$. Applying the property of measurable function: f(x,y) is mearsurable if $f_n(x,y)$ is measurable for each n, that is $\forall a, \{f_n>a\}$ is measurable.
Note that $\{f_n > a\} = \{(x, y)  : f_n(x, y) > a\} = \bigcup_k \Bigg\{ \bigg[\frac{k}{n}, \frac{k + 1}{n} \bigg) \times \{y : f\bigg( \frac{k}{n}, y \bigg) > a\}\Bigg\}$. 
Obviously $\bigg[\frac{k}{n}, \frac{k + 1}{n} \bigg)$ is measurable. And for $\{y : f\bigg( \frac{k}{n}, y \bigg) > a\}$, since $f(x,y)$ is continuous in $y$ for a fixed $x=k/n$ and $(a,+\infty)$ is open, $\{y : f\bigg( \frac{k}{n}, y \bigg) > a\}$ is open, therefore is measurable. Hence $\{f_n > a\} = \bigcup_k \Bigg\{ \bigg[\frac{k}{n}, \frac{k + 1}{n} \bigg) \times \{y : f\bigg( \frac{k}{n}, y \bigg) > a\}\Bigg\}$ is measurable. 
The proof of $lim_{n\to\infty}f_n(x,y)=f(x,y)$:
$|f_n(x,y)-f(x,y)|=|f(k/n,y)-f(x,y)|$, where $x\in\bigg[\frac{k}{n}, \frac{k + 1}{n} \bigg)$. Since f is continuous on x for a fixed y(applying the separate continuity second time), $\forall\epsilon>0, \exists n s.t.\delta=1/n, $ when $x-k/n<\delta=1/n, |f(x,y)-f(k/n,y)|<\epsilon$, that is $lim_{n\to\infty}f_n(x,y)=f(x,y)$.
See Cardona's answer for a similar question: Showing a function of two variables is measurable for more details
