Function whose discontinuity points are a prefixed $F_\sigma$ set in $\mathbb{R}$. I have been reading Carothers' book on real analysis 
and I found the following question on page 130:  
If E is an $F_\sigma$ set in $\mathbb{R}$, is $E=D(f)$ for some $f:\mathbb{R}\rightarrow \mathbb{R}$ ? 
Here $D(f)$ denotes the set of discontinuities for the function $f$. 
How do I solve it?
 A: Hint: If $E = \bigcup_{n} E_n$ where $E_n$ are closed, start by finding a function $f_n: {\mathbb R} \to \{0,1\}$ such that $f_n(x) = 0$ for $x \notin E_n$, while for every  $x \in E$ there are points $y$ arbitrarily close to $x$ with 
$f_n(x) \ne f_n(y)$.  Then consider $\sum_n 3^{-n} f_n$.
A: Yes for a simpler example if the closed set is a finite union let it be $C$ a closed set. Set $0$ as value for $R-C$ , $1$ as value for $C \cap Q$ , $2$ as value for $C \cap (R-Q)$. Now this is for a single set. If the set has to be compulsorily written as a proper union, $\cup C_i$ .Set Set $0$ as value for $R-\cup C_i$ , $1/2$ as value for $C_1 \cap Q$ , $1/3$ as value for $C_1 \cap (R-Q)$. Similarly $1/4$ as value for $(C_2-C_1) \cap Q$ , $1/9$ as value for $(C_2-C_1) \cap (R-Q)$.....and continue similarly. You can show that all points of $\cup C_i$ are discontinuous by using jump discontinuity. Also all points outside are continuous using the fact that $R-\cup C_n$ is open for any particular $n$.
