Q:

Limit function of a function is continuous

Let $f:[a,b]\to\mathbb{R} $ be a function such that $L(x)=\lim_{y\to x}f(y)$ is well defined and finite for all $x\in [a,b]$ (with one-sided limits at $x=a,b$). Show that $L$ is continuous on $[a,b]$ and the set $\{x\in[a,b]:f(x)\neq L(x)\}$ is finite or countable.
To show continuity I want to use $\delta,\epsilon$ definition and I have limit inside limit which gets really messy. For the second part, I don't have much clue.

A:

I have written $g$ for $L$. 
Let $x\in 
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
$ and $\varepsilon >0$. There exists $\delta >0$ such that $\left\vert
f(y)-g(x)\right\vert <\varepsilon $ if $0<\left\vert y-x\right\vert <\delta $
. If $u\in (x-\delta ,x+\delta )\backslash \{x\}$ then $\left\vert
g(u)-g(x)\right\vert =\left\vert \underset{y\rightarrow u}{\lim }%
f(y)-g(x)\right\vert \leq \varepsilon .$ This proves continuity of $g$.
Consider $\{x:\left\vert f(x)-g(x)\right\vert \geq \varepsilon \}$. This set
has no limit points and hence it is at most countable.

