Contentsazhou/teaching/20F/131a-hw...MATH 131A (20F) Analysis Alan Zhou HOMEWORK 2 Problem 1 Prove:...

39
MATH 131A (20F) Analysis Alan Zhou Contents 1 Homework 1 3 2 Homework 2 7 3 Homework 3 11 4 Homework 4 15 5 Homework 5 19 6 Homework 6 23 7 Homework 7 27 8 Homework 8 (sketches) 31 9 Midterm 1 33 10 Midterm 2 37 1

Transcript of Contentsazhou/teaching/20F/131a-hw...MATH 131A (20F) Analysis Alan Zhou HOMEWORK 2 Problem 1 Prove:...

  • MATH 131A (20F) Analysis Alan Zhou

    Contents

    1 Homework 1 3

    2 Homework 2 7

    3 Homework 3 11

    4 Homework 4 15

    5 Homework 5 19

    6 Homework 6 23

    7 Homework 7 27

    8 Homework 8 (sketches) 31

    9 Midterm 1 33

    10 Midterm 2 37

    1

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 1

    Problem 1

    For this exercise, you may assume algebraic manipulation and inequalities.

    (a) Prove: For all natural numbers n, we have

    12 + 22 + 32 + · · ·+ n2 = n(n+ 1)(2n+ 1)6

    .

    (b) Prove: For all natural numbers n ≥ 4, we have n! > n2.

    Solution. (a) The proof is by induction on n.

    For the base step n = 1, the left hand side is 12 = 1 and the right hand side is

    1 · 2 · 36

    = 1.

    For the inductive step, suppose the formula holds for a given n. To show that it holds forn+ 1, we compute

    12 + 22 + · · ·+ n2 + (n+ 1)2 = (12 + 22 + · · ·+ n2) + (n+ 1)2

    =n(n+ 1)(2n+ 1)

    6+ (n+ 1)2

    = (n+ 1)

    (n(2n+ 1)

    6+ (n+ 1)

    )= (n+ 1)

    (2n2 + n

    6+

    6n+ 6

    6

    )= (n+ 1) · 2n

    2 + 7n+ 6

    6

    = (n+ 1) · (n+ 2)(2n+ 3)6

    =(n+ 1)((n+ 1) + 1)(2(n+ 1) + 1)

    6.

    This completes the inductive step and the proof by induction.

    (b) The proof is by induction on n ≥ 4.For the base step n = 4, the left hand side is 4 ·3 ·2 ·1 = 24 and the right hand side is 42 = 16,and 24 > 16, as required.

    For the inductive step, suppose the inequality holds for a given n ≥ 4. To show that it holdsfor n+ 1, we start with

    (n+ 1)! = (n+ 1) · n! > (n+ 1) · n2,

    3

  • Solutions MATH 131A (20F)

    where the strict inequality follows from the inductive hypothesis n! > n2. It thus suffices toshow that

    (n+ 1) · n2 ≥ (n+ 1)2.

    This is equivalent to showing that n2 ≥ n+ 1, which follows from the calculation

    n2 ≥ 4n = n+ 3n ≥ n+ 3 · 4 > n+ 1.

    Hence the induction is complete.

    Problem 2

    Prove: If a, b ∈ Z, then(−a) · (−b) = a · b.

    The result of this problem also holds in any field, e.g. Q or R.

    Solution 1. We have

    (−a) · (−b) + (−(a · b)) = (−a) · (−b) + (−a) · b ([p. 15: property (3)])= (−a) · (−b+ b) (distributive property)= (−a) · 0 (additive inverse)= 0 ([p. 15: property (2)])

    = a · b+ (−(a · b)). (additive inverse)

    By [p. 15: property (1)], we can cancel the second term on each side to get (−a) · (−b) = a · b.

    Solution 2. As a special case of [p. 15: property (3)], note that for any n ∈ Z,

    − n = −(1 · n) = (−1) · n. (1.1)

    In particular,(−1) · (−1) = −(−1) = 1. (1.2)

    Hence

    (−a) · (−b) = ((−1) · a) · ((−1) · b) (by (1.1))= (((−1) · a) · (−1)) · b (multiplicative associativity)= ((a · (−1)) · (−1)) · b (multiplicative commutativity)= (a · ((−1) · (−1))) · b (multiplicative associativity)= (a · 1) · b (by (1.2))= a · b. (multiplicative identity)

    4

    https://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdf

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 3

    Prove: If a, b, c ∈ Z and a · c = b · c with c 6= 0, then a = b.

    The result of this problem also holds in any field, e.g. Q or R.

    Solution. We start with

    (a+ (−b)) · c = a · c+ (−b) · c (distributive property)= a · c+ (−(b · c)) ([p. 15: property (3)])= b · c+ (−(b · c)) (substituting a · c = b · c)= 0. (additive inverse)

    By [p. 15: property (5)], either a + (−b) = 0 or c = 0, but we are assuming that c 6= 0, hencea+ (−b) = 0. Since also b+ (−b) = 0, [p. 15: property (1)] implies a = b.

    An incorrect solution whose error is quite subtle goes roughly as follows: “Since a, b, c are integers,they are also rational numbers, so the result follows by multiplying through by c−1.” (See Problem6.) The problem here is that while c can be regarded as the rational number c/1, hypotheticallyit is possible that even though c 6= 0 as an integer, we do have c/1 = 0 as a rational number.The proof that this cannot happen requires a closer understanding of how the rational numbers areconstructed, and ultimately requires the result of this problem (or something equivalent).

    Problem 4

    Using the field properties, prove that

    (a+ b)2 = a2 + 2ab+ b2.

    The result of this problem holds in Z and in any field, e.g. Q or R. The problem statementuses additive and multiplicative associativity implicitly, in that the expression “a2 + 2ab + b2” isunambiguous because it could mean either (a2 + 2ab) + b2 or a2 + (2ab + b2), which are equal toeach other, and the expression “2ab” is unambiguous because it could mean either (2a)b or 2(ab),which are equal to each other. As such, we will suppress uses of associativity in the following. Thestatement 1 + 1 = 2 is assumed (it is true almost by definition of 2).

    Solution.

    (a+ b)2 = (a+ b)(a+ b) (definition of squaring)

    = a(a+ b) + b(a+ b) (distributive property)

    = a2 + ab+ ba+ b2 (distributive property)

    = a2 + ab+ ab+ b2 (multiplicative commutativity)

    = a2 + 1 · ab+ 1 · ab+ b2 (multiplicative identity)= a2 + (1 + 1) · ab+ b2 (distributive property)= a2 + 2ab+ b2 (1 + 1 = 2)

    5

    https://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdf

  • Solutions MATH 131A (20F)

    Problem 5

    Prove: 0 < 1.

    The result of this problem holds in any ordered field, e.g. Q or R.

    Solution. By [p. 19: Proposition 3.2: (4)] (the “trivial inequality”), x2 ≥ 0 for all x. In particular,12 = 1 · 1 = 1 by multiplicative identity, so 1 = 12 ≥ 0. Since 1 6= 0 in any field, 1 > 0.

    Problem 6

    Prove: If 0 < a < b, then 0 < b−1 < a−1.

    The result of this problem holds in any ordered field, e.g. Q or R. Before the solution, we provethe cancellation law for fields, which is shown for Z in Problem 3.

    Lemma 1.1. Let K be a field and x, y, z ∈ K. If z 6= 0, then xz = yz if and only if x = y.

    Proof of Lemma 1.1. The non-trivial direction is that x · z = y · z implies x = y. We compute

    x = x · 1 (multiplicative identity)= x · (z · z−1) (multiplicative inverse)= (x · z) · z−1 (multiplicative associativity)= (y · z) · z−1 (substituting x · z = y · z)= y · (z · z−1) (multiplicative associativity)= y · 1 (multiplicative inverse)= y. (multiplicative identity)

    Solution to Problem 6. We must show that 0 < b−1 and that b−1 < a−1.

    Since b > 0, we have b−1 > 0 by [p. 20: Proposition 3.2: (6)].

    It remains to show that b−1 < a−1. Since a > 0 and b > 0, [p. 20: Proposition 3.2: (6)] givesa−1 > 0 and b−1 > 0. Since a < b, also a ≤ b, so axiom (O5) gives us

    b−1 · a ≤ b−1 · b = 1.

    Since a 6= b (as a < b) and b−1 6= 0, we have b−1 · a 6= b−1 · b by Lemma 1.1, so in fact 1 > b−1 · a.Using axiom (O5) and Lemma 1.1 again gives

    a−1 = 1 · a−1 (multiplicative identity)> (b−1 · a) · a−1 (by (O5) and Lemma 1.1)= b−1. (by same calculation as in Lemma 1.1)

    6

    https://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdfhttps://ccle.ucla.edu/pluginfile.php/3800182/mod_resource/content/1/Notes_10.14_updated.pdf

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 2

    Problem 1

    Prove: For all x ∈ Q, we have−|x| ≤ x ≤ |x|.

    The result of this problem holds in any ordered field, e.g. Q or R.

    Solution. Since |x| ≤ |x|, Problem 2 tells us that −|x| ≤ x ≤ |x| by setting y = x.

    Problem 2

    Prove: For all x, y ∈ Q, we have

    |x| ≤ |y| if and only if − |y| ≤ x ≤ |y|.

    The result of this problem holds in any ordered field, e.g. Q or R.

    Solution. The proof in [p. 15-18] shows that for all x, z ∈ Q,

    |x| ≤ z if and only if− z ≤ x ≤ z.

    The result in the problem follows by setting z = |y|.

    Problem 3

    Prove that the sequence (an) defined by an = n/(n+ 1) is Cauchy.

    The simplest proof is probably to show that in fact, an → 1. To stick to results that have beencovered in lecture, we will directly use the definition of a Cauchy sequence.

    Solution. Let � > 0 be an arbitrary positive rational number. We must find some N ∈ N, allowedto depend on �, such that for all n,m ≥ N , we have |an − am| < �. First, we compute

    |an − am| =∣∣∣∣ nn+ 1 − mm+ 1

    ∣∣∣∣ = ∣∣∣∣(1− 1n+ 1)−(

    1− 1m+ 1

    )∣∣∣∣ = ∣∣∣∣ 1m+ 1 − 1n+ 1∣∣∣∣ .

    By the triangle inequality,

    |an − am| =∣∣∣∣ 1m+ 1 +

    (− 1n+ 1

    )∣∣∣∣ ≤ ∣∣∣∣ 1m+ 1∣∣∣∣+ ∣∣∣∣− 1n+ 1

    ∣∣∣∣ = 1m+ 1 + 1n+ 1 .By the archimedean property (for Q), there exists N ∈ N such that N > 2/� > 0. Then for alln,m ≥ N , we have n+ 1 > N > 2/� > 0, so 1/(n+ 1) < �/2, and similarly, 1/(m+ 1) < �/2. Hence

    |an − am| ≤1

    m+ 1+

    1

    n+ 1<�

    2+�

    2= �

    for all n,m ≥ N , as required.

    7

    https://www.math.ucla.edu/~azhou/teaching/20F/131a-week-02.pdf

  • Solutions MATH 131A (20F)

    Problem 4

    Prove that the sequence (an) defined by an = log n is not Cauchy. (Known properties of logmay be used for this problem.)

    Since a fair amount of real analysis is needed to establish log, we will also assume familiar propertiesof the real numbers. Logarithms in this class, and pure mathematics as a whole, are assumed to benatural logarithms (base e) unless otherwise specified.

    Solution. To show that (an) is not Cauchy, it suffices by [p. 10 Proposition 5.7] to show that (an) isnot bounded. Let M be any real number. By the archimedean property (for R), there exists N ∈ Nsuch that N > eM , and hence aN = logN > log(e

    M ) = M since log is an increasing function.

    Problem 5

    The real number which has decimal expansion .999 . . . is represented by the sequence (an),where an = 1− 10−n. That is, .999 . . . = “lim” an. Prove that .999 . . . = 1.

    Solution. We must show that for every rational � > 0, there exists N ∈ N such that for all n ≥ N ,we have |an − 1| < �. We can simplify

    |an − 1| =∣∣∣∣(1− 110n

    )− 1∣∣∣∣ = 110n < �.

    By [p. 20: Bernoulli’s inequality],

    10n = (1 + 9)n ≥ 1 + 9n > 9n

    for all natural numbers n, so it suffices to find N so that

    1

    9n< �

    for all n ≥ N . In particular, this should hold for N , so we want

    1

    9N< � ⇐⇒ 9N > 1

    �⇐⇒ N > 1

    9�.

    By the archimedean property (for Q), such an N exists. To check, for all n ≥ N , we have

    1

    10n<

    1

    9n≤ 1

    9N< �,

    as required.

    Instead of using Bernoulli’s inequality, one can prove by induction that 10n > n for all n ∈ N.

    8

    https://ccle.ucla.edu/pluginfile.php/3826288/mod_resource/content/1/Notes_week_3.pdfhttps://www.math.ucla.edu/~azhou/teaching/20F/131a-week-00.pdf

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 6

    (a) Suppose x is a positive real number. Prove that there exists a natural number N suchthat 0 < 1/N < x.

    (b) Suppose that x and y are real numbers such that y − x > 1. Prove that there existsan integer m such that x < m < y.

    (c) Given any two real numbers x and y with x < y, prove that there is a rational numberm/N such that x < m/N < y.

    The solution requires the archimedean property for R, which we prove now.

    Lemma 2.1. For any real number t, there exists N ∈ N such that N > t.

    Proof of Lemma 2.1. Referring to the construction of the real numbers by Cauchy sequences ofrationals, let (an) be a Cauchy sequence of rational numbers corresponding to t. The statement“N > t” means that there exists n0 ∈ N such that N > an for all n ≥ n0. Since (an) is a Cauchysequence, we can choose n0 ∈ N so that |an − am| < 1 for all n,m ≥ n0. By the archimedeanproperty for Q, we can choose N ∈ N so that N > an0 + 1. Then for all n ≥ n0, we have

    |an − an0 | < 1 =⇒ an < an0 + 1 < N,

    so N > t, as required.

    Solution to Problem 6. (a) Take t = 1/x in Lemma 2.1 to get a natural number N such thatN > 1/x > 0. Then 0 < 1/N < x as required.

    (b) Let S = {m ∈ Z | m > x}; by Lemma 2.1, S is non-empty. If there exists m ∈ S such thatm < y, then we are done, so suppose otherwise. Fix some choice of m ∈ S. Then m ≥ y, som − 1 ≥ y − 1 > x, which shows that m − 1 ∈ S. By induction, it follows that m − n ∈ Sfor all natural numbers n, i.e. m− n > x for all n ∈ N. However, by Lemma 2.1 again, thereexists N ∈ N such that N > m− x, and for such an N , we have m−N < x, a contradiction.Hence there exists m ∈ S such that m < y, as required.

    (c) Applying part (a) with y − x in place of x, there exists a natural number N such that0 < 1/N < y − x. Multiplying through by N > 0 shows that Ny −Nx > 1, so by part (b),there exists m ∈ Z such that Nx < m < Ny. Multiplying through by N−1 > 0 shows thatx < m/N < y, as required.

    9

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 3

    Problem 1

    Suppose that (an) is a convergent sequence and for each n ≥ 1, let bn = an+1. Prove that(bn) is also convergent and that lim

    n→∞bn = lim

    n→∞an.

    Solution. Let � > 0 be arbitrary and let ` = limn→∞

    an. We must show that there exists Nb ∈ N suchthat |bn − `| < � for all n ≥ Nb.Since an → `, there exists Na ∈ N such that |an − `| < � for all n ≥ Na. For all such n, we alsohave n+ 1 ≥ Na, so

    |bn − `| = |an+1 − `| < �

    for all n ≥ Na. Hence we can take Nb = Na to see that bn → `.

    Problem 2

    Let (an) be the sequence recursively defined by a1 =√

    2 and

    an+1 =√

    2an.

    (a) Prove that an ≤ 2 for all n ≥ 1.

    (b) Prove that an+1 ≥ an for all n ≥ 1.

    (c) Bounded monotonic sequences converge, so (an) converges because it is bounded aboveby 2 and increasing. Compute lim

    n→∞an.

    You may use the fact that limn→∞

    √bn =

    √lim

    n→∞bn if (bn) is convergent.

    In addition to the continuity of the square root (the fact given to us at the end of part (c)), we alsomake use of the fact that square root is an increasing function [0,∞) → [0,∞). Since the squareroot notation takes the non-negative root by default, an ≥ 0 for all n.

    Solution. (a) The proof is by induction on n.

    For the base step n = 1, we have a1 =√

    2 ≤ 2.For the inductive step, suppose for a given n that an ≤ 2. Then

    an+1 =√

    2an ≤√

    2 · 2 = 2.

    (b) By part (a),an+1 =

    √2an ≥

    √an · an = an.

    [Alternatively, we can do an inductive argument. The inductive step of this argument proceedsas follows: If an+1 ≥ an for a given n, then an+2 =

    √2an+1 ≥

    √2an = an+1.]

    11

  • Solutions MATH 131A (20F)

    (c) Let ` be the limit of (an). Taking the limit n → ∞ on both sides of the recurrence, on theleft hand side, we get ` by Problem 1. On the right hand side, we get

    limn→∞

    √2an =

    √limn→∞

    2an =√

    2 · limn→∞

    an =√

    2`.

    Hence ` =√

    2`, and since ` must be non-negative, this is equivalent to `2 = 2`, which hassolutions ` = 0 and ` = 2. Since (an) is increasing and a1 =

    √2, we have an ≥

    √2 for all n,

    hence ` ≥√

    2. Thus ` = 0 is not possible, so the limit must be ` = 2.

    Problem 3

    Let (Fn) be the sequence of Fibonacci numbers defined by F1 = F2 = 1 and, for n ≥ 2,

    Fn+1 = Fn + Fn−1.

    Let an = Fn+1/Fn denote the sequence of Fibonacci quotients.

    (a) Using the definition of Fn, prove that an+1 = 1 + 1/an.

    (b) Suppose for a moment that (an) converges to some number φ. Find φ.

    (c) For the number φ found above, prove that

    |an+1 − φ| ≤(

    2

    3

    )|an − φ|.

    (d) Prove that

    |an+1 − φ| ≤(

    2

    3

    )n|1− φ| ≤

    (2

    3

    )n+1.

    (e) Conclude that (an) converges to φ.

    Solution. (a) We compute

    1 +1

    an= 1 +

    1

    Fn+1/Fn= 1 +

    FnFn+1

    =Fn+1 + FnFn+1

    =Fn+2Fn+1

    = an+1.

    (b) By a straightforward induction, one shows that an ≥ 1 for all n, so if (an) converges to a limitφ, it must be the case that φ ≥ 1.Taking limits on both sides of the recurrence from part (a), on the left hand side, we get φby Problem 1. On the right hand side, the limit rules give us 1 + 1/φ. (Note that we needφ 6= 0 in order to take the limit of the quotient 1/an.) Hence

    φ = 1 +1

    φ=⇒ φ2 − φ− 1 = 0 =⇒ φ = 1±

    √5

    2.

    Of these two roots, only φ = (1 +√

    5)/2 satisfies φ ≥ 1, so this is the only possible limit.

    12

  • MATH 131A (20F) Analysis Alan Zhou

    (c) Writing an+1 = 1 + 1/an and φ = 1 + 1/φ, we get

    |an+1 − φ| =∣∣∣∣(1 + 1an

    )−(

    1 +1

    φ

    )∣∣∣∣ = ∣∣∣∣φ− ananφ∣∣∣∣ = 1anφ |an − φ|.

    It thus suffices to show that 1/anφ ≤ 2/3. Indeed,

    φ =1 +√

    5

    2≥ 1 + 2

    2=

    3

    2,

    while an ≥ 1 as noted above, so 1/anφ ≤ 2/3, as required.

    (d) We shift indices by letting m = n+ 1, so that the result we want to show is that

    |am − φ| ≤(

    2

    3

    )m−1|1− φ| ≤

    (2

    3

    )mfor all natural numbers m ≥ 2. In fact, this holds for all natural numbers m, so we will includethe m = 1 case so that we have a simpler base case when we do induction.

    For the first inequality, the proof is by induction on m.

    For the base step m = 1, both sides are |1− φ|.For the inductive step, suppose for a given m that |am−φ| ≤ (2/3)m−1|1−φ|. Then form+ 1, the result of part (c) and the inductive hypothesis give

    |am+1 − φ| ≤(

    2

    3

    )|am − φ| ≤

    (2

    3

    )·(

    2

    3

    )m−1|1− φ| =

    (2

    3

    )m|1− φ|.

    For the second inequality, it suffices to show that |1 − φ| ≤ 2/3, which follows fromφ ≥ 3/2, as shown in part (c), and |1− φ| = |−1/φ| = 1/φ.

    (e) Let � > 0. We wish to show that there exists N ∈ N such that |an − φ| < � for all n ≥ N .By part (d), we have |an−φ| ≤ (2/3)n for all n, so it suffices to find N ∈ N so that (2/3)n < �for all n ≥ N . By the binomial theorem and dropping all terms of degree at least 2, or byBernoulli’s inequality, we have (1 + t)n ≥ 1 + tn for all t ≥ 0 and all n ∈ N, so by takingt = 1/2, we obtain (

    3

    2

    )n≥ 1 + n

    2=⇒

    (2

    3

    )n≤ 1

    1 + n/2<

    1

    n/2=

    2

    n.

    By the archimedean principle, we can choose N ∈ N so that N > 2/�, and then for all n ≥ N ,we have 2/n ≤ 2/N < �, as required.

    13

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 4

    Problem 1

    Suppose that S ⊆ R is non-empty and bounded. Prove that inf S = − sup(−S).

    If S is non-empty and bounded below, then inf S exists. If m is a lower bound for S, then for anyy ∈ −S, we have y = −x for some x ∈ S, and then x ≥ m implies y = −x ≤ −m, so −m is anupper bound for −S. This shows that −S is non-empty and bounded above, so sup(−S) also exists.This shows that the problem makes sense, in fact even if we only know that S is non-empty andbounded below, but not necessarily bounded above.

    Solution. Let s = sup(−S).To show that inf S = −s, first we show that −s is a lower bound for S. Let x ∈ S be arbitrary.Then −x ∈ −S, so −x ≤ s since s is an upper bound for −S. Hence x ≥ −s, as required.Now we show that if m > −s, then m is not a lower bound for S. This will show that −s is thegreatest lower bound for S, so that inf S = −s. If m > −s, then −m < s. Since s is the least upperbound for −S, this means that −m is not an upper bound for −S, so there exists y ∈ −S withy > −m. Since y ∈ −S, there exists x ∈ S such that y = −x, and then −x > −m. Hence x < mand x ∈ S, showing that m is not a lower bound for S. This completes the proof.

    Problem 2

    Let A and B be non-empty bounded subsets of R, and let A+B be the set of all sums a+ bwhere a ∈ A and b ∈ B. Prove that sup(A+B) = supA+ supB.

    In this problem, we only need A and B to be bounded above, not necessarily bounded below.

    Solution 1. Let a = supA and b = supB.

    First we show that a + b is an upper bound for A + B. Let x ∈ A + B be arbitrary. Then wecan write x = a + b for some a ∈ A and b ∈ B. Since a is an upper bound for A, we have a ≤ a.Similarly, b ≤ b. Hence x = a+ b ≤ a + b.Now we show that a+b is the least upper bound for A+B. To do this, it suffices to show for every� > 0 that a + b− � is not an upper bound for A+B. Since a is the least upper bound for A, thequantity a− �/2 is not an upper bound for A, so there exists a ∈ A such that a > a− �/2. Similarly,there exists b ∈ B such that b > b− �/2. Then a+ b is an element of A+B with a+ b > a+ b− �,so a + b− � is not an upper bound of A+B, as desired.

    Solution 2. The proof that supA+ supB is an upper bound for A+ B is the same as in Solution1. This establishes that sup(A + B) ≤ supA + supB, so it remains to prove the other direction.For all a ∈ A and b ∈ B, we have a+ b ≤ sup(A+B), so if we fix an arbitrary b ∈ B and rearrange,we get a ≤ sup(A + B) − b for all a ∈ A. This shows that sup(A + B) − b is an upper bound forA, so then supA ≤ sup(A + B) − b. Since this holds for any b ∈ B, rearranging again, we haveb ≤ sup(A + B) − supA for all b ∈ B. Hence sup(A + B) − supA is an upper bound for B, sosupB ≤ sup(A+B)− supA. This gives us supA+ supB ≤ sup(A+B), as desired.

    15

  • Solutions MATH 131A (20F)

    Problem 3

    Let a1 = 1, and for n ≥ 1, define an+1 =(

    1− 1(n+ 1)2

    )an.

    (a) Prove that (an) is convergent.

    (b) Prove by induction that an = (n+ 1)/2n.

    (c) Find limn→∞

    an.

    Solution. (a) We show that (an) is decreasing and bounded below. We start with boundedness,as we require positivity in the argument that (an) is decreasing.

    (an) is bounded below: We show that an > 0 for all n. The proof is by induction on n.

    For the base step n = 1, we have a1 = 1 > 0.

    For the inductive step, suppose for a given n ≥ 1 that an > 0. Then for n+ 1, we have1/(n+ 1)2 ≤ 1/4 since n ≥ 1, so 1− 1/(n+ 1)2 ≥ 1− 1/4 = 3/4 > 0. Thus an+1 is theproduct of two positive quantities, hence also positive.

    (an) is decreasing: Since every term of the sequence is positive, it suffices to show thatan+1/an ≤ 1. Indeed, an+1/an = 1− 1/(n+ 1)2 ≤ 1 since 1/(n+ 1)2 ≥ 0.

    (b) For the base step, (n+ 1)/2n = 1 = a1 when n = 1.

    For the inductive step, suppose for a given n that an = (n+ 1)/2n. Then

    an+1 =

    (1− 1

    (n+ 1)2

    )an =

    n(n+ 2)

    (n+ 1)2(n+ 1)

    2n=

    n+ 2

    2(n+ 1),

    proving the claim for n+ 1.

    (c) We write

    an =n+ 1

    2n=

    1 + 1n2

    .

    By the theorems on arithmetic of limits, since 1/n→ 0, the sequence (an) has limit

    limn→∞

    an = limn→∞

    1 +1

    n2

    =1 + lim

    n→∞

    1

    n2

    =1 + 0

    2=

    1

    2.

    16

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 4

    Let (sn) be an increasing sequence of positive numbers and define σn = (s1 + · · ·+ sn)/n.

    (a) Prove that (σn) is an increasing sequence.

    (b) Suppose that (sn) is bounded. Prove that (σn) is a convergent sequence.

    For notational compactness, we write

    σn =1

    n

    n∑i=1

    si.

    Solution. (a) First, since (sn) is increasing, we have si ≤ sn whenever i ≤ n. Hence

    σn =1

    n

    n∑i=1

    si ≤1

    n

    n∑i=1

    sn = sn.

    This gives

    (n+ 1)σn+1 − nσn =n+1∑i=1

    si −n∑

    i=1

    si = sn+1 ≥ σn+1,

    and rearranging gives nσn+1 ≥ nσn, or σn+1 ≥ σn. Hence (σn) is increasing.

    (b) Let M be an upper bound for (sn). Then

    σn =1

    n

    n∑i=1

    si ≤1

    n

    n∑i=1

    M = M,

    so (σn) is bounded above by M . Since we showed in part (a) that (σn) is also increasing, (σn)converges. (In fact, it converges to the same limit as (sn), but it takes more work to show.)

    17

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 5

    The following lemma is useful in some of the problems.

    Lemma 5.1. Let (xn) and (yn) be sequences in R = R∪{−∞,+∞} with limits x and y, respectively,in R. If xn ≤ yn for all n (except perhaps finitely many), then x ≤ y.

    Proof. Let N0 be such that xn ≤ yn for all n ≥ N0. The proof proceeds by casework on x.If x = −∞, then x ≤ y holds no matter what (yn) and y are.If x = +∞, then for any M ∈ R, there exists Nx ∈ N such that xn ≥ M for all n ≥ Nx. Then forall n ≥ Ny := max{Nx, N0}, we have yn ≥ xn ≥M . Hence yn → +∞, so y = +∞ and x ≤ y.Finally, suppose x is a finite real number and, for the sake of contradiction, suppose that y < x.Since (xn) converges, as it has a finite limit, (xn) is bounded. Hence (yn) is bounded below, soy 6= −∞. Thus y must also be a finite real number, and so we can define � = (x− y)/3 > 0. Thereexist Nx, Ny ∈ N such that |xn − x| < � for all n ≥ Nx and |yn − y| < � for all n ≥ Ny. We thenhave for n = max{Nx, Ny, N0} that

    yn < y + � < x− � < xn,

    contradicting the assumption that xn ≤ yn for all n ≥ N0.

    Problem 1

    Let (an) and (bn) be sequences and suppose that there exists N ∈ N such that an ≤ bn forall n ≥ N . Prove that lim sup an ≤ lim sup bn. Hence it must be that x ≤ y.

    Solution. We claim for all m ≥ N that

    sup{an | n > m} ≤ sup{bn | n > m}.

    Let b = sup{bn | n > m}. For each n > m, since m ≥ N , this gives us an ≤ bn ≤ b. Hence b isan upper bound for the set {an | n > m}, and the claim follows since sup{an | n > m} is the leastupper bound of {an | n > m}. Having proved the claim, taking limits m→∞ yields

    lim sup an = limm→∞

    (sup{an | n > m}) ≤ limm→∞

    (sup{bn | n > m}) = lim sup bn,

    the inequality in the middle following from applying Lemma 5.1 to the (m-indexed) sequences

    xm = sup{an | n > m} and ym = sup{bn | n > m}.

    19

  • Solutions MATH 131A (20F)

    Problem 2

    Let (an) and (bn) be sequences.

    (a) Show that for any N ∈ N,

    sup{an + bn | n > N} ≤ sup{an | n > N}+ sup{bn | n > N}.

    (b) Show that lim sup(an + bn) ≤ lim sup an + lim sup bn.

    Some technical assumption is needed on the sequences for this problem to work, as otherwise, thesums on the right hand sides may not be defined. In particular, +∞ and −∞ cannot be summed,so we would need an assumption which prevents this possibility. The simplest is to prevent anyinfinities from appearing by demanding that the sequences are bounded, so this is the assumptionwe work with below.

    Solution. Suppose (an) and (bn) are bounded.

    (a) Fix N and letaN = sup{an | n > N} and bN = sup{bn | n > N}.

    (The sets {an | n > N} and {bn | n > N} are bounded, so these suprema are finite realnumbers.) Let c be any element of {an + bn | n > N}, so there exists n > N such thatc = an + bn. Then an ≤ aN and bn ≤ bN , so c ≤ aN + bN . Hence aN + bN is an upper boundof {an + bn | n > N}, so by minimality of supremum, the result follows.

    (b) Since (an) and (bn) are bounded, lim sup an and lim sup bn are finite, so we can write

    lim sup an + lim sup bn = limN→∞

    (sup{an | n > N}) + limN→∞

    (sup{bn | n > N})

    = limN→∞

    (sup{an | n > N}+ sup{bn | n > N}) .

    By Lemma 5.1 and part (a),

    limN→∞

    (sup{an | n > N}+ sup{bn | n > N}) ≥ limN→∞

    (sup{an + bn | n > N})

    = lim sup(an + bn),

    so lim sup(an + bn) ≤ lim sup an + lim sup bn, as desired.

    20

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 3

    Prove that (an) is bounded if and only if lim sup |an| is finite.

    In this solution, we use the “non-strict tail” {xn | n ≥ N} instead of the “strict” tail {xn | n > N}in the definition of lim sup. This does not change the value of the lim sup, but it makes the argumentslightly cleaner.

    Solution. First suppose that (an) is bounded, i.e. for some M ∈ R, we have |an| ≤M for all n. Forany N ∈ N, we have 0 ≤ sup{|an| | n ≥ N} ≤M ; the lower bound is because all absolute values arebounded below by 0, while the upper bound is because all elements of the set are bounded aboveby M by hypothesis. Hence taking the limit N →∞ and applying Lemma 5.1,

    0 ≤ limN→∞

    (sup{|an| | n ≥ N}) = lim sup |an| ≤M.

    This shows that lim sup |an| is finite, bounded between 0 and M .Conversely, suppose that lim sup |an| is finite. This means that the “tail supremum sequence”(sup{|an| |≥ N}), indexed by N , is convergent, hence bounded. In particular, if M is a bound forthe tail supremum sequence sequence, then it is a bound for the term corresponding to N = 1,which is sup{|an| | n ≥ 1} = sup{|an|}. That is, |an| ≤M for all n, so (an) is bounded.

    21

  • Solutions MATH 131A (20F)

    Problem 4

    Using only the comparison test and facts about p-series, determine which of the followingseries is convergent.

    (a)

    ∞∑n=2

    1

    log n

    (b)

    ∞∑n=1

    n!

    nn

    Marginally relevant for the first series, logarithms are natural logs unless otherwise specified, in thiscourse and in pure mathematics generally. Inductive arguments have been left to the reader.

    Solution. (a) This series is divergent.

    One can show by induction that 2n ≥ n > 1 for all n ≥ 2, so taking logs and using the factthat log is increasing, n log 2 ≥ log n > 0. This shows that 0 < 1/n log 2 < 1/ log n. The

    series

    ∞∑n=2

    1

    n log 2is a positive multiple of the harmonic series (with first term missing), hence

    divergent. Therefore, the larger series

    ∞∑n=2

    1

    log nis also divergent by comparison.

    (b) This series is convergent.

    One can show by induction that 0 < n!/nn ≤ 2/n2 for all n. The series∞∑

    n=1

    2

    n2is a positive

    multiple of the p-series with p = 2 > 1, hence convergent. Therefore, the smaller positive

    series

    ∞∑n=1

    n!

    nnis also convergent by comparison.

    Problem 5

    Prove that if∑|an| converges and (bn) is a bounded sequence, then

    ∑anbn converges.

    Solution. Choose M ∈ R so that |bn| ≤ M for all n. Then we have |anbn| ≤ M |an| for all n, sosince

    ∑|an| converges, so too do

    ∑M |an| and

    ∑|anbn|, the latter by comparison with the former.

    Thus∑anbn converges absolutely, hence also converges.

    A more direct proof can be given using the Cauchy criterion, and this is more or less equivalent:the proof that absolutely convergent series converge is itself an application of the Cauchy criterion.

    22

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 6

    Problem 1: Decimal expansion

    Suppose that (ak) is a sequence with the property that ak ∈ {0, 1, 2, . . . , 9} for all k ≥ 1.

    Prove that

    ∞∑k=1

    ak10k

    is a convergent series.

    Solution. By the comparison test, since ak ≤ 9 for all k, it suffices to show that∑

    k 9/10k is

    convergent. This is a constant multiple of a geometric series with common ratio 1/10, which hasmagnitude less than 1, so it is convergent.

    Problem 2: Summation by parts and Dirichlet’s test

    (a) (Summation by parts) Let (xn) and (yn) be sequences and let (sn) denote the sequenceof partial sums of (xn), i.e. sn = x1 + · · ·+ xn. Prove that

    n∑j=m+1

    xjyj = snyn+1 − smym+1 +n∑

    j=m+1

    sj(yj − yj+1)

    whenever m < n. This is the discrete analogue of integration by parts.

    (b) (Dirichlet’s test) Suppose that the sequence of partial sums (sn) above is bounded (butnot necessarily convergent). Suppose that (yn) is a decreasing non-negative sequencesuch that lim yn = 0. Prove that

    ∑xnyn converges.

    Solution.

    (a) We fix m and proceed by induction on n.

    For the base step n = m+ 1, we must show that

    xm+1ym+1 = sm+1ym+2 − smym+1 + sm+1(ym+1 − ym+2).

    Indeed, the right hand side simplifies to

    sm+1ym+1 − smym+1 = (sm+1 − sm)ym+1 = xm+1ym+1.

    For the inductive step, suppose the summation-by-parts formula holds for a given value ofn > m, i.e. for the given value of n, we have

    n∑j=m+1

    xjyj = snyn+1 − smym+1 +n∑

    j=m+1

    sj(yj − yj+1). (∗)

    23

  • Solutions MATH 131A (20F)

    We must show that

    n+1∑j=m+1

    xjyj = sn+1yn+2 − smym+1 +n+1∑

    j=m+1

    sj(yj − yj+1). (†)

    Taking the difference (†)− (∗), it suffices to show that

    xn+1yn+1 = sn+1yn+1 − snyn+1 + sn+1(yn+1 − yn+2),

    and this is proved by the exact same calculations as in the base step.

    (b) We apply the Cauchy criterion: Given � > 0, we wish to find N ∈ N such that whenevern > m ≥ N , we have ∣∣∣∣∣∣

    n∑j=m+1

    xjyj

    ∣∣∣∣∣∣ < �.By the summation-by-parts formula and the triangle inequality,∣∣∣∣∣∣

    n∑j=m+1

    xjyj

    ∣∣∣∣∣∣ =∣∣∣∣∣∣snyn+1 − smym+1 +

    n∑j=m+1

    sj(yj − yj+1)

    ∣∣∣∣∣∣≤ |snyn+1|+ |smym+1|+

    ∣∣∣∣∣∣n∑

    j=m+1

    sj(yj − yj+1)

    ∣∣∣∣∣∣≤ |sn|yn+1 + |sm|ym+1 +

    n∑j=m+1

    |sj(yj − yj+1)|.

    Since yj ≥ yj+1 for all j, we have |sj(yj−yj+1)| = |sj |(yj−yj+1). Now, since (sn) is bounded,say |sn| ≤M for all n,∣∣∣∣∣∣

    n∑j=m+1

    xjyj

    ∣∣∣∣∣∣ ≤Myn+1 +Mym+1 +n∑

    j=m+1

    M(yj − yj+1)

    = Myn+1 +Mym+1 +M(ym+1 − yn+1) = 2Mym+1.

    Since yk → 0 as k → ∞ and yk ≥ 0, there exists N ∈ N such that for all m ≥ N , we have0 ≤ ym < �/2M . In particular, for all n > m ≥ N , we get∣∣∣∣∣∣

    n∑j=m+1

    xjyj

    ∣∣∣∣∣∣ ≤ 2Mym+1 < 2M · �2M = �,completing the proof.

    24

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 3

    Let f : X → R and g : X → R be functions.

    (a) Prove that

    min(f, g) =1

    2(f + g)− 1

    2|f − g|.

    (b) Suppose that f and g are continuous. Prove that min(f, g) is continuous.

    Solution.

    (a) Let x ∈ X be arbitrary. We must show that

    (min(f, g))(x) := min{f(x), g(x)} = f(x) + g(x)2

    − |f(x)− g(x)|2

    .

    If f(x) ≤ g(x), then

    f(x) + g(x)

    2− |f(x)− g(x)|

    2=f(x) + g(x)

    2− g(x)− f(x)

    2= f(x) = min{f(x), g(x)}.

    If f(x) > g(x), then

    f(x) + g(x)

    2− |f(x)− g(x)|

    2=f(x) + g(x)

    2− f(x)− g(x)

    2= g(x) = min{f(x), g(x)}.

    In either case, we have the desired result.

    (b) Since f and g are continuous, f+g and f−g are continuous. Since compositions of continuousfunctions are continuous and the absolute value function is continuous, |f − g| is continuous.Since constant multiples of continuous functions are continuous, (f + g)/2 and |f − g|/2 arecontinuous. Finally, their difference, which is min(f, g) by part (a), is continuous.

    For the last problem, we need some results about density of rational and irrational numbers. Ingeneral, a subset S ⊆ R is dense (in R) if for any real numbers a < b, there exists x ∈ S such thata < x < b. For example, Homework 2 Problem 6 shows that Q is dense in R.

    Lemma 6.1. The irrational numbers are dense in R.

    Proof. Let a < b be given. By density of the rationals, there exists q ∈ Q such that a < q < b.Choose n ∈ N so that x = q +

    √2/n < b; this can be done by the archimedean principle. Then

    a < x < b and x is irrational.

    We also need a result that expresses density in terms of sequences.

    Lemma 6.2. If S ⊆ R is dense, then for x ∈ R, there is a sequence (xn) in S such that xn → x.

    Proof. For each n, by density of S in R, we can choose xn ∈ S with x− 1/n < xn < x+ 1/n. Then(xn) is a sequence in S and xn → x (by the squeeze lemma, say).

    25

  • Solutions MATH 131A (20F)

    Problem 4

    Let g : R→ R be defined by

    g(x) =

    {x x ∈ Q;0 x 6∈ Q.

    (a) Prove that g is continuous at x = 0.

    (b) Prove that g is not continuous at x = 1/2.

    The first solution presented uses the sequential definition of continuity, while the second uses the�-δ definition of continuity. It would also be valid to use one of them for one part and the other forthe other part. In both solutions, note the bound |g(x)| ≤ |x| for all x. (If x is rational, then bothsides are equal, and if x is irrational, then the left hand side is 0.)

    Solution 1.

    (a) We must show that for every sequence xn → 0, we have g(xn)→ g(0) = 0. This follows from|g(xn)| ≤ |xn| and applying the squeeze lemma.

    (b) It suffices to find a sequence xn → 1/2 for which g(xn) 6→ g(1/2) = 1/2. By Lemmas 6.1 and6.2, we can find a sequence of irrational numbers (xn) such that xn → 1/2. Then g(xn) = 0for all n, so g(xn) 6→ 1/2, as desired.

    Solution 2.

    (a) Let � > 0 be arbitrary. We must find δ > 0 such that whenever |x − 0| = |x| < δ, we have|g(x)− g(0)| = |g(x)| < �. Since |g(x)| ≤ |x|, we can take δ = �.

    (b) To show that g is not continuous, we can find � > 0 such that for every δ > 0, there existsx such that |x − 1/2| < δ but |g(x) − g(1/2)| = |g(x) − 1/2| ≥ �. Take � = 1/2. For anyδ > 0, by Lemma 6.1, there is an irrational number x such that 1/2 − δ < x < 1/2 + δ, i.e.|x− 1/2| < δ. Then |g(x)− 1/2| = 1/2 ≥ �.

    26

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 7

    Problem 1

    Suppose that f and g are continuous on [a, b] and satisfy f(a) ≥ g(a) and f(b) ≤ g(b). Provethat there exists a point c ∈ [a, b] such that f(c) = g(c).

    Solution. Let h = f − g, which is continuous on [a, b]. Then h(a) ≥ 0 while h(b) ≤ 0, so by theintermediate value theorem, there is a point c ∈ [a, b] such that h(c) = 0, i.e. f(c) = g(c).

    Problem 2

    Suppose that f is a continuous function on R and that f(a)f(b) < 0 for some a, b ∈ R.Prove that there exists a point c between a and b such that f(c) = 0.

    Solution. The condition f(a)f(b) < 0 means that either f(a) > 0 > f(b) or f(a) < 0 < f(b). Ineither case, the intermediate value theorem gives a point c non-strictly between a and b such thatf(c) = 0, and since f(a)f(b) < 0, we have f(a), f(b) 6= 0, so c is (strictly) between a and b.

    Problem 3

    Suppose that f is continuous on [0, 2] and that f(0) = f(2). Prove that there exists a pointc ∈ [0, 1] such that f(c) = f(c+ 1).

    Solution. Let g : [0, 1]→ R be given by g(x) = f(x+ 1)− f(x). Then g is continuous and

    g(0) + g(1) = (f(1)− f(0)) + (f(2)− f(1)) = f(2)− f(0) = 0.

    Hence either g(0) ≤ 0 ≤ g(1) or g(0) ≥ 0 ≥ g(1). In either case, the intermediate value gives apoint c ∈ [0, 1] such that g(c) = 0, i.e. f(c+ 1) = f(c).

    27

  • Solutions MATH 131A (20F)

    Problem 4

    (a) Suppose that f is uniformly continuous on a bounded set S. Prove that f is boundedon S.

    (b) Use part (a) to prove that f(x) = 1/x2 is not uniformly continuous on (0, 1).

    Solution. (a) Suppose f is not bounded on S; without loss of generality, we can suppose f is notbounded above. For each n, choose xn ∈ S such that f(xn) ≥ n. Then (xn) is a sequence ina bounded set S, so by Bolzano-Weierstrass, there is a subsequence (xnk) which is Cauchy.Since f is uniformly continuous, this implies (f(xnk)) is Cauchy, hence bounded, but this isa contradiction since f(xnk) ≥ nk for each k, and nk →∞ as k →∞.

    (b) The function f(x) = 1/x2 is unbounded on the bounded set (0, 1), as for any M > 1, we havef(1/2

    √M) = 4M > M . Hence f is not uniformly continuous on (0, 1) by part (a).

    Problem 5

    A function f : X → R is called Lipschitz if there exists a number M > 0 such that

    |f(x)− f(y)| ≤M |x− y|

    for all x, y ∈ X. Show that if f : X → R is Lipschitz, then it is uniformly continuous on X.

    Solution. Let � > 0 be given. Then for any x, y ∈ X such that |x− y| < δ := �/M ,

    |f(x)− f(y)| ≤M |x− y| < M · �M

    = �.

    Problem 6

    Suppose that f is continuous on [0,∞). Prove that if f is uniformly continuous on [k,∞)for some k ≥ 0, then f is uniformly continuous on [0,∞).

    Solution 1. Let � > 0. Since f is uniformly continuous on [k,∞), there exists δ1 > 0 such thatwhenever x, y ∈ [k,∞) and |x − y| < δ1, we have |f(x) − f(y)| < �/2. Since f is continuous and[0, k] is a compact interval, there exists δ2 > 0 such that whenever x, y ∈ [0, k] and |x− y| < δ, wehave |f(x) − f(y)| < �/2. Now let δ = min{δ1, δ2} and suppose x, y ∈ [0,∞) with |x − y| < δ. Ifx, y ≤ k or x, y ≥ k, then we get |f(x)− f(y)| < �/2 < � from above. If x ≤ k ≤ y, or vice versa,

    |f(x)− f(y)| ≤ |f(x)− f(k)|+ |f(k)− f(y)| < �2

    +�

    2= �.

    Hence f is uniformly continuous on [0,∞).

    28

  • MATH 131A (20F) Analysis Alan Zhou

    Solution 2. Let � > 0. Since f is uniformly continuous on [k,∞), there exists δ1 > 0 such thatwhenever x, y ∈ [k,∞) and |x − y| < δ1, we have |f(x) − f(y)| < �. Since f is continuous and[0, k+1] is a compact interval, there exists δ2 > 0 such that whenever x, y ∈ [0, k+1] and |x−y| < δ,we have |f(x) − f(y)| < �. Now let δ = min{1, δ1, δ2} and suppose x, y ∈ [0,∞) with |x − y| < δ.By the triangle inequality and |x− y| < 1, either x, y ≤ k + 1 or x, y ≥ k. Hence in either case, weget |f(x)− f(y)| < �, so f is uniformly continuous on [0,∞).

    Problem 7

    Let f(x) =√x. Prove that

    √x is uniformly continuous on [0,∞).

    Solution. By Problem 6, it suffices to prove that f is uniformly continuous on [1,∞). On thisdomain, we have

    |f(x)− f(y)| =∣∣√x−√y∣∣ = |x− y|√

    x+√y≤ 1

    2|x− y|,

    so f is Lipschitz and hence uniformly continuous on [1,∞).

    Problem 8

    Suppose that limx→a+

    f(x) = limx→a+

    h(x) = L and that f(x) ≤ g(x) ≤ h(x) for all x ∈ (a, b) forsome b. Use the �-δ definition to prove that lim

    x→a+g(x) = L.

    Solution. Let � > 0 be given. There exist δf , δh > 0 such that |f(x)−L| < � whenever 0 < x−a < δfand |h(x)− L| < � whenever 0 < x − a < δh. Let δ = min{b− a, δf , δh}. Then for all x such that0 < x− a < δ, we have a < x < δ + a = b, so

    L− � < f(x) ≤ g(x) ≤ h(x) < L+ �.

    Hence |g(x)− L| < � for all such x, and limx→a+

    g(x) = L.

    29

  • MATH 131A (20F) Analysis Alan Zhou

    HOMEWORK 8 (SKETCHES)

    Problem 1

    Using the limit definition of the derivative, prove that the function

    f(x) =

    {x2 sin(1/x) x 6= 00 x = 0

    is differentiable at x = 0.

    A common mistake with this function is to take the derivative at points x 6= 0, then conclude thatbecause limx→0 f

    ′(x) does not exist, f is not differentiable at x = 0. The reason this fails is thatthe derivative of a function need not be continuous.

    Solution sketch. The relevant limit for differentiability at 0 is

    limh→0

    f(h)− f(0)h− 0

    = limh→0

    h2 sin(1/h)− 0h− 0

    = limh→0

    h sin

    (1

    h

    ).

    Now consider the absolute value of h sin(1/h) and use a squeeze lemma to show that the limit aboveexists (and equals 0).

    Problem 2

    Suppose that f is an open interval I containing a. Prove that f ′(a) exists if and only ifthere is a function ε : I → R and a constant m such that

    f(x)− f(a) = (x− a)[m+ ε(x)] and limx→a

    ε(x) = 0;

    moreover, f ′(a) = m.

    Solution sketch. In the ( =⇒ ) direction, let m = f ′(a), then use the first of these equations tosolve for ε(x). [The expression you get will not be defined at x = a, so just set ε(a) = 0.] Thenshow that ε(x)→ 0 as x→ a.In the (⇐= ) direction, write down an expression for f ′(a) using the limit definition of derivative,then express this in terms of m and ε using the first of the given equations. Simplify this limitusing the second of the given equations.

    31

  • Solutions MATH 131A (20F)

    Problem 3

    Using the fact that (cosx)′ = − sinx, prove that |cosx− cos y| ≤ |x− y| for all x, y ∈ R.

    Solution sketch. When x = y, both sides are zero. When x 6= y, use the mean value theorem oncos between the points x and y. Then use the fact that sin is bounded in absolute value by 1.

    Problem 4

    Suppose that f : R→ R satisfies |f(x)− f(y)| ≤ (x− y)2 for all x, y ∈ R. Prove that f is aconstant function.

    Solution sketch. It suffices to show that f ′(x) = 0 for all x (why?). To do this, write down anexpression for f ′(x) using the limit definition of the derivative, then show that the limit equals 0by using the given condition together with a squeeze lemma.

    Problem 5

    Suppose that f and g are differentiable on R, that f(0) = g(0), and that f ′(x) ≤ g′(x) forall x ≥ 0. Prove that f(x) ≤ g(x) for all x ≥ 0.

    Solution sketch. Let h = g − f . Then h(0) = 0 and h′(x) ≥ 0 for all x ≥ 0, and we want to showthat h(x) ≥ 0 for all x ≥ 0.To do this, suppose h(x) < 0 for some x > 0. (We already know that h(0) = 0.) Then apply themean value theorem to h between the points 0 and x to get a contradiction.

    32

  • MATH 131A (20F) Analysis Alan Zhou

    MIDTERM 1

    Problem 1

    (a) Consider the sequence

    1, 0, 1, 0, 0, 1, 0, 0, 0︸ ︷︷ ︸3 zeros

    , 1, 0, 0, 0, 0︸ ︷︷ ︸4 zeros

    , 1, . . . .

    Prove that this sequence is not Cauchy.

    (b) Prove that the sequence (an) defined by an = log n is not Cauchy.

    Solution.

    (a) We show that this sequence (an) does not satisfy the definition of a Cauchy sequence for� = 1/2. That is, we show that for any N ∈ N, there exist m,n ≥ N such that |am−an| ≥ 1/2.In particular, it suffices to find m ≥ N such that am = 1 and n ≥ N such that an = 0.First, we show that the k-th ‘1’ appears at index k(k+ 1)/2. The proof is by induction on k.For the base step k = 1, the first ‘1’ does appear at index 1 · 2/2 = 1. For the inductive step,we know the k-th ‘1’ appears at index k(k + 1)/2. Following the k-th ‘1’, there are k zerosbefore the next ‘1’, so the next ‘1’ occurs at index

    k(k + 1)

    2+ (k + 1) =

    (k + 1)(k + 2)

    2,

    completing the induction.

    Given N , we can now choose m = N(N + 1)/2. Since N ≥ 1, we have (N + 1)/2 ≥ 1, som ≥ N and am = 1. Following m, there are N zeros, so in particular, if we choose n = m = 1,then n ≥ N and an = 0. This completes the proof that (an) is not Cauchy.

    (b) See Homework 2 Problem 4.

    33

  • Solutions MATH 131A (20F)

    Problem 2

    Suppose that (an) is a Cauchy sequence and that (bn) is a sequence which is equivalent to(an). Prove that (bn) is bounded.

    Solution 1. Since (an) is Cauchy, (an) is bounded. Let M > 0 be such that |an| ≤M for all n ∈ N.Since (an) and (bn) are equivalent, there exists N ∈ N such that |bn−an| < 1 for all n ≥ N . (Choose� = 1 in the definition of sequence equivalence.) Then for all n ≥ N , the triangle inequality gives

    |bn| ≤ |bn − an|+ |an| < 1 +M.

    Hence for all n ∈ N, we have

    |bn| ≤M ′ = max{|b1|, . . . , |bN |, 1 +M},

    showing that (bn) is bounded.

    Solution 2. We start by showing that (bn) is Cauchy. Let � > 0 be arbitrary. We wish to findN ∈ N such that for all m,n ≥ N , we have |bm − bn| < �.Since (an) is Cauchy, there exists N1 ∈ N such that |am − an| < �/3 whenever m,n ≥ N1. Since(an) and (bn) are equivalent, there exists N2 ∈ N such that |an − bn| < �/3 whenever n ≥ N2.We pick N = max{N1, N2}. Then for all m,n ≥ N , the triangle inequality yields

    |bm − bn| ≤ |bm − am|+ |am − an|+ |an − bn| <�

    3+�

    3+�

    3= �,

    the bounds on the first and third terms coming from m,n ≥ N ≥ N2 and the bound on the secondterm coming from m,n ≥ N ≥ N1. This shows that (bn) is Cauchy, and hence bounded.

    34

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 3

    Prove that2n

    n!≤ 1n

    for all n ≥ 6.

    Solution. The proof is by induction on n.

    For the base step n = 6, the left hand side is 26/6! = 64/720 whereas the right hand side is1/6 = 120/720, so the inequality holds.

    For the inductive step, suppose for a given n ≥ 6 that 2n/n! ≤ 1/n. Then for n+ 1,

    2n+1

    (n+ 1)!=

    2

    n+ 1

    2n

    n!≤ 2n+ 1

    1

    n=

    2

    n

    1

    n+ 1≤ 1n+ 1

    ,

    where the last step follows from the fact that n ≥ 6 > 2. This completes the induction.

    Problem 4

    Use induction to prove that

    |a1 + a2 + · · ·+ an| ≤ |a1|+ |a2|+ · · ·+ |an|

    for n numbers a1, . . . , an ∈ Q.

    The triangle inequality (n = 2 case) was proved in class and/or the text, so we will assume it.

    Solution. For the base step n = 1, both sides are |a1|.For the inductive step, suppose this inequality holds for a given n ∈ N. Then for n+ 1, the triangleinequality gives

    |a1 + · · ·+ an + an+1| ≤ |a1 + · · ·+ an|+ |an+1|.

    The inductive hypothesis then gives

    |a1 + · · ·+ an|+ |an+1| ≤ |a1|+ · · ·+ |an|+ |an+1|.

    The transitive property implies the desired result for n+ 1, completing the induction.

    35

  • MATH 131A (20F) Analysis Alan Zhou

    MIDTERM 2

    Problem 1

    (a) Consider the sequence (an) defined by the formula

    an = (−1)n(

    1 +1

    n

    ).

    Compute the quantities sup an, lim sup an, inf an, and lim inf an.

    (b) Suppose that (ak) is a sequence with the property that ak ∈ {0, 1, . . . , 9} for all k ≥ 1.

    Prove that

    ∞∑k=1

    ak10k

    is a convergent series.

    Solution. (a) Computing the first few terms, the sequence starts as

    −2, 3/2, −4/3, 5/4, . . . .

    From this, we can see that sup an = 3/2 : The first term is a1 = −2 ≤ 3/2, and for n ≥ 2,we have |an| = 1 + 1/n ≤ 3/2, so an ≤ 3/2 for all n ≥ 2, with equality attained at n = 2. Thesame argument shows that inf an = −2 : For all n, we have |an| = 1 + 1/n ≤ 2, so an ≥ −2for all n, with equality attained at n = 1.

    We claim that lim sup an = 1 and lim inf an = −1 . Since |an| = 1 + 1/n for all n, we havelim |an| = 1. Hence any convergent subsequence (ank) must have limit satisfying |lim ank | = 1,i.e. any convergent subsequence must have limit ±1. The subsequential limit 1 is attainedby the subsequence (a2k), whereas the subsequential limit −1 is attained by the subsequence(a2k+1), so the maximum subsequential limit, i.e. the lim sup, is 1, while the minimumsubsequential limit, i.e. the lim inf, is −1.

    (b) See Homework 6 Problem 1.

    37

  • Solutions MATH 131A (20F)

    Problem 2

    Recall that by the completeness theorem, we can think of any real number as a limit ofrational numbers. In this question, we find a sequence of rational numbers that convergesto a real (irrational) number. Let

    a1 = 2 and an+1 =an2

    +1

    anfor n ≥ 1.

    (a) Suppose that (an) converges to a non-zero number L. Find L.

    (b) Prove that an ≥ L for all n. (Use the value of L that you found in part (a).)

    (c) Prove that (an) is decreasing.

    (d) Prove that (an) is convergent.

    Solution. (a) Taking the limit n→∞ on both sides of the recurrence, we get

    L =L

    2+

    1

    L=⇒ L2 = 2.

    By an induction argument, an ≥ 0 for all n, so L ≥ 0. This forces L =√

    2 .

    (b) For the case n = 1, we have a1 ≥√

    2. For any n > 1, we have

    a2n − 2 =(an−1

    2+

    1

    an−1

    )2− 2 =

    (an−1

    2− 1an−1

    )2≥ 0,

    so a2n ≥ 2, and combined with an ≥ 0, this implies an ≥√

    2.

    (c) For any n ≥ 1, we have

    an − an+1 = an −(an2

    +1

    an

    )=a2n − 2

    2an≥ 0,

    so an ≥ an+1.

    (d) Since (an) is decreasing and bounded below, (an) is convergent.

    38

  • MATH 131A (20F) Analysis Alan Zhou

    Problem 3

    Suppose that f : R→ R is a continuous function such that f(x) = 0 for every x ∈ Q. Provethat f(x) = 0 for all x ∈ R.

    Solution. Let x ∈ R be arbitrary. Since Q is dense in R, there is a sequence (xn) of rational numbersconverging to x. Then by continuity of f ,

    f(x) = f(

    limn→∞

    xn

    )= lim

    n→∞f(xn) = lim

    n→∞0 = 0.

    Problem 4

    Suppose that (an) is a sequence of positive numbers and that the sequence (n2an) converges.

    Prove that the series∑an converges.

    Solution. Suppose n2an → `. Then |n2an − `| ≤ 1 for all n sufficiently large, so n2|an| ≤ 1 + |`|for all such n. Then |an| ≤ (1 + |`|)/n2 for all n sufficiently large, and the series

    ∑(1 + |`|)/n2

    converges (p-test for p = 2), so∑an converges (absolutely).

    39

    Homework 1Homework 2Homework 3Homework 4Homework 5Homework 6Homework 7Homework 8 (sketches)Midterm 1Midterm 2