While reading this answer, it puzzles me how can it be that one such a usual function is continuous at 0 and discontinuous in any open interval around zero. Is that correct?
If we take the definition of continuity from the Tom Apostol's Calculus (section 3.3), where a function $f(x)$ is continuous at $p$ if the following implication holds:
$$ \forall \epsilon>0.\exists \delta>0. x\in (p-\delta, p+\delta)\implies \lvert f(x) - f(p) \lvert < \epsilon $$
To me it looks that the following follows:
$$ \forall \epsilon'>0.\exists \delta'>0. \forall x_1, x_2\in (p-\frac{\delta'}{2}, p+\frac{\delta'}{2})\implies \lvert f(x_1) - f(p) \lvert < \epsilon' \land \lvert f(p) - f(x_2) \lvert < \epsilon' \\ \implies -\epsilon' < f(x_1) - f(p) < \epsilon' \land -\epsilon' < f(p) - f(x_2) < \epsilon' $$
when we sum the two inequalities, we get
$$ -2\epsilon' < f(x_1) - f(x_2) < 2\epsilon' \implies \lvert f(x_1) -f(x_2) \lvert<2\epsilon' $$
If we say that $$x_1 = p - \frac{\delta'}{8} \land \epsilon' = \frac{\epsilon}{2} \land \delta=\frac{\delta'}{8} $$
then
$$ \forall \epsilon>0. x\in (x_1-\delta, x_1+\delta)\implies \lvert f(x) - f(x_1) \lvert < \epsilon $$
In other words, $f$ is continuous at $x_1$.
The steps above are not very rigorous, so I am quite sure I did something wrong, I just don't know what. Can someone please point out my mistake?
Thanks!
The first part of my question was focused only on defining the $x_1$ (a value different than $p$), and finding that for all $x_2$ in the neighborhood of $p$, it holds that $ \lvert f(x_1)−f(x_2) \lvert $ can be arbitrarily small. Do we agree about that part? – S11n Jun 29 '21 at 08:50