Let $f$ be a function such that every point of discontinuity is a removable discontinuity. Prove that $g(x)= \lim_{y\to x}f(y)$ is continuous. Let $f$ be a function with the property that every point of discontinuity is a removable discontinuity, i.e., $\lim_{y \to x}f(y)$ exists for all $x$, but $f$ may be discontinuous at some (even infinitely many) numbers $x$. Define $g(x)= \lim_{y\to x}f(y)$. Prove that $g$ is continuous.
Since $g(a)= \lim_{y\to a}f(y)$, by definition, it follows that for any $\epsilon \gt 0$ there is a $\delta \gt 0$ such that $|f(y)-g(a)|\lt \epsilon$ for $0\lt |y-a| \lt \delta$. This means that 
$$g(a)-\epsilon \lt f(y) \lt g(a)+\epsilon$$.
for $0\lt |y-a| \lt \delta$.
What I need to show is that if $|x-a| \lt \delta$, we have 
$$g(a)-\epsilon \lt \lim_{y\to x}f(y) \lt g(a)+\epsilon$$.
I'm having trouble reaching this conclusion with the information I have. I'd appreciate any solutions or suggestions.
 A: We are trying to show that for any $a$ and any $\epsilon \gt 0$ there is some $\delta \gt 0$ such that $|g(x)-g(a)| \lt \epsilon$ for all $|x-a| \lt \delta$
From the definition of $g$ we know that for $\frac{\epsilon}{2}$ there is $\delta$ such that for all $0 \lt |x-a| \lt \delta$ we have $|f(x)-g(a)| \lt \frac{\epsilon}{2}$
Now if $f$ is continuous at $x$ then $f(x)=g(x)$ and the inequality follows.  
Let $x_0,\ \  0 \lt |x_0-a| \lt \delta$ be a discontinuity point of $f$. Then we know that $x_0$ is removable and that $g(x_0) = \lim_{x \to x_0}f(x)$ and so there is $\delta_2$ such that for $0 \lt |x-x_0| \lt \delta_2$ we have $|f(x)-g(x_0)| \lt \frac{\epsilon}{2}$.
Let $x_1$ be a point such that $|x_1-a| \lt \delta$ and $|x_1-x_0| \lt \delta_2$ therefore:
$$
|g(x_0) - g(a)| \le |g(x_0)-f(x_1)| + |f(x_1)-g(a)| \lt \epsilon
$$
A: The Let $a$ be in the domain of $g$ and $\epsilon > 0$. 
From $g(a)= \lim_{y\to a}f(y)$ is follows – as you already said –
that there is a $\delta > 0$ such that
$$
g(a)-\epsilon \lt f(y) \lt g(a)+\epsilon \text{ for all } y \in B_\delta(a) \setminus \{ a \}
$$
(where $B_\delta(a) := \{ y \mid |y - a| \lt \epsilon\} $ is the "ball"
with radius $\delta$ and center $a$).
Now for each $x \in B_\delta(a) \setminus \{ a \}$ there is a $r > 0$ such that
$B_r(x) \subset B_\delta(a) \setminus \{ a \}$ and therefore 
$$
g(a)-\epsilon \lt f(y) \lt g(a)+\epsilon \text{ for all } y \in B_r(x)\, . \tag 1
$$
By taking the limit $y \to x$ in $(1)$ it follows that
$$
g(a)-\epsilon \le g(x) \le g(a)+\epsilon \, . \tag{2}
$$
The last relations are trivially true for $x = a$.
So for each $\epsilon > 0$ we have found a $\delta > 0$ such that
$(2)$ holds for all $x \in B_\delta(a) $.
This proves the continuity of $g$ at $a$.
A: Here is what we know:
$$
g(x)= \lim_{y\to x}f(y) \tag{1}  
$$
$$
g(a)-\epsilon \lt f(y) \lt g(a)+\epsilon \text{ for } 0\lt |y-a| \lt \delta \tag{2}  
$$
$$
|x-a| \lt \delta \tag{3}  
$$
What we want to show:
$$
g(a)-\epsilon \lt \lim_{y\to x}f(y) \lt g(a)+\epsilon \tag{4}
$$
From $(1)$ it follows that for any $\epsilon \gt 0$ there is a $\delta \gt 0$ such that $|f(y)-g(x)|\lt \epsilon$ for $0\lt |y-x| \lt \delta$. But $|f(y)-g(x)| = |g(x)-f(y)|$. This means that:
$$
f(y)-\epsilon \lt g(x) \lt f(y)+\epsilon \text{ for } 0\lt |y-x| \lt \delta \tag{5}  
$$
From $(5)$, by $(1)$, it follows that:
$$
f(y)-\epsilon \lt \lim_{y\to x}f(y) \lt f(y)+\epsilon \text{ for } 0\lt |y-x| \lt \delta \tag{6}  
$$
Now where $f$ is continuous we have $\lim_{y\to x}f(y) = f(x) = g(x) \implies g(x) \le f(x) \le g(x)$,   respectively $g(x)-\epsilon \le f(x) -\epsilon$ and $f(x) +\epsilon \le g(x)+\epsilon$. By this, in conjunction with $(2)$ and $(6)$, it follows that for $|y-a| \lt \delta$ and $0\lt |y-x| \lt \delta$:
$$
g(a)-\epsilon \le f(y)-\epsilon \lt \lim_{y\to x}f(y) \lt f(y)+\epsilon \le g(a)+\epsilon \tag{7}  
$$
Which implies the desired result, $(4)$.
By $(5)$, given $(3)$, this also implies that:
$$
g(a)-\epsilon \le g(x) \le g(a)+\epsilon \tag{8}  
$$ 
which shows that $|g(x)-g(a)| \le \epsilon$ for all $x$ satisfying $|x-a| \lt \delta$. Thus $g$ is continuous.
A: Assume for simplicity that $f$ is defined on an open set $\Omega\subset{\mathbb R}^n$, and consider a point $a\in \Omega$. Let an $\epsilon>0$ be given.  By definition of $g$ there is a $\delta>0$ such that
$$|f(x)-g(a)|<\epsilon\qquad\forall\>x\in \dot U_\delta(a)\tag{1}\ ,$$
whereby $U_\delta(a)$ denotes the $\delta$-neighborhood of $a$, and the dot removes the point $a$ from this neighborhood.
Consider an arbitrary point $x_0\in\dot U_\delta(a)$. By definition of $g$ there is a $\delta'>0$ such that
$$|f(x)-g(x_0)|<\epsilon\qquad \forall\>x\in \dot U_{\delta'}(x_0)\ .\tag{2}$$
Choose a point $x$ on the open segment $\>]a,x_0[\>$ in $(2)$ and then obtain, using $(1)$, that
$$|g(x_0)-g(a)|<2\epsilon\ .$$
Since this is true for all $x_0\in\dot U_\delta(a)$ we are done.
