I think I found a flaw in the $\varepsilon$-$\delta$ definition of continuity.
If I have a function $f(x)$ defined as follows.
- $f(x) = 1$ for all $x<1$ and $x>2$;
- $f(x) = 100$ for $x = 1.5$;
- $f(x)$ is undefined anywhere else.
According to the $\varepsilon$-$\delta$ definition of continuity, if I take $\delta$ as any positive number smaller than $0.5$, then $f(x)$ by definition is continuous at $x = 1.5$ because within the $\delta$-neighborhood there is only one point defined, but $f(x)$ is obviously not continuous at $x = 1.5$.
Below is the $\varepsilon$-$\delta$ definition of continuity:
The function $f(x)$ is continuous at a point $x_0$ of its domain if for every positive $\varepsilon$ we can find a positive number $\delta$ such that $$|f(x) - f(x_0)|<\varepsilon$$ for all values $x$ in the domain of $f$ for which $|x-x_0|<\delta$.
Solution 1:
Your example in fact shows that according to the formal definition of continuity, the function $f$ as you have defined it is continuous at $x=1.5$, and rather your informal suggestion that $f$ is "obviously not continuous at $x=1.5$" is actually mistaken.
Solution 2:
(You should accept the top answer (LAGC), but this is too long for a comment.)
A lot of people learn that continuity means "you can trace it with a pencil." This is a decent metaphor (it is an even better metaphor for "piecewise smooth"), but misleading in this case since the domain is not connected. I think this is why you thought your function shouldn't be continuous.
Another metaphor which, while not perfect, is more useful in this case is "it doesn't rip the domain apart." This metaphor would lead you to suspect that your function is continuous, which the formal definition proves is true.