selected problems and solutions

25
Selected problems and solutions 1. Prove that |(0, 1)| = |R|. Solution. Define f : (0, 1) R by f (x)= 1 x-0.5 +2, x< 0.5 1 x-0.5 - 2, x> 0.5 0, x =0.5 Note that the image of (0, 0.5) under f is (-∞, 0), the image of (0.5, 1) under f is (0, ), and f (0) = 0. This shows that f is surjective. Furthermore, it is easy to check that f is injective when restricted to (0, 0.5) or (0.5, 1). As the images of these intervals are disjoint from each other and 0, it follows that f is injective on (0, 1). So f is a bijection as desired. 2. Find an injective function f : (0, 1) 2 N by using binary expansions. Then define a surjective function g :2 N (0, 1) using a similar idea. Though g is not one-to-one, it is “two-to-one” in a certain sense; why? Solution. Every x (0, 1) has a binary expansion in the sense that there exists a sequence {a n } n=1 such that x = X n=1 a n 2 -n where a n ∈{0, 1} for all n N. (The expansion is typically written 0.a 1 a 2 a 3 ....) It may be assumed that the a n ’s do not have an “infinite trail” of 1’s; that is, that {a n } n=1 does not converge to 1; this ensures that the binary expansions are unique. Now define f : (0, 1) 2 N by f (x)= {n : a n =1} where {a n } n=1 is the binary expansion of x (unique in the above sense). It is easy to see that f is injective. Now define g :2 N (0, 1) as follows. If S N and S 6= , S 6= N, define g(S )= x where x has the binary expansion {a n } n=1 given by a n = ( 1, n S 0, n/ S Also define g()=1/3 and g(N)=2/3. It is easy to see that g is surjective. Furthermore g is two-to-one in the sense that |{S : g(S )= x}| ≤ 2 The latter follows from the following fact: every real number has at most two distinct binary expansions, and if a real number has two distinct binary expansions then it has a terminat- ing binary expansion. (This was the reason for choosing 1/3 and 2/3 above; they have no terminating binary expansion.) 1

Upload: lyhanh

Post on 13-Feb-2017

231 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Selected problems and solutions

Selected problems and solutions

1. Prove that |(0, 1)| = |R|.

Solution. Define f : (0, 1)→ R by

f(x) =

1

x−0.5 + 2, x < 0.51

x−0.5 − 2, x > 0.50, x = 0.5

Note that the image of (0, 0.5) under f is (−∞, 0), the image of (0.5, 1) under f is (0,∞), andf(0) = 0. This shows that f is surjective. Furthermore, it is easy to check that f is injectivewhen restricted to (0, 0.5) or (0.5, 1). As the images of these intervals are disjoint from eachother and 0, it follows that f is injective on (0, 1). So f is a bijection as desired.

2. Find an injective function f : (0, 1) → 2N by using binary expansions. Then define asurjective function g : 2N → (0, 1) using a similar idea. Though g is not one-to-one, it is“two-to-one” in a certain sense; why?

Solution. Every x ∈ (0, 1) has a binary expansion in the sense that there exists a sequence{an}∞n=1 such that

x =∞∑n=1

an2−n

where an ∈ {0, 1} for all n ∈ N. (The expansion is typically written 0.a1a2a3 . . ..) It may beassumed that the an’s do not have an “infinite trail” of 1’s; that is, that {an}∞n=1 does notconverge to 1; this ensures that the binary expansions are unique. Now define f : (0, 1) → 2N

byf(x) = {n : an = 1}

where {an}∞n=1 is the binary expansion of x (unique in the above sense). It is easy to see thatf is injective.

Now define g : 2N → (0, 1) as follows. If S ⊂ N and S 6= ∅, S 6= N, define

g(S) = x

where x has the binary expansion {an}∞n=1 given by

an =

{1, n ∈ S0, n /∈ S

Also define g(∅) = 1/3 and g(N) = 2/3. It is easy to see that g is surjective. Furthermore g istwo-to-one in the sense that

|{S : g(S) = x}| ≤ 2

The latter follows from the following fact: every real number has at most two distinct binaryexpansions, and if a real number has two distinct binary expansions then it has a terminat-ing binary expansion. (This was the reason for choosing 1/3 and 2/3 above; they have noterminating binary expansion.)

1

Page 2: Selected problems and solutions

3. Prove that {(−1)n}∞n=1 is not convergent.

Solution. We will show the sequence does not converge to a, where a is an arbitrary real number.Let ε = 1 and note that either 1 /∈ (a− ε, a+ ε) or −1 /∈ (a− ε, a+ ε) (or both). Let N be anarbitrary natural number; we will find n ≥ N such that |an − a| ≥ ε. If 1 /∈ (a− ε, a+ ε) thenn = 2N suffices; if −1 /∈ (a− ε, a+ ε) then n = 2N + 1 suffices. This completes the proof.

4. Assume S ⊂ R and that x is an accumulation point of S. Show that if x is also an upperbound of S, then x = supS.

Solution. We assume x is an upper bound of S, so it only must be shown that there is nosmaller upper bound. Assume y is an upper bound of S such that y < x, and let ε = x − y.Then (x− ε, x+ ε) is a neighborhood of x which contains no point of S, which contradicts theassumption that x is an accumulation point of S.

5. Suppose that {an}∞n=1 is a sequence converging to a, and assume b is an accumulation pointof {an : n ∈ N}. Prove that a = b.

Solution. Assume that a 6= b, and let ε = |b− a|/2. As b is an accumulation point of {an : n ∈N}, for any natural number N there exists n ≥ N such that an ∈ (b− ε, b+ ε). (This is becauseevery neighborhood of b contains infinitely many elements of {an : n ∈ N}, so in particularmust contain an’s with n ≥ N .) So for any N , there exists n ≥ N such that |an− a| ≥ ε, whichmeans that {an}∞n=1 does not converge to a, a contradiction.

6. Assume f : [a, b] → R is increasing and define g : (a, b) → R by g(x) = sup{f(z) : z < x}.Prove that g(c) ≤ f(c) for all c ∈ (a, b). Also prove that if g(c) 6= f(c), then f does not have alimit at c.

Solution. Let c ∈ (a, b). As f is increasing, f(c) is an upper bound of {f(z) : z < c}. Thus,g(c) = sup{f(z) : z < c} ≤ f(c).

To prove the second statement in Problem 5 we show the contrapositive (that is, if f has alimit at c, then g(c) = f(c)). Assume f has the limit L at c, and let ε > 0. Choose δ > 0 suchthat

x ∈ [a, b] and 0 < |x− c| < δ ⇒ |f(x)− L| < ε (1)

Choose u, v ∈ (a, b) such that c− δ < u < c < v < c+ δ. Then

L− ε < f(u) ≤ g(c) ≤ f(c) ≤ f(v) < L+ ε (2)

We justify the inequalities in (2) as follows:The first and fifth inequalities follow from the limit statement (1);The second inequality comes from the fact that f(u) ∈ {f(z) : z < c};The third inequality comes from the first part of this problem;

2

Page 3: Selected problems and solutions

The fourth inequality comes from the fact that f is increasing.As ε > 0 was arbitrary, (2) implies

L = g(c) = f(c).

7. Give examples of:

(i) A function f : R→ R which is unbounded in every open interval.

(ii) A function f : [0, 1]→ R such that

S = {a ∈ [0, 1] : limx→a

f(x) does not exist}

is countably infinite.

Solution: (i) Define f : R→ R by

f(x) =

{m, if x = n

m ∈ Q is in lowest terms0, else

and let I = (a, b) be a (bounded) interval with K = max{|a|, |b|}. Assume f is bounded by M .Then

|Q ∩ I| ≤∣∣∣{ nm

: |m| ≤M, |n| ≤MK}∣∣∣ ≤ (2M + 1)(2MK + 1)

a contradiction since |Q ∩ I| is infinite.

(ii) Define f : [0, 1]→ R by

f(x) =

{1/n, x ∈

(1

n+1 ,1n

], n ∈ N

0, x = 0

Then S = { 1n : n ∈ N} is countably infinite.

8. Give an example of a bounded function which is continuous but not uniformly continuous.(If it is clear the function is bounded and continuous, just say so, but you should justify thefact that it is not uniformly continuous.)

Solution. Define f : (0, 1) → R by f(x) = cos(π/x). We will take for granted the fact that fis continuous. Assume (for contradiction) that f is uniformly continuous. Then there is δ > 0such that x, y ∈ (0, 1) and |x− y| < δ imply |f(x)− f(y)| < 1. Let x = 1/n and y = 1/(n+ 1)where n > 1/δ. Then

|x− y| =∣∣∣∣ 1n − 1

n+ 1

∣∣∣∣ =1

n(n+ 1)<

1n< δ

3

Page 4: Selected problems and solutions

but|f(x)− f(y)| = | cos(nπ)− cos((n+ 1)π)| = 2 ≥ 1

9. Let f : [a, b]→ R be a bounded function, define g : (a, b)→ R by g(x) = sup{f(y) : y < x},and let c ∈ (a, b). Prove that if limx→c f(x) = f(c), then limx→c g(x) = g(c).

Solution. We recall the following simple fact:

(∗) If x, y ∈ (a, b) with x < y, then f(x) ≤ g(y).

Assume limx→c f(x) = f(c). We will consider two cases: g(c) = f(c) and g(c) 6= f(c). Assumeg(c) = f(c). Let ε > 0 and choose δ > 0 such that |x− c| < δ implies1 |f(x)− f(c)| < ε. Picku, v such that c− δ < u < c < v < c+ δ. Note that f(x) ≤ g(c) for x < c and f(x) < f(c) + εfor c ≤ x < v. Thus x ∈ (u, v) and (∗) imply

g(c)− ε = f(c)− ε < f(u) ≤ g(x) ≤ max{g(c), f(c) + ε} = g(c) + ε.

It easily follows that limx→c g(x) = g(c). Now assume g(c) 6= f(c) and let ε = |f(c) − g(c)|.Choose δ such that |x − c| < δ implies |f(x) − f(c)| < ε. Then either f(x) > g(c) for allx ∈ (c − δ, c + δ), or f(x) < g(c) for all x ∈ (c − δ, c + δ). The former is impossible by (∗),so the latter must hold, which implies g is constant on (c − δ, c + δ). It easily follows thatlimx→c g(x) = g(c).

10. Let f and g be defined as in Problem 9, and let c ∈ (a, b). If f has a limit at c, must g havea limit at c? Either prove it, or provide a counterexample.

Solution. No. Define f : [−1, 1]→ R by f(x) = 0 for x 6= 0 and f(0) = 1. Then g : (−1, 1)→ Rhas the formula g(x) = 0 for x ≤ 0 and g(x) = 1 for x > 0. So f has a limit at 0, but g doesnot have a limit at 0.

11. Let A and B be disjoint subsets of R, and f : A ∪ B → R a continuous function. Assumef is uniformly continuous on A and on B. Must it be true that f is uniformly continuous onA ∪B? Prove it or provide a counterexample.

Solution. No. Let A = (0, 1) and B = (1, 2), and define f : A ∪B → R by

f(x) =

{0, x ∈ A1, x ∈ B

We first show f is continuous. Let x ∈ A ∪ B and ε > 0. If x ∈ A, pick δ > 0 such that(x − δ, x + δ) ⊂ A; if x ∈ B pick δ > 0 such that (x − δ, x + δ) ⊂ B. Let y ∈ A ∪ B be such

1Since c ∈ (a, b), δ > 0 can be chosen small enough so that |x− c| < δ also implies x ∈ [a, b].

4

Page 5: Selected problems and solutions

that |x − y| < δ. Then either x and y are both in A, or they are both in B. In either case|f(x)− f(y)| = 0 < ε, proving f is continuous.

Now we show f is uniformly continuous on A (the proof that f is uniformly continuouson B is analogous). Let ε > 0 and pick any δ > 0. Then x, y ∈ A and |x − y| < δ imply|f(x)− f(y)| = |0− 0| = 0 < ε.

To see that f is not uniformly continuous on A ∪ B, let ε = 1 and take any δ > 0. Letx = 1 − min{1/2, δ/4} and y = 1 + min{1/2, δ/4}. Then x, y ∈ A ∪ B and |x − y| < δ but|f(x)− f(y)| = |0− 1| = 1 ≥ ε.

12. Let f : R→ R be continuous and A ⊂ R compact. Must it be true that f−1(A) is compact?Prove it or provide a counterexample.

Solution. No. Define f : R→ R by

f(x) =1

1 + x2.

and observe that 0 ≤ f(x) ≤ 1 for all x ∈ R. Now [0, 1] ⊂ R is compact but f−1([0, 1]) = R isnot compact.

13. Define f : (0, 1) → R by f(x) = 0 if x is irrational, and f(x) = 1/m if x = n/m wheren,m ∈ N have no common prime divisors. Let x ∈ (0, 1). Prove that f is continuous at x ifand only if x is irrational.

Solution. Let ε > 0. Observe that if f(y) ≥ ε, then y ∈ Q and x = n/m where m ≤ 1/ε and1 ≤ n ≤ m. Thus,

S = {y ∈ (0, 1) : f(y) ≥ ε}

is finite. Pick δ = min{|x − y| : y ∈ S, y 6= x}. Then y ∈ (0, 1) and 0 < |x − y| < δ impliesy /∈ S, so that |f(y)− 0| = f(y) < ε. This proves that limy→x f(y) = 0. Since x is a limit pointof (0, 1), f is continuous at x if and only if limy→x f(y) = f(x). As f(x) = 0 if and only ifx /∈ Q, the result follows.

14. Let f : R→ R and suppose that:

(∗) for each c ∈ R, the equation f(x) = c has exactly two solutions.

Prove that f is not continuous.

Solution. Let c, d ∈ R with c 6= d. By (∗) we may pick p < q such that f(p) = f(q) = c andr < s such that f(r) = f(s) = d. One of the following must hold:

(i) x < u < v < y (ii) x < v < u < y

(iii) v < x < u < y (iv) x < u < y < v

5

Page 6: Selected problems and solutions

In all of cases (i)-(iv) we have

f(x) = f(y) = p, f(u) = f(v) = q.

We will consider only cases (i) and (iii), as the proofs in cases (ii) and (iv) are analogous.Suppose (i) holds. Pick any c ∈ (u, v). Then c ∈ [x, y] so we must have p ≤ f(c) ≤ q.

Combining this with (∗), we see that actually p < f(c) < q. Now by IVT, there exists a ∈ (x, u)and b ∈ (v, y) such that f(a) = f(b) = f(c). This contradicts (∗).

Now suppose (iii) holds. Pick any r such that p < r < q. Then by IVT there existsa ∈ (v, x), b ∈ (x, u), and c ∈ (y, v) such that f(a) = f(b) = f(c) = r.

15. Prove that for each positive real number x, there is a real number y such that y2 = x.(Hint: let y = sup{z ∈ R : z2 < x}, and show that y2 = x.)

Solution. Let x be a positive real number. First we show that y is well-defined. Note thatS ≡ {z ∈ R : z2 < x} is nonempty since it contains 0. Let z ∈ S. If z > x + 1 thenz2 > (x + 1)2 = x2 + 2x + 1 > x, contradiction. So z ≤ x + 1 which shows x + 1 is an upperbound of S. So y = supS exists. Note that x/2 is positive and (x/2)2 ∈ {z ∈ R : z2 < x}, whichshows y is positive. Suppose that y2 6= x. Assume first y2 > x. Choose 0 < δ < (y2 − 2)/(2y)such that also δ < y. Then (y − δ)2 > x. Let z ∈ S. If z > y − δ then z2 > (y − δ)2 > x,contradiction. So z ≤ y− δ, which shows y− δ is an upper bound of S, contrary to y being theleast upper bound of S. Now assume y2 < x. Choose 0 < δ < (x− y2)/(2y + 1) such that alsoδ < 1. Then (y + δ)2 < x, so y + δ ∈ S, contrary to y being an upper bound of S.

16. Let S be a set. Prove that S is infinite if and only if |A| = |S| for some proper subset A ofS.

Solution. Assume |A| = |S| where A is a proper subset of S. If S is finite, say |S| = |{1, . . . , n}|,then |A| = |{1, . . . , n − k}| < |{1, . . . , n}| = |S|, where k is the number of elements in S \ A,contradiction. So S is infinite as desired. Conversely assume S is infinite. Choose x1 ∈ S, thenx2 ∈ S \ {x1}, then x3 ∈ S \ {x1, x2}, ... in this way we have (by induction) distinct pointsxn ∈ S for all n ∈ N. Let T = {xn : n ∈ N} and define f : T → T by f(xn) = x2n. Sincethe xn’s are distinct f is injective, so f : T → f(T ) is bijective. Now define g : S → S byg(x) = f(x) if x ∈ T , and g(x) = x if x ∈ S \ T . Since f is injective so is g, so g : S → g(S) isbijective. Now A ≡ g(S) has the same cardinality as S, yet since f(T ) is a proper subset of T ,A = (S \ T ) ∪ f(T ) is a proper subset of S, as desired.

17. Give an example of a bounded countably infinite set of real numbers with a countablyinfinite set of limit points.

Solution. Consider S = {1/n+1/m : n,m ∈ N}. Then S is bounded (S ⊂ [0, 2]) and countablyinfinite, and the set of limit points of S is {1/n : n ∈ N}∪{0}, which is also countably infinite.

6

Page 7: Selected problems and solutions

18. Consider Q as a metric space with the usual distance function d(x, y) = |x− y|, and defineS = {x ∈ Q : 2 < x2 < 3}. Show that S is closed and bounded in Q, but that S is not compact.

Solution. Note that Sc = {x ∈ Q : x2 < 2 or x2 > 3} since ±√

2 /∈ Q, ±√

3 /∈ Q. Let x ∈ Sc.Then x2 > 3 or x2 < 2. If x2 > 3 and x > 0 choose2 δ > 0 such that (x − δ)2 > 3. If x2 > 3and x ≤ 0 choose δ > 0 such that (x + δ)2 > 3. If x2 < 2 and x > 0 choose δ > 0 such that(x+ δ)2 < 2. If x2 < 2 and x ≤ 0 choose δ > 0 such that (x− δ)2 < 2. Then (x− δ, x+ δ) ⊂ Sc,showing Sc is open. We conclude S is closed. Now S is bounded since S ⊂ B1(2), for example.To see that S is not compact, for each n ∈ N choose qn ∈ Q∩S such that

√3−1/n < qn <

√3.

Then it is not hard to see that {qn : n ∈ N} is an infinite subset of S with no limit point in S.

19. Let X be a metric space. A collection {Uα} of open subsets of X is called a base for X iffor every x ∈ X and every open set V in X containing x, we have x ∈ Uα ⊂ V for some Uα.Prove that the collection

S = {(q − ε, q + ε) : q ∈ Q, ε > 0 ∈ Q}

of neighborhoods in R with rational centers and rational widths is a base for R.

Solution. Let x ∈ R and let U be an open set containing x. Then there is a neighborhood(x− ε, x+ ε) of x such that (x− ε, x+ ε) ⊂ U . Choose q ∈ Q such that q ∈ (x− ε/3, x+ ε/3),and choose δ such that ε/3 < δ < 2ε/3. Then

x ∈ (q − δ, q + δ) ⊂ (x− ε, x+ ε) ⊂ U.

20. A metric space is called separable if it has a countable dense subset. Let X be a metricspace. Prove that X is separable if every infinite subset of X has a limit point.

(Hint: Let x1 ∈ X. Then pick x2 ∈ X \ Bδ(x1). Next pick x3 ∈ X \ (Bδ(x1) ∪ Bδ(x2)).Continuing in this way, show that X \ (Bδ(x1) ∪ . . . ∪ Bδ(xm)) must eventually be empty forsome m. Then consider neighborhoods of xi with δ = 1/n.)

Solution. Assume every infinite subset of X has a limit point. Let δ > 0 and choose xj ’s as inthe hint. If X \ (Bδ(x1) ∪ . . . ∪ Bδ(xm)) is nonempty for every m, then we obtain an infinitesubset {x1, x2, . . .} of X. This subset has a limit point x. Consider the neighbhorhood Bδ/2(x)of x. This neighborhood contains infinitely many xj ’s, so in particular it contains xi 6= xj .But xi, xj ∈ Bδ/2(x) implies that xj ∈ Bδ(xi), contrary to the construction of the xj ’s. Weconclude that X ⊂ Bδ(x1) ∪ . . . ∪ Bδ(xm) for some m. Let S be the set consisting of the allthe xj ’s chosen in this way, for each δ = 1/n, n = 1, 2, . . .. Since for each δ = 1/n we havefinitely many xj ’s, S is countable. To see that S is dense in X, let x ∈ X and let Bε(x) be aneighborhood of x. Choose n so that 1/n < ε, and pick an xj from S such that x ∈ B1/n(xj).(This is possible since S includes the centers of a collection of 1/n-neighborhoods which coverX.) Then xj ∈ Bε(x) as desired.

2See also HW1, problem 2.

7

Page 8: Selected problems and solutions

21. The Cantor set consists of real numbers which admit a ternary (base 3) decimal expansionof the form .a1a2a3... where an ∈ {0, 2} for all n. Use this to prove that the Cantor set isuncountable.

Solution. Let C be the Cantor set and write each element of C in the form described above.Define f : C → 2N by f(.a1a2a3 . . .) = {n ∈ N : an = 2}. It is easy to check that f is bijective.

22. Use decimal expansions as in Problem 1 to prove that the Cantor set is perfect.

Solution. Let C be the Cantor set. Let x = .a1a2a3 . . . be a point in R \ C, expressed as aternary expansion. Let m = min{n : an /∈ {0, 2}} and k = min{n > m : an 6= 2}. Notethat (x − 3−k, x + 3−k) contains no points of C. This shows the complement of C is open, soC is closed. Now let y = .b1b2b3 . . . be any point in C, written as a ternary expansion withbn ∈ {0, 2} for all n. Let yn = .c1c2c3 . . . where cj = bj for j 6= n and cn = 0 if bn = 2, andcn = 2 if bn = 0. Then yn ∈ C, yn 6= y for all n and |yn − y| = 2/3n. Any neighborhood(y − ε, y + ε) contains yn for n sufficiently large, showing y is a limit point of C.

23. Prove that if Un is a dense open subset of Rd for n = 1, 2, . . ., then ∩∞n=1Un is dense in Rd.

Solution. Let x ∈ Rd and let N be a neighborhood of x. Since U1 is dense in Rd we may pick apoint x1 ∈ U1 such that x1 ∈ N . Since U1 ∩N is open we may choose a closed ball3 B1 aroundx1 such that B1 ⊂ U1 ∩N . Suppose we have chosen closed balls B1, . . . , Bn around x1, . . . , xn,respectively, such that

(∗) Bj+1 ⊂ Bj , Bj ⊂ Uj .

Since Un+1 is dense in Rd and Bn contains an open ball B, we may pick a point xn+1 ∈ Un+1

such that xn+1 ∈ B ⊂ Bn. Now B ∩ Un+1 is open so we may pick a closed ball Bn+1 aroundxn+1 such that Bn+1 ⊂ B ∩ Un+1. In particular Bn+1 ⊂ Bn and Bn+1 ⊂ Un+1. By inductionwe have closed balls B1, B2, . . . satisfying (∗). So there is a point y ∈ ∩∞n=1Bn ⊂ ∩∞n=1Un. Sincealso y ∈ N , we see that ∩∞n=1Un is dense in Rd as desired.

24. Let X be a metric space and {an} a sequence in X.(i) Suppose that the range of {an} is bounded and has exactly one limit point, a. Must it

be true that {an} converges to a? Prove it, or provide a counterexample.(ii) Prove that {an} converges if and only if every subsequence of {an} converges.(iii) Prove that if two subsequences of {an} converge to different limits, then {an} does not

converge.

Solution. Consider first (i). Let X = R and an = 1 for n odd and an = 1/n for n even. Then

3That is, a set of the form {y ∈ Rd : |x − y| ≤ ε} where x ∈ Rd and ε > 0. We may choose an open ball(neighborhood) with the same property; to get a closed ball with this property simply divide the radius in half.The closed balls are bounded by definition, hence compact.

8

Page 9: Selected problems and solutions

the range of {an} has exactly one limit point, namely 0, but {an} does not converge. Considernow (ii). Assume {an} converges, say to a. Let ε > 0. Choose N such that n ≥ N impliesd(an, a) < ε. Let {ank

} be a subsequence of {an}. Then k ≥ N implies nk ≥ k ≥ N andso d(ank

, a) < ε. This shows that every subsequence of {an} converges to a. Notice that wehave just proved (iii). Conversely, if every subsequence of {an} converges, then {an} converges(every sequence is a subsequence of itself). This finishes the proof of (ii).

25. Let X be a metric space and E a closed and bounded subset of X. Must it be true thatevery sequence in E has a subsequence which converges to a point in E? Either prove it orprovide a counterexample.

Solution. No. Let X = Q with d(x, y) = |x − y|, let E = {x ∈ X :√

2 < x <√

3}, andpick xn ∈ E such that |xn −

√2| < 1/n. Then {xn} has no subsequence which converges to

a point of E. (To see this, for a given y ∈ E, let ε = |y −√

2|/2; for any n > 1/ε we have|xn − y| ≥ |y −

√2| − |

√2− xn| > 2ε− ε = ε.)

26. Define a0 = 2 and an+1 = φ(an) for n ≥ 0, where

φ(x) :=x+ 2

x

2.

Prove that {an}∞n=1 is decreasing and bounded below4, hence convergent. Then let X =[√

2, 2] ⊂ R and use our result on contraction mappings to show that {an}∞n=1 converges to√2. What can be said about the rate of convergence?

Solution. By the geometric-arithmetic mean inequality

φ(x) ≥

√x

(2x

)=√

2

and so alsoφ(x)x

=1 + 2

x2

2≤ 1.

In particular this shows {an}∞n=1 is decreasing and bounded below by√

2. Now we show {an}∞n=1

satisfies the conditions of Problem 3 with X = [√

2, 2] and k = 1/4. The two displays aboveimply that φ(X) ⊂ X. Let x, y ∈ X with x < y. Then

φ(x)− φ(y) =x− y

2+y − xxy

∈[x− y

4, 0]

which shows |φ(x)−φ(y)| ≤ k|x−y|. By solving x∗ = φ(x∗) and selecting the positive solution weconclude that {an}∞n=1 converges to x∗ =

√2. It is not hard to see that the rate of convergence

4You may use without justification the geometric-arithmetic mean inequality, which states that (x + y)/2 ≥√xy for positive real numbers x, y.

9

Page 10: Selected problems and solutions

satisfies the upper bound

|xn − x∗| ≤kn

1− k|x0 − x1| =

23

(14

)n.

27. Give an example of a continuous bijective function f : X → Y between metric spaces Xand Y , such that f−1 is not continuous.

Solution. Define f : [0, 1) ∪ [2, 3]→ [0, 2] by

f(x) =

{x, x ∈ [0, 1)4− x, x ∈ [2, 3]

Then f is continuous and bijective, but

f−1(x) =

{x, x ∈ [0, 1)4− x, x ∈ [1, 2]

is not continuous.

28. Let D ⊂ R be bounded and f : D → R a uniformly continuous function.

(i) Let a be a limit point of D. Prove that f has a finite limit at a.(ii) Use (i) to show that f can be extended to a continuous function on the closure of D.(iii) Conclude that f(D) is bounded.

Solution. (i) Let {an} be a sequence in D \ {a} converging to a. By Problem 4 on Midterm2, it suffices to show that {f(an)} converges. Let ε > 0. Using uniform continuity, pick δ > 0such that x, y ∈ D and |x − y| < δ imply |f(x) − f(y)| < ε. Since convergent sequences areCauchy, we may pick N such that n,m ≥ N implies |an − am| < δ. Then n,m ≥ N implies|f(an)− f(am)| < ε. So {f(an)} is Cauchy, hence convergent.

(ii) Define an extension f : D → R by

f(x) =

{f(x), x ∈ Dlimy→x f(y), x ∈ D \D

Then f is well-defined by part (i), and it is continuous by construction.(iii) Note that D ⊂ R is closed by definition and bounded since D is bounded. So D ⊂ R

is compact. Now f is continuous so f(D) ⊂ R is compact, hence bounded. As f(D) = f(D) ⊂f(D), we conclude that f(D) is bounded.

29. Let X and Y be metric spaces. A function f : X → Y is said to be Lipschitz continuous ifthere is K > 0 such that for all x, y ∈ X,

d(f(x), f(y)) ≤ K d(x, y). (3)

10

Page 11: Selected problems and solutions

Prove that Lipschitz continuous functions are uniformly continuous. Give an example to showthat the converse is false.

Solution. Let f : X → Y satisfy equation (3) for all x, y ∈ X. Let ε > 0 and pick δ = ε/K.Then x, y ∈ X and d(x, y) < δ imply

d(f(x), f(y)) ≤ K d(x, y) < Kδ = ε.

To see that the converse is false, consider f : [0, 1] → R, f(x) =√x. We have seen that f is

continuous. Since [0, 1] is compact, f is uniformly continuous. However, equation (3) will nothold when x = 0 and 0 ≤ y < 1/K2.

30. Let f : R → R be continuous and suppose that f(U) is open for each open set U ⊂ R.Prove that f is monotonic.

Solution. Suppose f is not monotonic. Then there exists x < y < z such that either f(x) < f(y)and f(y) > f(z), or f(x) > f(y) and f(y) < f(z). We will consider only the former case, asthe latter is analogous. Since f is continuous, it attains a maximum value on [x, z], say

f(u) = v = sup{f(z) : z ∈ [x, z]}

for some u ∈ [x, z]. Since y ∈ (x, z) and f(y) > f(x), f(y) > f(z), we must actually haveu ∈ (x, z). Now let U = (x, z) and note that v ∈ f(U). But for any ε > 0, (v − ε, v + ε) is nota subset of f(U): for example v + ε/2 /∈ f(U). So f(U) is not open, contradiction.

31. Let f : [a, b]→ R. Prove the following statements:

(i) If f is continuous and injective, then f is monotone.(ii) If f is differentiable and f ′(x) 6= 0 for all x ∈ (a, b), then f is injective.(iii) If f is differentiable and f ′(a) < 0 < f ′(b), then there is c ∈ (a, b) such that f ′(c) = 0.(iv) If f is differentiable and f ′(a) < d < f ′(b), then there is c ∈ (a, b) such that f ′(c) = d.

Solution. (i) Suppose f is continuous and injective, yet f is not monotone. Then there existx, y, z ∈ [a, b], with x < y < z, such that either (a) or (b) below holds:

(a) f(x) < f(y) and f(y) > f(z)(b) f(x) > f(y) and f(y) < f(z)

We will consider only case (a), as (b) is similar. If f(z) < f(x), then by IVT there existsw ∈ (y, z) such that f(w) = f(x), contradiction to injectivity of f . If f(z) > f(x), then thereexists w ∈ (x, y) such that f(w) = f(z), again contrary to injectivity of f .

(ii) Assume f is differentiable on (a, b). Suppose f is not injective. Then there is x <y ∈ [a, b] such that f(x) = f(y). By MVT, there exists c ∈ (x, y) ⊂ (a, b) such that f ′(c) =[f(y)− f(x)]/(y − x) = 0.

11

Page 12: Selected problems and solutions

(iii) Assume f is differentiable on (a, b), and f ′(x) 6= 0 for all x ∈ (a, b). Then by (ii),f is injective, so by (i), f is monotone. If f is increasing, then for any x 6= y ∈ (a, b),[f(y)−f(x)]/(y−x) ≥ 0, which shows f ′(x) ≥ 0. If f is decreasing, then for any x 6= y ∈ (a, b),[f(y)− f(x)]/(y − x) ≤ 0, which shows f ′(x) ≤ 0.

(iv) Suppose f is differentiable and f ′(a) < d < f ′(b). Define g(x) = f(x)−xd for x ∈ [a, b].Then g is differentiable and g′(a) < 0 < g′(b), so by (iii), there exists c ∈ (a, b) such thatg′(c) = 0. Thus f ′(c) = g′(c) + d = d.

32. Give an example of a function f such that f ′ exists on [0, 1] but is not continuous on [0, 1].Note that by Problem 31, such f ′ will have the intermediate value property, despite beingdiscontinuous.

Solution. Define f : [0, 1]→ R by

f(x) =

{x2 sin(1/x), x ∈ (0, 1]0, x = 0

Then f ′(x) = 2x sin(1/x)− cos(1/x) for x > 0 and

f ′(0) = limx→0

x2 sin(1/x)− 0x− 0

= limx→0

x sin(1/x) = 0.

Thus f ′ exists on [0, 1] but is not continuous at 0, since f ′ does not have a limit at 0.

33. Suppose f is defined in a neighborhood of x and f ′′(x) exists. Prove that

limh→0

f(x+ h) + f(x− h)− 2f(x)h2

= f ′′(x).

Give an example in which the limit above exists but f ′′ does not exist.

Solution. Note that the assumptions imply that f ′ is defined in a neighborhood (x − δ, x + δ)of x. For h ∈ [0, δ/2], define

p(h) = f(x+ h) + f(x− h)− 2f(x), q(h) = h2.

Now p and q are differentiable on (0, δ/2), q′(h) 6= 0 for all h ∈ (0, δ/2), p(0) = q(0) = 0, andby the chain rule,

limh→0

p′(h)q′(h)

= limh→0

f ′(x+ h)− f ′(x− h)2h

= limh→0

(f ′(x+ h)− f ′(x)

2h+f ′(x)− f ′(x− h)

2h

)=f ′′(x)

2+f ′′(x)

2= f ′′(x).

12

Page 13: Selected problems and solutions

So by L’Hospital’s rule,

limh→0

p(h)q(h)

= f ′′(x),

as desired.For the example, define f : R→ R by

f(x) =

{x2

2 , x > 0−x2

2 , x ≤ 0

Then f ′(x) = |x|, which we have seen is not differentiable at 0. However,

limh→0

f(h) + f(−h)− 2f(0)h2

= limh→0

h2 − (−h)2

h2= 0.

34. Let f ′ be differentiable on [a − h, a + h] such that f ′′ is continuous at a. If f ′(a) = 0and f ′′(a) < 0, use Taylor’s theorem to show that f has a strict local maximum at a, thatis, f(x) < f(a) for x in a neighborhood of a. Is the assumption that f ′′ is continuous at anecessary?

Solution. Taylor’s theorem shows that

f(x)− f(a)x− a

=12f ′′(ζ),

where ζ is between x and a. Since f ′′(a) < 0 and f ′′ is continuous at a, the RHS above isnegative for x in a neighborhood of a. However, continuity at a is not needed. By definition of(second) derivative,

f ′(x)− f ′(a)x− a

=f ′(x)x− a

is negative for x in a neighborhood (a−δ, a+δ) of a. This shows that f ′(x) > 0 for x ∈ (a−δ, a)and f ′(x) < 0 for x ∈ (a − δ, a). Finally MVT shows that f is strictly increasing on [a − δ, a]and strictly decreasing on [a, a+ δ], which allows us to conclude.

35. Let (X, dX) and (Y, dY ) be metric spaces withX compact, let Z = {f : X → Y | f is continuous},and define dZ : Z × Z → R by

dZ(f, g) = supx∈X

dY (f(x), g(x)).

Prove that dZ is a metric.

Solution. Fix f, g ∈ Z and define φ : X → R by φ(x) = dY (f(x), g(x)). We first claimthat φ is continuous. Let ε > 0 and x ∈ X. Pick δ > 0 such that dX(y, x) < δ implies

13

Page 14: Selected problems and solutions

dY (f(y), f(x)) < ε/2 and dY (g(y), g(x)) < ε/2. Then dX(y, x) < δ implies

|φ(y)− φ(x)| = |dY (f(y), g(y))− dY (f(x), g(x))|≤ |dY (f(y), g(y))− dY (f(x), g(y))|+ |dY (f(x), g(y)− dY (f(x), g(x))|≤ dY (f(y), f(x)) + dY (g(y), g(x)) < ε

with the last line coming from the triangle inequality in Y . Since X is compact it follows thatdZ(f, g) = supx∈X φ(x) is finite. Note that dZ(f, g) ≥ 0 and for any h ∈ Z,

dZ(f, g) = supx∈X

dY (f(x), g(x)) = supx∈X

dY (g(x), f(x)) = dZ(g, f),

dZ(f, g) = 0⇐⇒ supx∈X

dY (f(x), g(x)) = 0

⇐⇒ dY (f(x), g(x)) = 0 ∀ x ∈ X ⇐⇒ f(x) = g(x) ∀ x ∈ X,dZ(f, g) = sup

x∈XdY (f(x), g(x)) ≤ sup

x∈X[dY (f(x), h(x)) + dY (h(x), f(x))]

≤ supx∈X

dY (f(x), h(x)) + supx∈X

dY (h(x), g(x)) = dZ(f, h) + dZ(h, g).

These statements follow from the fact that dY is a metric.

36. Let Z, X and Y be as in Problem 35, and consider continuous functions fn : X → Y . Provethat fn converges uniformly if and only if {fn} converges in (Z, dZ).

Solution. Suppose {fn} converges uniformly to f . Then since each fn is continuous, f iscontinuous, so f ∈ Z. Let ε > 0 and pick N such that n ≥ N implies dY (fn(x), f(x)) < ε forall x ∈ X. Then n ≥ N implies

dZ(fn, f) = supx∈X

dY (fn(x), f(x)) ≤ ε,

which shows that {fn} converges to f in (Z, dZ). Conversely assume that {fn} converges to fin (Z, dZ). Pick N such that n ≥ N implies

dZ(fn, f) = supx∈X

dY (fn(x), f(x)) < ε.

Then n ≥ N implies dY (fn(x), f(x)) < ε for all x ∈ X, which shows uniform convergence.

37. Give an example of sequences {fn}, {gn} of uniformly converging functions such that {fngn}does not converge uniformly.

Solution. Let fn(x) = x+ 1/n = gn(x) be defined on [0,∞). Given ε > 0, pick N > 1/ε. Thenn ≥ N implies |fn(x)− x| = 1/n < ε for all x ∈ [0,∞), which shows uniform convergence to x.Observe that (fngn)(x) = x2 + 2x/n+ 1/n2 converges pointwise to x2. For ε = 1, observe thatfor any N ,

|(fNgN )(x)− x2| = 2xN

+1N2

> 1 = ε

14

Page 15: Selected problems and solutions

when x ≥ N/2. Hence, the convergence is not uniform.

38. Definefn(x) =

x

1 + nx2.

Prove that {fn} converges uniformly to a function f. Show that f ′(x) = limn→∞ f′n(x) except

when x = 0.

Solution. Since each fn is odd, it suffices to consider convergence on [0,∞). On this intervalwe have

f ′n(x) =1− nx2

(1 + nx2)2= 0⇐⇒ x = n−1/2.

andfn(n−1/2) =

12n1/2

.

We claim that0 ≤ fn(x) ≤Mn :=

12n1/2

, x ∈ [0,∞). (4)

If not, there is y ∈ [0,∞) such that fn(y) > Mn. Suppose y < n−1/2. Since f(0) = 0, IVTimplies there is u ∈ (0, y) such that f(u) = Mn, and consequently Rolle’s theorem impliesthere is v ∈ (u, n−1/2) such that f ′n(v) = 0, contradiction. Suppose then that y > n−1/2.Since limx→∞ fn(x) = 0, IVT implies there is u ∈ (y,∞) such that f(u) = Mn, and so Rolle’stheorem implies there is v ∈ (n−1/2, u) such that f ′(v) = 0, contradiction. Note that (4) impliesuniform convergence, since Mn does not depend on x and limn→∞Mn = 0. The last statementis straightforward to check.

39. Give an example of a sequence of equicontinuous functions {fn} that converges pointwisebut not uniformly.

Solution. Define fn : R→ R by fn(x) = x− (n− 1) for x ∈ [n− 1, n], fn(x) = (n+ 1)− x forx ∈ [n, n+ 1] and fn(x) = 0 otherwise. To establish equicontinuity, given ε > 0 let δ = ε; then|fn(x)− fn(y)| < ε whenever |x− y| < δ and n ∈ N. To see pointwise convergence, given ε > 0and x ∈ R, pick N > x+ 1. Then n ≥ N implies fn(x) = 0, showing that {fn} converges to 0pointwise. To see that the convergence is not uniform, let ε = 1/2, take any N , and note that|fN (N)− 0| = |1− 0| = 1 > ε.

40. Let fn : [a, b] → R be monotone for each n. Suppose {fn} converges pointwise to acontinuous function. Show that it converges uniformly.

Solution. Let f be the pointwise limit of {fn}, which is uniformly continuous since [a, b] iscompact. Let ε > 0 and pick δ > 0 such that |x − y| < δ implies |f(x) − f(y)| < ε/2. As

15

Page 16: Selected problems and solutions

{(x− δ/2, x+ δ/2)}x∈[a,b] is an open cover of [a, b], there is a finite subcover,

[a, b] ⊂(x1 −

δ

2, x1 +

δ

2

)∪ . . . ∪

(xk −

δ

2, xk +

δ

2

).

where WLOG x1 < . . . < xk. Observe that then xi−xi−1 < δ for i = 2, . . . , k. For i = 1, . . . , k,pick Ni such that n ≥ Ni implies |fn(xi) − f(xi)| < ε/2. Let N = max{N1, . . . , Nk} and letn ≥ N . Assume WLOG that fn is increasing. Fix any x ∈ [a, b]; we have x ∈ [xi−1, xi] for somei = 2, . . . , k. Then

fn(xi−1)− f(x) ≤ fn(x)− f(x) ≤ fn(xi)− f(x)

and so|fn(x)− f(x)| ≤ max{|fn(xi−1)− f(x)|, |fn(xi)− f(x)|},

while for j = i− 1 or j = i,

|fn(xj)− f(x)| ≤ |fn(xj)− f(xj)|+ |f(xj)− f(x)| < ε

2+ε

2= ε.

Combining the last two expressions gives

|fn(x)− f(x)| < ε.

41. Let X be compact, fn : X → R, and {fn} equicontinuous. Suppose {fn} convergespointwise. Prove that it converges uniformly.

Solution. Let ε > 0. Pick δ > 0 such that d(x, y) < δ implies |fn(x) − fn(y)| < ε/3 for all n.Since {Bδ(x)}x∈X is an open cover of X, there is a finite subcover

X ⊂ Bδ(x1) ∪ . . . ∪Bδ(xk).

For i = 1, . . . , k, pick Ni such that m,n ≥ Ni implies |fn(xi) − fm(xi)| < ε/3, and let N =max{N1, . . . , Nk}. Let m,n ≥ N and let x ∈ X be arbitrary. Then x ∈ Bδ(xi) for some i and

|fn(x)− fm(x)| ≤ |fn(x)− fn(xi)|+ |fn(xi)− fm(xi)|+ |fm(xi)− fm(x)| < ε

3+ε

3+ε

3= ε.

42. Let φ : [0, 1] × R → R be continuous. Suppose there is 0 < M < 1 such that |φ(r, s) −φ(r, t)| ≤M |s− t| for all r ∈ [0, 1] and s, t ∈ R. Prove there is a solution to

y′ = φ(x, y), y(0) = c

as follows: Let Z be the set of continuous functions [0, 1]→ R with the sup metric (see HW5,Problem 1), and show that

Ψ(f)(x) = c+∫ x

0φ(t, f(t)) dt, x ∈ [0, 1]

16

Page 17: Selected problems and solutions

is a contraction mapping on Z.

Solution. Observe that Ψ(Z) ⊂ Z and

dZ(Ψ(f),Ψ(g)) = supx∈[0,1]

|Ψ(f)(x)−Ψ(g)(x)|

= supx∈[0,1]

∣∣∣∣∫ x

0[φ(t, f(t))− φ(t, g(t))] dt

∣∣∣∣≤ sup

x∈[0,1]

∫ x

0|φ(t, f(t))− φ(t, g(t))| dt

≤ supx∈[0,1]

|φ(x, f(x))− φ(x, g(x))|

≤ supx∈[0,1]

K|f(x)− g(x)|

= KdZ(f, g),

proving that Ψ is a contraction mapping. Note also that Z is complete: if {fn} is a Cauchysequence in Z then it is uniformly convergent (see also Problem 36), so its limit must be acontinuous function, hence an element of Z. This allows us to conclude. Observe that M < 1 isnot needed; we can divide the differential equation by any nonzero constant and it still holds.

43. Let φ : [0, 1] × R → R be continuous. Suppose there is M > 1 such that |φ(r, s)| ≤ M forall r ∈ [0, 1] and s ∈ R. Let Z and Ψ be as in Problem 42 and define

E = {f ∈ Z : |f(x)− c| ≤M and |f(x)− f(y)| ≤M |x− y| for all x, y ∈ [0, 1]}.

Show that Ψ(E) ⊂ E and use the Arzela-Ascoli theorem to show that E is compact.

Solution. Let f ∈ E. Then

|Ψ(f)(x)− c| = |∫ x

0φ(t, f(t)) dt| ≤M

and

|Ψ(f)(x)−Ψ(f)(y)| =∣∣∣∣∫ x

yφ(t, f(t)) dt

∣∣∣∣ ≤M |x− y|.Thus, Ψ(E) ⊂ E. Note that E is uniformly bounded (by M + c) and equicontinuous: givenε > 0, pick δ = ε/M ; then |x− y| < δ implies |f(x)− f(y)| ≤M |x− y| = ε for all f ∈ E. It iseasy to see that E is also closed. So the Arzela-Ascoli theorem shows that E is compact.

One can also check that E is convex, and then the Brouwer fixed point theorem5 shows thatΨ|E has a fixed point. (This gives an alternate proof of existence of a solution to the ODE inProblem 42.)

5We did not discuss this theorem in class, you don’t need to know it

17

Page 18: Selected problems and solutions

44. Let fn, f : X → R be such that f is continuous at x and fn → f uniformly. Show thatxn → x in X implies fn(xn)→ f(x).

Solution. Assume xn → x and let ε > 0. Pick Nf such that n ≥ N implies |fn(y)− f(y)| < ε/2for all y ∈ X, pick δ > 0 such that d(y, x) < δ implies |f(y) − f(x)| < ε/2, and pick Nx suchthat n ≥ Nx implies d(xn, x) < δ. Let N = max{Nf , Nx}. Then n ≥ N implies

|fn(xn)− f(x)| ≤ |fn(xn)− f(xn)|+ |f(xn)− f(x)| < ε

2+ε

2= ε.

45. Let fn, f : X → R be such that X is compact, f is continuous, and fn(xn)→ f(x) wheneverxn → x in X. Show that {fn} converges uniformly to f .

Solution. Suppose that {fn} does not converge uniformly to f . Then there is ε > 0 such thatfor all N , there exists n ≥ N and y ∈ X such that |fn(y) − f(y)| ≥ ε. This allows us to buildinductively a sequence {ynk

} such that |fnk(ynk

) − f(ynk)| ≥ ε for all k. Since X is compact,

{ynk} has a subsequence {xn} converging to some point x ∈ X. Thus, fn(xn)→ f(x) but

|fn(xn)− f(xn)| ≥ ε for all n.

Pick δ > 0 such that d(y, x) < δ implies d(f(y), f(x)) < ε/2, and pick N such that n ≥ Nimplies d(xn, x) < δ. Then n ≥ N implies

|fn(xn)− f(x)| ≥ |fn(xn)− f(xn)| − |f(xn)− f(x)| > ε− ε

2=ε

2,

so that {fn(xn)} does not converge to f(x), contradiction.

46. Let f : [0,∞) → R and for all n define fn : [0,∞) → R by fn(x) = f(xn). Under whatconditions on f is {fn} equicontinuous?

Solution. If f is a constant function, then of course {fn} is equicontinuous. So suppose f isnonconstant, say f(s) = a and f(t) = b for some s 6= t ∈ [0,∞). Let ε = |b − a|/2. If f isequicontinuous, there is δ > 0 such that |x − y| < δ implies |fn(x) − fn(y)| < ε for all n. Letsn = n

√s and tn = n

√t. Note that |fn(sn)− fn(tn)| = |f(s)− f(t)| = |b− a| > ε for all n, but

we may choose n large enough so that |sn− tn| < δ. Thus, {fn} cannot be equicontinuous. Wehave shown that {fn} is equicontinuous if and only if f is constant.

47. Let fn : [a, b] → (0,∞) be continuous, such that f(x) =∑∞

n=1 fn(x) is continuous. Showthat

∑∞n=1 fn(x) converges uniformly on [a, b].

Solution. Let gn(x) = f(x)−∑n

k=1 fk(x) for x ∈ [a, b]. By our assumptions gn is nonnegativeand continuous, gn(x) ≤ gn+1(x) for all x ∈ [a, b], and gn → 0 pointwise. Let ε > 0 and

18

Page 19: Selected problems and solutions

define Un = {x ∈ [a, b] : gn(x) < ε}. Then U1 ⊂ U2 ⊂ . . . since gn ≤ gn+1, pointwiseconvergence implies that ∪∞n=1Un = [a, b], and continuity of gn shows that Un is open in [a, b].Compactness of [a, b] yields a finite subcover of the Un’s, say [a, b] = Un1 ∪ . . . ⊂ Unk

= UNwhere N = max{n1, . . . , nk}. Moreover, n ≥ N implies [a, b] = UN ⊂ Un and so gn(x) < ε forall x ∈ [a, b]. (This is a special case of Dini’s theorem.)

48. Let {fn} be a sequence of continuous functions [a, b]→ R. Suppose fn → f uniformly andf is continuous. Must the convergence be uniform?

Solution. No, Let [a, b] = [0, 1] and let f(x) = 0 for x ∈ [2/n, 1], f(x) = 2/n − x/n forx ∈ [1/n, 2/n], and f(x) = x/n for x ∈ [0, 1/n]. Then {fn} are all continuous and convergepointwise to 0, but the convergence is not uniform since fn(1/n) = 1 for all n (see Problem 44).

49. Let fn : X → R be a uniformly convergent sequence of continuous functions on X. Give anexample to show that {fn} may not be equicontinuous.

Solution. Let fn(x) = sin(1/x)/n be defined on (0, 1). Since |fn(x)| ≤ 1/n for all x ∈ (0, 1),{fn} converges uniformly to 0. However, {fn} is not equicontinuous because (each) fn is notuniformly continuous.

50. Let fn : X → R be such that X is compact and {fn} is pointwise bounded and equicontin-uous. Let φ(x) = supn∈N |fn(x)|. Show φ is continuous.

Solution. Note that φ is well-defined by pointwise boundedness. Let ε > 0 and pick δ > 0 suchthat d(x, y) < δ implies |fn(x)− fn(y)| < ε for every n. Fix x, y ∈ X be such that d(x, y) < δ.Then for every n,

|fn(x)| < |fn(y)|+ ε, |fn(y)| < |fn(x)|+ ε,

and soφ(x) ≤ φ(y) + ε, φ(y) ≤ φ(x) + ε.

Thus, |φ(x)− φ(y)| ≤ ε.

51. Suppose fn : [a, b]→ R is such that∑fn converges uniformly. Show that fn → 0 uniformly.

Solution. Let sn be the nth partial sum, let ε > 0 and pick N such that n ≥ N implies∣∣∣∣∣sn−1(x)−∞∑n=1

fn(x)

∣∣∣∣∣ =

∣∣∣∣∣∞∑k=n

fk(x)

∣∣∣∣∣ < ε

2.

19

Page 20: Selected problems and solutions

for all x ∈ [a, b]. Then n ≥ N implies

|fn(x)| =

∣∣∣∣∣∞∑

k=n+1

fk(x)−∞∑k=n

fk(x)

∣∣∣∣∣ < ε

2+ε

2= ε

for all x ∈ [a, b].

52. Let f : [0, 1]→ R be infinitely differentiable, such that f (n)(0) = 0 for n = 0, 1, 2, . . . but fis not identically zero. Suppose that

∑anf

(n) converges uniformly. Show that limn!an = 0.

Solution. Pick y ∈ [0, 1] such that f(y) 6= 0. By Taylor’s theorem,

|f(y)| = |f(n)(ζn)|yn

n!, n = 1, 2, . . . ,

where ζn ∈ (0, y). Thus,

|f(y)n!an| ≤|f(y)n!an|

yn= |anf (n)(ζn)|. (5)

By Problem 51, {anf (n)} converges uniformly to 0. So given ε > 0, we may choose n such thatn ≥ N implies |anf (n)(x)| < ε|f(y)| for all x ∈ [0, 1]. Then from (5), n ≥ N implies |n!an| < ε.

53. Suppose fn : Rk → R is such that {fn} is equicontinuous and converges pointwise to f .Show that f is continuous.

Solution. Fix x ∈ X and δ > 0. Observe that Bδ(x) is compact. Recall that a sequence ofcontinuous functions on a compact space converges uniformly if and only if it is equicontinuousand converges pointwise. Hence, {fn} converges uniformly on Bδ(x) and so f is continuous onBδ(x), and in particular at x.

54. Let f : R→ Rn (n ≥ 2) be differentiable with f ′(t) 6= 0 for all t. Fix p /∈ f(R) and let q bea point on f(R) with minimal distance to p (assumed to exist). Show that p− q is orthogonalto f(R) at q.

Solution. Define φ : R → R by φ(t) = |f(t) − p|2. By assumption φ has a minimum at t = t0,where f(t0) = q. Thus, 0 = φ′(t0) = 2(f(t0)− p) · f ′(t0).

55. Suppose f : Rn → R is such that f(tx) = tf(x) for all t ∈ R and x ∈ Rn, but f is not linear.Show that f has directional derivatives at the origin, but is not differentiable there. Give anexample of such a function.

20

Page 21: Selected problems and solutions

Solution. We prove the contrapositive. Suppose that f differentiable. Then

0 = limt→0

f(tv)− f(0)− f ′(0)(tv)t

= f(v)− f ′(0)v,

showing f(v) = f ′(0)v, that is, f is linear. An example is f(x, y) = (x1/3 + y1/3)3.

56. Define f : R2 → R by f(x, y) = xy. Use the definition of derivative to show that f isdifferentiable everywhere, with df(a,b)(x, y) = bx+ ay.

Solution. Define L(x, y) = bx+ ay. Then

|f(a+ x, b+ y)− f(a, b)− L(x, y)||(x, y)|

=|xy|√x2 + y2

≤ x2 + y2√x2 + y2

= |(x, y)| → 0 as (x, y)→ 0.

57. Let E ⊂ Rn be open and f : E → R differentiable. Prove that if f has a local maximum ata ∈ E, then f ′(a) = 0.

Solution. Suppose f has a local maximum at a. Then for i = 1, . . . , n and sufficiently small t,

f(a+ tei)− f(a)t

≤ 0, if t > 0,f(a+ tei)− f(a)

t≥ 0, if t < 0.

This shows that Dif(a) = 0 for i = 1, . . . , n and so f ′(a) = (D1f(a), . . . , Dnf(a)) = 0.

58. For E ⊂ R2, suppose f : E → R is differentiable with D1f(x) = 0 for all x ∈ E. Underwhat condition on E can we say f depends on x2 only?

Solution. This will be true if for each x2 ∈ R, the set Ex2 := {x1 ∈ R : (x1, x2) ∈ E}is connected (the empty set being considered connected vacuously). Fix x2 ∈ R and defineg(x1) = f(x1, x2) on Ex2 . Suppose g(x1) 6= g(x′1). Our condition implies that Ex2 contains theinterval between x1 and x′1, so by the single variable MVT there is t between x1 and x′1 suchthat g′(t) 6= 0. But g′(t) = D1f(t, x2), contradiction.

59. Let f : U → Rm be of class C1, with U ⊂ Rn an open set containing the line segment Lfrom a to a+ h. Suppose T : Rn → Rm is linear with matrix A. Show that

|f(a+ h)− f(a)− T (h)| ≤ |h|maxx∈L||f ′(x)−A||.

Solution. Define g(x) = f(x)− T (x). The multivariate MVT implies

|g(a+ h)− g(a)| ≤ |h|maxx∈L||g′(x)||.

21

Page 22: Selected problems and solutions

By linearity of T and the fact that its derivative matrix at any point is A, this can be rewritten

|f(a+ h)− f(a)− T (h)| ≤ |h|maxx∈L||f ′(x)−A||.

60. Let f : Rm → Rm be of class C1 on the unit ball B1(0). Suppose that f(0) = 0, f ′(0) = Iand ||f ′(x)− I|| < ε for all x ∈ B1(0). Use Problem 59 to show that f(B1(0)) ⊂ B1+ε(0).

Solution. With 1 the identity map, x, y ∈ B1(0), and L the line segment from x to y,

|f(x)− f(y)− (x− y)| = |f(x)− f(y)− 1(x− y)| ≤ |x− y|maxz∈L||f ′(z)− I|| < ε|x− y|,

where the first inequality above comes from Problem 59, and the second from assumption6. Thus,

|f(x)− f(y)| < (1 + ε)|x− y|.

Taking y = 0 and using f(0) = 0, we get

|f(x)| < (1 + ε)|x| ≤ 1 + ε.

61. Let f : Rn → Rm be of class C1 at a and suppose dfa : Rn → Rm is injective. UseProblem 59 to show that f is injective in a neighborhood of a.

Solution. First notice that

|dfa(x)| = |x|∣∣∣∣dfa( x

|x|

)∣∣∣∣ ≥ |x|min|y|=1|dfa(y)| = c|x|

where c > 0 since dfa is injective. Next, note that since f is class C1 at a, there is δ > 0 suchthat ||f ′(z)− f ′(a)|| < ε < c for all z ∈ Bδ(a). So with x 6= y ∈ Bδ(a) and L the line segmentfrom x to y, we have

||f(x)− f(y)|− |dfa(x− y)|| ≤ |f(x)− f(y)−dfa(x− y)| ≤ |x− y|maxz∈L||f ′(z)− f ′(a)|| < ε|x− y|

by Problem 59. Thus,

|f(x)− f(y)| > |dfa(x− y)| − ε|x− y| ≥ c|x− y| − ε|x− y| = (c− ε)|x− y| > 0.

62. Let f : X → X, with X a complete metric space and f Lipschitz continuous with constant0 < K < 1. Prove that there is a unique fixed point x∗ ∈ X satisfying f(x∗) = x∗, and for eachx ∈ X,

d(fn(x), x∗) ≤Kn

1−Kd(f(x), x).

6Note that convexity of B1(0) has also been used.

22

Page 23: Selected problems and solutions

Solution. Fix x ∈ X. For m > n,

d(fm(x), fn(x)) ≤ d(fm(x), fm−1(x)) + . . .+ d(fn+1(x), fn(x))

≤(Km−1 + . . .+Kn

)d(f(x), x)

≤ Kn

1−Kd(f(x), x).

(6)

So {fn(x)} is Cauchy. Since X is complete, {fn(x)} converges, say to x∗. By continuity of f ,

f(x∗) = f(

limn→∞

fn(x))

= limn→∞

fn+1(x) = x∗.

If y∗ satisfies f(y∗) = y∗ then

d(x∗, y∗) = d(f(x∗), f(y∗)) ≤ Kd(x∗, y∗),

which is impossible unless x∗ = y∗. The estimate on the rate of convergence to x∗ comes fromletting m→∞ in (6).

63. Let G : R2 → R be class C1, such that G(a, b) = 0 and D2G(a, b) 6= 0. Prove7 that thereexists a continuous real-valued function f , defined on an open interval around a, such thatf(a) = b and G(x, f(x)) ≡ 0.

Hint: Consider the sequence fn+1(x) = fn(x)− G(x,fn(x))D2G(a,b) .

Solution. Using continuity of D2G, choose δ > 0 such that∣∣∣∣1− D2G(x, z)D2(a, b)

∣∣∣∣ ≤ 12

for (x, z) ∈ (a− δ, a+ δ)× (b− δ, b+ δ). Using continuity of G, choose ε ∈ (0, δ) such that∣∣∣∣ G(x, b)D2G(a, b)

∣∣∣∣ < δ

2

whenever x ∈ (a− ε, a+ ε). For x ∈ (a− ε, a+ ε), define φx : (b− δ, b+ δ)→ R by

φx(z) = z − G(x, z)D2G(a, b)

.

Note that

|φ′x(z)| =∣∣∣∣1− D2G(x, z)

D2(a, b)

∣∣∣∣ ≤ 12.

Thus, φx is Lipschitz continuous with Lipschitz constant 1/2. Also,

|φx(z)− b| ≤ |φx(z)− φx(b)|+ |φx(b)− b| ≤ 12|z − b|+

∣∣∣∣ G(x, b)D2G(a, b)

∣∣∣∣ < δ.

7Don’t assume the implicit function theorem here!

23

Page 24: Selected problems and solutions

This shows that φx maps into (b−δ, b+δ). Thus, φx is a contraction mapping (see Problem 62).Let f(x) be its unique fixed point, and note that φ(f(x)) = f(x) implies G(x, f(x)) = 0. Also,b = f(a) since φa(b) = b and the fixed point is unique. Convergence to the fixed point satisfies(see Problem 62)

|φnx(z)− f(x)| ≤ δ21−n. (7)

Consider the function sequence {fn(x)} from the hint, defined for x ∈ (a − ε, a + ε), withf0(x) ≡ b. Since f0 and G are continuous, a simple induction argument shows that fn iscontinuous for each n. Note that fn(x) = φnx(b), so (7) shows that {fn} converges uniformly tof . Thus, f is continuous.

64. Let A be a symmetric n × n matrix and define q : Rn → R by q(x) = xtAx. Suppose therestriction of q to the unit sphere {x : |x| = 1} attains a maximum or minimum at the pointv. Show that Av = λv for some λ ∈ R.

Solution. Define g : Rn → R by g(x) = |x|2 − 1 and let M = {x ∈ Rn : g(x) = 0}. Sinceg′(x) = 2x 6= 0 for all x ∈M , we may use the method of Lagrange multipliers:

q′(v) = λg′(v), some λ ∈ R. (8)

Note that, with Ak the kth row of A,

Dkq(x) = Dk(xtAx) = Dk

n∑i,j=1

xiAijxj

=n∑j=1

Akjxj +n∑i=1

xiAik = 2n∑j=1

Akjxj = 2Akx,

where the last equality uses the fact that A is symmetric. Thus, q′(x) = 2Ax, and so from (8)we get Av = λv.

65. Define f : (R+)n → R by f(x) = n−1(x1 + . . .+ xn). Find the minimum value of f on thesurface S = {x ∈ Rn : g(x) = 0}, where g(x) = x1 . . . xn − c (c > 0 constant). Use this todeduce the geometric-arithmetic mean inequality: for positive reals a1, . . . , an,

(a1 . . . an)1/n ≤ n−1(a1 + . . .+ an).

Solution. Let h = f |S be the restriction of f to S. We claim it suffices to minimize h in the cubeC := [0, nc1/n]n. Since C is compact, h|C attains a minimum value at a point a ∈ C. Supposea ∈ int C. Then since g′(a) 6= 0, we can use Lagrange multipliers to get f ′(a) = λg′(a), i.e.,

n−1 = λa1 . . . ai . . . an, i = 1, . . . , n.

It follows that a1 = . . . = an, so since a1 . . . an = c, we have a1 = . . . = an = c1/n andf(a) = c1/n. If a /∈ int C, then ai ≥ nc1/n for some i and so f(a) ≥ c1/n. Thus, h cannot attaina smaller value than c1/n. The geometric-arithmetic mean inequality follows.

24

Page 25: Selected problems and solutions

66. A set P ⊂ Rn is called an (n− 1)-patch if for some i ∈ {1, . . . , n}, there exists a real-valueddifferentiable function h defined on an open set U ⊂ Rn−1 such that

P = {x ∈ Rn : πi(x) ∈ U and xi = h(πi(x))},

where πi(x) := (x1, . . . , xi, . . . , xn). A set M ⊂ Rn is called an (n − 1)-manifold if for eachx ∈M there is an open set W ⊂ Rn containing x such that W ∩M is a (n− 1)-patch.

Suppose g : Rn → R is class C1 and let M = {x ∈ Rn : g(x) = 0}. Suppose g′(x) 6= 0 for allx ∈M . Show that then M is an (n− 1)-manifold in Rn.

Solution. Let c ∈ M . Then g′(c) 6= 0 so Dig(c) 6= 0, some i = 1, . . . , n. WLOG supposeDng(c) 6= 0, and write c = (a, b) with a ∈ Rn−1, b ∈ R. By the implicit function theorem thereis a neighborhood U of a (in Rn−1) and a unique C1 function h : U → R such that h(a) = band g(x, h(x)) = 0 for x ∈ U . Moreover, from the proof of the implicit function there is aneighborhood W of c such that W ∩M is the graph of h, that is,

W ∩M = {(x, y) ∈ Rn : x ∈ U, y = h(x)}.

Note that this is an (n− 1)-patch, so we are done.

25