Skip to main content
\(\newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\R}{\mathbb{R}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section5.4Continuous Functions

Subsection5.4.1Continuity

Recall our definition of continuity for a function at a single point.

Definition5.4.1Continuity at a Point

A function \(f\) is continuous at \(a\) if

\begin{equation*} \lim_{x \to a} f(x) = f(a). \end{equation*}

The single equation captures the full definition because for the equation to be true, the limit must exist and the value of the function must exist. Also, recall that the function is right-continuous if the limit comes from the right (\(x \to a^+\)) and left-continuous if the limit comes from the left (\(x \to a^-\)).

These ideas allow us to define what we mean by saying that a function is continuous on an interval.

Definition5.4.2Continuity on an Interval

A function \(f\) is continuous on an interval \((a,b)\) if \(f\) is continuous at every point \(x \in (a,b)\text{.}\) We can include an endpoint if the limit statement is true coming from within the interval. That is, we include \(a\) if

\begin{equation*} \lim_{x \to a^+}f(x)=f(a) \end{equation*}

and we include \(b\) if

\begin{equation*} \lim_{x \to b^-}f(x)=f(b). \end{equation*}

There are two important theorems that describe what we know about functions that are continuous on an interval. The Extreme Value Theorem guarantees that any function that is continuous on a closed interval has a highest and lowest point within that interval. The Intermediate Value Theorem guarantees that a function that is continuous on a closed interval can not skip over any values between its values at the endpoints. The proofs for both of these theorems require advanced methods not taught at this level. We treat them essentially as axioms, statements that are true without proof.

If a function is not continuous on \([a,b]\text{,}\) then it does not necessarily have a maximum or minimum value. One way that this might happen is if \(f\) has a vertical asymptote within the interval. In that case, the values of \(f\) would be unbounded. Another way that this might happen is that \(f\) is bounded by what would be a maximum (or minimum) value but just doesn't reach it because of a sudden jump.

Example5.4.4

Consider the function defined piecewise as

\begin{equation*} f(x) = \begin{cases} \frac{1}{x^2}, & x \ne 0, \\ 0, & x=0. \end{cases} \end{equation*}

This function has a non-removable discontinuity at \(x=0\text{,}\) corresponding to a vertical asymptote. Because the formula has \(x^2\) in the denominator (always positive), we have

\begin{equation*} \lim_{x \to 0} f(x) = +\infty. \end{equation*}

This function is unbounded on the interval \([-1,1]\) and has no maximum. It does have a minimum at \(f(0)=0\) since that is below the rest of the graph.

<<SVG image is unavailable, or your browser cannot render it>>

Example5.4.6

Consider the function defined piecewise as

\begin{equation*} f(x) = \begin{cases} x^2, & -1 \lt x \lt 1, \\ \frac{1}{2}, & x = \pm 1. \end{cases} \end{equation*}

This function has a removable discontinuities at \(x=\pm 1\text{,}\) where the limits are 1 but the values are \(\frac{1}{2}\text{.}\) In this case, \(f\) is continuous on \((-1,1)\) but not on \([-1,1]\text{.}\) The maximum value should have been \(y=1\text{,}\) but the graph never reaches that value because of the discontinuity. The function does have a minimum value at \(f(0)=0\text{.}\)

<<SVG image is unavailable, or your browser cannot render it>>

Example5.4.8

Consider the function defined piecewise as

\begin{equation*} f(x) = \begin{cases} x^2, & -1 \lt x \le 1, \\ 2, & x = -1. \end{cases} \end{equation*}

This function has a removable discontinuity at \(x=-1\text{.}\) In this case, \(f\) is continuous on \((-1,1]\) but not on \([-1,1]\text{.}\) In spite of the discontinuity at \(x=-1\text{,}\) this function has a maximum value \(f(-1)=2\) because that value is above every other point in the interval.

<<SVG image is unavailable, or your browser cannot render it>>

The previous example is included to emphasize that a theorem gives conditions that guarantee something is true. But those conditions are not always required. The extreme value theorem gives conditions that guarantee a function will have a maximum value. There are no exceptions for a continuous function on a closed interval to have both maximum and minimum values. But there are discontinuous functions that have them as well. It is just that there are also discontinuous functions that do not have extreme values.

The Intermediate Value Theorem guarantees that the graph of \(y=f(x)\) intersects every horizontal line between \(y=f(a)\) and \(y=f(b)\) at least once for values of \(x\) between \(a\) and \(b\text{.}\) Because continuity is essentially connectedness, the only way for the graph to go from \(y=f(a)\) to \(y=f(b)\) is to cross through all intermediate values. A discontinuous function has the ability to jump across values without touching them.

Example5.4.11

Consider the function defined piecewise as

\begin{equation*} f(x) = \begin{cases} -1, & x \lt 0, \\ 0, & x = 0, \\ 1, & x \gt 0. \end{cases} \end{equation*}

This function has a jump discontinuity at \(x=0\text{,}\) and is otherwise constant. If we consider the interval \([-1,1]\text{,}\) the values at the endpoints are \(f(-1)=-1\) and \(f(1)=1\text{.}\) Except for \(y=0\text{,}\) the function \(y=f(x)\) has no solutions for \(-1 \lt y \lt 1\) because of the jump.

<<SVG image is unavailable, or your browser cannot render it>>

The Intermediate Value Theorem allows us to know that a continuous function has a solution to an equation within a particular interval. If the interval is small, we have an approximation to the value of the solution. We say that the interval brackets the solution. Finding successively smaller bracketing intervals allows us to approximate the root to any needed precision. The Intermediate Value Theorem guarantees this works for continuous functions.

Example5.4.13

The function \(f(x)=x^3-x-3\) is continuous because it is a polynomial. Because \(f(1)=-3\) and \(f(2)=3\text{,}\) we know that \(f(x)\) must pass through every \(y\)-value between -3 and 3 for at least one value of \(x\) in the interval \((1,2)\text{.}\) In particular, if we are solving \(f(x)=0\text{,}\) since \(y=0\) is between \(f(1)=-3\) and \(f(2)=3\text{,}\) we know that there is a solution \(x\) bracketed by the interval \([1,2]\text{.}\)

<<SVG image is unavailable, or your browser cannot render it>>

If we find a smaller interval, then we can know more precisely where the root occurs. In particular, since \(f(1.6)=-0.504\) and \(f(1.7)=0.213\) and \(y=0\) is between those values, the Intermediate Value Theorem guarantees that our continuous function has a root bracketed by the interval \([1.6, 1.7]\text{.}\)

Subsection5.4.2Definite Integrals and Average Value

When we studied the definite integral, we learned that continuity implies integrability. However, a discontinuous function might still be integrable. For example, the definite integral of a piecewise continuous function with a finite number of jump discontinuities can be computed using the splitting property. The total definite integral would be equal to the sum of the definite integrals on each of the subintervals.

Continuity does guarantee something stronger than integrability. It guarantees that the function attains its average value over an interval. To make this precise, we first need to define the average value.

Definition5.4.15Average Value of a Function

The average value of a function \(f\) on an interval \([a,b]\text{,}\) denoted \(\langle f \rangle_{[a,b]}\text{,}\) is defined as

\begin{equation*} \langle f \rangle_{[a,b]} = \frac{1}{b-a} \int_{a}^{b} f(x) \, dx, \end{equation*}

so long as \(f\) is integrable on \([a,b]\text{.}\)

The average value is defined as the value of a constant function that has the same definite integral over the interval:

\begin{equation*} \int_{a}^{b} \langle f \rangle_{[a,b]} \, dx = \langle f \rangle_{[a,b]} \cdot (b-a) = \int_{a}^{b} f(x)\, dx. \text{.} \end{equation*}
Example5.4.16

The figure below illustrates a simple function \(f(x)\) defined on the interval \([0,5]\text{,}\)

\begin{equation*} f(x) = \begin{cases} 3, & 0 \le x \lt 1, \\ 5, & 1 \le x \lt 3, \\ -1, & 3 \le x \le 5. \end{cases} \end{equation*}

<<SVG image is unavailable, or your browser cannot render it>>

The definite integral equals the sum of the signed areas,

\begin{equation*} \int_0^5 f(x) \, dx = 3 \cdot 1 + 5 \cdot 2 + -1 \cdot 2 = 11. \end{equation*}

The average value is equal to this definite integral divided by the width of the interval,

\begin{equation*} \langle f \rangle_{[0,5]} = \frac{1}{5} \int_{0}^5 f(x)\,dx = \frac{11}{5}. \end{equation*}

<<SVG image is unavailable, or your browser cannot render it>>

Because \(f\) is continuous on \([a,b]\text{,}\) the Extreme Value Theorem guarantees that \(f\) attains a minimum value \(f(x_{\min})\) and a maximum value \(f(x_{\max})\) so that \(f(x_{\min}) \le f(x) \le f(x_{\max})\) for all \(x \in [a,b]\text{.}\)

The average value \(\langle f \rangle_{[a,b]}\) must be between the minimum and maximum values. The Integral Bounds theorem guarantees

\begin{equation*} f(x_{\min}) (b-a) \le \int_{a}^{b} f(x) \, dx \le f(x_{\max}) (b-a) \end{equation*}

which then implies

\begin{equation*} f(x_{\min}) \le \langle f \rangle_{[a,b]} \le f(x_{\max}). \end{equation*}

By the Intermediate Value Theorem with the interval with end points \(x_{\min}\) and \(x_{\max}\) (we don't know which is on the left/right), there must be some value \(c\) between these points, and so \(c \in (a,b)\text{,}\) for which

\begin{equation*} f(c) = \langle f \rangle_{[a,b]}. \end{equation*}

In the previous example, \(f\) was not continuous and we can see that the graph \(y=f(x)\) did not intersect the constant value \(\langle f \rangle_{[0,5]}\text{.}\) The Mean Value Theorem for Integrals guarantees that when the function is continuous, the constant function using the average value must intersect the graph \(y=f(x)\text{.}\)

Example5.4.20

The function \(f(x)=x^2\) is continuous everywhere. The average value on the interval \([-1,2]\) can be found using the elementary accumulation formula for a quadratic rate and the splitting property.

\begin{align*} \langle f \rangle_{[-1,2]} &= \frac{1}{2--1} \int_{-1}^{2} x^2 \, dx \\ &= \frac{1}{3} \Big( \int_0^2 x^2 \, dx - \int_0^{-1} x^2 \, dx \Big) \\ &= \frac{1}{3} \Big( \frac{1}{3}(2^3) - \frac{1}{3}(-1)^3 \Big) = \frac{1}{3}\Big(\frac{8}{3} + \frac{1}{3}\Big) = 1 \end{align*}

A figure showing the graphs \(y=f(x)=x^2\) and \(y=\langle f \rangle_{[-1,2]} = 1\) is shown below. The Mean Value Theorem predicted the existence of a point \(c \in (-1,2)\) where \(f(c)=\langle f \rangle_{[-1,2]}=1\text{,}\) which we can see occurs at \(c=1\text{.}\)

<<SVG image is unavailable, or your browser cannot render it>>

The Mean Value Theorem for Integrals also provides the justification for the Monotonicity Test for Accumulation Functions.

Consider any two points \(c_1, c_2 \in [a,b]\) with \(c_1 \lt c_2\text{.}\) Because \(A(x)\) is an accumulation function, by the splitting property of definite integrals,

\begin{equation*} A(c_2) - A(c_1) = \int_{c_1}^{c_2} f(x) \, dx. \end{equation*}

On the other hand, because \(f\) is continuous, the Mean Value Theorem guarantees the existence of a point \(c \in (c_1,c_2)\) such that

\begin{equation*} A(c_2)-A(c_1) = \int_{c_1}^{c_2} f(x)\, dx = f(c)\cdot(c_2-c_1). \end{equation*}

Now assume that \(f(x) \gt 0\) for all \(x \in (a,b)\text{.}\) Then \(f(c) \gt 0\) and \(c_2-c_1 \gt 0\text{,}\) guaranteeing that \(A(c_2)-A(c_1) \gt 0\text{.}\) That is, \(A(c_2) \gt A(c_1)\text{.}\) This is what is needed to show that \(A\) is increasing.

Next assume that \(f(x) \lt 0\) for all \(x \in (a,b)\text{.}\) Then \(f(c) \lt 0\) while \(c_2-c_1 \gt 0\text{,}\) guaranteeing that \(A(c_2)-A(c_1) \lt 0\text{.}\) That is, \(A(c_2) \lt A(c_1)\text{,}\) which shows that \(A\) is decreasing.

Finally assume that \(f(x) = 0\) for all \(x \in (a,b)\text{.}\) Then \(f(c) = 0\text{,}\) implying that \(A(c_2)-A(c_1) = 0\text{.}\) That is, \(A(c_2) = A(c_1)\text{,}\) which shows that \(A\) is constant.