# Spivak's Calculus, Chapter 6 problem 16 d)

I don't understand how to solve this problem and the official solution does not make much sense to me either.

The problem is:

(d) Let $f$ be a function with the property that every point of discontinuity is a removable discontinuity. This means that $\lim_{y\to x}f(y)$ exists for all $x$, but $f$ may be discontinous at some (even infinetely many) numbers $x$. Define $g(x) = \lim_{y\to x}f(y)$. Prove that $g$ is continous.

The official solution is:

Since $g(a) = \lim_{y\to a}f(y)$, by definition, it follows that for any $\varepsilon>0$ there is a $\delta>0$ such that $|f(y)-g(a)|<\varepsilon$ for $|y-a|<\delta$. This means that $$g(a)-\varepsilon<f(y)<g(a)+\varepsilon$$ for $|y-a|<\delta$. So if $|x-a|<\delta$, we have $$g(a)-\varepsilon \leq \lim_{y\to x}f(y) \leq g(a)+\varepsilon$$ which shows that $|g(x)-g(a)|\leq\varepsilon$ for all $x$ satisfying $|x-a|<\delta$. Thus $g$ is continous at $a$.

I don't understand how saying that $|x-a|<\delta$ impliest that $g(a)-\varepsilon \leq \lim_{y\to x}f(y) \leq g(a)+\varepsilon$.

When I was trying to come up with my own solution the thing that bothered me that if a lot of values of $f(x)$ are changed (so that they are equal to $\lim_{x\to a}f(x)$) then this may in fact change the limit of some other points? I then tried to say that for some $\delta>0$ the values for $x$ in $0<|x-a|<\delta$ the values would stay the same, however I think that for a functions such as one where $f(x) = 0$ if $x$ is irrational and $f(x) = \frac{1}{q}$ if $x=\frac{p}{q}$ in lowest terms, this would not be true. Where did I go wrong?

• Similar question here: math.stackexchange.com/questions/1160005/… – Martin R Apr 15 '15 at 9:53
• It's just taking limits of the inequality. Doing so changes $<$ into $\leq$. Your own answer is a bit complicated way of looking at this simple idea of taking limit of an inequality – Paramanand Singh Oct 15 '18 at 9:33

If $|x-a|<\delta$, then the $y$'s approaching $x$ also satisfy $|y-a|<\delta$, if $y$ is close enough to $x$. So the first inequeality applies to all these $y$'s close enough and then also to its limit.
First we will prove that changing the values of $f(x)$ to $\lim\limits_{x\to a}f(x)$ (at those points where $f$ has a removable discontinuity) does not change $\lim\limits_{x\to y}$ at any other point. Let's say that at $\lim\limits_{x\to a}f(x) = l$. Now this means that if we pick any $\varepsilon>0$ we have some $\delta>0$ such that for all $x$ if $0<|x-a|<\delta$, then $|f(x)-l|<\varepsilon$, which means that \begin{equation*} l-\varepsilon<f(x)<l+\varepsilon \end{equation*} Now let's say that we have some $y$, such that $0<|y-a|<\delta$, at which we have a removable discontinuity, so $\lim\limits_{x\to y}f(x) \neq f(y)$. Let's now redefine $f$ such that $f(y) = \lim\limits_{x\to y}f(x)$. If we assume, for sake of contradiction, that now $f(y)>l+\varepsilon$, this means (as $f$ is now continous at $y$), that for some $\delta'$ we have $f(x)>l+\varepsilon$ for all $x$ if $|x-y|<\delta'$ . (This is a slight extension of Theorem 3, which say that if $f(a) > 0$ and $f$ is continous at $a$, then there there is $\delta_1>0$, such that $f(x)>0$ for all $x$ satisfying $0\leq |x-a|<\delta_1$ ). Similarly if we say that $f(y) < l-\varepsilon$. However, this is a contradiction, since if $x\neq y$ the value of $f(x)$ for $x$ such that $0<|x-a|<\delta$ does not change, so we should have $l-\varepsilon<f(x)<l+\varepsilon$ if $x\neq y$. Therefore we can only have \begin{equation*} l-\varepsilon\leq f(y)\leq l+\varepsilon. \end{equation*} So this means that after we "fix" the removable discontinuities (so our new function is $g(x)$) we have for every $\varepsilon>0$ a $\delta>0$, such that for all $x$ if $0<|x-a|<\delta$, then $|g(x)-\lim\limits_{x\to a}f(x)|\leq\varepsilon$, which is a valid definition of a limit (also accoring to Problem 25 in chapter 5)! So for every $a$ we have \begin{equation*} \lim\limits_{x\to a}f(x) = \lim\limits_{x\to a}g(x) = g(a), \end{equation*} therefore $g(x)$ is continous for all $x$. $\blacksquare$