TITLE: Is the "limit function" a continuous function?
QUESTION [8 upvotes]: Let $f:\mathbb{R}\to\mathbb{R}$ be a function such that for all $x_0\in\mathbb{R}$ we have $\lim\limits_{x\to x_0}f(x)=g(x_0)\in \mathbb{R}$. 
Is $g$ a continuous function?

REPLY [5 votes]: Fix an $x_0$ and let an  $\epsilon>0$ be given. We have to prove that there is a $\delta>0$ such that $|g(x)-g(x_0)|<\epsilon$ as soon as $|x-x_0|<\delta$.
By assumption on $f$ and $g$ there is a $\delta>0$ such that
$$|f(x)-g(x_0)|<{\epsilon\over2}\qquad \bigl(0<|x-x_0|<\delta\bigr)\ .$$
Consider now an arbitrary $x$ with $|x-x_0|<\delta$. There is a $\delta'>0$ such that
$$|f(x')-g(x)|<{\epsilon\over2}\qquad \bigl(0<|x'-x|<\delta'\bigr)\ .$$
The open set $$S:=\ ]x_0-\delta, x_0+\delta[\ \cap\ ]x-\delta',x+\delta'[\ \ \setminus\{x_0,x\}$$
is nonempty; therefore we may take a point $x'\in S$ and then have
$$|g(x)-g(x_0)|<|g(x)-f(x')|+|f(x')-g(x_0)|<{\epsilon\over2}+{\epsilon\over2}=\epsilon\ .$$