(related to Definition: Continuous Functions at Single Real Numbers)

The following are examples of real functions, which are not continuous at single points.

The function $f:\mathbb R\to \mathbb R$, $$f(x):= \begin{cases} -1&\text{if }x < 0\\ 1&\text{if }x \ge 0 \end{cases}$$ is not continuous at the point $x=0$.

*Proof*:
* Let $f(x):=-1$, if $x < 0$ and $f(x)=1$ else.
* Assume $f$ is continuous at $0$ and its limit equals $L\in\mathbb R$, i.e. $\lim_{x\to 0}f(x)=L.$
* This means by definition that for all $\epsilon > 0$ there is a $\delta > 0$ such that for all $x$ satisfying $0 < |x| < \delta$ we have $|f(x)-L| < \epsilon.$
* Now, we will find an $\epsilon > 0$, for which this condition does not hold. We will show that $\epsilon = 1$ will do. Let $\delta > 0$ be given.
* Let $x_1:=\frac\delta2$ and $x_2:=-\frac\delta2.$
* Note that $0 < |x_1|,|x_2| = \frac\delta2 < \delta.$
* Also note that $f(x_1)=1$ and $f(x_2)=-1.$
* Now, if $|f(x_1) - L| < \epsilon=1$ and $|f(x_2) - L| < \epsilon=1$, it would follow that $2=\epsilon + \epsilon > |f(x_1) - L| + |f(x_2) - L| = |f(x_1) - L| + |L - f(x_2)| \ge |f(x_1) - L + L - f(x_2)|=|f(x_1) - f(x_2)|=2$, i.e. that $2 > 2.$
* Since $2 > 2$ is a contradition, the assumption must be wrong and $f$ has no limit at $x=0$.

The function $f:\mathbb R\to \mathbb R$, $f(x):=\sin\left(\frac 1x\right)$ is not continuous at the point $x=0$.

*Proof*:
* Let $f(x)=\sin\left(\frac 1x\right).$
* Assume $f$ is continuous at $0$ and its limit equals $L\in\mathbb R$, i.e. $\lim_{x\to 0}f(x)=L.$
* This means by definition that for all $\epsilon > 0$ there is a $\delta > 0$ such that for all $x$ satisfying $0 < |x| < \delta$ we have $|f(x)-L| < \epsilon.$
* Now, we will find an $\epsilon > 0$, for which this condition does not hold. We will show that $\epsilon = 1$ will do. Let $\delta > 0$ be given.
* Select an integer $k > \frac{1}{2\pi\delta}.$ Let $x_1:=\frac{2}{(4k+1)\pi}$ and $x_2:=\frac{2}{(4k+3)\pi}.$
* Note that $0 < |x_1|,|x_2| < \frac{2}{4k\pi} < \delta.$
* Also note that $f(x_1)=\sin\left(\left(2k+\frac 12\right)\pi\right)=1$ and $f(x_2)=\sin\left(\left(2k+\frac 32\right)\pi\right)=-1.$
* Now, if $|f(x_1) - L| < \epsilon=1$ and $|f(x_2) - L| < \epsilon=1$, it would follow that $2=\epsilon + \epsilon > |f(x_1) - L| + |f(x_2) - L| = |f(x_1) - L| + |L - f(x_2)| \ge |f(x_1) - L + L - f(x_2)|=|f(x_1) - f(x_2)|=2$, i.e. that $2 > 2.$
* Since $2 > 2$ is a contradition, the assumption must be wrong and $f$ has no limit at $x=0$.

**Kane, Jonathan**: "Writing Proofs in Analysis", Springer, 2016