As we have studied limits, we have gained the intuition that limits measure “where a function is heading.” That is, if $\underset{x\to 1}{lim}f(x)=3$, then as $x$ is close to 1, $f(x)$ is close to 3. We have seen, though, that this is not necessarily a good indicator of what $f(1)$ actually is. This can be problematic; functions can tend to one value but attain another. This section focuses on functions that do not exhibit such behavior.
Let $f$ be a function defined on an open interval $I$ containing $c$.
$f$ is continuous at $c$ if $\underset{x\to c}{lim}f(x)=f(c)$.
$f$ is continuous on $I$ if $f$ is continuous at $c$ for all values of $c$ in $I$. If $f$ is continuous on $(-\mathrm{\infty},\mathrm{\infty})$, we say $f$ is continuous everywhere.
A useful way to establish whether or not a function $f$ is continuous at $c$ is to verify the following three things:
$\underset{x\to c}{lim}f(x)$ exists,
$f(c)$ is defined, and
$\underset{x\to c}{lim}f(x)=f(c)$.
If $f$ is defined near $c$ but is not continuous at $c$, then we say that $f$ is discontinuous at $\mathbf{c}$ or $f$ has a discontinuity at $\mathbf{c}$. We will discuss three types of discontinuities, as seen in Figure 1.6.1.
Let $f$ be defined as shown in Figure 1.6.2. Give the interval(s) on which $f$ is continuous. ^{†}^{†}margin: Λ
SolutionWe proceed by examining the three criteria for continuity.
The limits $\underset{x\to c}{lim}f(x)$ exists for all $c$ between 0 and 3.
$f(c)$ is defined for all $c$ between 0 and 3, except for $c=1$. We know immediately that $f$ cannot be continuous at $x=1$.
The limit $\underset{x\to c}{lim}f(x)=f(c)$ for all $c$ between 0 and 3, except, of course, for $c=1$.
We conclude that $f$ is continuous at every point of $(0,3)$ except at $x=1$. Therefore $f$ is continuous on $(0,1)\cup (1,3)$.
The floor function,
$f(x)=\lfloor x\rfloor $, returns the largest integer smaller than or equal to the input $x$. (For example, $f(\pi )=\lfloor \pi \rfloor =3$.) The graph of $f$ in Figure 1.6.3 demonstrates why this is often called a “step function.”
Give the intervals on which $f$ is continuous.
SolutionWe examine the three criteria for continuity.
The limits ${lim}_{x\to c}f(x)$ do not exist at the jumps from one “step” to the next, which occur at all integer values of $c$. Therefore the limits exist for all $c$ except when $c$ is an integer.
The function is defined for all values of $c$.
The limit $\underset{x\to c}{lim}f(x)=f(c)$ for all values of $c$ where the limit exist, since each step consists of just a line.
We conclude that $f$ is continuous everywhere except at integer values of $c$. So the intervals on which $f$ is continuous are
$$\mathrm{\dots},(-2,-1),(-1,0),(0,1),(1,2),\mathrm{\dots}.$$ |
Our definition of continuity on an interval specifies the interval is an open interval. At endpoints or points of discontinuity we may consider continuity from the right or left.
Right Continuous
Let $f$ be defined on a closed interval with left endpoint $a$. We say that $f$ is continuous from the right at $a$ (or right continuous at $a$) if
$$\underset{x\to {a}^{+}}{lim}f(x)=f(a).$$ |
Left Continuous
Let $f$ be defined on a closed interval with right endpoint $b$. We say that $f$ is continuous from the left at $b$ (or left continuous at $b$) if
$$\underset{x\to {b}^{-}}{lim}f(x)=f(b).$$ |
We can then extend the definition of continuity to closed intervals by considering the appropriate one-sided limits at the endpoints.
Let $f$ be defined on the closed interval $[a,b]$ for some real numbers $a,b$. Then $f$ is continuous on $\mathrm{[}a\mathrm{,}b\mathrm{]}$ if:
$f$ is continuous on $(a,b)$,
$f$ is right continuous at $a$ and
$f$ is left continuous at $b$.
We can make the appropriate adjustments to talk about continuity on half-open intervals such as $[a,b)$ or $(a,b]$ if necessary.
Continuity is inherently tied to the properties of limits. Because of this, the properties of limits found in Theorems 1.3.1 and 1.3.3 apply to continuity as well. We will utilize these properties in the following example.
For each of the following functions, give the domain of the function and the interval(s) on which it is continuous.
$f(x)=1/x$
$f(x)=\mathrm{sin}x$
$f(x)=\sqrt{x}$
$f(x)=\sqrt{1-{x}^{2}}$
$f(x)=\left|x\right|$
SolutionWe examine each in turn.
The domain of $f(x)=1/x$ is $(-\mathrm{\infty},0)\cup (0,\mathrm{\infty})$. As it is a rational function, we apply Theorem 1.3.3 to recognize that $f$ is continuous on all of its domain.
The domain of $f(x)=\mathrm{sin}x$ is all real numbers, or $(-\mathrm{\infty},\mathrm{\infty})$. Applying Theorem 1.3.4 shows that $\mathrm{sin}x$ is continuous everywhere.
The domain of $f(x)=\sqrt{x}$ is $[0,\mathrm{\infty})$. Applying Theorem 1.3.4 shows that $f(x)=\sqrt{x}$ is continuous on its domain of $[0,\mathrm{\infty})$.
The domain of $f(x)=\left|x\right|$ is $(-\mathrm{\infty},\mathrm{\infty})$. We can define the absolute value function as $$. Each “piece” of this piecewise defined function is continuous on all of its domain, giving that $f$ is continuous on $(-\mathrm{\infty},0)$ and $[0,\mathrm{\infty})$. We cannot assume this implies that $f$ is continuous on $(-\mathrm{\infty},\mathrm{\infty})$; we need to check that $\underset{x\to 0}{lim}f(x)=f(0)$, as $x=0$ is the point where $f$ transitions from one “piece” of its definition to the other. It is easy to verify that this is indeed true, hence we conclude that $f(x)=\left|x\right|$ is continuous everywhere.
The following theorem states how continuous functions can be combined to form other continuous functions.
Let $f$ and $g$ be continuous functions on an interval $I$, let $c$ be a real number and let $n$ be a positive integer. The following functions are continuous on $I$.
Sums/Differences: $f\pm g$
Constant Multiples: $c\cdot f$
Products: $f\cdot g$
Quotients: $f/g$ (as long as $g\ne 0$ on $I$)
Powers: ${f}^{n}$
Roots: $\sqrt[n]{f}$ (if $f\ge 0$ on $I$ or $n$ is odd)
The proofs of each of the parts of Theorem 1.6.1 follow from the Basic Limit Properties given in Theorem 1.3.1. We will prove the product of two continuous functions is continuous now.
We know that $f$ and $g$ are continuous at $c$ so by definition we have
$$\underset{x\to c}{lim}f(x)=f(c)\mathit{\hspace{1em}}\text{and}\mathit{\hspace{1em}}\underset{x\to c}{lim}g(x)=g(c).$$ |
Therefore,
$\underset{x\to c}{lim}(f\cdot g)(x)$ | $=\underset{x\to c}{lim}f(x)\cdot g(x)$ | ||
$=\underset{x\to c}{lim}f(x)\cdot \underset{x\to c}{lim}g(x)$ | |||
$=f(c)\cdot g(c)$ | |||
$=(f\cdot g)(c).\mathit{\u220e}$ |
Let $f$ be continuous on $I$, where the range of $f$ on $I$ is $J$, and let $g$ be continuous on $J$. Then
$$(g\circ f)(x)=g(f(x))$$ |
is continuous on $I$.
Now knowing the definition of continuity we can re-read Theorem 1.3.4 as giving a list of functions that are continuous on their domains.
The following functions are continuous on their domains.
$f(x)=\mathrm{sin}x$
$f(x)=\mathrm{cos}x$
$f(x)=\mathrm{tan}x$
$f(x)=\mathrm{cot}x$
$f(x)=\mathrm{sec}x$
$f(x)=\mathrm{csc}x$
$f(x)=\mathrm{ln}x$
$f(x)={a}^{x}$ ($a>0$)
In the following example, we will show how we apply the previous theorems.
State the interval(s) on which each of the following functions is continuous.
$f(x)=\sqrt{x-1}+\sqrt{5-x}$
$f(x)=x\mathrm{sin}x$
$f(x)=\mathrm{tan}x$
$f(x)=\sqrt{\mathrm{ln}x}$
The two square-root terms are continuous on the intervals $[1,\mathrm{\infty})$ and $(-\mathrm{\infty},5]$, respectively. As $f$ is continuous only where each term is continuous, $f$ is continuous on the intersection of these two intervals: $[1,5]$. A graph of $f$ is displayed in Figure 1.6.4.
The functions $y=x$ and $y=\mathrm{sin}x$ are each continuous everywhere, hence their product is, too.
Theorem 1.6.3 states that $f(x)=\mathrm{tan}x$ is continuous “on its domain.” Its domain includes all real numbers except odd multiples of $\pi /2$. Thus $f(x)=\mathrm{tan}x$ is continuous on
$$\mathrm{\dots},(-\frac{3\pi}{2},-\frac{\pi}{2}),(-\frac{\pi}{2},\frac{\pi}{2}),(\frac{\pi}{2},\frac{3\pi}{2}),\mathrm{\dots}$$ |
or, equivalently, on $D=\{x\in \mathbb{R}|x\ne \frac{(2n+1)\pi}{2},n\in \mathbb{Z}\}$.
The domain of $y=\sqrt{x}$ is $[0,\mathrm{\infty})$. The range of $y=\mathrm{ln}x$ is $(-\mathrm{\infty},\mathrm{\infty})$, but if we restrict its domain to $[1,\mathrm{\infty})$ its range is $[0,\mathrm{\infty})$. So restricting $y=\mathrm{ln}x$ to the domain of $[1,\mathrm{\infty})$ restricts its output is $[0,\mathrm{\infty})$, on which $y=\sqrt{x}$ is defined. Thus the domain of $f(x)=\sqrt{\mathrm{ln}x}$ is $[1,\mathrm{\infty})$.
A common way of thinking of a continuous function is that “its graph can be sketched without lifting your pencil.” That is, its graph forms a “continuous” curve, without holes, breaks or jumps. While beyond the scope of this text, this pseudo-definition glosses over some of the finer points of continuity. Very strange functions are continuous that one would be hard pressed to actually sketch by hand.
This intuitive notion of continuity does help us understand another important concept as follows. Suppose $f$ is defined on $[1,2]$ and $f(1)=-10$ and $f(2)=5$. If $f$ is continuous on $[1,2]$ (i.e., its graph can be sketched as a continuous curve from $(1,-10)$ to $(2,5)$) then we know intuitively that somewhere on $[1,2]$ $f$ must be equal to $-9$, and $-8$, and $-7,-6,\mathrm{\dots},0,1/2,$ etc. In short, $f$ takes on all intermediate values between $-10$ and $5$. It may take on more values; $f$ may actually equal 6 at some time, for instance, but we are guaranteed all values between $-10$ and 5.
While this notion seems intuitive, it is not trivial to prove and its importance is profound. Therefore the concept is stated in the form of a theorem and illustrated in Figure 1.6.5.
Let $f$ be a continuous function on $[a,b]$ and, without loss of generality, let $$. Then for every value $y$, where $$, there exists at least one value $c$ in $(a,b)$ such that $f(c)=y$
One important application of the Intermediate Value Theorem is root finding. Given a function $f$, we are often interested in finding values of $x$ where $f(x)=0$. These roots may be very difficult to find exactly. Good approximations can be found through successive applications of this theorem. Suppose through direct computation we find that $$ and $f(b)>0$, where $$. The Intermediate Value Theorem states that there exists at least one $c$ in $[a,b]$ such that $f(c)=0$. The theorem does not give us any clue as to where that value is in the interval $[a,b]$, just that it exists.
Show that $f(x)={x}^{3}+x+3$ has at least one real root.
SolutionWe must determine an interval on which the function changes from positive to negative values. We start by evaluating $f$ at different values. We see that $f(0)=3>0$ and $f(1)=5>0$. As we choose larger positive values of $x$, we can see that $f(x)$ values will continue to grow. Looking at negative $x$-values, $f(-1)=1>0$ and $$ so we know $f(x)$ must change sign in $[-2,-1]$. Because $f(x)$ is a polynomial, it is continuous on all real numbers so is continuous on $[-2,-1]$. By the Intermediate Value Theorem there is a $c$ in $(-2,-1)$ where $f(x)=0$. Thus $f(x)$ must have at least one real root on $(-2,-1)$.
Note that in the above example you were not asked to find the root, just to show that the function had a root.
There is a technique that produces a good approximation of $c$. Let $d$ be the midpoint of the interval $[a,b]$ and consider $f(d)$. There are three possibilities:
$f(d)=0$ — we got lucky and stumbled on the actual value. We stop as we found a root.
$$ Then we know there is a root of $f$ on the interval $[d,b]$ — we have halved the size of our interval, hence are closer to a good approximation of the root.
$f(d)>0$ Then we know there is a root of $f$ on the interval $[a,d]$ — again,we have halved the size of our interval, hence are closer to a good approximation of the root.
Successively applying this technique is called the Bisection Method of root finding. We continue until the interval is sufficiently small. We demonstrate this in the following example.
Approximate the root of $f(x)=x-\mathrm{cos}x$, accurate to three places after the decimal.
SolutionConsider the graph of $f(x)=x-\mathrm{cos}x$, shown in Figure 1.6.6. It is clear that the graph crosses the $x$-axis somewhere near $x=0.8$. To start the Bisection Method, pick an interval that contains $0.8$. We choose $[0.7,0.9]$. Note that all we care about are signs of $f(x)$, not their actual value, so this is all we display.
$$, $f(0.9)>0$, and $f(0.8)>0$. So replace $0.9$ with $0.8$ and repeat.
$$, $f(0.8)>0$, and at the midpoint, $0.75$, we see that $f(0.75)>0$. So replace $0.8$ with $0.75$ and repeat. Note that we don’t need to continue to check the endpoints, just the midpoint. Thus we put the rest of the iterations in Figure 1.6.7.
Notice that in the 12${}^{\text{th}}$ iteration we have the endpoints of the interval each starting with $0.739$. Thus we have narrowed the zero down to an accuracy of the first three places after the decimal. Using a computer, we have
$$f(0.7390)=-0.00014,f(0.7391)=0.000024.$$ |
Either endpoint of the interval gives a good approximation of where $f$ is 0. The Intermediate Value Theorem states that the actual zero is still within this interval. While we do not know its exact value, we know it starts with $0.739$.
This type of exercise is rarely done by hand. Rather, it is simple to program a computer to run such an algorithm and stop when the endpoints differ by a preset small amount. One of the authors did write such a program and found the zero of $f$, accurate to 10 places after the decimal, to be 0.7390851332. While it took a few minutes to write the program, it took less than a thousandth of a second for the program to run the necessary 35 iterations. In less than 8 hundredths of a second, the zero was calculated to 100 decimal places (with less than 200 iterations).
It is a simple matter to extend the Bisection Method to solve problems similar to “Find $x$, where $f(x)=0$.” For instance, we can find $x$, where $f(x)=1$. It actually works very well to define a new function $g$ where $g(x)=f(x)-1$. Then use the Bisection Method to solve $g(x)=0$.
Similarly, given two functions $f$ and $g$, we can use the Bisection Method to solve $f(x)=g(x)$. Once again, create a new function $h$ where $h(x)=f(x)-g(x)$ and solve $h(x)=0$.
In Section 4.4 another equation solving method will be introduced, called Newton’s Method. In many cases, Newton’s Method is much faster. It relies on more advanced mathematics, though, so we will wait before introducing it.
This section formally defined what it means to be a continuous function. “Most” functions that we deal with are continuous, so often it feels odd to have to formally define this concept. Regardless, it is important, and forms the basis of the next chapter.
In your own words, describe what it means for a function to be continuous.
In your own words, describe what the Intermediate Value Theorem states.
What is a “root” of a function?
Given functions $f$ and $g$ on an interval $I$, how can the Bisection Method be used to find a value $c$ where $f\left(c\right)=g\left(c\right)$?
T/F: If $f$ is defined on an open interval containing $c$, and $\underset{x\to c}{lim}f\left(x\right)$ exists, then $f$ is continuous at $c$.
T/F: If $f$ is continuous at $c$, then $\underset{x\to c}{lim}f\left(x\right)$ exists.
T/F: If $f$ is continuous at $c$, then $\underset{x\to {c}^{+}}{lim}f\left(x\right)=f\left(c\right)$.
T/F: If $f$ is continuous on $[a,b]$, then $\underset{x\to {a}^{-}}{lim}f\left(x\right)=f\left(a\right)$.
T/F: If $f$ is continuous on $[0,1)$ and $[1,2)$, then $f$ is continuous on $[0,2)$.
T/F: The sum of continuous functions is also continuous.
In Exercises 11–18., a graph of a function $f$ is given along with a value $a$. Determine if $f$ is continuous at $a$; if it is not, state why it is not.
In Exercises 19–22., determine if $f$ is continuous at the indicated values. If not, explain why.
In Exercises 23–36., give the intervals on which the given function is continuous.
$f\left(x\right)={x}^{2}-3x+9$
$g\left(x\right)=\sqrt{{x}^{2}-4}$
$g\left(x\right)=\sqrt{4-{x}^{2}}$
$h\left(k\right)=\sqrt{1-k}+\sqrt{k+1}$
$f\left(t\right)=\sqrt{5{t}^{2}-30}$
$g\left(t\right)={\displaystyle \frac{1}{\sqrt{1-{t}^{2}}}}$
$g\left(x\right)={\displaystyle \frac{1}{1+{x}^{2}}}$
$f\left(x\right)={e}^{x}$
$g\left(s\right)=\mathrm{ln}s$
$h\left(t\right)=\mathrm{cos}t$
$f\left(k\right)=\sqrt{1-{e}^{k}}$
$f\left(x\right)=\mathrm{sin}\left({e}^{x}+{x}^{2}\right)$
$$
$$
Exercises 39–42. test your understanding of the Intermediate Value Theorem.
Let $f$ be continuous on $[1,5]$ where $f\left(1\right)=-2$ and $f\left(5\right)=-10$. Does a value $$ exist such that $f\left(c\right)=-9$? Why/why not?
Let $g$ be continuous on $[-3,7]$ where $g\left(0\right)=0$ and $g\left(2\right)=25$. Does a value $$ exist such that $g\left(c\right)=15$? Why/why not?
Let $f$ be continuous on $[-1,1]$ where $f\left(-1\right)=-10$ and $f\left(1\right)=10$. Does a value $$ exist such that $f\left(c\right)=11$? Why/why not?
Let $h$ be a function on $[-1,1]$ where $h\left(-1\right)=-10$ and $h\left(1\right)=10$. Does a value $$ exist such that $h\left(c\right)=0$? Why/why not?
In Exercises 43–46., find the value(s) of $a$ and $b$ so that the function is continuous on $\mathbb{R}$.
$$
$f\left(x\right)=\{\begin{array}{cc}{a}^{2}x-a\hfill & x>3\hfill \\ 4\hfill & x\le 3\hfill \end{array}$
$$
$f\left(x\right)=\{\begin{array}{cc}{x}^{2}+2x\hfill & x\le a\hfill \\ -1\hfill & x>a\hfill \end{array}$
In Exercises 47–50., sketch the graph of a function that has the following properties.
$f$ is discontinuous at 3, but continuous from the left at 3, and continuous elsewhere.
$f$ is discontinuous at -1 and 2, but continuous from the right at -1 and continuous from the left at 2, and continuous elsewhere.
$f$ has a jump discontinuity at -2 and an infinite discontinuity at 4 and is continuous elsewhere.
$f$ has a removable discontinuity at 2, is continuous only from the left at 5, and is continuous elsewhere.
In Exercises 51–54., show that the functions have at least one real root.
$f\left(x\right)={x}^{2}+2x-4$
$f\left(x\right)=\mathrm{sin}x-1/2$
$f\left(x\right)={e}^{x}-2$
$f\left(x\right)=\mathrm{cos}x-\mathrm{sin}x$
Give an example of function $f\left(x\right)$ for which $\underset{x\to 0}{lim}f\left(x\right)$ does not exist.