g.x/_{D}
(_{1}

2; xD0 or xD1;

1 x; 0 < x < 1; C

(Figure2.2.4

### (a)

) is bounded onŒ0; 1, and sup0x1

g.x/_{D}1; inf

0x1g.x/D0:

Therefore,ghas no maximum or minimum onŒ0; 1, since it does not assume either of the values0and1.

The function

h.x/_{D}1 x; 0_{}x_{}1;

which differs fromgonly at0and1(Figure2.2.4

### (b)

), has the same supremum and infi- mum asg, but it attains these values atx_{D}0andx

_{D}1, respectively; therefore,

max
0x1h.x/D1 and 0minx1h.x/D0:
2
1
1
1
*y*
*x*
1
1
*y*
*x*
(a) (b)
*y = g*(*x*) *y = *1* − x*

### Figure 2.2.4

### Example 2.2.11

The functionf .x/_{D}ex.x 1/sin 1

x.x 1/; 0 < x < 1;

oscillates between_{˙}ex.x 1/infinitely often in every interval of the form.0; /or.1 ; 1/,
where0 < < 1, and

sup 0<x<1

f .x/_{D}1; inf

0<x<1f .x/D 1:

### Theorem 2.2.8

Iff is continuous on a finite closed intervalŒa; b;thenf is bounded onŒa; b:### Proof

Suppose thatt_{2}Œa; b. Sincef is continuous att, there is an open intervalIt containingtsuch that

jf .x/ f .t /_{j}< 1 if x_{2}It\Œa; b: (2.2.6)
(To see this, set_{D}1in (2.2.1), Theorem2.2.2.) The collectionH _{D} ˚_{I}_{t}ˇˇ_{a}_{}_{t} _{}_{b} _{is}

an open covering ofŒa; b. SinceŒa; bis compact, the Heine–Borel theorem implies that
there are finitely many pointst1,t2, . . . , tnsuch that the intervalsIt1,It2, . . . , Itn cover
Œa; b. According to (2.2.6) witht _{D}ti,

jf .x/ f .ti/j< 1 if x2Iti \Œa; b:
Therefore,
jf .x/_{j D j}.f .x/ f .ti//Cf .ti/j jf .x/ f .ti/j C jf .ti/j
1_{C j}f .ti/j if x2Iti \Œa; b:
(2.2.7)
Let
M _{D}1_{C} max
1injf .ti/j:
SinceŒa; b_{}Sn_{i}_{D}_{1} Iti \Œa; b

, (2.2.7) implies that_{j}f .x/_{j }M ifx_{2}Œa; b.

This proof illustrates the utility of the Heine–Borel theorem, which allows us to choose M as the largest of afiniteset of numbers.

Theorem2.2.8and the completeness of the reals imply that

iff is continuous on a finite closed intervalŒa; b, thenf has an infimum and a supre- mum on Œa; b. The next theorem shows that f actually assumes these values at some points inŒa; b.

### Theorem 2.2.9

Suppose thatf is continuous on a finite closed intervalŒa; b:Let˛_{D} inf

axbf .x/ and ˇD_{a}_{}sup_{x}_{}_{b}f .x/:

Then˛andˇare respectively the minimum and maximum off onŒa; b_{I}that is;there are
pointsx1andx2inŒa; bsuch that

f .x1/D˛ and f .x2/Dˇ:

### Proof

We show thatx1exists and leave it to you to show thatx2exists (Exercise2.2.24). Suppose that there is no x1 inŒa; b such thatf .x1/ D ˛. Thenf .x/ > ˛ for allx_{2}Œa; b. We will show that this leads to a contradiction.
Suppose thatt _{2}Œa; b. Thenf .t / > ˛, so

f .t / >f .t /C˛ 2 > ˛:

Sincef is continuous att, there is an open intervalIt abouttsuch that

f .x/ > f .t /C˛

2 if x2It\Œa; b (2.2.8)

(Exercise2.2.15). The collectionH _{D}˚_{I}_{t}ˇˇ_{a}_{}_{t} _{}_{b} _{is an open covering of}_{Œa; b}_{. Since}

Œa; bis compact, the Heine–Borel theorem implies that there are finitely many pointst1,

t2, . . . ,tnsuch that the intervalsIt1,It2, . . . ,Itn coverŒa; b. Define ˛1D min

1in

f .ti/C˛

2 :

Then, sinceŒa; b_{}Sn_{i}_{D}_{1}.Iti \Œa; b/, (2.2.8) implies that
f .t / > ˛1; at b:

But˛1> ˛, so this contradicts the definition of˛. Therefore,f .x1/D˛for somex1in

Œa; b.

### Example 2.2.12

We used the compactness ofŒa; bin the proof of Theorem 2.2.9when we invoked the Heine–Borel theorem. To see that compactness is essential to the proof, consider the function

g.x/_{D}1 .1 x/sin1
x;

which is continuous and has supremum2on the noncompact interval.0; 1, but does not assume its supremum on.0; 1, since

g.x/_{}1_{C}.1 x/
ˇ
ˇ
ˇ
ˇsin
1
x
ˇ
ˇ
ˇ
ˇ
1_{C}.1 x/ < 2 if 0 < x_{}1:
As another example, consider the function

f .x/_{D}e x;

which is continuous and has infimum0, which it does not attain, on the noncompact interval
.0;_{1}/.

The next theorem shows that iff is continuous on a finite closed intervalŒa; b, thenf assumes every value betweenf .a/andf .b/asxvaries fromatob(Figure2.2.5, page64).

### Theorem 2.2.10 (Intermediate Value Theorem)

Suppose that f is con- tinuous onŒa; b; f .a/_{¤}f .b/;andis betweenf .a/andf .b/:Thenf .c/

_{D}for somecin.a; b/:

*a* *x* *b* *x*
*y*

*y = f*(*x*)

*y = µ*

### Figure 2.2.5

### Proof

Suppose thatf .a/ < < f .b/. The setS _{D}˚xˇˇa_{}x_{}b and f .x/_{}

is bounded and nonempty. Letc _{D} supS. We will show thatf .c/ _{D} . Iff .c/ > ,
thenc > a and, sincef is continuous atc, there is an > 0 such that f .x/ > if
c < x _{} c (Exercise 2.2.15). Therefore, c is an upper bound for S, which
contradicts the definition ofcas the supremum ofS. Iff .c/ < , thenc < band there is
an > 0such thatf .x/ < forc_{}x < c_{C}, socis not an upper bound forS. This is
also a contradiction. Therefore,f .c/_{D}.

The proof for the case wheref .b/ < < f .a/can be obtained by applying this result to f.