# Testing assumptions for continuity

If I have a real-valued function g defined on an interval [c,d] and I know that for $$\epsilon > 0$$, $$\exists$$ a $$\delta > 0$$ s.t.

$$\lvert g(x)-L\lvert$$ < $$\epsilon$$, $$\forall x \in [c,d]$$ where limit $$L$$ exists at point $$p$$ and $$\lvert p - x \lvert < \delta$$.

Why is it not necessarily the case that the difference between the supremum and infimum of $$g(x)$$ over the $$x$$-interval from $$[p-\delta,p+\delta]$$not necessarily < $$2\epsilon$$?

I see that f is not continuous or bounded. But closed [a,b] places a decent constrain on our max delta value, so I am having a hard time seeing how if the statement $$\lvert g(x)-L\lvert$$ < $$\epsilon$$ is true that the inequality would not hold.

Is the issue that g is not uniformly continuous, so if we change $$\delta$$ we may run into discontinuities that cause epsilon to fluctuate in size?

I'm not sure what I'm missing.

The reason is that $$f$$ may not be continuous at $$x=p.$$ That is, it may have any value there, since that doesn't affect the fact that it has a limiting value there. Clearly then, in such a case the difference in the max and min values can be as large as you please. For an example consider the function defined as $$0$$ for all $$x\ne 0$$ and which is $$1$$ at $$0.$$ Then the limiting value at $$0$$ is $$0,$$ and the difference in question on any interval $$[-\delta,\delta],$$ with $$\delta>0$$ is $$1-0.$$ Clearly there is some $$\epsilon$$ smaller than this when $$\delta$$ is sufficiently small.
The point is, that a function has a limiting value at a point and is defined there does not imply that its value there equals its limiting value. The situation you envisage (when the function is bounded over a sufficiently closed interval about $$p$$) is satisfied if in addition it is continuous at $$p.$$ That is, if it has a value that there that coincides with its limit there.