Skip to main content

Section 2.4 Continuity

References.

We have seen that many common functions \(f\) like polynomials have the nice property that the limit as \(x\) goes to \(a\) can be evaluated by simple evaluation of \(f(a)\text{.}\) This property is useful in many ways, so we now give it a name, explore its meaning in terms of graphs and other nice consequences, and expand our list of such functions.

Definition 2.4.1. Continuity at one point.

The function \(f\) is continuous at \(\mathbf{a}\) if \(\displaystyle \lim_{x \to a} f(x) = f(a).\) (Note that this requires \(f\) to be defined at \(a\text{!}\))
If not, we say that \(f\) is discontinuous at \(\mathbf{a}\).

Definition 2.4.2. Continuity of a Function.

If a function is continuous at every point \(a\) in its domain, we call it simply continuous.
For example all polynomials are continuous. Indeed, all rational functions are continuous: continuity only fails at points where the denominator is zero, and those points are not in the domain!

Continuity at Some Places but not Others.

Sometimes we have to be very careful with this definition:
Consider the function
\begin{equation*} f(x) = \left\{ \begin{array}{rl} x^3, & x < 2 \\ x^2+2x, & x > 2 \end{array} \right. \end{equation*}
The function \(f\) is not continuous at \(x = 2\) due to being undefined there, even though the limit exists there: \(\displaystyle\lim_{x \to 2} f(x) = 8\text{.}\) On the other hand, this function is continuous at all \(x\) values in its domain, so it is continuous, despite this discontinuity outside its domain.

Removable Discontinuities.

There is also a remedy for the one discontinuity of \(f\) in the example above, which is to extend its definition to that one \(x\) value missing form its domain by setting \(f(2) = 8\text{.}\) This extended definition gives a function that is defined and continuous for all real \(x\) values, a bit more satisfying than having that gap in its domain.
If a function is discontinuous at some point \(x = a\) because it is not defined there, but \(\displaystyle \lim_{x \to a}f(x)\) exists, this discontinuity is called removable: the gap in the domain and the discontinuity can be removed by extending the domain of the function to include the value \(a\text{,}\) with \(f(a)\) given the value of this limit.
An important case is the formula for the slope m(x) of the secant line from \(P(a, f(a))\) to \(Q(x, f(x))\text{,}\) where the “missing value” at \(x=a\) is the tangent slope at that point.

Jump Discontinuities.

Another situation seen already is with the Heaviside function, where at some places, the two one-sided limits do not match up. Here is a more natural mathematical situation where this occurs:
The integer part function \(f(x) = \lfloor x \rfloor\) is defined as the largest integer less than or equal to \(x\text{,}\) so that \(\lfloor 3.9 \rfloor = 3\text{,}\) \(\lfloor 5 \rfloor = 5\text{,}\) \(\lfloor -1.2 \rfloor = -2\) (not \(-1\text{!}\)). This is just the familiar process of “rounding down”, like when you give your age in years.
  • Sketch the graph of \(y =\lfloor x \rfloor\text{.}\)
  • For which values \(a\) is this function continuous at \(a\text{?}\)
  • For which values \(a\) is this function discontinuous?
  • Is this function continuous?
The discontinuities seen here at each integer are called jump discontinuities: points where the function has one-sided limits from each side, but they are different.

Continuity From One Side Only.

In the example above, the limits from the right do equal the function value, so that side seems “continuous”. We talk about this situation as follows:

Definition 2.4.5. Right-continuity.

The function \(f\) is continuous from the right at \(\mathbf{a}\) or right-continuous at \(\mathbf{a}\) if its right-limit there exists and equals its value there: \(\lim_{x \to a^+} f(x) = f(a).\)
Similarly, left-continuity at \(\mathbf{a}\) means \(\lim_{x \to a^-} f(x) = f(a)\text{.}\)
For example, the integer part function is right-continuous at every \(x\) value, or simply right-continuous.

Loose Ends: Continuity on an Interval with Endpoints.

With a function like \(\sqrt{x(1-x)}\) whose domain \([0,1]\) includes end-points, continuity at an end-point is take to mean one-sided continuity from the only side that makes sense: from inside the interval.

Definition 2.4.6. Continuity on an interval.

A function \(f\) is continuous on an interval if it is continuous at each interior point (non-endpoint) and is also “continuous from the inside” at any endpoint that is in the interval: that is,
right-continuous at the left endpoint,
left-continuous at the right endpoint.
Thus \(f(x)=\sqrt{x(1-x)}\) can be shown to be continuous on interval \([0,1]\) using the Root Law for limits and the simple limit behavior of polynomials:
\(\displaystyle\lim_{x \to 0^+}\sqrt{x(1-x)} = \sqrt{0(1-0)} = f(0)\text{,}\)
\(\displaystyle\lim_{x \to 1^-}\sqrt{x(1-x)} = \sqrt{1(1-0)} = f(1)\text{,}\)
and for \(0 < a < 1\text{,}\) \(\displaystyle \lim_{x \to a}\sqrt{x(1-x)} = \sqrt{a(1-a)} = f(a)\text{.}\)

New Continuous Functions from Old Ones with Arithmetic.

The laws for limits of constant multiples, sums, difference products and quotients of functions also mean that if \(f\) and \(g\) are continuous at \(x=a\text{,}\) so are \(cf\) for any constant \(c\text{,}\) \(f+g\text{,}\) \(f-g\text{,}\) and \(fg\text{.}\)
\(f/g\) is also, so long as it even makes sense at \(a\text{:}\) \(g(a) \neq 0\text{.}\)
For example, continuity of the product at \(x=a\) requires \(\displaystyle \lim_{x \to a}f(x)g(x) = f(a)g(a)\text{,}\) and in fact
\begin{align*} \lim_{x \to a}f(x)g(x) & = \lim_{x \to a}f(x) \lim_{x \to a}g(x) \text{ (from the Product Rule for Limits),}\\ &= f(a) g(a) \text{ (from continuity of each function),} \end{align*}
as needed.
As seen in Section 2.3 on limit rules, these facts allow us to show that all polynomials are continuous, and rational functions are continuous at each number in their domains (avoiding divisions by zero), so they are also continuous.
Next, let us consider two other important ways to produce new functions, and whether these preserve continuity.

Continuity of An Inverse Function at a Point.

Inverses of continuous functions are also continuous. First:
Intuitively, there is no break in the graph of \(f\) at point \((a,f(a)) = (a,b)\text{,}\) so when the graph is flipped over the line \(y = x\) to get the graph of \(f^{-1}\text{,}\) there is no break in its graph at point \((b, f^{-1}(b)) = (b, a)\text{.}\)

Continuity of Inverse Functions.

When the above applies at each point in the domain of \(f\text{:}\)
For example, since a root function \(\sqrt[q]{x} = x^{1/q}\) is the inverse of the polynomial \(x^q\text{,}\) this shows that all root functions are continuous.

Continuity of Compositions.

The Root Law for limits allows us to show that any root of a continuous function, \([f(x)]^{1/q}\text{,}\) is continuous. This is one case of continuity of a composition.
To see this more generally, we need the last main law of limits, which could not be stated in Section 2.3 because it needs the idea of continuity:
Loosely speaking, the limit operation can move from outside function \(f\) to inside it so long as \(f\) is continuous at the relevant point.
This is intuitive because for \(x\) near \(a\text{,}\) \(g(x)\) is near \(b\text{,}\) so the argument \(g(x)\) of \(f\) in \(f(g(x))\) is near \(b\text{,}\) and continuity of \(f\) at \(b\) says that the value of \(f(g(x))\) is close to \(f(b)\text{.}\) This shows that composition respects continuity, but we must be careful about the domain, since with
\begin{equation*} (f \circ g)(x)=f(g(x)), \end{equation*}
\(f\) has a different domain than \(g\text{:}\)
This is just the above result for the case where \(b = g(a)\text{.}\)
Putting this together over the whole domain of \(g\text{:}\)

Continuity of Algebraic Functions.

Combining all these rules gives the continuity of all functions built up from polynomials with arithmetic, powers, roots and inverses, giving all algebraic functions, and some more besides.
The next question is whether common transcendental (non-algebraic) functions are continuous.

Continuity of Trigonometric Functions.

With trigonometric functions, radian angle \(\theta\) is the distance along the unit circle anti-clockwise from point \(P(1,0)\) to point \(Q(\cos\theta,\sin\theta)\text{.}\) (Negative \(\theta\) means going clock-wise by distance \(|\theta|\text{.}\))
Thus the \(x\)-coordinate \(\cos\theta\) of \(Q\) is not further than distance \(|\theta|\) from the \(x\)-coordinate \(1\) of \(P\) and likewise for the \(y\)-coordinates, \(\sin\theta\) and \(0\text{:}\)
\begin{equation*} |\cos\theta - 1| < |\theta|, \; |\sin\theta - 0| = |\sin\theta| \leq |\theta|. \end{equation*}
A simple use of the Squeeze Theorem shows that
\begin{equation*} \lim_{\theta \to 0} \cos \theta = 1 = \cos 0, \quad \lim_{\theta \to 0} \sin \theta = 0 = \sin 0, \end{equation*}
so these functions are continuous at zero. Alternatively, the definition of limits in Section 2.4 can be applied, with \(\delta = \epsilon\) in each case.
Then use of the trigonometric sum rules allows us to show that these functions are continuous everywhere.
With that, all other standard trigonometric functions like \(\tan \theta\) are continuous everywhere that they are defined, since they all come from sines and cosines by quotients like \(\tan \theta = \displaystyle \frac{\sin \theta}{\cos \theta}\text{,}\) \(\sec \theta = \displaystyle \frac{1}{\cos \theta}\text{,}\) etc.
(Again, \(\tan\) is not continuous at \(\theta=\pi/2, -\pi/2\) etc., but those points are not in its domain, so do not really matter!)

Continuity of Exponentials and Logarithms.

We defined the exponential function \(a^x\) for all real \(x\) using limits of rational powers of \(a\text{,}\) and this naturally makes the limits in the definition of continuity match up:

Continuity of all the Familiar “Elementary Functions”.

In summary, it seems that every familiar function given by a formulas in terms of polynomials, roots, powers, trigonometric, exponential and logarithmic functions, and inverses and compositions of these is continuous.
These functions are collectively known as elementary functions.
The only failures of continuity that we have seen so far are:
  • at gaps in the domain due to division by zero, and
  • at points where the “formula” for the functions changes, introducing a jump: for example, rounding in the nearest integer function, or “turning on the power” in the Heaviside function.

Solving Equations with Continuous Functions.

One very important feature of continuous function is that there are no “gaps” in the graph, just as there are no “gaps” between the real numbers. (There are gaps between the rational numbers: the places where irrational numbers go.)
For example, if we deal only with rational numbers, the graph of \(f(x)=x^2\) does not intersect the horizontal line \(x=2\text{:}\) it comes very close above and below that line, but no rational number \(x\) gives \(x^2=2\text{.}\)
On the other hand, the graph of \(f(x)=x^2\) for all real numbers \(x\) does intersect that line, at \(x=\sqrt{2}\) and also \(x=-\sqrt{2}\text{.}\)

Defining Inverse Functions, Like Logarithms.

This absence of gaps in the range of an exponential function was useful to define logarithmic functions, because with a function like \(f(x)=a^x\text{,}\) it is ensured that for every positive number \(y\text{,}\) there is a value \(x\) that solves \(a^x=y\text{,}\) and this solution is what we call \(x=\log_a y\text{.}\) This shows that \(\log_a\) is defined for domain \((0,\infty)\text{.}\)

The Intermediate Value Theorem.

The sort of equation solving used to get the inverse of a function is always possible for a continuous function: A common case is that whenever a continuous function takes both positive and negative values on some interval, it has a root there too: \(f(x)=0\) has a solution.
Show that the equation \(\cos x = x\) has a solution.
Solution.
  1. First, any zero of the function \(f(x)=x-\cos x\) will be a solution.
  2. We know that \(f(0) = -1\) and \(f(2) = 2 - \cos 2 \geq 2 - 1 = \text{,}\) so \(f\) changes sign on interval \([0,2]\text{.}\)
  3. Also, the function \(f\) is continuous on this interval.
  4. Thus for some number \(c\) between 0 and 2, \(f(c)=c-\cos c = 0\text{,}\) so \(c=\cos c\text{.}\)

Exercises Exercises

Study Calculus Volume 1, Section 2.4 2 , Exercises 133, 137, 141, 147, 150, 151, 154, 157, 163, and 165.
openstax.org/books/calculus-volume-1/pages/2-4-continuity
openstax.org/books/calculus-volume-1/pages/2-4-continuity