18  Important Theorems

Highlights of this Chapter: we prove two foundational results about continuous functions whose proofs have several steps in common:

  • Continuous Functions are determined by their values on dense sets.
  • The Extreme Value Theorem: a continuous function achieves a max and min on any closed interval.
  • The Intermediate Value Theorem: a continuous function must take every value between f(a) and f(b) on the interval [a,b].

Just like we have seen various ‘proof styles’ for sequences (recurrent themes in proofs, like ‘an ε/2 argument’) one of the biggest takeaways of this section is a proof technique for working with continuous functions. It has three steps, summarized below:

This is to vague on its own to be useful, but in reading the proofs of the boundedness theorem, the extreme value theorem, and the intermediate value theorem below, look out for these three recurrent steps.

18.1 Dense Sets

Functions determined by values on dense set

Lemma 18.1 If f is a continuous function such that f(r)=0 for every rational number r, then f=0 is the zero function.

Proof. Let f be such a function, and aR any real number. Then there is a sequence rn of rational numbers converging to a. Given that f is zero on all rationals, we see that f(rn)=0 for all n. Thus f(rn) is the constant zero sequence, and so its limit is zero: limf(rn)=lim0=0 But, since f is assumed to be continuous, we know that we can move the limit inside of f: 0=limf(rn)=f(limrn)=f(a) Thus f(a)=0, and since a was arbitrary, we see f is the constant function equal to zero at all real numbers.

Proposition 18.1 (Equal on Rationals Equal) Let f,g be continuous functions such that for all rQ they are equal: f(r)=g(r). Then in fact, f=g: for all xR, f(x)=g(x)

Proof. Since f and g are continuous, the function h=fg is continuous using the theorems for field operations. And, since f(x)=g(x) for all rational x, we see h(x)=0 on the rationals. Thus, by ?prp-zero-on-rationals, h itself must be the zero function on all of R. Thus for every x, h(x)=f(x)g(x)=0, or rearranging, x,f(x)=g(x)

This has a the pretty significant consequence that if we have a function and we know it is continuous, then being able to calculate its values at the rational numbers is good enough to completely determine the function on the real line. In particular, this can be used to prove various uniqueness results: you can show a certain function is uniquely defined if you can prove that its definition implies (1) continuity and (2) determines the rational points (or more generally, the values on a dense set).

Theorem 18.1 (Equal on a Dense Set Equal) Continuous functions are determined by their values on a dense subset of their domains: if f,g:XR and DX is dense with f=g on D, then f(x)=g(x) for all xX.

Exercise 18.1 Prove this (following the ideas for the special case of rationals)

We will use this property in understanding exponential functions (where their value at rational numbers are determined by powers and roots) and trigonometric functions (whose values on certain dyadic multiples of π are determined by the half-angle identities.)

There are many useful theorems of this type, that check a property of a function on a dense set and use it to conclude the same property holds generally. We give two more examples below, that prove useful in upcoming work

Proposition 18.2 If f is continuous and monotone on a dense set, then it is monotone on its entire domain.

Proof. Assume for contradiction that f is monotone increasing on a dense set D in the domain of f, but that it is not monotone increasing on the entire domain. This means that there exists a pair x<y in the domain where f(x)>f(y), call the difference f(y)f(x)=D and set ε=D/3. Then by continuity of f there is a δx about x such that |xa|<δx implies |f(x)f(a)|<ε, and similarly for a δy about y.

We are going to use these δ neighborhoods to choose points in dx,dyD near x and y, so we need to be careful: we wish to ensure dx<dy just as x<y, so we want our δ neighborhoods to not overlap. And since we got the values δx and δy from continuity we don’t have any control over their size, so they might be rather large! But this is no serious problem, we can easily shrink them if needed: if δ=|yx| we can set δx to be the minimum of its original value and δ/2, and same for δy.

Now, by the density of D in the domain, there is a dxD within δx of x and a dyD within δy of y. Together with the above this implies that f(dx) is at least f(x)ε and f(dy) is at most f(y)+ε. But the distance between f(x) and f(y) was D=3ε, so f(dx)f(dy)ε>0 and hence f(dx)>f(dy). But this contradicts the fact that f is increasing on D as dx<dy.

Exercise 18.2 Modify the above proof to show that if f is continuous and strictly increasing or strictly decreasing on a dense set, then it is strictly increasing/decreasing everywhere on its domain.

Exercise 18.3 If f is continuous and convex on a dense set, then it is convex on its entire domain.

18.2 Extreme Values

Proposition 18.3 (Continuous on Closed Interval Bounded) Let f be a continuous function on a closed interval [a,b]. Then the image f([a,b]) is bounded.

Proof. Assume for the sake of contradiction that f is not bounded. Then for each nN there must be some xn[a,b] where |f(xn)|>n. This sequence {xn} need not be convergent, but it lies in the interval [a,b] so it is bounded, and thus contains a convergent subsequence xnk by Bolzano Weierstrass. Say xnkx. Then since axnkb for all k, by the inequalities of limits we see axb so the limit x lies in the interval [a,b] as well.

But what is the value f(x)? Since f is continuous and xnkx we know that f(xnk)f(x) But for each k, xnk has the property that f(xnk)>nk by definition. Thus, the sequence f(xnk) is not bounded, and cannot be convergent (since all convergent sequences are bounded). This is a contradiction, as it implies that f(x) is not defined, even though we have assumed f is defined on the entire interval [a,b].

Thus, no such sequence xn is possible, and so there must be some n where |f(x)|<n for all x[a,b]. That is, f must be bounded on [a,b].

Building off this result, one can prove that a continuous function actually achieves its upper and lower bounds on any closed interval. This result will play a role several times across the theory of functions and derivatives, so we give it a memorable name: the extreme value theorem (as maxima and minima taken collectively are called extrema).

Theorem 18.2 (Extreme Value Theorem) Let f be a continuous function on a closed interval [a,b]. Then f achieves a maximum and minimum value: that is, there exists a point p where f(p)f(x) for all x[a,b], and a q where f(q)f(x) for all x[a,b].

Proof. We show f achieves a maximum, and leave the minimum case as an exercise. Let f be continuous on [a,b] and let R={f(x)x[a,b]} be the set of outputs, or the range of f. Since f is bounded we see that R is a bounded subset of R, and so by completeness m=infRM=supR must exist. Our goal is to find values xm,xM[a,b] for which the infimum and supremum are realized: f(xm)=mf(xM)=M

Here we show this holds for the supremum, the infimum is left as an exercise below. Since M is the supremum, for any ε>0 we know that Mε is not an upper bound for R={f(x)x[a,b]}: thus there must be some x where f(x)>Mε. So letting ε=1/n each n, let xn be a point where M1n<f(xn)M. As n we know M1nM and so by the squeeze theorem we see that f(xn)M as well.

We don’t know that the points xn themselves converge, but we do know that this entire sequence lies inside the closed interval [a,b] so its bounded and Bolzano Weierstrass lets us extract a convergent subsequence xnkx. And as axnkb it follows that the limit x[a,b] as well. Because subsequences of a convgent sequence converge to the same limit, we know that f(xnk) is convergent, and still has limit M. But now we can finally use continuity!

Since f is continuous, we know limf(xn)=f(limxn), and so M=f(x). Thus we managed to find a point x[a,b] where f(x) is the supremum: f(x) is an upper bound for all possible values of f on [a,b], which by definition means its the max value! So f achieves a maximum on [a,b].

Exercise 18.4 Complete the proof by showing a continuous function on a closed interval achieves a minimum.

18.3 Intermediate Values

The intermediate value theorem is the rigorous version of “you can draw the graph of a continuous function without picking up your pencil”.

One note: in the statement below we use the phrase y is between f(a) and f(b) as a shorthand to mean that either f(a)<y<f(b) or f(b)<y<f(a) (as we don’t know if f(a) or f(b) is larger).

Theorem 18.3 (The Intermediate Value Theorem) Let f be a continuous function on the interval [a,b], and let y be any number between f(a) and f(b). Then there exists an x between a and b such that y=f(x).

Proof. Without loss of generality we will assume that f(a)<f(b) so that y lies in the interval [f(a),f(b)] (the other case is analogous, we just instead must write the interval [f(b),f(a)]). We wish to find a point x[a,b] where f(x)=y, so we start by defining the set of points where f(x) is less than or equal to y:

S={x[a,b]f(x)y}

This set is nonempty: aS as f(a)<y by assumption. And its bounded above by b: if xS then x[a,b] so xb by definition. Thus, the supremum σ=supS exists, and σ[a,b]. We will show that f(σ)=y, by showing both inequalities f(σ)y and f(σ)y.

First, we show . Since σ is the supremeum, for each n we know that σ1n is not an upper bound, and so there must be an point xn(σ1/n,σ) where f(xn)y. The squeeze theorem assures that xnσ, and the continuity of f assures that f(xn) converges (since xn does). But for all n we know f(xn)y, so by the inequalities of limits we also know limf(xn)=f(σ)y.

Next, we show . First note that σb as f(σ)y but f(b)>y. So, σ<b and so after truncating finitely many terms, the sequence xn=σ+1/n lies strictly between σ and b. Since this sequence is greater than the upper bound σ, we know that none of the xn are in S and so f(xn)>y by definition, for all n. But as n the sequence of xn’s is squeezed to converge to σ, and so by continuity we know f(σ)=f(limxn)=limf(xn) Applying the inequalities of limits this time yields the reverse: since for all n we know f(xn)>y, it follows that limf(xn)y so f(σ)y.

Putting these together we know that f(σ) is some number which must simultaneously by y and y. The only number satisfying both of these inequalities is y itself, so f(σ)=y

Corollary 18.1 Continuous image of a closed interval is a closed interval.

Historically, the intermediate value theorem was one of the reasons for developing much of analysis: mathematicians knew that whatever the correct formal definition of continuity was, it should certainly imply this! So, our proof of the intermediate value theorem (which embodies the intuitive notion of continuity) may be seen as evidence that we have chosen good definitions of continuity and convergence: they work as we expect!

Remark 18.1. It may seem at first that the intermediate value theorem is equivalent to continuity: if a function satisfies the intermediate value property, then its continuous. Try to prove it! Where do you get stuck?

Example 18.1 Consider the following function f(x)={sin(1x)x00x=0

Then f satisfies the conclusion of the intermediate value theorem on every closed interval, but f is not continuous at 0.

18.3.1 Useful Corollaries

Continuity is a strong constraint on a function, and the behavior of a continuous function at one or more points can often be used to gain information about nearby points. A direct corollary of the intermediate value theorem that is very useful is the special case when y=0:

Corollary 18.2 (Positive to Negative implies Zero) If f is a continuous function on an interval and it is positive one endpoint and negative on the other, then f has a zero in-between.

This suggests a means of finding the zeros of a function, which narrows in on them exponentially fast! Called “bisection”: find any two points where function changes sign. Divide region in half, evaluate at midpoint. Keep interval with different sign endpoints, repeat.

This argument also suggests simple proofs of various other theroems proving the existence of a point in the domain having some specified property. Here we give a classic fixed point theorem as an example

Proposition 18.4 (A Fixed Point Theorem) If f:[0,1][0,1] is continuous then there is some x[0,1] with f(x)=x.

Proof. Consider the function g(x)=f(x)x. Since f(0)0 we know g(0)=f(0)00, and as f(1)1 we similarly know that g(1)=f(1)10.

Like fixed points above, we can also use the IVT to prove the existence of solutions to various equations. Here, we use it to prove the existence of the square root of 2 - a calculation that took us quite some fiddling around with algebra and the Archimedean property originally!

Example 18.2 (Existence of 2) The function f(x)=x2 is continuous on R. But f(1)=1 which is less than 2 and f(2)=4 which is greater than 2. Thus, by the intermediate value theorem there must be some s[1,2] such that f(s)=s2=2, so s=2.

Exercise 18.5 (Existence of nth roots.) For every x0 there exists a unique positive number y such that yn=x.

Its worth mentioning one additional corollary of the interemediate value theorem together with the extreme value theorem, which helps us understand the ranges of continuous functions

Corollary 18.3 If f is a continuous function and IR is a closed interval, then f(I) is an interval.

Here we allow the degenerate case [a,a]={a} to count as an interval, if f is constant.

18.4 Uniform δ on Closed Intervals

In general the definition of continuity takes place at each x individually, so for a fixed ε we might find different δ’s depending on which point we are at. This can be theoretically bothersome sometimes, as it would be much easier to just pick a δ once and for all and use it in an entire problem.

The following theorem shows this is indeed possible

Theorem 18.4 (Continuous + Closed Uniform) Let f be a continuous function defined on the closed interval [a,b]. Then f is in fact uniformly continuous on this interval.

Proof. Assume for the sake of contradiction that f is not uniformly continuous, and fix ε>0. Then there is no fixed δ that works, so for any proposed δ, there must be some a where it fails.

We can use this to produce a sequence: for δ=1/n let anI be a point where this δ fails: there is some xn within 1/n of an but |f(xn)f(an)|>ε.

Thus, in fact we have two sequences xn and an! We know very little about either except that they are in a closed interval I, so we can apply Bolzano Weierstrass to get convergent subsequences (we have to be a bit careful here, see the exercise below).

We will call the subsequences Xn and An (with capital letters). Now that we know they both converge, we can see that they also have the same limit: (as, by construction |XnAn|<1n). Call that limit L.

Then since f is continuous at L, we know that limf(Xn)=f(limXn)=f(L)=f(limAn)=limf(An) Thus, limf(Xn)f(An)=0. However this is impossible, since for all values of n we know |f(Xn)f(An)|>ε! This is a contradiction, and thus there must have been some uniform δ that worked all along.

In proof, use that we can simultaneously apply bolzano weierstrass to two sequences: this appears as an back in the chapter on subsequences. If you didn’t do it then, you should prove this for yourself now.