# Real numbers/Continuous functions/Motivation/Introduction/Section

We denote the distance between two real numbers ${\displaystyle {}x}$ and ${\displaystyle {}x'}$ by ${\displaystyle {}d{\left(x,x'\right)}:=\vert {x-x'}\vert }$. For a given function

${\displaystyle f\colon \mathbb {R} \longrightarrow \mathbb {R} ,}$

one may ask whether it is possible to control the distance in the image (the target) by controlling the distance in the domain. Let ${\displaystyle {}x\in \mathbb {R} }$ and let ${\displaystyle {}y=f(x)}$ be its image. One would like that for points ${\displaystyle {}x'}$ which are close to ${\displaystyle {}x}$, also their image points ${\displaystyle {}f(x')}$ are close to ${\displaystyle {}f(x)}$. Already linear functions with different slopes show that the measure for being close in the image and in the domain can not be the same. A reasonable question is whether for any desired exactness in the image there exists at all an exactness in the domain which ensures that the values of the function are lying inside the desired exactness. To make this intuitive idea more precise, let ${\displaystyle {}\epsilon >0}$ be given. This ${\displaystyle {}\epsilon }$ represents an accuracy for the target. The question is whether one can find a ${\displaystyle {}\delta >0}$ (representing an accuracy for the domain) such that for all ${\displaystyle {}x'}$ fulfilling ${\displaystyle {}d{\left(x,x'\right)}\leq \delta }$, also the relation ${\displaystyle {}d{\left(f(x),f(x')\right)}\leq \epsilon }$ holds. This idea leads to the concept of a continuous function.

## Definition

Let ${\displaystyle {}D\subseteq \mathbb {R} }$ be a subset,

${\displaystyle f\colon D\longrightarrow \mathbb {R} }$

a function, and ${\displaystyle {}x\in D}$ a point. We say that ${\displaystyle {}f}$ is continuous in the point ${\displaystyle {}x}$, if for every ${\displaystyle {}\epsilon >0}$, there exists a ${\displaystyle {}\delta >0}$, such that for all ${\displaystyle {}x'\in D}$ fulfilling ${\displaystyle {}\vert {x-x'}\vert \leq \delta }$, the estimate ${\displaystyle {}\vert {f(x)-f(x')}\vert \leq \epsilon }$ holds. We say that ${\displaystyle {}f}$ continuous, if it is continuous in every point

${\displaystyle {}x\in D}$

${\displaystyle {}D}$ stands for the set of definition of the function. Typically, ${\displaystyle {}D}$ is just ${\displaystyle {}\mathbb {R} }$, or an interval, or ${\displaystyle {}\mathbb {R} }$ with finitely many points removed. Instead of working with the real numbers ${\displaystyle {}\epsilon }$ and ${\displaystyle {}\delta }$, one might also work just with the unit fractions ${\displaystyle {}{\frac {1}{n}}}$ and ${\displaystyle {}{\frac {1}{m}}}$.

## Example

A constant function

${\displaystyle \mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto c,}$

is continuous. For every given ${\displaystyle {}\epsilon }$, one can choose an arbitrary ${\displaystyle {}\delta }$, since

${\displaystyle {}d(f(x),f(x'))=d(c,c)=0\leq \epsilon \,}$

holds anyway.

The identity

${\displaystyle \mathbb {R} \longrightarrow \mathbb {R} ,x\longmapsto x,}$

is also continuous. For every given ${\displaystyle {}\epsilon }$, one can take ${\displaystyle {}\delta =\epsilon }$, yielding the tautology: If

${\displaystyle {}d(x,x')\leq \delta =\epsilon \,,}$

then

${\displaystyle {}d(f(x),f(x'))=d(x,x')\leq \epsilon \,}$

holds.

## Example

We consider the function

${\displaystyle f\colon \mathbb {R} \longrightarrow \mathbb {R} ,}$

given by

${\displaystyle {}f(x)={\begin{cases}0,{\text{ if }}x<0\,,\\1,{\text{ if }}x\geq 0\,.\end{cases}}\,}$

This function is not continuous in ${\displaystyle {}0}$. For ${\displaystyle {}\epsilon ={\frac {1}{2}}}$ and every positive ${\displaystyle {}\delta }$, there exists a negative number ${\displaystyle {}x'}$ such that ${\displaystyle {}d(0,x')=\vert {x'}\vert \leq \delta }$. But for such a number we have ${\displaystyle {}d(f(0),f(x'))=d(1,0)=1\not \leq {\frac {1}{2}}}$.

The following statement relates continuity to convergent sequences.

## Lemma

Let ${\displaystyle {}D\subseteq \mathbb {R} }$ be a subset,

${\displaystyle f\colon D\longrightarrow \mathbb {R} }$

a function and ${\displaystyle {}x\in D}$

a point. Then the following statements are equivalent.
1. ${\displaystyle {}f}$ is continuous in the point ${\displaystyle {}x}$.
2. For every convergent sequence ${\displaystyle {}{\left(x_{n}\right)}_{n\in \mathbb {N} }}$ in ${\displaystyle {}D}$ with ${\displaystyle {}\lim _{n\rightarrow \infty }x_{n}=x}$, also the image sequence ${\displaystyle {}{\left(f(x_{n})\right)}_{n\in \mathbb {N} }}$ is convergent with limit ${\displaystyle {}f(x)}$.

### Proof

Suppose that (1) is fulfilled and let ${\displaystyle {}{\left(x_{n}\right)}_{n\in \mathbb {N} }}$ be a sequence in ${\displaystyle {}D}$ converging to ${\displaystyle {}x}$. We have to show that

${\displaystyle {}\lim _{n\rightarrow \infty }f(x_{n})=f(x)\,}$

holds. To show this, let ${\displaystyle {}\epsilon >0}$ be given. Due to (1), there exists a ${\displaystyle {}\delta >0}$ fulfilling the estimation property (from the definition of continuity) and because of the convergence of ${\displaystyle {}{\left(x_{n}\right)}_{n\in \mathbb {N} }}$ to ${\displaystyle {}x}$ there exists a natural number ${\displaystyle {}n_{0}}$ such that for all ${\displaystyle {}n\geq n_{0}}$ the estimate

${\displaystyle {}d(x_{n},x)\leq \delta \,}$

holds. By the choice of ${\displaystyle {}\delta }$ we have

${\displaystyle d(f(x_{n}),f(x))\leq \epsilon {\text{ for all }}n\geq n_{0},}$

so that the image sequence converges to ${\displaystyle {}f(x)}$.

Suppose now that (2) is fulfilled. We assume that ${\displaystyle {}f}$ is not continuous. Then there exists an ${\displaystyle {}\epsilon >0}$ such that for all ${\displaystyle {}\delta >0}$ there exist elements ${\displaystyle {}z\in D}$ such that their distance to ${\displaystyle {}x}$ is at most ${\displaystyle {}\delta }$, but such that the distance of their value ${\displaystyle {}f(z)}$to ${\displaystyle {}f(x)}$ is larger than ${\displaystyle {}\epsilon }$. This holds in particular for every ${\displaystyle {}\delta =1/n}$, ${\displaystyle {}n\in \mathbb {N} _{+}}$. This means that for every natural number ${\displaystyle {}n\in \mathbb {N} _{+}}$, there exists a ${\displaystyle {}x_{n}\in D}$ with

${\displaystyle d(x_{n},x)\leq {\frac {1}{n}}{\text{ and with }}d(f(x_{n}),f(x))>\epsilon .}$

This sequence ${\displaystyle {}{\left(x_{n}\right)}_{n\in \mathbb {N} }}$ converges to ${\displaystyle {}x}$, but the image sequence does not converge to ${\displaystyle {}f(x)}$, since the distance of its members to ${\displaystyle {}f(x)}$ is always at least ${\displaystyle {}\epsilon }$. This contradicts condition (2).

${\displaystyle \Box }$