Countable subset and monotonic function let E be subset of R which has no isloated points(or C does not have any isolated point of E)  and C be countable subset of R does there exist a monotonic function on E which is continuous only at points in E-C?
The problem is from Royden 4th edition page 109. 
I know the proof in case E is an open bounded interval only.
 A: Let 
$$L=\left\{x\in C:\exists y_x\in\Bbb R\big(y_x<x\text{ and }(y_x,x)\cap E=\varnothing\big)\right\}\;;$$
this is the set of points in $C$ that are not limits from the left of points in $E$. Another way to say it is that $x\in L$ if and only if $x\in C$ and $x>\sup_{\Bbb R}\{y\in E:y<x\}$. Let $Y=\{y_x:x\in L\}$; $C\cup Y$ is countable, so let
$$C\cup Y=\{x_n:n\in\Bbb N\}\;.$$
(I’m assuming that $C$ is countably infinite; if $C$ is finite, the problem is fairly trivial.) Let
$$f:E\cup Y\to\Bbb R:x\mapsto\sum_{x_n\le x}\frac1{2^n}\;.$$
Finally, let
$$g:E\to\Bbb R:x\mapsto\begin{cases}
f(y_{x_n}),&\text{if }x=x_n\in Y\\
f(x),&\text{otherwise}\;.
\end{cases}$$
The definition of $f$ ensures that $g$ is discontinuous from the left at every point of $C\setminus L$ and continuous everywhere else, and the modification to get $g$ ensures that $g$ is discontinuous from the right at every point of $L$ without affecting continuity at any other point of $E$. Thus, $g$ is discontinuous precisely at the points of $C$.
A: Yes, list $E\cap C = \{x_n:n=1,2..\}$. For each $x$ let $N_x=\{n:x_n<x\}$. Define $f(x)=\sum_{n\in N_x}2^{-n}$. 
I do not quite see what is the role of $E$ in this question, we could define $f$ as above, initially disregarding $E$ (and using $C = \{x_n:n=1,2..\}$) and then later restricting this function to $E$. 
Edit. This may not be "discontinuous enough" at points of $C$, as discussed in comments below. So define also $M_x=\{n:x_n\le x\}$, define $g(x)=\sum_{n\in M_x}2^{-n}$, and define $h(x)=f(x)+g(x)$. I hope $h$ works, if not then I do not understand the question and may need to read all over again. 
Edit. $h$ is continuous at points of $E\setminus C$ (verify:). But $h$ (and any function) would be continuous at those points of $C$ that are isolated in $E$, that is at any $c\in C$ which has a neighborhood which misses all other points in $E$. It is ok if $c$ is isolated in $C$,but not in $E$, in that case $h$ would be discontinuous at $c$. Indeed $c=x_m$ for some $m$ (according to the above definition of $f$). So, $2^{-m}$ is not one of the members of the sum that defines $f(c)=f(x_m)=\sum_{n\in N_{x_m}}2^{-n}$ (this is since $m\not\in N_{x_m}$, since in the definition of $N_x$ we have strict inequality, but it is not true that $x_m<x_m$). On the other hand, if $x>x_m$, then $2^{-m}$ is one of the members of the sum that defines $f(x)=\sum_{n\in N_{x}}2^{-n}$, this is because $m\in N_x$, since $x_m<x$. It follows that if $x>x_m$ then $f(x)\ge f(x_m)+2^{-m}$, so $\lim_{x\to x_m^+} f(x)\ge f(x_m)+2^{-m}$, here we are assuming the there are points in $E$ to the right of $x_m$, arbitrarily close to $x_m$ (that is, we are assuming that $x_m$ is not isolated from the right in $E$). So $f$ has a jump at $x_m$ (to the right of $x_m$) so $f$ is discontinuous (from the right) at $x_m$. Similarly, if $x_m$ is not isolated from the left in $E$ then one may show that $\lim_{x\to x_m^-}f(x)\le f(x_m)-2^{-m}$, so $g$ has a jump at $x_m$ (at the left of $x_m$). So, if $x_m$ is not isolated in $E$ then it is either not isolated from the left, or not isolated from the right, or both, so either $g$ of $f$ or both are discontinuous at $x_m$, so $h$ is discontinuous at $x_m$. You should be able to verify all these details yourself, once you know what you are trying to prove. 
