• No results found

Min-max and intermediate value theorems Note: 1.5 lectures

Continuous Functions

3.3 Min-max and intermediate value theorems Note: 1.5 lectures

Continuous functions on closed and bounded intervals are quite well behaved.

3.3.1

Min-max theorem

Recall a function f: [a,b]R is bounded if there exists a BR such that |f(x)| ≤B for all

x[a,b]. We have the following lemma.

Lemma 3.3.1. Let f: [a,b]Rbe a continuous function. Then f is bounded.

Proof. Let us prove this claim by contrapositive. Suppose f is not bounded. Then for eachnN,

there is anxn∈[a,b], such that

|f(xn)| ≥n.

The sequence {xn} is bounded as a≤xn≤b. By the , there is a convergent subsequence{xni}. Letx:=limxni. Sincea≤xni ≤bfor alli, thena≤x≤b. The

sequence{f(xni)}is not bounded as|f(xni)| ≥ni≥i. Thus f is not continuous atxas f(x) = flim

i→∞xni

, but lim

i→∞f(xni) does not exist. Recall from calculus that f: SRachieves anabsolute minimumatcSif

f(x) f(c) for allxS. On the other hand, f achieves anabsolute maximumatcSif

f(x) f(c) for allxS.

If such ac∈Sexists, then f achieves an absolute minimum (resp. absolute maximum) on S. absolute maximum of f = f(c)

absolute minimum of f = f(d)

a b

d c

Figure 3.5: f:[a,b]→Rachieves an absolute maximum f(c)atc, and an absolute minimum f(d)atd.

IfSis a closed and bounded interval, then a continuous f must achieve an absolute minimum and an absolute maximum onS.

Theorem 3.3.2(Minimum-maximum theorem). Let f: [a,b]Rbe a continuous function. Then

Proof. The lemma says that f is bounded, and thus the set f([a,b]) ={f(x):x∈[a,b]} has a supremum and an infimum. There exist sequences in the set f([a,b])that approach its supremum

and its infimum. That is, there are sequences{f(xn)}and{f(yn)}, wherexn,ynare in[a,b], such that

lim

n→∞f(xn) =inff([a,b]) and nlim→∞f(yn) =supf([a,b]).

We are not done yet, we need to find where the minima and the maxima are. The problem is that the sequences{xn}and{yn}need not converge. We know{xn}and{yn}are bounded (their elements belong to a bounded interval[a,b]). Apply the , to find convergent

subsequences{xni}and{ymi}. Let x:= lim

i→∞xni and y:=ilim→∞ymi.

As axni ≤b, we havea≤x≤b, and similarlya≤y≤b. Soxandyare in[a,b]. A limit of a

subsequence is the same as the limit of the sequence, and we can take a limit past the continuous function f:

inff([a,b]) = lim

n→∞f(xn) =ilim→∞f(xni) = f lim i→∞xni = f(x). Similarly,

supf([a,b]) = lim

n→∞f(yn) =ilim→∞f(ymi) = f lim i→∞ymi = f(y).

Therefore, f achieves an absolute minimum atxand f achieves an absolute maximum aty. Example 3.3.3: The function f(x):=x2+1 defined on the interval[−1,2]achieves a minimum at x=0 when f(0) =1. It achieves a maximum atx=2 where f(2) =5. Do note that the domain of definition matters. If we instead took the domain to be[10,10], thenx=2 would no longer be a maximum of f. Instead the maximum would be achieved at eitherx=10 orx=−10.

Let us show by examples that the different hypotheses of the theorem are truly needed.

Example 3.3.4: The function f(x):=x, defined on the whole real line, achieves neither a minimum, nor a maximum. So it is important that we are looking at a bounded interval.

Example 3.3.5: The function f(x):=1/x, defined on(0,1)achieves neither a minimum, nor a maximum. The values of the function are unbounded as we approach 0. Also as we approachx=1, the values of the function approach 1, but f(x)>1 for allx(0,1). There is nox(0,1)such that

f(x) =1. So it is important that we are looking at a closed interval.

Example 3.3.6: Continuity is important. Define f: [0,1]R by f(x):=1/x for x>0 and let

f(0):=0. The function does not achieve a maximum. The problem is that the function is not continuous at 0.

3.3.2

Bolzano’s intermediate value theorem

Bolzano’s intermediate value theorem is one of the cornerstones of analysis. It is sometimes only called the intermediate value theorem, or just Bolzano’s theorem. To prove Bolzano’s theorem we prove the following simpler lemma.

Lemma 3.3.7. Let f: [a,b]→Rbe a continuous function. Suppose f(a)<0and f(b)>0. Then

there exists a number c(a,b)such that f(c) =0.

Proof. We define two sequences{an}and{bn}inductively: (i) Leta1:=aandb1:=b.

(ii) If fan+bn 2 ≥0, letan+1:=anandbn+1:= an+2bn. (iii) If fan+bn 2 <0, letan+1:= an+2bn andbn+1:=bn. a1 b1 a2 b2 a3 b3 a4 b4 a5b5 c

Figure 3.6:Finding roots (bisection method).

See for an example defining the first five steps. Ifan<bn, thenan< an+2bn <bn. So an+1<bn+1. Thus by an<bnfor alln. Furthermore,an≤an+1 andbn≥bn+1for all n, that is the sequences are monotone. Asan<bn≤b1=band bn>an≥a1=afor all n, the sequences are also bounded. Therefore, the sequences converge. Letc:=limanandd:=limbn, where alsoa≤c≤d≤b. We need to show thatc=d. Notice

bn+1−an+1= bn−2an.

By ,

bn−an=b1−a1

2n−1 =21−n(b−a).

As 21−n(ba)converges to zero, we take the limit asngoes to infinity to get dc= lim

n→∞(bn−an) =nlim→∞2

1−n(ba) =0. In other wordsd=c.

By construction, for allnwe have

f(an)<0 and f(bn)≥0.

Since liman=limbn=cand as f is continuous, we may take limits in those inequalities: f(c) =lim f(an)≤0 and f(c) =lim f(bn)≥0.

As f(c)0 and f(c)0, we conclude f(c) =0. Thus alsoc=6 aandc6=b, soa<c<b.

Theorem 3.3.8(Bolzano’s intermediate value theorem). Let f: [a,b]Rbe a continuous function.

Suppose y∈Ris such that f(a)<y< f(b)or f(a)>y> f(b). Then there exists a c∈(a,b)such

that f(c) =y.

The theorem says that a continuous function on a closed interval achieves all the values between the values at the endpoints.

Proof. If f(a)<y< f(b), then defineg(x):= f(x)−y. Then we see thatg(a)<0 andg(b)>0

and we apply togto findc. Ifg(c) =0, then f(c) =y.

Similarly, if f(a)>y> f(b), then defineg(x):=yf(x). Then againg(a)<0 andg(b)>0

and we apply to findc. Again ifg(c) =0, then f(c) =y.

If a function is continuous, then the restriction to a subset is continuous. So if f: S→R is

continuous and[a,b]S, then f|[a,b]is also continuous. Hence, we generally apply the theorem to

a function continuous on some large setS, but we restrict attention to an interval.

The proof of the lemma tells us how to find the root c. The proof is not only useful for us pure mathematicians, but it is a useful idea in applied mathematics, where it is called thebisection method.

Example 3.3.9 (Bisection method): The polynomial f(x):=x32x2+x1 has a real root in (1,2). We simply notice that f(1) =−1 and f(2) =1. Hence there must exist a pointc∈(1,2)such that f(c) =0. To find a better approximation of the root we follow the proof of . We look at 1.5 and find that f(1.5) =0.625. Therefore, there is a root of the polynomial in(1.5,2). Next we look at 1.75 and note that f(1.75)≈ −0.016. Hence there is a root of f in(1.75,2). Next we look at 1.875 and find that f(1.875)0.44, thus there is a root in(1.75,1.875). We follow this procedure until we gain sufficient precision. In fact, the root is atc1.7549.

The technique above is the simplest method of finding roots of polynomials, which is perhaps the most common problem in applied mathematics. In general it is hard to do quickly, precisely, and automatically.

There are better and faster methods of finding roots of equations, such as Newton’s method. One advantage of the above method is its simplicity. The moment we find an initial interval where the intermediate value theorem applies, we are guaranteed to find a root up to a desired precision in finitely many steps. Furthermore, the bisection method finds roots of any continuous function, not just a polynomial.

The theorem guarantees at least one c such that f(c) =y, but there may be many different roots of the equation f(c) =y. If we follow the procedure of the proof, we are guaranteed to find approximations to one such root. We need to work harder to find any other roots.

Polynomials of even degree may not have any real roots. For example, there is no real numberx such thatx2+1=0. Odd polynomials, on the other hand, always have at least one real root.

Proposition 3.3.10. Let f(x)be a polynomial of odd degree. Then f has a real root. Proof. Suppose f is a polynomial of odd degreed. We write

f(x) =adxd+ad−1xd−1+···+a1x+a0, wheread6=0. We divide byad to obtain amonic polynomial

g(x):=xd+bd−1xd−1+···+b1x+b0,

where bk =ak/ad. Let us show thatg(n) is positive for some largen∈N. We first compare the

highest order term with the rest:

bd−1nd−1+···+b1n+b0 nd = bd1nd−1+···+b1n+b0 nd ≤ |bd−1|n d−1+···+|b 1|n+|b0| nd ≤ |bd−1|n d−1+···+|b 1|nd−1+|b0|nd−1 nd = n d−1 |b d−1|+···+|b1|+|b0| nd = 1 n |bd−1|+···+|b1|+|b0| . Therefore lim n→∞ bd−1nd−1+···+b1n+b0 nd =0.

Thus there exists anM∈Nsuch that bd−1Md−1+···+b1M+b0 Md <1, which implies −(bd−1Md−1+···+b1M+b0)<Md. Therefore,g(M)>0.

Next we look atg(n)fornN. By a similar argument (exercise) we find that there exists

someK∈Nsuch thatbd−1(−K)d−1+···+b1(−K) +b0<Kd and thereforeg(−K)<0 (why?). In the proof make sure you use the fact thatd is odd. In particular, ifdis odd then(n)d =(nd). We appeal to the intermediate value theorem to find a c∈[−K,M], such that g(c) =0. As

g(x) = fa(dx), then f(c) =0, and the proof is done.

Example 3.3.11: An interesting fact is that there do exist discontinuous functions that have the intermediate value property. The function

f(x):=

(

sin(1/x) ifx6=0, 0 ifx=0,

is not continuous at 0, however, it has the intermediate value property. That is, for anya<b, and

anyysuch that f(a)<y< f(b)or f(a)>y> f(b), there exists acsuch that f(y) =c. Proof is

left as an exercise.

The intermediate value theorem says that if f: [a,b]Ris continuous then f([a,b])contains

all the values between f(a)and f(b). In fact, more is true. Combining all the results of this section we can prove the following useful corollary whose proof is left as an exercise.

Corollary 3.3.12. If f: [a,b]→Ris continuous, then the direct image f([a,b]) is a closed and

bounded interval or a single number.

3.3.3

Exercises

Exercise 3.3.1: Find an example of a discontinuous function f:[0,1]Rwhere the conclusion of the

intermediate value theorem fails.

Exercise 3.3.2: Find an example of abounded discontinuous function f:[0,1]→Rthat has neither an

absolute minimum nor an absolute maximum.

Exercise3.3.3: Let f:(0,1)→Rbe a continuous function such thatlim

x→0f(x) =xlim→1f(x) =0. Show that f achieves either an absolute minimum or an absolute maximum on(0,1)(but perhaps not both).

Exercise3.3.4: Let

f(x):=

(

sin(1/x) if x6=0, 0 if x=0.

Show that f has the intermediate value property. That is, for any a<b, if there exists a y such that

f(a)<y< f(b)or f(a)>y>f(b), then there exists a c∈(a,b)such that f(c) =y.

Exercise3.3.5: Suppose g(x)is a monic polynomial of odd degree d, that is, g(x) =xd+bd−1xd−1+···+b1x+b0,

for some real numbers b0,b1, . . . ,bd−1. Show that there exists a K∈Nsuch that g(−K)<0. Hint: Make

sure to use the fact that d is odd. You will have to use that(n)d=(nd).

Exercise3.3.6: Suppose g(x)is a monic polynomial of positive even degree d, that is,

g(x) =xd+bd−1xd−1+···+b1x+b0,

for some real numbers b0,b1, . . . ,bd−1. Suppose g(0)<0. Show that g has at least two distinct real roots. Exercise3.3.7: Prove : Suppose f:[a,b]Ris a continuous function. Prove that the

direct image f([a,b])is a closed and bounded interval or a single number.

Exercise3.3.8: Suppose f:R→Ris continuous and periodic with period P>0. That is, f(x+P) =f(x)

for all x∈R. Show that f achieves an absolute minimum and an absolute maximum.

Exercise3.3.9(Challenging): Suppose f(x)is a bounded polynomial, in other words, there is an M such

Exercise3.3.10: Suppose f:[0,1]→[0,1]is continuous. Show that f has a fixed point, in other words,

show that there exists an x∈[0,1]such that f(x) =x.

Exercise3.3.11: Find an example of a continuous bounded function f:R→Rthat does not achieve an

absolute minimum nor an absolute maximum onR.

Exercise3.3.12: Suppose f:R→Ris a continuous function such that x≤ f(x)≤x+1for all x∈R. Find

f(R).

Exercise3.3.13: True/False, prove or find a counterexample. If f:R→Ris a continuous function such that

f|Zis bounded, then f is bounded.

Exercise3.3.14: Suppose f:[0,1](0,1)is a bijection. Prove that f is not continuous.

Exercise3.3.15: Suppose f:R→Ris continuous.

a) Prove that if there is a c such that f(c)f(−c)<0, then there is a d∈Rsuch that f(d) =0.

b) Find a continuous function f such that f(R) =R, but f(x)f(−x)≥0for all x∈R. Exercise3.3.16: Suppose g(x)is a monic polynomial of even degree d, that is,

g(x) =xd+bd−1xd−1+···+b1x+b0,

for some real numbers b0,b1, . . . ,bd−1. Show that g achieves an absolute minimum onR. Exercise3.3.17: Suppose f(x)is a polynomial of degree d and f(R) =R. Show that d is odd.