In this section, we learn:

### Definitions of Continuity and Discontinuity

Consider a function $$f$$ whose graph is shown in the following figure. We can intuitively say that $$f$$ is discontinuous at $$x=-3,-1,3$$, and $$5$$ and is continuous at any other points; we don’t have to lift the pen to draw the graph of $$f$$ except when $$x=-3,-1,3,5$$. Figure 1: The function $$f$$ is not continuous at $$x=-3,-1,3$$ and $$5$$.

• The function is discontinuous at $$x=-3$$ because it is not defined there.

• The function has a jump discontinuity at $$x=-1$$; the left-hand limit is not equal to the right-hand limit. Because $$\lim_{x\to-1^{-}}f(x)=f(-1)$$, we say the function is continuous from the left.

• The function is not continuous at $$x=3$$ because $$f(3)$$ is not equal to the limit of the function as $$x\to3$$. $\lim_{x\to3}f(x)=-1\neq f(3)=5$

• The function is discontinuous at $$x=5$$ because $\lim_{x\to5^{-}}f(x)=3\neq f(5)=1.$ However, we intuitively say the function continuous at $$x=-5$$ because $\lim_{x\to-5^{+}}f(x)=f(5)=1.$ Because $$x=\pm5$$ are endpoints of the domain of $$f$$, only one-sided limits exist.

Here is the formal definition of continuity.

Definition 1: The function $$f$$ is continuous at $$a$$ if $\lim_{x\to a}f(x)=f(a)$

It follows from the above definition that when the function $$f$$ is continuous at $$a$$ then

1. $$f$$ is defined at $$a$$.

2. $$\lim_{x\to a}f(x)$$ exits (which requires that $$f$$ to be defined on some open interval containing $$a$$).

3. $$\lim_{x\to a}f(x)=f(a)$$

• When $$f$$ is not continuous at $$a$$ we say $$f$$ is discontinuous at $$a$$ or has a discontinuity at $$a$$.

In a similar fashion, we can define left and right continuities.

Definition 2: The function $$f$$ is left-continuous at $$a$$ (or continuous from the left) if $\lim_{x\to a^{-}}f(x)=f(a)$ The function is right-continuous at $$a$$ (or continuous from the right) if $\lim_{x\to a^{+}}f(x)=f(a).$

• It follows from the definitions that the function $$f$$ is continuous at $$x=a$$ if and only if it is left-continuous and right-continuous at the point $$a$$.

• If a function is continuous at every $$x$$ in an open interval $$(a,b)$$, we say it is continuous over $$(a,b)$$.

• We say a function is continuous over a closed interval $$[a,b]$$ if it is continuous over the open interval $$(a,b)$$ and is left-continuous at $$a$$ and right-continuous at $$b$$.

Example
Show that $$f(x)=3-\sqrt{4-x^{2}}$$ is continuous on $$[-2,2]$$.

Solution

For $$-2<a<2$$, we have

\begin{aligned} \lim_{x\to a}f(x) & =\lim_{x\to a}(3-\sqrt{4-x^{2}})\\ & =\lim_{x\to a}3-\lim_{x\to a}\sqrt{4-x^{2}} & {\small \text{by Difference Rule in Sec. 4.4}}\\ & =3-\sqrt{\lim_{x\to a}(4-x^{2})} & {\small \text{by Root Rule}}\\ & =3-\sqrt{4-a^{2}}& {\small (4-x^2) \text{ is a Polynomial}}\\ & =f(a) \end{aligned}

Similarly, we can show $\lim_{x\to-2^{+}}f(x)=3=f(-2),\quad\lim_{x\to2^{-}}f(x)=3=f(2)$ The graph of $$f$$ is shown in the following figure.

### Types of Discontinuity

1. Removable Discontinuity

We say that $$f$$ has a removable discontinuity at $$x=a$$ if $\lim_{x\to a}f(x)=L,$ and either $$f$$ is not defined at $$a$$ or $$f(a)\neq L$$. We can make $$f(x)$$ continuous at $$x=a$$, if $$L$$ is assumed as the value of $$f(a).$$

For example, the function $f(x)=\frac{x^{2}-4}{x-2}$ is not defined for $$x=2$$ (because there would be division by zero), but for every other value of $$x$$, $f(x)=\frac{(x-2)(x+2)}{x-2}=x+2.$ Because $\lim_{x\to2}(x+2)=4,$ we obtain $\lim_{x\to2}\frac{x^{2}-4}{x-2}=4.$ Although the function is not defined when $$x=2$$, if we arbitrarily assign $$f(x)$$ the value 4 when $$x=2$$ (that is, $$f(2)=4$$), then it becomes continuous at $$x=2$$ (see Figure 3).  (a) $f(x)=\frac{x^{2}-4}{x-2}$ is discontinuous at $x=2$ (b) The discontinuity of $f$ at $x=2$ is removed if we define $f(x)=\begin{cases} \frac{x^{2}-4}{x-2} & x\neq2\\ 4 & x=2 \end{cases}$.

Figure 3

2. Jump Discontinuity

We say $$f$$ has a jump discontinuity at $$x=a$$ if the right and left limits exist but have different values $\lim_{x\to a^{-}}f(x)\neq\lim_{x\to a^{+}}f(x).$

For example, the Heaviside step function $$H(x)$$ is defined as $H(x)=\begin{cases} 1 & \text{if }x\geq0\\ 0 & \text{if }x<0 \end{cases}$ This function has a jump discontinuity at $$x=0$$ because $\lim_{x\to0^{-}}H(x)=0\neq\lim_{x\to0^{+}}H(x)=1.$ We note that $$H(x)$$ is right continuous at $$x=0$$ because $$H(0)=\lim_{x\to0^{+}}H(x)=1$$. (See Figure 4). Figure 4: Graph of $$H(x)=\begin{cases} 1 & \text{if }x\geq0\\ 0 & \text{if }x<0 \end{cases}$$

The greatest integer function (also known as the floor function) $$y=\left\lfloor x\right\rfloor$$ (or $y=[\![ x]\!]$) has a jump discontinuity at every integer (see Figure 5). For example, $\lim_{x\to2^{-}}\left\lfloor x\right\rfloor =1\neq\lim_{x\to2^{+}}\left\lfloor x\right\rfloor =2.$ Figure 5: Graph of $$y=\left\lfloor x\right\rfloor$$

3. Infinite Discontinuity

We say $$f$$ has an infinite discontinuity at $$x=a$$ if one of the one-sided limits or both of them are plus or minus infinity.

For example, $$f(x)=1/x^{2}$$ has an infinite discontinuity at $$x=0$$ (See Figure 6). Note that we can choose a value for $$f(0)$$ but we cannot make it continuous at $$x=0$$ because $$\lim_{x\to0}f(x)=\infty$$ and $$\infty$$ is not a number to assign it to $$f(0)$$. Figure 6: Graph of $$f(x)=\dfrac{1}{x^{2}}$$.

4. Oscillating Discontinuity

For example, $$f(x)=\sin\left(\frac{1}{x}\right)$$ oscillates between $$-1$$ and $$1$$ infinitely often as $$x\to0$$ (See the following figure). Because this function does not approach a single number, it does not have a limit as $$x\to0$$. Figure 7: Graph of $$f(x)=\sin\left(\dfrac{1}{x}\right)$$.

#### A function that is discontinuous at every point of its domain

Consider the Dirichlet function defined as $D(x)=\begin{cases} 1 & \text{if }x\text{ is rational}\\ 0 & \text{if }x\text{ is irrational} \end{cases}$ This function is discontinuous at every point; $$D(x)$$ fails to have a limit at any point.

Suppose $$D(x)$$ has a limit $$L$$ at a point $$a$$. Suppose $$\epsilon=1/2$$ is given, we should be able to find a $$\delta>0$$ such that $0<|x-a|<\delta\implies|D(x)-L|<\frac{1}{2}$ Because each deleted neighborhood $$0<|x-a|<\delta$$ contains a rational point $$x_{1}$$ and irrational point $$x_{2}$$, we should have $|D(x_{1})-L|=|1-L|<\frac{1}{2}$ and $|D(x_{2})-L|=|0-L|<\frac{1}{2}$ and hence $1=|D(x_{1})-L-(D(x_{2})-L)|\leq|D(x_{1})-L|+|D(x_{2})-L|<\frac{1}{2}+\frac{1}{2}$ Because this is impossible, $$D(x)$$ cannot have a limit.

### Elementary Continuous Functions

Here are some elementary continuous functions

1. $$y=x^{n}$$ where $$n$$ is a positive integer is continuous everywhere.

2. Polynomials are continuous everywhere, because for any $$a$$, $$\lim_{x\to a}P(x)=P(a)$$

3. Let $$P(x)$$and $$Q(x)$$ be two polynomials and $$Q(a)\neq0$$. Then the rational function $R(x)=\frac{P(x)}{Q(x)}$ is continuous at $$x=a$$. In other words, a rational function is continuous on their domains and is discontinuous at the points where the denominator is zero.

4. $$y=\sqrt[n]{x}$$ where $$n$$ is a positive odd integer is continuous everywhere.

5. $$y=\sqrt[n]{x}$$ where $$n$$ is a positive even integer is continuous on its domain $$[0,\infty)$$.

6. The sine and cosine functions are continuous on $$\mathbb{R}=(-\infty,\infty)$$. Figure 8: $$y=\sin x$$ and $$y=\cos x$$ are continuous everywhere.
7. Tangent, cotangent, secant and cosecant functions are continuous where they are defined; that is, on their domains. Specifically $$y=\tan x$$ is continuous everywhere except where $$\cos x=0$$; that is when $$x=\frac{\pi}{2}+k\pi$$ for all integers $$k$$. Thus $$y=\tan x$$ is continuous on $\left\{ x\Big|\ x\neq\frac{\pi}{2}+k\pi,\quad k\in\mathbb{Z}\right\}$ Figure 9: $$y=\tan x$$ is continuous on its domain

The graphs of the rest of trigonometric functions are illustrated in Figure . The domains of these functions are apparent from their graphs.   (a) $$y=\cot x$$ (b) $$y=\sec x$$ (c) $$y=\text{csc}x$$

Figure 10

8. Inverse trigonometric functions are continuous on their domains. For example, $$y=\arcsin x$$ and $$y=\arccos x$$ are continuous on $$[-1,1]$$and $$y=\arctan x$$ is continuous on $$\mathbb{R}=(-\infty,\infty)$$.

9. $$y=e^{x}$$ is continuous on its domain $$\mathbb{R}=(-\infty,\infty)$$.

10. $$y=\ln x$$ is continuous on its domain $$(0,\infty)$$.

In fact, most of the functions that we deal with in this course are continuous on their domains. Some exceptions are: