# Continuity

Page
Continuity – HMC Calculus Tutorial

For functions that are “normal” enough, we know immediately whether or not they are continuous at a given point. Nevertheless, the continuity of a function is such an important property that we need a precise definition of continuity at a point:

A function $f$ is continuous at $c$ if and only if $\displaystyle\lim_{x\to c} f(x)=f(c).$

That is, $f$ is continuous at $c$ if and only if for all $\varepsilon > 0$ there exists a $\delta > 0$ such that ${\small\textrm{if }} |x-c|<\delta \quad{\small\textrm{then }} |f(x)-f(c)|<\varepsilon.$ In words, for $x$ close to $c$, $f(x)$ should be close to $f(c)$.

#### Notes

• If $f$ is continuous at every real number $c$, then $f$ is said to be continuous.
• If $f$ is not continuous at $c$, then $f$ is said to be discontinuous at $c$. The function $f$ can be discontinuous for two distinct reasons:
• $f(x)$ does not have a limit as $x\to c$. (Specifically, if the left- and right-hand limits exist but are different, the discontinuity is called a jump discontinuity.)
• $f(x)$ has a limit as $x\to c$, but $\lim_{x\to c} f(x)\neq f(c)$ or $f(c)$ is undefined. (This is called a removable discontinuity, since we can “remove” the discontinuity at $c$ by redefining $f(c)$ as $\lim_{x\to c} f(x)$.)

$f(x) = \frac{1}{x}$
Disconinuity at $x = 0$

$f(x) = \frac{x^2-9}{x-3}$
Removable Discontinuity at $x = 3$

$f(x)=\left\{\begin{array}{ll} x^2, & x < 0\\ 1, & x = 0\\x + 1, & x > 0\end{array}\right.$
Discontinuity at $x = 0$

$f(x)=\left\{\begin{array}{ll} 1, & x < 0\\ 3, & x \leq 0\end{array}\right.$
Jump Discontinuity at $x = 0$

$f(x) = sin(\frac{1}{x})$
Discontinuity at $x = 0$

Rather than returning to the $\varepsilon$-$\delta$ definition whenever we want to prove a function is continuous at a point, we build up our collection of continuous functions by combining functions we know are continuous:

If $f$ and $g$ are continuous at $c$, then

1. $f+g$ is continuous at $c$.
2. $\alpha f$ is continuous at $c$ for any real number $\alpha$.
3. $fg$ is continous at $c$.
4. $f/g$ is continuous at $c$ if $g(c)\neq 0$.
###### Example

The function $\displaystyle f(x)=\frac{x^2-4}{(x-2)(x-1)}$ is continuous everywhere except at $x=2$ and at $x=1$. The discontinuity at $x=2$ is removable, since $\displaystyle \frac{x^2-4}{(x-2)(x-1)}$ can be simplified to $\displaystyle \frac{x+2}{x-1}$. To remove the discontinuity, define $f(2)=\frac{2+2}{2-1}=4.$

We can also look at the composition $f\circ g$ of two functions, $(f\circ g)(x)=f(g(x)).$

If $g$ is continuous at $c$ and $f$ is continuous at $g(c)$, then the composition $f\circ g$ is continuous at $c$.

Theorem

#### Theorem

If $g$ is continuous at $c$ and $f$ is continuous at $g(c)$, then the composition $f\circ g$ is continuous at $c$.

##### Idea of Proof:

For $x$ “close” to $c$, $g(x)$ is “close” to $g(c)$.
For $g(x)$ “close” to $g(c)$, $f(g(x))$ is “close” to $f(g(c))$.
So for $x$ “close” to $c$, $f(g(x))$ is “close” to $f(g(c))$.

##### Proof:

Let $\varepsilon>0$.

We will show that there exists $\delta>0$ such that if $|x-c|<\delta$, then $|f(g(x))-f(g(c))|<\varepsilon$.

Since $f$ is continuous at $g(c)$, there exists $\delta_1>0$ such that

$${\small\textrm{if }} |x_1-g(c)|<\delta_1, {\small\textrm{ then }} |f(x_1)-f(g(c))|<\varepsilon.$$ For $\delta_1>0$, there exists $\delta>0$ such that

$${\small\textrm{if }} |x-c|<\delta, {\small\textrm{ then }} |g(x)-g(c)|<\delta_1$$ by the continuity of $g$ at $c$.

Substituting $g(x)$ for $x_1$ in (1), we have from (2) and (1) that ${\small\textrm{if }} |x-c|<\delta, {\small\textrm{ then }} |f(g(x))-f(g(c))|<\varepsilon,$ and the proof is complete.

(This proof is taken from Salas and Hille’s Calculus: One Variable, 7th ed.)

We’d also like to speak of continuity on a closed interval $[a,b]$. To deal with the endpoints $a$ and $b$, we define one-sided continuity:

A function $f$ is continuous from the left at $c$ if and only if $\displaystyle\lim_{x\to c^-} f(x)=f(c)$. It is continuous from the right at $c$ if and only if $\displaystyle\lim_{x\to c^+} f(x)=f(c)$.

We say that $f$ is continuous on $[a,b]$ if and only if

1. $f$ is continuous on $(a,b)$,
2. $f$ is continuous from the right at $a$, and
3. $f$ is continuous from the left at $b$.
One-Sided Continuity

$\displaystyle{\lim_{x\rightarrow 0^+} f(x)=f(0)}$ so $f(x) = \sqrt{x}$ is continuous from the right at $0$.

$\displaystyle{\lim_{x\rightarrow 1^-} f(x)=f(1)}$ so $f(x)=\sqrt{1-x}$ is continuous from the left at $1$.

Note that $f$ is continuous at $c$ if and only if the right- and left-hand limits exist and both equal $f(c)$.

###### Example

The function $f(x)=\left\{\begin{array}{ll} x, & x\leq 0\\ x^2, & 0 < x\leq 1\\ \frac{2}{x}, & 1 < x\leq 2\\ x-1, & x > 2 \end{array}\right.$ is continuous everywhere except at $x=1$, where $f$ has a jump discontinuity.

#### Key Concepts

A function $f$ is continuous at $c$ if and only if $\displaystyle\lim_{x \to c} f(x) = f(c)$.

That is, $f$ is continuous at $c$ if and only if for all $\varepsilon > 0$ there exists a $\delta > 0$ such that ${\small\textrm{if }} |x-c| < \delta {\small\textrm{ then }} |f(x)-f(c)| < \varepsilon{\small\textrm{.}}$ In words, for $x$ close to $c$, $f(x)$ should be close to $f(c)$.