6.3. THE EXTREME VALUES THEOREM 105

16. Let f (x) ={

1 if x ∈Q0 if x /∈Q and consider g(x) = f (x)

(x− x3

). Determine where g is

continuous and explain your answer.

17. Suppose f is any function whose domain is the integers. Thus D( f ) = Z, the set ofwhole numbers, · · · ,−3,−2,−1,0,1,2,3, · · · . Then f is continuous. Why? Hint: Inthe definition of continuity, what if you let δ = 1

4 ? Would this δ work for a givenε > 0? This shows that the idea that a continuous function is one for which you candraw the graph without taking the pencil off the paper is a lot of nonsense.

18. Give an example of a function f which is not continuous at some point but | f | iscontinuous at that point.

19. Find two functions which fail to be continuous but whose product is continuous.

20. Find two functions which fail to be continuous but whose sum is continuous.

21. Find two functions which fail to be continuous but whose quotient is continuous.

22. Suppose f is a function defined on R and f is continuous at 0. Suppose also thatf (x+ y) = f (x)+ f (y) . Show that if this is so, then f must be continuous at everyvalue of x ∈ R. Next show that for every rational number, r, f (r) = r f (1) . Finallyexplain why f (r) = r f (1) for every r a real number. Hint: To do this last part, youneed to use the density of the rational numbers and continuity of f .

23. Show that if r is an irrational number and pnqn→ r where pn,qn are positive integers,

then it must be that pn → ∞ and qn → ∞. Hint: If not, extract a convergent subse-quence for pn and qn argue that to which these converge must be integers. Hence rwould end up being rational.

6.3 The Extreme Values TheoremThe extreme values theorem says continuous functions achieve their maximum and mini-mum provided they are defined on a sequentially compact set.

Example 6.3.1 Let f (x) = 1/x for x ∈ (0,1) .

Clearly, f is not bounded. Does this violate the conclusion of the above lemma? It doesnot because the end points of the interval involved are not in the interval. The same functiondefined on [.000001,1) would have been bounded although in this case the boundedness ofthe function would not follow from the above lemma because it fails to include the rightendpoint.

The next theorem is known as the max min theorem or extreme value theorem.

Theorem 6.3.2 Let K ⊆ Fp be sequentially compact and let f : K→ R be continu-ous. Then f achieves its maximum and its minimum on K. This means there exist, x1,x2 ∈Ksuch that for all x ∈ K, f (x1)≤ f (x)≤ f (x2) .

Proof: Let λ ≡ sup{ f (x) : x ∈ K}. Then if l < λ , there exists x ∈ K such that f (x)> lsince otherwise, λ is not as defined since l would be a smaller upper bound. Thus thereexists a sequence {xn} ∈ K such that limn→∞ f (xn) = λ . This is called a maximizing se-quence. Since K is sequentially compact, there exists a subsequence

{xnk

}which converges