Matheno - Learn Well and Excel

D.1 Continuity at a point and over an interval

We turn now to an idea closely related to limits, and a concept that we’ll use often and need to define: “continuity.” As you’ll see, whether we can apply certain tools to a function at a given point requires that we know that the function is “continuous” there, so we need to understand what continuity is!

Your everyday sense of “continuity” is quite useful for thinking about continuity in mathematics and science: time sweeps along continuously; river water flows continuously; “I biked continuously for twenty miles without stopping.” The key idea is that there is no interruption in something that is continuous — no gaps, leaps, or sudden breaks.

If you can draw the curve without lifting your pencil from the page, the function is continuous
We can translate these everyday ideas to a simple way to determine if a function is continuous by considering its graph: if you can draw a function’s curve without lifting your pencil from the page, then that function is continuous. For example, each of the functions in the following figure is continuous:
Examples of continuous functions: a polynomial, sine curve, absolute value, and square-root of x
By contrast, a function is not continuous if it has a jump or gap somewhere. We label such functions discontinuous, and there are examples in the figure below. Notice that for each of these functions you cannot draw the curve without lifting your pencil from the page. (The circle around the “hole” in the first graph of course actually indicates that the function is undefined there, and isn’t actually a part of the function: if we were walking up along this line, we’d have to leap over that gap, which makes the function discontinuous. )
Three graphs that are examples of discontinuity: (1) A horizontal line at y = 5 for x less than 3, and then a sudden jump up to y = 6 for x greater than 3. (2) The function 1/(x-2) that goes to negative infinity as x to 2 from the left, and to positive infinity as x to 2 from the right. (3) A straight line with a hole at the point (2, 4).
A more mathematical way to think about continuity is to notice that for a continuous function, if we make a small change in the function’s input (imagine moving your hand a bit to the right as you draw the graph), the function’s output changes by a small amount (so you don’t have to suddenly move where your pencil is to draw the next bit). In fact, if a function is continuous at a particular point, then starting from that point you can make the function’s change-in-output as small as you’d like by making the change-in-input sufficiently small.

By contrast, if the function is discontinuous at a point (like at $x=2$ in each of the Discontinuous Example graphs above), then you cannot make the function’s change in output as small as you’d like. Instead, the function’s value on the left-side of the point is simply disconnected from its value on the right-side of the point.

The words, “make the change-in-output as small as you’d like by making the change-in-input sufficiently small” probably remind you of limits, as they should: the mathematical definition of “continuity” had to wait for the notion of “limit” to be developed, and relies heavily on that notion. Here is the official definition of Continuity at a Point:

Continuity at a Point, Definition:
A function f is continuous at $x = a$ if
\[\lim_{x \to a}f(x) = f(a)\]

 
First, for a function to be continuous at $x=a$ it must be defined there; otherwise there’s automatically a “gap” of some sort, and so the function is discontinuous. But being defined at $x=a$ is not sufficient! For example in the bottom graph above, the function is defined at $x=2,$ but is clearly discontinuous at that point.

The bottom graph thus highlights the importance of the limit in the definition of continuity. Applying our understanding of limits from earlier, in words the definition says: a function is continuous at $x =a$ if the function is defined at $x=a,$ and if we can make the the function’s output $f(x)$ as close as we’d like to its value at $x=a,$ $f(a),$ by making x sufficiently close to a. That is, using our $\epsilon$ and $\delta$ notation, we must be able to be within $\pm \epsilon$ of $f(a)$ (“as close as we’d like”) by being within $\pm \delta$ of $a$ (“sufficiently close”). Kinda cool: see how important your understanding of the concept of “limits” is?

The Three Requirements for Continuity

Memorize these
As a practical matter, the continuity definition has three requirements, which you should memorize since a question that asks you to prove continuity at the point $x=a$ means that you must verify each:
1. $f(a)$ exists: a is in the domain of f.
2. $\displaystyle{\lim_{x \to a}f(x)}$ exists.
3. $\displaystyle{\lim_{x \to a}f(x) = f(a)}$: the limit equals the function’s value at $x=a.$

You can see how each function in the Discontinuous Examples figure above fails one of the requirements: In the top two figures, the function is not defined at $x=2,$ and so we know immediately that the function is discontinuous there. (On an exam that’s all you’d have to write; no need to proceed to the other items.) In the bottom graph, $f(2)$ is defined so requirement #1 is fulfilled, but then $\displaystyle{\lim_{x \to 2}f(x)}$ does not exist and so the function is discontinuous at $x=2$ by requirement #2. We’ll of course let you practice showing that a function is continuous, or not, in problems below.

One-sided Continuity

Graph of y = sqrt(x) showing one-sided continuity  from the rightBefore then, let’s introduce the idea of one-sided continuity, which is of course tied closely to the idea of one-sided limits. The figure to the right shows one of the example continuous functions from above, $f(x) = \sqrt{x}.$ As we know, this function defined only for $x \ge 0$, and simply doesn’t exist for $x \lt 0.$ Its limit as $x \to 0$ thus doesn’t exist, and so we can’t talk about its (general) continuity at $x=0.$ It is, however, “continuous from the right,” meaning it satisfies the one-sided limit condition $\displaystyle{\lim_{x \to 0^+} = f(0)}.$

More generally, one-sided continuity at a point is defined by

One-Sided Continuity at a Point, Definition
\begin{align*}
\text{Continuous from the right at }x=a: &\quad \lim_{x \to a^+} = f(a) \\[8px] \text{Continuous from the left at }x=a: &\quad \lim_{x \to a^-} = f(a) \\[8px] \end{align*}

Let’s consider an example to show how this all works in practice.

Example 1: Semicircle continuous at endpoints

Graph of the function f(x) = sqrt(1-x^2), which is a semicircle
Consider the function $f(x) = \sqrt{1-x^2},$ which has the domain $[-1, 1].$ Show that f is
(i) continuous from the right at the endpoint $x=-1,$ and
(ii) continuous from the left at $x=1.$

Solution.
We use the Three Requirements for Continuity, now as applied for one-sided continuity:
(i) At $x = -1$:

1. $x=-1$ is in the domain of the function.
2. $\displaystyle{\lim_{x \to -1^+}\sqrt{1 – x^2} = \sqrt{\lim_{x \to -1^+}1 – \lim_{x \to -1^+}x^2} = \sqrt{1-1}=0 }$
and so exists.
3. Since $f(-1) = 0,$ $\displaystyle{\overbrace{\lim_{x \to -1^+}\sqrt{1 – x^2} = 0}^{\text{from 2.}} = f(-1).}$

Hence f is continuous from the right at $x = -1.\; \cmark$

(i) At $x = 1$:

1. $x=1$ is in the domain of the function.
2. $\displaystyle{\lim_{x \to 1^-}\sqrt{1 – x^2} = \sqrt{\lim_{x \to 1^-}1 – \lim_{x \to 1^-}x^2} = \sqrt{1-1}=0 }$
and so exists.
3. Since $f(1) = 0,$ $\displaystyle{\overbrace{\lim_{x \to 1^-}\sqrt{1 – x^2} = 0}^{\text{from 2.}} = f(1).}$

Hence f is continuous from the left at $x = 1. \; \cmark$

Quick aside about Substitution and Continuity
The preceding example actually contains a subtle point: do you remember when we first introduced Substitution as a tactic for finding limits we said, rather informally, that we were looking at “a function that is defined at the point of interest and that behaves smoothly near the point of interest, meaning there are no jumps or gaps there”?

Open for reminder of discussion about Substitution to find a limit
Substitution
When finding the limit $\displaystyle{\lim_{x \to a}f(x) },$ if you substitute $x=a$ into $f(x)$ and obtain a number for $f(a)$ (and don’t get “undefined”), then the limit is simply that value $f(a)$:
\[\lim_{x \to a} f(x) = f(a)\]

As you saw in the examples above, when Substitution works you can find the limit easily, often in one line, which makes these problems quick. And we don’t want to overcomplicate that. At the same time, we want to emphasize again that $\displaystyle{\lim_{x \to a}f(x) }$ and $f(a)$ are two distinct quantities.
Recall our working definition of limits:
\[\lim_{x \to a} f(x) = L\]

is a number L (if one exists) such that $f(x)$ is as close to L as we want
whenever x is sufficiently close to a.

We saw earlier various cases where $\displaystyle{\lim_{x \to a} f(x) \ne f(a) }$ (figure (a), below). By contrast, for these “nice, smooth functions” the limit does simply equal $f(a)$ (figure (b) below).
(a) Graph with a hole in it, such that f(2) = 5, which does not fall on the line that defines the function everywhere else, showing discontinuity. (b) A nice smooth parabola, such that every point of the function falls on the curve so that the function is continuous.

[collapse]

We see now that what we were actually saying is that “if the function is continuous at $x=a,$ then Substitution works.” We thus didn’t use Substitution to find the limit in requirement #2 in Example 1, since that would have assumed the very continuity that we’re aiming to prove. (Instead, we invoked more formal limit laws and moved the limit inside the square-root symbol, and proceeded from there.) This is a subtle point, but worth mentioning.

Continuity is crucial: we can only use certain tools where a function is continuous
Indeed, very soon we’ll see that we can only apply certain Calculus tools (like substitution, and later differentiation and integration) if a function is continuous. Going forward, rather than saying a function is “nice and smooth, with no gaps or jumps,” we’ll say simply “the function is continuous at $x=a,$” or “if a function is continuous, then ….”
Everything above has focused on a function’s continuity at a point. Let’s now consider continuity over an interval of some sort:

Continuity on an Interval

Continuity on open intervals
No surprise: If the function f is continuous at every number in the open interval $(a, b),$ then f is continuous on the interval $(a, b)$.

Similarly, if it is continuous at every number in the infinite interval $(-\infty, b),$ $(a, \infty),$ or $(-\infty, \infty),$ then it is continuous on that interval.

Continuity on closed intervals
We can extend these ideas to apply to continuity on a closed interval, simply by adding in the requirement that the function also be one-sided continuous at both endpoints of the interval:

Continuous on a closed interval
If a function f is defined on a closed interval $[a, b],$ then f is continuous on $[a, b]$ if it is continuous on $(a, b)$ and
\[\lim_{x \to a^+}f(x) = f(a) \quad \text{and} \quad \lim_{x \to b^-}f(x) = f(b)\]

 

Example 1 (continued): Semicircle continuous over its entire domain

Graph of the function f(x) = sqrt(1-x^2), which is a semicircle
Consider again the function $f(x) = \sqrt{1-x^2},$ which has the domain $[-1, 1].$
Show that f is continuous on its domain.

Solution.
To show that f is continuous on the open interval $(1,1)$:

1. f is defined on this interval.
2. Consider an input-value $x=c$ in the interval $-1 \lt c \lt 1.$ Then
\[\lim_{x \to c}f(x) = \sqrt{\lim_{x \to c}1- \lim_{x \to c}x^2} = \sqrt{1-c^2} \] and so exists.
3. Still thinking about $x=c$ in the same interval, since $f(c) = \sqrt{1-c^2},$
\[\overbrace{\lim_{x \to c}f(x) = \sqrt{1-c^2}}^{\text{from 2.}} = f(c)\]

Hence f is continuous at every $x=c$ in the interval $(-1, 1). \; \blacktriangleleft$

We already showed above in Example 1 that f is one-sided continuous at its endpoints $x= -1$ and $x = 1,$ and won’t repeat the arguments here. Summarizing the results there, we have
\[\lim_{x \to 1^+}f(x) = 0 = f(-1) \; \blacktriangleleft \quad \text{and} \quad \lim_{x \to 1^-}f(x) = 0 = f(1) \; \blacktriangleleft\] Hence f is continuous on its entire domain $[-1, 1]. \; \cmark$

Practice Problems

Time for some practice problems so you can consolidate the ideas here for yourself.
Most students find problems that ask you to that a function is continuous a little awkward at first, but — as with most things — become less so with practice.

Tips iconIf you are going to be tested on continuity, make sure you know how to complete Problems #4 and #5, which are extremely common on exams.

Practice Problem #1
Given the statement, "The function f is continuous at $x=5,$" which of the following must be true?
I. $\displaystyle{\lim_{x \to 5} f(x)}$ exists.
II. $\displaystyle{\lim_{x \to 5}f(x) = f(5)}$.
III. $f(5)$ exists.
IV. $f(5.001)$ exists.
\begin{array}{lllll} \text{(A) I, II, III, & IV} && \text{(B) II only} && \text{(C) I & II only} && \text{(D) I, II & III only} && \text{(E) none of these} \end{array}
Show/Hide Solution
I. $\displaystyle{\lim_{x \to 5} f(x)}$ exists ✓: true as requirement #2 of a function that is continuous at $x=5.$

II. $\displaystyle{\lim_{x \to 5}f(x) = f(5)}$ ✓: true as requirement #3 of a function that is continuous at $x=5.$

III. $f(5)$ exists ✓: true as requirement #1 of a function that is continuous at $x=5.$

IV. $f(5.001)$ exists ✗: The function’s continuity at $x=5$ tells us nothing about its behavior even a short distance away, including whether the function is even defined at $x = 5.001.$ Perhaps its domain ends at $x=5.000000001$; we simply have no idea, and so Statement IV does not have to be true.

Hence the true statements are I, II and III $\implies \quad\text{ (D)} \quad \cmark$
[hide solution]
Practice Problem #2
Let f be the function defined by \[f(x) = \begin{cases} \sqrt{x+2} & \text{for } -2 \le x \le 7 \\[8px] x -4 & \text{for } 7 \lt x \end{cases} \] Prove that f is, or is not, continuous at $x=7.$
Show/Hide Solution
To determine whether f is continuous or not, we simply step through the requirements and see whether the function satifies them all at $x=7$ (in which case it’s continuous there) or doesn’t (in which case it’s not). \[f(x) = \begin{cases} \sqrt{x+2} & \text{for } -2 \le x \le 7 \\ x-4 & \text{for } 7 \lt x \end{cases} \] 1. $f(7)$ exists, and equals (note that for $x=7$ we use the top equation) \[f(7) = \sqrt{7+2} = \sqrt{9} = 3 \quad \blacktriangleleft\] 2. To determine whether the (general) limit exists for this piecewise function at $x=7,$ we must determine the limit from the left and from the right separately: \begin{align*} \lim_{x \to 7^-}f(x) &= \lim_{x \to 7^-}\sqrt{x+2} = \sqrt{9} = 3 \\[8px] \lim_{x \to 7^+}f(x) &= \lim_{x \to 7^+}(x-4) = 3 \end{align*} Hence $\displaystyle{\lim_{x \to 7^-}f(x) = \lim_{x \to 7^+}f(x) = 3},$ and so the limit exists and $\displaystyle{\lim_{x \to 7}f(x) = 3} \quad \blacktriangleleft$
3. \[\lim_{x \to 7}f(x) = 3 = f(7) \quad \blacktriangleleft\] and hence f is continuous at $x=7. \quad \cmark$

The graph below shows how the two pieces of the function meet at $x=7,$ as we showed above. Graph of the piecewise function, showing how the square-root curve and the line meet at (7, 3))
[hide solution]
Practice Problem #3
Show that $f(x) = \dfrac{1}{x-1}$ is continuous on the interval $[2, 5].$
Show/Hide Solution
Recall that to show continuity on a closed interval $[a,b]$, we need to show (I) that f is continuous on the open interval $(a,b)$; (II) is continuous from the right at $x=a$, and (III) is continuous from the left at $x=b.$

I. Continuity on $(2, 5)$
1.$f(x) = \dfrac{1}{x-1}$ is defined everywhere except for $x=1,$ and so is defined on the interval $(2, 5)$.
2. Consider an input-value $x=c$ where $2 \lt c \lt 5.$ Then \[ \lim_{x \to c}f(x) = \lim_{x \to c}\frac{1}{x-1} = \frac{1}{c-1} \text{and so the limit exists}\] 3. \[\lim_{x \to c}f(x) = \frac{1}{c-1} = f(c) \] and hence f is continuous at every value $x=c$ in the open interval $(2, 5) \; \blacktriangleleft$.


II. Continuous from the right at $x=2$:
1. The function is defined at $x=2,$ and $f(2) = \dfrac{1}{2-1} = 1.$
2. \[\lim_{x \to 2^+}f(x) = \lim_{x \to 2^+}\frac{1}{x-1} = 1 \text{ and so exists}\] 3. \[\lim_{x \to 2^+}f(x) = 1 = f(2) \] Hence f is continuous from the right at $x=2. \; \blacktriangleleft$


III. Continuous from the right at $x=5$:
1. The function is defined at $x=5,$ and $f(5) = \dfrac{1}{5-1} = \dfrac{1}{4}.$
2. \[\lim_{x \to 5^-}f(x) = \lim_{x \to 5^-}\frac{1}{x-1} = \frac{1}{4} \text{ and so exists}\] 3. \[\lim_{x \to 5^-}f(x) = \frac{1}{4} = f(5) \] Hence f is continuous from the left at $x=5. \; \blacktriangleleft$


Having shown I, II and III, we have shown that f is continuous on the closed interval $[2, 5]. \; \cmark$
[hide solution]

The next few problems are typical exam questions.

Practice Problem #4
Let f be the function defined by \[f(x) = \begin{cases} x^2 & \text{for } x \le 2 \\[8px] -x + k & \text{for } 2 \lt x \end{cases} \] Find the value of k such that f is continuous at $x = 2.$

Open for interactive graph of the function, with a slider for $k$
You can use the slider beneath the graph to vary the value of k and see visually how setting it to a particular value makes the function continuous at $x = 2.$ This is just a helpful visual that you wouldn’t have on an exam; you still need to use the tools we’ve developed to find the answer and show your work as you would need to on a test.


Use the slider to change the value of k:

Currently k = 0
[collapse]
Show/Hide Solution
\[f(x) = \begin{cases} x^2 & \text{for } x \le 2 \\ -x + k & \text{for } 2 \lt x \end{cases} \] We know that for f to be continuous at $x=0$ it must meet the three conditions. The key one we’ll focus on is that the limit from the left must equal the limit from the right: \begin{align*} \lim_{x \to 2^-} f(x) &= \lim_{x \to 2^+} f(x) \\[8px] \lim_{x \to 2^-} x^2 &= \lim_{x \to 2^+} (-x + k) \\[8px] (2)^2 &= -(2) + k \\[8px] 4 &= -2 + k \\[8px] 6 &= k \quad \cmark \end{align*} That gives us our answer: for f to be continuous at $x=2,$ we must have $k = 6.$ The interactive graph above illustrates this result.

Although it’s not required, let’s step through the requirements for f to be continuous at $x=2,$ now with the value $k=6$ in place:
1. $f(0)$ is defined, and (using the relevant top equation for $x=0$) \[f(0) = 0^2 = 0 \quad \blacktriangleleft\] 2. For the limit to exist, the limit of this piecewise function from the left and from the right must be equal: \begin{align*} \lim_{x \to 2^-}f(x) = \lim_{x \to 2^-}x^2 &= 4 \\[8px] \lim_{x \to 2^+}f(x) = \lim_{x \to 2^+}(-x+6) &= -2 + 6 = 4 \end{align*} Since $\displaystyle{\lim_{x \to 2^-}f(x) = \lim_{x \to 2^+}f(x)= 4},$ the limit at $x=2$ exists and $\displaystyle{\lim_{x \to 2}f(x) = 4 \quad \blacktriangleleft} $
3. \[\lim_{x \to 2}f(x) = 4 = f(2) \quad \blacktriangleleft \] Therefore f, with $k=6,$ is continuous at $x=2.$
[hide solution]
Practice Problem #5
Find the values of b and c that make f continuous for all real values of x. \[f(x) = \begin{cases} \dfrac{x^2 - 9}{x-3} & \text{for } x \le 3 \\[8px] x^2 + bx + c & \text{for } 3 \lt x \le 4 \\[8px] 2x + c & \text{for } 4 \le x \end{cases} \]
Show/Hide Solution
We have two unknowns, b and c. Fortunately we need to ensure continuity at two x-values, which will give us two equations from which to solve for b and c. (Two equations and two unknowns: can do!)

For f to be continuous at $x=3$ we must have \begin{align*} \lim_{x \to 3^-}f(x) &= \lim_{x \to 3^+}f(x) \\[8px] \lim_{x \to 3^-}\frac{x^2 – 9}{x-3} &= \lim_{x \to 3^+}\left(x^2 + bx + c \right) \\[8px] \lim_{x \to 3^-}\frac{(x+3)(x-3)}{x-3} &= \;… \\[8px] \lim_{x \to 3^-} (x+3) &= \;… \\[8px] 3+3 &= (3)^2 + b(3) + c \\[8px] 6 &= 9 + 3b + c \\[8px] -3 &= 3b + c \quad\blacktriangleleft \end{align*} So that’s one of the two equations we need.

To generate the other, let’s look at $x=4$: \begin{align*} \lim_{x \to 4^-}f(x) &= \lim_{x \to 4^+}f(x) \\[8px] \lim_{x \to 4^-}\left(x^2 + bx + c \right) &= \lim_{x \to 4^+}(2x + c) \\[8px] (4)^2 + b(4) + c &= 2(4) + c \\[8px] 16 + 4b + c &= 8 + c \\[8px] 4b &= -8 \\[8px] b &= -2 \quad \cmark \end{align*} Ah, we weren’t expecting to find the value for b so easily: $b = -2.$

Let’s substitute that value for b into our equation marked $\blacktriangleleft$ above: \begin{align*} -3 &= 3b + c \quad \text{[We now know }b=-2]\\[8px] -3 &= 3(-2) + c \\[8px] -3 &= -6 + c \\[8px] 3 &= c \quad \cmark \end{align*} So those are our two values: \[b = -2 \quad \text{and} \quad c = 3 \; \cmark\] * * *
Just for completeness, let’s check to make sure those values are correct: \[f(x) = \begin{cases} \dfrac{x^2 – 9}{x-3} & \text{for } x \le 3 \\ x^2 – 2x +3 & \text{for } 3 \lt x \le 4 \\ 2x + 3 & \text{for } 4 \le x \end{cases} \] At $x=3$: \begin{align*} \lim_{x \to 3-}\frac{x^2 – 9}{x-3} &\overset{?}{=} \lim_{x \to 3^+}\left(x^2 – 2x +3 \right) \\[8px] \lim_{x \to 3-}(x+3) &\overset{?}{=} 3^2 – 2(3) +3 \\[8px] 3 + 3 &\overset{?}{=} 9 – 6 +3 \\[8px] 6 &= 6 \;\checkmark \end{align*} At $x=4$: \begin{align*} \lim_{x \to 4^-}\left(x^2 – 2x +3 \right) &\overset{?}{=} \lim_{x \to 4^+}(2x + 3) \\[8px] (4)^2 -2(4) + 3 &\overset{?}{=} 2(4) +3 \\[8px] 16 – 8 + 3 &\overset{?}{=} 8 + 3 \\[8px] 11 &= 11 \;\checkmark \end{align*} Yep, the limits match in both cases, so we’re correct: $b = -2$ and $c = 3. \quad \blacktriangleleft$
[hide solution]

On the next screen we’ll give names to the different types of discontinuities, and see how to “remove a discontinuity.” On the screen after that, we’ll discuss continuous functions (including providing a list of functions that simply are continuous on their domains, which is super-helpful to know).

For now, what questions or comments do you have about the material on this screen, or any other Calculus concepts? Please join the discussion over on the Forum!


The Upshot

  1. Informally, a function is continuous if you can draw its curve without lifting your pencil. Formally, a function f is continuous at $x = a$ if
    \[\lim_{x \to a}f(x) = f(a)\]
  2. To prove that a function is continuous at $x=a,$ we must show three things (which you should memorize):
    1. $f(a)$ exists: a is in the domain of f.
    2. $\displaystyle{\lim_{x \to a}f(x)}$ exists.
    3. $\displaystyle{\lim_{x \to a}f(x) = f(a)}$: the limit equals the function’s value at $x=a.$
  3. For one-sided continuity, we consider only the limit from the left or from the right:
    \begin{align*}
    \text{Continuous from the right at }x=a: &\quad \lim_{x \to a^+} = f(a) \\[8px] \text{Continuous from the left at }x=a: &\quad \lim_{x \to a^-} = f(a) \\[8px] \end{align*}
  4. A function is continuous on the open interval $(a, b)$ if it is continuous at every point in that interval. It is continuous on the closed interval $[a, b]$ if it is continuous on the open interval $(a, b)$ and also at the endpoints, such that
    \[\lim_{x \to a^+}f(x) = f(a) \quad \text{and} \quad \lim_{x \to b^-}f(x) = f(b)\]


Buy us a coffee We're working to add more,
and would appreciate your help
to keep going! 😊

We'd appreciate your feedback! 😊
How helpful?

What are your thoughts or questions?

Subscribe
I'd like to be
0 Comments
Inline Feedbacks
View all comments