What does continuity mean? In pre-calculus classes, we often first hear something like “you can draw the graph without picking up your pencil”. This is a good guide to start with for a formal definition: its clearly capturing some property that is easy to check by visual inspection! But it’s not precise: terms like “you” and “pencil”, as well as modal phrases like “can draw” are nowhere to be found in the axioms of ordered fields! How can we say the same thing, using words we have access to?
Epsilons and Deltas
First, a function is an input-output machine, so we should rephrase things in terms of inputs and outputs. When a graph makes a jump (where you’d have to pick up your pencil), the output changes a lot even when the input barely does. Thus, not having to pick up your pencil means you change the input by a little bit, the output changes by a little bit.
This is totally something we can make precise! A good start is by giving names to things: we want to say for any change in the input smaller than some , we know the output cant change that much: maybe its maximum is some other small change :
Definition 16.1 (Continuity with ) A function is continuous at a point in its domain if for every there is some threshold where if is within of , then is within of . As a logic sentence:
A function is continuous on a set if it is continuous at for each . A function is continuous if it is continuous on its domain.
Working with this Definition
This definition looks a lot like the sequence definition, at least in terms of the order of the quantifiers. And so we can work with it the same way: playing the “- game” instead of the - game.
Example 16.1 Any constant function is continuous at every real number .
To prove this, we choose arbitrary , and observe that for any , , which is less than . Thus, for any (and if we want to be specific, choose say ), if then .
Example 16.2 The function is continuous at every real number .
Here’s the scratch work: note that if then is constant, and we are done by the previous example. So, we may assume . Given an aribtrary , choose , and note that . If this means , so we may choose .
Remark: our value of is allowed to depend on , as well as properties of our function (like the here)
While the definition is nice in that it looks like the sequence definition, we still end up having to play the game with every argument. Indeed, while some functions are well-suited these, for other relatively simple looking arguments, picking the right actually turns out to be a bit of work!
Example 16.3 The function is continuous.
Scratch Work: Given ; we will prove is continuous at (here we do the case ; it is only a small modification for : can you complete it?) Start by choosing arbitrary . We seek a such that when , we can ensure . Using difference of squares, for our future value of . To make further progress, let’s decide to always choose a value of which is (if you originally had a larger , of course taking a smaller value will also work, so its no trouble to choose a maximal size). Then means is always within of , so can never be bigger than . Thus, can never be bigger then , or so we know
For this to be less than , we can solve for , and set . Writing a rigorous proof by essentially starting with this claimed value for and “working backwards” confirms this works.
Like any definition, its good after seeing a few examples to also turn and look at non-examples:
Example 16.4 The step function is discontinuous at , but is continuous at all other real numbers.
At , we prove discontinuity by fixing , and showing for any there are points within of whose values under differ from by more than . Indeed - we can just take : this is positive, and , but whereas , so . However, for any nonzero , is continuous at . Fixing an arbitrary , we can take , and note that being within of implies has the same sign as (either positive or negative). Thus , so which is certainly less than .
Thus, a function with a jump in it is discontinuous right at the jump, as we expect. This shows its possible for a function to be discontinuous at a single point, but things can get much stranger!
Example 16.5 The characteristic function of the rational numbers is discontinuous everywhere.
Setting , note that proving discontinuity at means showing that for *any$ we can find an within of where differs from by more than . The proof breaks into two cases depending on the (ir)rationality of . First, for irrational , by the density of rationals we may for any find a rational number with , so . But, since is irrational and since its rational, thus . The case of rational is similar, but now we use the density of the irrationals to find an appropriate .
We saw above a function that is discontinuous at a single point, and then one that is discontinuous everywhere. What’s harder to imagine, is a function that is continuous at a single point. Try thinking about what this might mean!
Exercise 16.1 Show that the following function is continuous at and discontinuous everywhere else:
There are even stranger functions out there: for instance, the Thomae function is continuous at the irrational numbers, and discontinuous at every rational.
As an example of proving something using continuity, we prove the useful fact that when an continuous function is nonzero at some point, it actually stays nonzero for a little bit on each side.
Proposition 16.1 (Nonzero on a Neighborhood) If is continuous, then there is a small open interval about where is nonzero.
Proof. Let with , and set . By continuity, there is some such that if we know . Unpacking this, for all we know
And thus
If is positive, then the lower bound here is which is still positive, so is always positive in the interval. And, if is negative, the upper bound here is which is still negative: thus is always negative in the interval.
Continuity and Sequences
We spent a lot of time working with sequences so far, so it would be nice if we could leverage some of that knowledge as more than just analogy. And indeed we can! We give the formal result below, but pause to develop some intuition:
Theorem 16.1 (Sequences and Continuity) Let be a real function, and a point of its domain. Then is continuous at if and only if for every sequence in the domain wtih , we have .
This theorem is an equivalence of definitions or an if-and-only-if result, so the proof requires two parts: first we show that continuity implies sequence continuity, and then we show the converse.
Proof (Continuity Implies Sequence Continuity). Let be continuous at , and an arbitrary sequence converging to . We wish to show the sequence converges to . Choosing an , we use the assumed continuity to get a where implies that .
But since , we know there must be some such that for we have : thus for this same we have .
Putting this all together, this is just the definition of convergence for the sequence to : starting with we got an which for we can guarantee . So we are done.
Proof (Sequence Continuity Implies Continuity). Here we prove the contrapositive: that if is not continuous at then it is also not sequence continuous there.
If is not continuous at then there is some where for every we can find points within of where is more than away from . From this we need to somehow produce a sequence, so we will take a sequence of such ’s and for each pick some such bad point .
For example, if we let then call the point with but . Doing this for all produces a sequence where And so by the squeeze theorem we see that converges, and its limit is . But we also know (by our choices of ) that for every element of this sequence |f(x_n)-f(a)|>$, so there’s no way that converges to .
Thus, we’ve shown by example that our function is not sequence continuous at , as required.
When working with this definition of continuity, its important to remember that we need to check for all sequences . If it fails for any individual sequence, that is enough to show the function is not continuous at that point. Thus when proving continuity we will always start with let be an arbitrary sequence converging to , and make use of convergence theorems to help us (since we cannot know the particular sequence), whereas for proving discontinuity all we need to do is produce a specific example sequence that fails.
With this definition, we can bring all of our theory on limits and put it to work. We see many of these benefits below; here we pause merely to re-do a single example for illustrative purposes:
Example 16.6 The function is continuous on all of .
Let be arbitrary, and choose an arbitrary sequence of real numbers with (we know at least one such sequence exists since we have proven every real number is the limit of a sequence of rationals). By the limit theorem for products, since we know . And as , we can rewrite this as . Since was arbitrary, this holds for all such sequences, and so is continuous at . But since was arbitrary, is continuous on the entire real line.
Building Continuous Functions
Because we have an equivalent characterization of continuity in terms of sequence convergence, and we have many theorems about this, we can use our characterization to rephrase these as results about continuity.
Proposition 16.2 (Continuity of Constant Multiples) If is continuous at and is a constant, then the function is continuous at .
Proof (Using ). First note if we are done as is a constant function. Otherwise, let : since is continuous at there exists a such that implies . But this implies So implies , and is continuous at .
Proof (Using Sequences). Let be arbitrary, and a sequence converging to . Then by the limit theorem for multiples, . Rephrasing this in terms of the function , this just says that so is continuous at .
Theorem 16.2 (Continuity and the Field Operations) Let be functions which are continuous at a point . Then the functions and are all continuous at . Furthermore if then is also continuous at .
Proof. We prove the case for sums, and leave the rest as an exercise. Let be any two continuous functions and let be a point in their domains. Let be any sequence converging to . Since is continuous we know that and similarly by the continuity of , . Thus by the limit theorem for sums, the sequence is convergent, with So, is continuous at . Since was arbitrary, we see that is continuous at every point of its domain. The same argument applies for subtraction, multiplication, and division using the respective limit theorems for sequences.
Exercise 16.2 Prove the remaining “continuity theorems”.
Exercise 16.3 (Continuity of Polynomials) Prove that every polynomial is a continuous function on the entire real line. Hint: prove is continuous for each by induction. Then prove the result for polynomials by induction on their degree!
Exercise 16.4 (Continuity of Rational Functions) A rational function is a quotient of polynomials . Prove that every rational function is continuous, on every point of its domain.
One of the most important operations for functions is that of composition: if and then the function is defined as . More generally, so long as the domain of is a subset of the range of , the composition is well defined.
Theorem 16.3 (Continuity of Compositions) Let be functions such that is continuous at , and is continuous at . Then the composition is continuous at .
Proof. Let be an arbitrary sequence converging to : we wish to show that . Since is continuous at we see immediately that is a convergent sequence with . And now, since is assumed to be continuous at and is a sequence converging to this point, we know as required.
Another limit theorem we had was the limit theorem for the square root: which translates directly to a continuity theorem as well!
Theorem 16.4 (Continuity of Roots) The function is continuous on .
Proof. We actually already proved this, as a limit theorem about the square root! CITE states that if and is any sequence of nonnegative numbers converging to , then . Thus is continuous at , and as is an arbitrary nonnegative value, its continuous on its domain.
Corollary 16.1 (Continuity of Absolute Value) The absolute value satisfies for all real . This is a composition of two continuous functions, and thus is continuous.
The same is true for roots, though we do not stop to prove it here, you may wish to for practice! This is a special case of a more general result on the continuity of inverse functions (as the square root is the inverse of )
Theorem 16.5 (Continuity of Inverse Functions) Let be a continuous invertible function for bounded subsets. Then is continuous.
Proof (By Contradiction). Assume for the sake of contradiction that is continuous and invertible with but is not continuous. Then there would be some sequence convergent sequence where .
This sequence lies in which is bounded, so it contains a convergent subsequence due to Bolzano Weierstrass. Its further possible to select such a subsequence that converges to some value (if this were impossible, all convergent subsequences would converge to , and so our sequence would have converged to this value!)
Now we use the fact that is continuous. Since , we see , and since is the inverse of , this just means that . But since is invertible, its , so the fact that means that . That is, we have found a subsequence of , which does not converge to .
But this implies that the sequence itself does not converge to (else all subsequence would converge to !) and this is a contradiction, as we assumed at the very start. Thus, is actually continuous, as desired.
We can apply this to functions we care about like powers, to prove the continuity of roots.
Corollary 16.2 The function is continuous on the positive reals.
Proof. Let , we want to show is continuous at . So, we need to choose bounded sets for our domains, to make sure things work. Taking will do, as it contains , and then , so is an invertible function from to . Its continuous, so its inverse is continuous, meaning is continuous on the interval which contains . Thus its continuous at , and as was an arbitrary positive real number,
Exercise 16.5 Our argument above showed is continuous at all positive inputs. Show its continuous at zero.
Note to students! If you can think of a better proof of this, (especially one that doesn’t have this awkward boundedness/bolzano weierstrass stuff) let me know. If its slick enough, I’ll replace the proof in the textbook, and thank you in a footnote of the future editions!
The combination of these theorems allows us to prove many complicated functions are continuous, that would otherwise have been quite difficult directly from the definition!
Example 16.7 The following function is continuous on the entire real line.
To prove it, we work from inside out, like we do for using the limit laws. Starting with the numerator, we see is continuous as its a polynomial, so is continuous as the composition of two continuous functions, and is continuous as its the sum of two continuous functions. For the denominator, we similarly start with the continuity of , compose with to get the continuity of , then compose with to get is continuous, add the constant function 1 (which is continuous) take the cube root (composing with the continuous function ) and finally add the continuous function 1 once more. So, the numerator and denominator are continuous. Finally, the denominator is strictly positive for all (hence nonzero), so the quotient is continuous.
Exercise 16.6 (Continuity of Max and Min) Prove that for any , we have Intuitively, notice is the midway point between and , and is half the distance between them. So is the midway point plus half the distance, so its the larger of the two. But give a rigorous argument, perhaps by cases.
Use this to conclude that if are two continuous functions then is also continuous. Propose and prove a similar formula for the minimum, and show that is continuous in .
Function Limits
A related but slightly different concept is the limit of a function. We include this here as the definition and techniques ties very closely to those for continuity; we will have use for this material when we introduce the derivative, and in other cases where we need to understand the behavior of a function near a point, without actually being able to compute the function’s value at that point (perhaps, that point is outside the functions’ domain).
Definition 16.2 (Limits of Functions) Let and be a limit point of . Then we write if for every there is a such that if and then .
One can alternatively phrase this in terms of sequences:
Exercise 16.7 Prove the following definition is equivalent to : Given any sequence in with for all , implies that .
Example 16.8
Let be any sequence converging to , for which for all . Then since the denominator of is never zero, and we can simplify with algebra:
Thus, for all we have
Since was arbitrary, this holds for all sequences and
We will be most interested in taking the limit of functions in cases where things are not actually define at like the example above: the most important example being the derivative, defined as the limit . However a good sanity check with a new definition is to see it performs as expected in known situations
Theorem 16.6 (Limits of Continuous Functions) If is continuous at , then .
Proof. Let be a sequence converging to , but not equal to at any term. Since is continuous at , we know the sequence converges to . Thus by the sequence definition of function limits .
As an exercise, re-prove this result using the definition.
One-Sided Limits
The definition of function limit requires understanding all sequences limiting to but not equal to . In applications, its often important to consider more restricted limits, looking only at what happens when we approach from above or from below.
Definition 16.3 (Left- and Right-Sided Limits) Let be a function
Similarly to above, these definitions have sequence counterparts (prove this, as an exercise):
Definition 16.4 Let be a function. Then if for every sequence with we have . Similarly if for every with we have .
Exercise 16.8 (Limit Exists when Both Sides Agree) Let be a function defined on an interval containing (but perhaps not at ). Then exists if and only if both and both exist, and in this case is equal to their common value.
Exercise 16.9 (One Sided Limits of Monotone Functions) Let be a bounded monotone function on the interval . Then both of the one sided limits exist Hint: show they are the inf and sup of
This proves useful in many cases where we know only that our function is monotone, but cannot compute its values. For us, the most important application is Proposition 24.1 where we show exponential functions are differentiable, when we have only assumed they are continuous.