$\newcommand{\Rr}{\mathbb{R}}$ $\newcommand{\Zz}{\mathbb{Z}}$ $\newcommand{\Nn}{\mathbb{N}}$ $\newcommand{\Qq}{\mathbb{Q}}$ $\newcommand{\ve}{\varepsilon}$ $\newcommand{\dp}[2]{\langle #1, #2\rangle}$ $\newcommand{\va}{\mathbf{a}}$ $\newcommand{\vb}{\mathbf{b}}$ $\newcommand{\vc}{\mathbf{c}}$ $\newcommand{\vx}{\mathbf{x}}$ $\newcommand{\vy}{\mathbf{y}}$ $\newcommand{\vz}{\mathbf{z}}$ $\newcommand{\norm}[1]{\left\| #1 \right\|}$ $\newcommand{\ds}{\displaystyle}$ $\DeclareMathOperator{\dom}{Dom}$

Continuity of functions¶

Read Section 3.2 Check your understanding against the following questions:

  • What does it mean by a real-valued function $f(x)$ continuous at a point $c$?
  • What does it mean by a real-valued function is continuous?
  • What is by a removable discontinuity? What is a jump discontinuity? Give examples.

Definition A function $f \colon S \to \Rr$ is continuous at $c \in S$ if for any $\ve > 0$, there exists $\delta > 0$ such that whenever $x \in S$ and $|x-c| < \delta$, $|f(x) -f(c)| < \ve$.

We say that $f$ is continuous on $A$ ($A \subseteq S$) if $f$ is continuous at every point in $A$. We say that $f$ is continuous if it is continuous on its domain.

Proposition 1. (3.2.2) Let $f$ be a real-valued function defined on $S \subset \mathbb{R}$ and $c \in S$. Then

  1. $f$ is continuous on all isolated point of $S$.
  2. If $c$ is a cluster point of $S$, then $f$ is continuous at $c$ if and only if $\lim_{x \to c} f(x) = f(c)$.
  3. $f$ is continuous at $c$ if and only if for every sequence $(x_n)$ of elements of $S$ that tends to $c$, $f(x_n) \to f(c)$.

We only prove the 3rd bullet point here. It is the sequence characterization of continuity.

Proof. Suppose $f$ is continuous at $c$ and $(x_n)$ is a sequence in $S$ that converges to $c$. For any $\ve > 0$, by continuity of $f$ at $c$, there exists $\delta > 0$, such that

$$ |f(x)-f(c)| < \ve \tag{1} $$

whenever $x \in S$ with $|x-c|< \delta$. For this particular $\delta > 0$, since $(x_n) \to c$, so there exists $N$ such that for all $n \ge N$,

$$ |x_n - c| < \delta. \tag{2}$$

Since $x_n \in S$ and (2) holds, therefore we have

$$ |f(x_n) - f(c)| < \ve $$

whenever $n > N$. This shows that $(f(x_n)) \to f(c)$.

Conversely, suppose $f$ is not continuous at $c$. Then there exists some $\ve_0 > 0$ such that for any $n \in \Nn$, there exists some $x_n \in S$ such that

$$ |x_n -c| < \frac{1}{n}\quad \text{but}\quad |f(x_n) -f(c)| > \ve_0. $$

So $(x_n)$ is a sequence in $S$ that converges to $c$ but the sequence $(f(x_n))$ does not converge to $f(c)$.

Continuity is preserved by many operations. Using the sequence characterization of continity, they all reduced to the properties described in Proposition 6 of Week 05's notes. (see also Proposition 3.2.5. in the textbook)

Proposition 2. If $f$ and $g$ are continuous at $c$ then so are

$f+g$, $fg$, and $1/g$ provided that $g(c) \neq 0$.

Proof. Take any sequence $(x_n)$ in $S := \dom f \cap \dom g$ that converges to $c$. Then $f(x_n) \to f(c)$ and $g(x_n)\to g(c)$ and so by the corresponding properties about sequences,

  1. $(f+g)(x_n) = f(x_n) + g(x_n) \to f(c)+g(c) = (f+g)(c)$
  2. $(fg)(x_n) = f(x_n)g(x_n) \to f(c)g(c) = (fg)(c)$
  3. $(1/g)(x_n) = 1/g(x_n) \to 1/g(c) = (1/g)(c)$

And so the continuity of each of them at $c$ follows from the sequence characterization.

Examples.

  • Constant functions are continuous.
  • The identity function $x \mapsto x$ is continuous.
  • The absolute value function $|x|$ is continuous.
  • The function $f(x)=1/x$ is continuous on $\Rr \setminus \{0\}$.
  • $x^{r}$ ($r > )0$ is continuous on $[0,\infty)$.
  • Polynomials and rational functions are contintuous.
  • $\sin(x)$ and $\cos(x)$ are continuous.
  • $e^x$ and $\ln(x)$ are continuous.

Exercise Shows that $|x|$ is continuous. (Hint: $||x|-|c|| \le |x-c|$)

Composition of functions preserves continuity.

Proposition 3. (3.2.7) Suppose $f$ is continuous at $c$ and $g$ is continuous at $f(c)$, then $g \circ f$ is continuous at $c$.

Proof. Take any sequence $(x_n)$ in $\dom f$ that converges to $c$, then by continuity of $f$ at $c$ $(f(x_n))$ is a sequence in $\dom g$ that converges to $f(c)$. Hence

$$ (g\circ f)(x_n) = g(f(x_n)) \to g(f(c)) = g\circ f(c)$$

by continuity of $g$ at $f(c)$. This shows that $g\circ f$ is continuous at $c$ by the sequence characterization of continuity.

Here is a simple but useful observation about the relation between limit and continuity.

Proposition 4. Let $f \colon S \to \Rr$ be a function and $c$ is a cluster point of $S$.

The limit of $f$ at $c$ exists if and only if $f|_{S \setminus \{c\}}$ can be extended to a function on $S \cup \{c\}$ that is continuous at $c$.

Moreover, the limit of $f$ at $c$, if exists, must be $g(c)$ where $g$ is any extension of $f|_{S \setminus \{c\}}$ to $S \cup \{c\}$ that is continuous at $c$.

Proof. Suppose $\ds \lim_{x\to c} f(x) = L$. It is straight forward to check that the function defined by

$$ g(x) = \begin{cases} f(x) & \text{if}\ x \in S\setminus \{c\} \\ L & \text{if}\ x = c \end{cases} $$

extends $f|_{S \setminus\{c\}}$ and is continuous at $c$.

Conversely, suppose $g$ is an extension of $f|_{S \setminus\{c\}}$ on $S \cup \{c\}$ that is continuous at $c$. By continuity, for any $\ve > 0$, there exists $\delta > 0$ such that $|g(x)-g(c)| < \ve $ whenever $x \in S$ and $|x-c|<\delta$. Since $f$ and $g$ agree on $S \setminus \{c\}$, so $|f(x)-f(c)| = |g(x)-g(c)| < \ve$ whenever $x \in S \setminus\{c\}$ and $|x-c| < \delta$. This shows that $\lim_{x \to c} f(x)$ exists and is $g(c)$.

Proposition 5 Let $f \colon S \to \Rr$ be continuous. Suppose $f$ vanishes on a dense subset $D$ of $S$ then $f$ vanishes on $S$.

Proof. Fix any $c \in S$. Since $D$ is dense in $S$, for any $n \in \Nn$, there exists $d_n \in D$ such that $|d_n -c| < 1/n$. Thus $d_n \to c$ and so continuity of $f$ (at $c$) implies $f(d_n) \to f(c)$. Since $f$ vanishes on $D$, $f(d_n) = 0$ for each $n$, and so $f(c)$ must be zero as well. Since $c$ is an arbitrary point in $S$, this shows that $f$ vanishes on $S$ as well.

Corollary If two continuous $f,g$ on $S$ agree on a dense subset of $S$, then $f=g$.

Proof. $f-g$ is a continuous function on $S$ that vanishes on a dense set hence $f-g=0$, equivalently $f=g$, on $S$ by Proposition 5.

Proposition 6 If $f$ is continuous at $c$ and $f(c)>0$, then there exist $\delta > 0$ such that $f >0$ on $\dom f \cap (c-\delta, c+\delta)$.

Proof. Since $f(c) >0$, so is $f(c)/2$. By continuity of $f$ at $c$, there exists $\delta > 0$ such that $$ 0< f(c)/2 < f(x) \le f(c)$$ whenever $x \in \dom f$ and $|x-c| < \delta$.