3.2. THEOREMS ABOUT CONTINUOUS FUNCTIONS 41

< M[

ε

2M−1 +

ε

2M−1

]= ε.

This completes the proof of the second part of 2.)Note that in these proofs no effort is made to find some sort of “best” δ . The problem

is one which has a yes or a no answer. Either is it or it is not continuous.Now consider 3.). If f is continuous at x, f (x) ∈ D(g) ⊆ Rp, and g is continuous at

f (x) ,then g◦ f is continuous at x. Let ε > 0 be given. Then there exists η > 0 such that if|y− f (x)|< η and y ∈ D(g) , it follows that |g(y)−g( f (x))|< ε. From continuity of f atx, there exists δ > 0 such that if |x−z|< δ and z ∈ D( f ) , then | f (z)− f (x)|< η . Then if|x−z|< δ and z ∈ D(g◦ f )⊆ D( f ) , all the above hold and so

|g( f (z))−g( f (x))|< ε.

This proves part 3.)To verify part 4.), let ε > 0 be given and let δ = ε. Then if |x−y| < δ , the triangle

inequality implies

| f (x)− f (y)|= ||x|− |y||≤ |x−y|< δ = ε.

This proves part 4.) and completes the proof of the theorem.Next here is a proof of the intermediate value theorem.

Theorem 3.2.2 Suppose f : [a,b]→ R is continuous and suppose f (a)< c < f (b) . Thenthere exists x ∈ (a,b) such that f (x) = c.

Proof: Let d = a+b2 and consider the intervals [a,d] and [d,b] . If f (d) ≥ c, then on

[a,d] , the function is ≤ c at one end point and ≥ c at the other. On the other hand, iff (d) ≤ c, then on [d,b] f ≥ 0 at one end point and ≤ 0 at the other. Pick the interval onwhich f has values which are at least as large as c and values no larger than c. Now considerthat interval, divide it in half as was done for the original interval and argue that on one ofthese smaller intervals, the function has values at least as large as c and values no larger thanc. Continue in this way. Next apply the nested interval lemma to get x in all these intervals.In the nth interval, let xn,yn be elements of this interval such that f (xn)≤ c, f (yn)≥ c. Now|xn− x| ≤ (b−a)2−n and |yn− x| ≤ (b−a)2−n and so xn→ x and yn→ x. Therefore,

f (x)− c = limn→∞

( f (xn)− c)≤ 0

whilef (x)− c = lim

n→∞( f (yn)− c)≥ 0.

Consequently f (x) = c and this proves the theorem.

Lemma 3.2.3 Let φ : [a,b]→R be a continuous function and suppose φ is 1−1 on (a,b).Then φ is either strictly increasing or strictly decreasing on [a,b] .