0% found this document useful (0 votes)
10 views300 pages

Understanding Real Analysis

The document is a preface to the book 'Understanding Real Analysis' by Paul Zorn, which aims to help students, particularly those new to real analysis, gain a deeper understanding of the subject. It outlines the book's goals, such as building on calculus basics, focusing on mathematical proof and structure, and providing many examples and solutions. The preface also discusses the book's reader-friendly style and its suitability for a one-semester course while acknowledging the contributions of various individuals to its creation.

Uploaded by

avigne21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views300 pages

Understanding Real Analysis

The document is a preface to the book 'Understanding Real Analysis' by Paul Zorn, which aims to help students, particularly those new to real analysis, gain a deeper understanding of the subject. It outlines the book's goals, such as building on calculus basics, focusing on mathematical proof and structure, and providing many examples and solutions. The preface also discusses the book's reader-friendly style and its suitability for a one-semester course while acknowledging the contributions of various individuals to its creation.

Uploaded by

avigne21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

i i

i i

Understanding Real Analysis

i i

i i
i i

i i

i i

i i
i i

i i

Understanding
Real Analysis

Paul Zorn
Saint Olaf College

A K Peters, Ltd.
Natick, Massachusetts

i i

i i
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2010 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works


Version Date: 20110714

International Standard Book Number-13: 978-1-4398-9432-3 (eBook - PDF)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made
to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all
materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of
all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not
been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or uti-
lized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopy-
ing, microfilming, and recording, or in any information storage or retrieval system, without written permission from the
publishers.

For permission to photocopy or use material electronically from this work, please access [Link] ([Link]
[Link]/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-
750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organiza-
tions that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identi-
fication and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
[Link]
and the CRC Press Web site at
[Link]
i i

i i

Contents

Preface vii

1 Preliminaries: Numbers, Sets, Proofs, and Bounds 1


1.1 Numbers 101: The Very Basics . . . . . . . . . . . . . . . . . 1
1.2 Sets 101: Getting Started . . . . . . . . . . . . . . . . . . . . 10
1.3 Sets 102: The Idea of a Function . . . . . . . . . . . . . . . . 15
1.4 Proofs 101: Proofs and Proof-Writing . . . . . . . . . . . . . 27
1.5 Types of Proof . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.6 Sets 103: Finite and Infinite Sets; Cardinality . . . . . . . . . 46
1.7 Numbers 102: Absolute Values . . . . . . . . . . . . . . . . . 55
1.8 Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
1.9 Numbers 103: Completeness . . . . . . . . . . . . . . . . . . 65

2 Sequences and Series 73


2.1 Sequences and Convergence . . . . . . . . . . . . . . . . . . 73
2.2 Working with Sequences . . . . . . . . . . . . . . . . . . . . 83
2.3 Subsequences . . . . . . . . . . . . . . . . . . . . . . . . . . 92
2.4 Cauchy Sequences . . . . . . . . . . . . . . . . . . . . . . . 99
2.5 Series 101: Basic Ideas . . . . . . . . . . . . . . . . . . . . . 105
2.6 Series 102: Testing for Convergence and Estimating Limits . . 118
2.7 Lim sup and lim inf: A Guided Discovery . . . . . . . . . . . 129

3 Limits and Continuity 133


3.1 Limits of Functions . . . . . . . . . . . . . . . . . . . . . . . 133
3.2 Continuous Functions . . . . . . . . . . . . . . . . . . . . . . 146
3.3 Why Continuity Matters: Value Theorems . . . . . . . . . . . 154
3.4 Uniform Continuity . . . . . . . . . . . . . . . . . . . . . . . 163

4 Derivatives 173
4.1 Defining the Derivative . . . . . . . . . . . . . . . . . . . . . 173
4.2 Calculating Derivatives . . . . . . . . . . . . . . . . . . . . . 183
4.3 The Mean Value Theorem . . . . . . . . . . . . . . . . . . . 195
4.4 Sequences of Functions . . . . . . . . . . . . . . . . . . . . . 204

i i

i i
i i

i i

vi CONTENTS

5 Integrals 215
5.1 The Riemann Integral: Definition and Examples . . . . . . . . 215
5.2 Properties of the Integral . . . . . . . . . . . . . . . . . . . . 226
5.3 Integrability . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
5.4 Some Fundamental Theorems . . . . . . . . . . . . . . . . . 250

Solutions 257

Index 288

i i

i i
i i

i i

Preface

What This Book Is, and Isn’t


This book aims to do what its title suggests: help students—especially those new
to real analysis—really understand what it is all about.
Who could oppose such a goal? A better question is how, concretely, this
textbook tries to achieve it. Following are some more specific goals, strategies,
and features.

Building on calculus basics. Students in the beginning real analysis course that
this book supports may have little or no course experience beyond single-variable
calculus (a year, say) and perhaps some exposure to linear algebra, differential
equations, or multivariate calculus. What can be expected from such students is a
general, though probably informal, sense of the big ideas of calculus—function,
limit, derivative, and integral—and some curiosity about the rigorous theory that
lies behind the techniques. This book’s main strategy is to exploit students’ prior
experience with and curiosity about calculus in working toward deeper under-
standing.

Focus on mathematical proof and structure. Beginning real analysis students


may or may not already have taken a “proofs” or “bridge” or “transition” course.
This book makes no hard-wired assumption either way. The long and relatively
leisurely Chapter 1 includes enough of this material (e.g., a fairly complete in-
troduction to sets and cardinality) to help less “mature” students make their way
efficiently into real analysis. A class of students who do have this background can
simply move more quickly through these preliminaries; there is enough material
here to support a full semester course in either case.
Real analysis is, arguably, a challenging area in which to learn proof tech-
niques, as I hope many students will do. Definitions and theorems, for instance,
can be quite technical, with multiple layers of quantification. On the flip side (I’m
convinced!), real analysis has the advantage of being about ideas most students
will have recently encountered—and many students really are eager to accept a
challenge so closely connected to their recent experience.

Focus on mathematical language. Outsiders and newcomers find mathematical


language surprisingly subtle, sophisticated, and sensitive to word order, usage,
and punctuation. (Run the definition of uniform continuity by a colleague in the

vii

i i

i i
i i

i i

viii Preface

humanities sometime.) Most mathematics students need guidance and explicit


attention to linguistic conventions in the discipline. This book aims to offer such
help, especially in earlier sections, before the mathematical and linguistic subtlety
ramp up—together.

Redoing some elementary calculus topics “right.” A beginning analysis course


can help students deepen and consolidate their understanding of calculus ideas.
For example, few students seem to make deep sense of infinite series on that first
dreaded pass, usually in Calculus 2. Students who study sequence convergence
carefully, as in the course envisioned here, are in a far better position to make
sense of abstract questions of series convergence and divergence and to go deeper
into such topics as estimation of series “tails.”

Focus on the basics. This book focuses on (what I take to be) basic elements of
the theory; neither compactness nor the Lebesgue integral is covered, for instance.
This is intentional: I’ve willingly traded “coverage” for “simplicity.” (Instructors
who want to go deeper can readily do so; see below for suggestions.) Covering
fewer topics, moreover, leaves room for more narrative discussion and concrete
examples, of which there are a lot. To put it another way, I try to look closely at
relatively simple things.

Many examples, many solutions. The book contains many worked-out exam-
ples and quite a few detailed solutions to exercises, especially in earlier sections.
I believe that many students learn theory largely “inductively,” from examples,
and that detailed solutions to a substantial number of problems can usefully illus-
trate, for newcomers, the language and conventions of mathematical discourse.

Reader-friendly style. I’ve aimed for a friendly-but-serious narrative style. The


marginal notes, for instance, are intended mainly as brief nudges, pointers to “dan-
gerous curves,” or just friendly asides. It takes two to achieve friendliness, of
course, so the verdict is ultimately up to the reader.

Increasing sophistication. Mathematical depth and technical sophistication grad-


ually increase over the chapters. Chapter 1, for instance, is quite leisurely, while
Chapter 5, on the Riemann integral, is relatively technical (like the integral itself)
and business-like.

Using This Book


Following are some suggestions for using this book.

i i

i i
i i

i i

Preface ix

A one-semester course? This book is designed for use in one typical college
semester, but there is more material here than I would cover in that time, except
perhaps with veterans of a proofs course. With a less experienced class I might
omit the coverage of infinite series, for instance, to concentrate more heavily on
integrals. Or one could omit integrals entirely, and go into more depth on series,
sequences, and derivatives.

Supplementary topics. Real analysis offers many possibilities for group or in-
dividual projects on supplementary topics. These can be especially useful with
unusually well-prepared or highly talented students, who can otherwise be bored
in a class of less highly selected students. Here are some ideas; all are readily
researchable in books or online by motivated students:
• The Cantor–Banach–Bernstein theorem: if f : A → B and g : B → A are
injective, then there is a bijection h : A → B.
• Exploring the limit superior and the limit inferior (a “guided discovery” on
this topic appears in the book).
• Exploring Taylor polynomials and remainder theorems (Taylor’s theorem
is mentioned, but only briefly).
• Exploring compactness of subsets of R, the Heine–Borel theorem, and con-
nections with boundedness of functions and convergence of sequences.
• Exploring deeper properties of the Riemann integral. Suppose, for instance,
that a function f is integrable on [0, 1] and f (x) > 0 for all x. Showing
1
rigorously that 0 f > 0 is harder than it might seem, and it raises good
questions about monotonicity, points of continuity, and integrability.

Solutions. Solutions to a substantial subset of the exercises are included at the


end of the book. These include solutions to most of the odd-numbered problems
and a much smaller subset of even-numbered problems. For more complete solu-
tions, instructors should contact marketing@[Link].

Thanks
This book owes its existence to a large (uncounted but surely countable) set of
teachers, academic colleagues, St. Olaf College students, publishing company
professionals, friends, advisors, critics, “competitors,” family, and others. It is
a pleasure to acknowledge some of them by name—and to claim sole credit for
errors that survived their best efforts to help.
Among local colleagues I thank Bruce Hanson, Paul Humke, Loren Larson,
Arnie Ostebee, Matt Richey, Lynn Steen, Ted Vessey, and many others with whom

i i

i i
i i

i i

x Preface

I have discussed matters mathematical and pedagogical for many years. On mat-
ters of taste and usage—both linguistic and mathematical—my friend Barry Cipra
is a reliable resource. His advice, when I have taken it, has always proved correct.
These gifted teachers, expositors, and mathematicians have helped me think about
the deep connections and subtle relationships among teaching, telling, and doing
mathematics. They have also demonstrated, by argument and example, that seri-
ous engagement with post-calculus mathematics is possible, and valuable, for a
broad range of students, not just a small elite. This “big tent” approach to our dis-
cipline informs and underpins St. Olaf’s very successful undergraduate program,
and I have kept it in mind when writing this book.
Academic colleagues elsewhere have taught me a lot, too. These include my
own mathematics teachers at Washington University and the University of Wash-
ington; authors and referees from my work with Mathematics Magazine and other
publications of the Mathematical Association of America; and authors of other
real analysis textbooks from which I have learned, taught, or read. Real analysis
can be viewed usefully from many angles; doing so offers depth and perspective.
St. Olaf College mathematics major students deserve thanks, too. Several
cohorts of students in sections of Math 244: Elementary Real Analysis have used
drafts of this book and offered valuable suggestions, criticisms, and pointers to
typos—and worse.
Klaus Peters and Charlotte Henderson, at A K Peters, have worked with re-
markable (indeed, unprecedented in my experience) care, diligence, and intelli-
gence to make this book better and its production easier. I’m all the more grateful
to them because, as a sometime editor myself, I know how difficult and exacting
that work can be.
Last, but hardly least important, are the support and forbearance of my wife,
Janet, in everything that book writing entails for anyone unlucky enough to be
around the process. Thanks.

i i

i i
i i

i i

CHAPTER 1
Preliminaries: Numbers, Sets,
Proofs, and Bounds

1.1 Numbers 101: The Very Basics


Real analysis is all about real-valued functions of a real variable, so an obvious
early step is to understand basic properties of the set of real numbers. Many of
these properties are related to or inherited from slightly simpler sets, such as the
integers and the rational numbers. We reserve some special symbols for these
important sets:∗

N = {1, 2, 3, . . . } : the natural numbers;


Z = {. . . , −2, −1, 0, 1, 2, . . . } : the integers;
Q : the rational numbers;
R : the real numbers.

Using these symbols we can discuss these sets clearly and efficiently, with sen-
tences like the following:

42 √ √
N ⊆ Z ⊆ Q ⊆ R; ∈ Q; 152399025 ∈ Z; 93 ∈ R \ Q.
43

What each of these symbol strings says should be clear. Whether each claim is The last one says that 93 is
true or false is less obvious—but that’s a matter of mathematics, not of symbolic real but not rational. Notice the
funny “setminus” sign.
clarity. As it turns out, all four claims are true; proving the last assertion takes
some effort. We’ll see a proof soon; for now
Set notation is useful and efficient, but only when used correctly. Something the proof is beside the point.
is amiss, for instance, with each of the following expressions:

(i) R ∈ Q; (ii) 3.1 ⊃ N; (iii) N ⊆ R.
∗ The special font can help avoid confusion with other sets. The choices N and R are made for

obvious reasons; Q and Z remind us of quotient and Zahlen (German for “numbers”), respectively.
The symbol C can denote the set of complex numbers.

i i

i i
i i

i i

2 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

A charitable reader might try to make sense of (i)–(iii), but their problems are
ultimately fatal—none really makes sense. (A nicer way to say this is to refer to
errors of syntax.) The problem with (i), for instance, is not the (true!) fact that
real numbers may be irrational, but rather that R is a set of numbers, and hence
not even in the running to be an element of the set of rationals. Expression
√ (ii) is
meaningless for similar reasons, and (iii) is even worse: the expression N has
no clear meaning, so the question of containment in R is moot.

E XAMPLE 1. Does each of the following symbolic claims make sense? If a


claim makes sense, is it true or false?

(i) Q ∈ R; (ii) 106 π ∈ Q; (iii) if a ∈ Q and b ∈ Q then a + b ∈ Q.

S OLUTION . Statement (i) makes no sense—Q is the wrong type of object to


be an element of R. Claim (ii) asserts—meaningfully but falsely—that 106 π is
If 106 π were a quotient of rational. Claim (iii) also makes good sense; it says that the sum of two rational
integers, π would be rational, numbers is another rational number. This, too, is true, because the sum of two
too, which it isn’t.
“fractions” is another “fraction.” ♦

Integers, Rationals, and Reals


What exactly is a real number?
The question may seem absurd. Nobody reading this book will balk at expres-
sions like
 π  √2  1
sin = and ex dx = e − 1,
4 2 0

both of which are rich stews of integers, fractions, and irrational numbers. We
will not deny or ignore your earlier experience—all of it will be useful—but aim
to sharpen intuition and make assumptions explicit.
As a look ahead consider, for instance, the expression

f (x) − f (π)
lim = f  (π),
x→π x−π
It’s f  (π ), as we know from which describes a certain derivative. Making clear sense of such an expression,
beginning calculus. as we’ll need to do later in studying derivatives, depends on various properties of
real numbers. Here are some early hints:

• Real arithmetic: The fractional expression

f (x) − f (π)
x−π

i i

i i
i i

i i

1.1. Numbers 101: The Very Basics 3

is built up using subtraction and division of the real numbers x, π, f (x),


and f (π), at least some of which are irrational. Depending on its definition,
the function f may require additional arithmetic operations on reals.

• Approximation and distance: The idea of limit entails one quantity “ap-
proaching” another, in a subtle sense that we’ll soon work hard to make
precise. But it is clear already that we won’t get far without some notion of
“distance” between numbers, and we’ll need to know that any real number,
say π, has plenty of “near” neighbors along which an “approach” to π can
be made.

• No gaps: For any limit to exist there needs to be a value for the quantity in
question to approach; if the real numbers had “gaps” there could be trou-
ble. This modest-seeming requirement, called completeness, turns out to be
subtler than it might first seem. We’ll revisit it soon.

Integers. We’ll build up our description of the real numbers by starting with sim-
pler sets: first Z and then Q. What’s “simpler” depends, of course, on the situa-
tion. To a number theorist, for instance, there is nothing simple about the integers.
In real analysis, however, we’ll need only basic, familiar properties of the in-
tegers, and we’ll usually take these as “known.” We’ll accept without fuss, for
instance, that equations like

a + b = b + a, ab = ba, (a + b)c = ac + bc, and


2 2
(3a − 5b)(2a − 7b) = 6a − 31ab + 35b

make sense, and hold true, for any integers a, b, and c. We also “know” that every
integer a has an additive inverse, −a, but that a multiplicative inverse, 1/a, need What happens if a = 0?
not be an integer.

The well-ordering property. Here’s another basic fact we’ll just assume: Every
nonempty set of positive integers has a least element. This fact is known formally
as the well-ordering property of the positive integers. The name may be myste-
rious but the property itself should be familiar and believable from experience. It comes from set theory—not
Among all even positive multiples of 7, for instance, 14 is smallest. We’ll take our subject here.
the well-ordering property as an axiom, not as a theorem to be proved. In more formal discussion the
property is sometimes proved to
follow from even simpler
Rational numbers. Basic algebraic properties of Q are equally familiar. All four
axioms.
equations above, for example, hold just as well for rational numbers a, b, and
c as for integers. Because nonzero rational numbers have (rational) reciprocals,
equations and expressions that involve division can now make sense. Here are
three examples:

i i

i i
i i

i i

4 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

p+q p q pq q p+q 1 1
= + ; =p ; = + .
r r r r r pq q p
All are true, of course, whenever p, q, and r are rational numbers and all denomi-
nators are nonzero.
In later work we’ll freely use such familiar facts, usually without comment.
Right now it is a good exercise to derive some properties of Q, assuming basic
properties of Z.
For us a rational number r is just a ratio of integers:
a
r= , where a, b ∈ Z and b = 0.
b
Of course, any given rational number has many possible forms:
2 14 −222 84
= = = = ...;
3 21 −333 132
the first form, in which numerator and denominator have no common factors, is
called reduced.

E XAMPLE 2. Prove—assuming basic properties of integer arithmetic—that if p


and q are any rational numbers, then p + q ∈ Q and p + q = q + p.

S OLUTION . The proof is direct: We start with the hypothesis and derive the
conclusions. Because p and q are rational, we can write
a c
p= and q = ,
b d
where a, b, c, d ∈ Z and b = 0 = d. Now we add fractions:
a c ad + cb
p+q = + = ,
b d bd
which exhibits p + q as the desired ratio of integers. (Both numerator and de-
nominator are integers, and the denominator is nonzero, thanks to basic integer
arithmetic, which we take as known.)
Also,
c a cb + ad ad + cb
q+p= + = = ,
d b db bd
where the last equality follows from commutativity of integer operations. The last
expression is just what we calculated earlier for p + q, so we’re done. ♦

E XAMPLE 3. Prove that if p ∈ Q and p = 0, then there is a rational number q


with pq = 1. (In other words, q deserves the name 1/p.)

i i

i i
i i

i i

1.1. Numbers 101: The Very Basics 5

S OLUTION . We’ll give an explicit formula for q.


The hypothesis means that there are nonzero integers a and b with p = a/b.
Now q = b/a does the job, since

ab
pq = = 1. ♦
ab
Q is a field. The following theorem says, in mathematical parlance, that Q is a
field. Nothing in the theorem should
surprise you; the point is to
Theorem 1.1. The set Q has the following properties: collect and formalize key
properties.
• Two operations: Addition and multiplication are operations on Q: if p and
q are any rational numbers, then so are p + q and pq.
• Commutativity: Addition and multiplication are commutative operations:
if p and q are any rational numbers, then p + q = q + p and pq = qp.
• Associative operations: Addition and multiplication are associative opera-
tions: if p, q, and r are any rational numbers, then (p + q) + r = p + (q + r)
and (pq)r = pqr.
• Identities: The rational number zero is an additive identity: 0 + p = p
holds for all p ∈ Q. The rational number one is a multiplicative identity:
1p = p holds for all p ∈ Q.
• Inverses: For every rational number p, the rational number −p is an ad-
ditive inverse: p + (−p) = 0. For every nonzero rational number p, the
rational number 1/p is a multiplicative inverse: p · 1/p = 1.
• Distributivity: Multiplication distributes across addition: For any rationals
p, q, and r, p(q + r) = pq + pr.

All parts of the theorem can be proved in the spirit of the preceding examples,
assuming similar properties of Z. But . . .

E XAMPLE 4. Z is not a field. Why not?

S OLUTION . To be a field, a set must satisfy each of the long list of properties
in Theorem 1.1. Proving all this can be daunting. But there’s a happy flip side:
Disproving that Z is a field is easy. It is enough to find just one property that fails
for Z, and for this even a single counterexample suffices. We could just observe,
for instance, that the integer 42 has no multiplicative inverse among the integers,
and leave it at that. ♦

i i

i i
i i

i i

6 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Q is not R. The set Q is clearly infinite—it contains all the integers, for one thing.
A bit less obvious, perhaps, is the fact that between any two different rationals lie
infinitely many more rationals. Between 3.14 and 3.15, for instance, lie
3.141, 3.142, . . . , 3.149, 3.1411, 3.1412, . . . , 3.14237568, 3.14237569, . . .
and so on. With so many rational numbers around, one might wonder whether
there are any irrationals—numbers that cannot√ be √ written
√ as ratios of integers.
Nowadays everybody “knows” the answer: 2, 3, 3 2, π, e, and many other
favorite numbers are all irrational. But none of these facts is completely triv-
ial. Indeed, the Pythagoreans (around 500 BCE) saw all numbers as rational.
By some accounts, they drowned the philosopher Hippasus as a heretic after he
demonstrated that a square of side 1 has irrational diagonal. We’ll take that risk
and still give a proof.

Theorem 1.2. 2 is irrational.

Like other proofs we’ve given, Proof: The proof is by contradiction: Assuming 2 is rational, we’ll derive an
this one exploits basic absurdity.
properties of integers. √ √
Assume, then, that 2 is rational. We can write 2 = ab , for some positive
integers a and b, not both even. (If both were even we could cancel a common
factor of 2.) Next we do some algebra:
√ a a2
2= =⇒ 2= =⇒ 2b2 = a2 .
b b2
Now 2b2 is certainly even, and so a2 must be even, too. But then a itself must be
even; otherwise, a2 would be odd. Thus we can write a = 2c for some integer c,
and we have
2b2 = a2 = 4c2 =⇒ b2 = 2c2 .
This implies that b (like a) is even, which contradicts our earlier assumption, and
completes the proof. 
See the exercises. A more general theorem can be proved by similar means:

Theorem 1.3. n is irrational for every integer n that is not a perfect square.

Infinitely many irrationals for the price of one. It took some work to find even
one irrational number. This done, however, it is surprisingly easy to find many,
many more irrationals.
Theorem 1.4. If x is irrational and r = 0 is rational, then
x r
xr, x + r, x − r, 1/x, , and
r x
are all irrational.

i i

i i
i i

i i

1.1. Numbers 101: The Very Basics 7

Proof: There is less to this than meets the eye. Everything boils down to the
field properties of Q, listed in Theorem 1.1. For example, suppose (aiming for
a contradiction) that xr is rational. We know from Theorem 1.1 that 1/r is also
rational, and so the product
1
xr × = x
r
is rational, too. This contradicts our hypothesis, and so xr must be irrational. The
remaining parts are similar, and are left as exercises. 

Real numbers. So what is a real number?


For us, the set R is the union of all the rational and all the irrational numbers.
Admittedly, this is not a logically airtight definition. It ignores, for example, such The reals can be defined
difficult questions as how to be sure we’ve included all the needed irrationals. But rigorously, starting from the
rationals; this is sometimes
our informal view is a good start, and we’ll deepen it in the next section as we done in more advanced
study properties and alternative ways of viewing the real numbers. courses.

Exercises
1. As in Example 1, page 2, decide whether each of the following claims
makes sense. If a claim makes sense, is it true or false?

(a) If r ∈ Q then 5r ∈ Q.

(b) 8 ⊂ R \ Q.

(c) { 8} ⊂ R \ Q.
(d) If a ∈ Q and b ∈ R \ Q then ab ∈ R \ Q.
(e) If a ∈ Q and b ∈ N then a/b ∈ Q.
(f) If a ∈ Q then there exists n ∈ N such that na2 > 100.

2. We said in this section that Z is not a field. Which of the several require-
ments in Theorem 1.1 does Z fail? Which does it pass? Give an example to
illustrate each failed requirement.

3. For which integers a is 1/a an integer? For which integers a is 1/a rational?
For which integers a is 1/a = a? No proofs necessary, but be sure to
consider all possibilities.

4. The set of irrationals is not a field because (among many other reasons) the
irrationals contain no multiplicative identity. Give one reason—as briefly
as possible—why each of the following sets is not a field.

i i

i i
i i

i i

8 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(a) The set S1 of nonnegative rationals.


(b) The set S2 that includes all the irrationals and all the integers.

(c) The set S3 of all numbers of the form a + b 2, where a and b are
integers.

5. Let p and q be two rational numbers. In each part following, decide whether
the given expression must be a rational number. If so, explain why, referring
to any theorems in this section. If not, give a counterexample.
p+q
(a) (the average of p and q)
2
p+q
(b) 2
p + q2

(c) p2 + q 2

(d) p2 + 2pq + q 2

6. The well-ordering property (see page 3) says something special about the
set N:
If S ⊂ N and S = ∅, then S has a least element.
Give informal answers, not formal proofs, in each part following.

(a) Does Q have the well-ordering property? (In other words, does every
nonempty subset of Q have a least element?) Why or why not?
(b) Does the set R = { 1, 10, 100, 1000, . . . } have the well-ordering
property? Why or why not?
(c) Does the set T = { −3, −2, −1, . . . , 41, 42 } have the well-ordering
property? Why or why not?
(d) Replace the word “least” with “greatest” in the well-ordering property
above. Does the result hold for N? For T ? For Z \ N?

7. We know from elementary calculus that ln n tends to infinity (“blows up”)


slowly as n tends to infinity. It follows that ln ln ln n also tends to infinity,
but slower still. Use the well-ordering property to explain why there must
be a least positive integer n0 such that ln ln ln n0 > 2. (Notes: Finding n0
exactly would be tricky, since n0 is very, very large. For fun, try to estimate
how many digits n0 has.)
8. Let both x and r be irrational numbers, and consider the quantities xr, x+r,
x − r and x/r, as in Theorem 1.4. Must any quantity be irrational? Must
any be rational? No proofs needed, but give examples to illustrate all the
possibilities.

i i

i i
i i

i i

1.1. Numbers 101: The Very Basics 9


9. Imitate the proof of Theorem 1.2 to show that 3 is irrational. (Hint: If a2
is divisible by 3, then a is divisible by 3, too. This is easy to prove, but just
assume it here.)
10. Use Theorem 1.4 in this problem.
(a) Show that if x2 is irrational, then x is irrational, too.
√ √ √ √
(b) We know that 2 and 3 are irrational. Show that 2 + 3 is irra-
tional, too.
√ √ √ √ √ √
(c) All of 2, 3, and 5 are irrational. Show that 2 + 3 + 5 is
irrational, too. (This is harder.)
11. Add details (explain anything
√ that isn’t obvious) to the following hints to
give another proof that 2 is irrational. (The proof’s very clever idea is
attributed to Fermat.)

If 2 = a/b holds for any positive integers a and b, then there must be a
smallest possible b, in the sense that no smaller denominator works. Let
such a and b be given; note that 2b2 = a2 . Now consider the new fraction
2b − a a
= .
a−b b
Explain why (i) both a and b are positive integers; (ii) b < b; (iii)
 
  2 √
a
b = 2, and so deduce that 2 = a/b is impossible.

12. The set M2×2 of 2 × 2 matrices with real number entries permits matrix
addition and matrix multiplication, so we can ask about the properties men-
tioned in Theorem 1.1. No proofs needed, but give examples to illustrate
any properties that fail.
(a) Are addition and multiplication in M2×2 commutative?
(b) Which elements in M2×2 have additive and/or multiplicative inverses?
(c) Does addition and multiplication in M2×2 satisfy the distributive prop-
erty?

13. Let F be the set of real numbers of the form a + b 2, with a and b ra-
tional numbers. Show that F is a field. (Hint: The hardest part concerns
multiplicative inverses.)
14. Consider the set Z2 = {0, 1}.
(a) Show that Z2 is not a field with the usual operations of multiplication
and addition.
(b) Show that Z2 is a field if we use the two operations (i) ordinary mul-
tiplication; (ii) addition “mod 2”: 0 + 0 = 0 and 0 + 1 = 1 + 0 = 1,
but 1 + 1 = 0.

i i

i i
i i

i i

10 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

1.2 Sets 101: Getting Started


This section is a brief introduction to (or review of) rudiments of set theory that
play some role in real analysis. An important purpose is to establish vocabulary
and notations that will help us streamline later discussions.
A set is any collection of objects, called elements of the set. Here are some
samples:
A = {January, February, March, . . . , December} ,
B = {January, March, May, July, August, October, December} ,
 
C = 1, {2, 3}, x2 + 1, November, elephant ,
D = {2, 3} ,
I = [2, 3] = {x | 2 ≤ x ≤ 3} ,
N = {1, 2, 3, . . . } ,
∅ = the empty set.
Observe:
• Names: It is common, but not required, to use uppercase letters to denote
sets. For a few very special sets, like N and ∅ above, we use special charac-
ters.
• Looks can deceive: The sets D = {2, 3} and I = [2, 3] bear some typo-
graphical resemblance but are otherwise very different—D has only two
elements while I, like every nonempty interval, has infinitely many.
• Different descriptions: Sets can be described in various ways. For B, C,
and D, for instance, we listed each set’s elements explicitly. For A, I, and
N we described a pattern or condition that elements must satisfy. What
really matters is clarity.
• Weird sets: The strange set C illustrates that a set’s elements may be quite
different from each other. In particular, a set may contain other sets as ele-
ments. We’ll usually stick to relatively tame sets in studying real analysis.

Notations and operations. Standard symbols let us describe set properties and
operations clearly and concisely. Just a few go a long way:
• Subsets and containment: The expression B ⊂ A says (truthfully for the
sets above) that B is a subset of A; the C-like symbol suggests containment.
If B  A, then B is a proper subset of A.
In a similar spirit, all of these expressions:
A ⊃ B; B ⊆ A; B  A; I ⊇ D; ∅⊆D
Are they all true of the sets
above? describe various containment relations.

i i

i i
i i

i i

1.2. Sets 101: Getting Started 11

• Membership: The expression a ∈ A means that a is an element of A. Here Read ∈ as “in.”


are some (true) examples for the sets above:

March ∈ A; 2 ∈ D; April ∈
/ B; {2, 3} ∈ C; {2, 3} ∈
/ I.

The last two claims might be surprising. Notice that the set {2, 3} is indeed
an element of the peculiar set C, but not of I, which contains only numbers. On the other hand, {2,3} ⊂ I.

• New sets from old: Any two sets S and T can be combined in various ways
to form new sets:

union : S ∪ T = {x | x ∈ S or x ∈ T };
intersection : S ∩ T = {x | x ∈ S and x ∈ T };
set difference : S \ T = {x | x ∈ S and x ∈
/ T };
Cartesian product : S × T = {(x, y) | x ∈ S and y ∈ T }.

Here are some (true) examples from the sets above; note that all of the
results are sets:

A ∩ C = {November}; A ∪ B = A; A ∩ B = B;
A \ B = {February, April, June, September, November} ; B \ A = ∅;
A × N = {(m, n) | m is a month and n is a positive integer} .

In practice, statements about sets may involve complex symbolic combinations.


Making sense of them takes careful reading.

E XAMPLE 1. Let Z, Q, and R denote (as usual) the sets of integers, rationals,
and reals, respectively, and consider the sets
   
S = x ∈ R | x2 − x − 1 = 0 ; T = x ∈ R | x2 − x − 1 > 5 .

The sets S and T illustrate set-builder notation: they are “built” from a larger set
using a selection rule or membership criterion. (The vertical bar | means some-
thing like “such that.”)
What does each of the following assertions mean? Which are true?

(i) S ∈ Z; (ii) S ⊂ Q; (iii) S ⊂ R \ Q; (iv) 4 ∈ T.

S OLUTION . Statement (i) says that S—a set of numbers—is itself an integer;
this is clearly false. Statements (ii) and (iii) make better sense; (ii) says that all
roots of x2 − x− 1 are rational, while (iii) says that these same roots are
√ irrational.
Who’s right? Well, by the quadratic formula, the two roots are (1 ± 5)/2, both

i i

i i
i i

i i

12 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

of which are real but irrational, so (iii) is true and (ii) is false. Statement (iv) boils
down to the claim that 42 − 4 − 1 > 5, which is clearly true.
We might, by the way, have saved some work by first rewriting S and T in
simpler or different forms. As we’ve seen,
 √ √
1+ 5 1− 5
S= , .
2 2

Check for yourself. The quadratic formula also shows that x2 − x − 1 = 5 has the two roots x = −2
and x = 3, and so
T = {x ∈ R | x < −2 or x > 3} . ♦

Intervals. Intervals in the real line are familiar but useful sets in studying real
analysis. Calculus veterans have seen countless examples; we collect a few as
reminders of the possible variety and of some useful descriptive language.

interval description inequality form


[−2, 3] closed, bounded {x ∈ R | −2 ≤ x ≤ 3}
(−2, 3) open, bounded {x ∈ R | −2 < x < 3}
[−2, ∞) closed, unbounded {x ∈ R | −2 ≤ x}
(−∞, 3) open, unbounded {x ∈ R | x < 3}
(−2, 3] half-open, bounded {x ∈ R | −2 < x ≤ 3} .

In particular, closed intervals contain their endpoints, if any, while open in-
tervals do not. All intervals, open or closed, bounded or unbounded, share two
defining properties:
Definition 1.5. A set I ⊂ R is an interval if (i) I contains at least two points;
(ii) if a and b are in I and a < x < b, then x ∈ I, too.

E XAMPLE 2. Let I and J be any two intervals. What possible forms can the
intersection I ∩ J take?

S OLUTION . The intervals I and J might miss each other entirely; then I ∩J = ∅.
Or I and J might intersect in a single point, as do I = [1, 3] and J = [3, 5]. More
interesting is the fact that only one other possibility exists: If I ∩ J contains at
least two points, then I ∩ J is an interval.
The hard way to prove this is to handle many special cases, depending on
whether each of I and J is open, closed, bounded, unbounded, etc. The easy way
is to use Definition 1.5, in which only (ii) is a live question.

i i

i i
i i

i i

1.2. Sets 101: Getting Started 13

Suppose, then, that both a and b are in I ∩ J, and a < x < b. Since I is an
interval, Definition 1.5 guarantees that x ∈ I. For the same reason, we must have
x ∈ J, too. Thus x ∈ I ∩ J, and we’re done. ♦

Exercises
1. Consider several sets discussed in this section:

A = {January, February, March, . . . , December} ;


B = {January, March, May, July, August, October, December} ;
 
C = 1, {2, 3}, x2 + 1, November, elephant ;
D = {2, 3} ; I = [2, 3] = {x | 2 ≤ x ≤ 3} .

(a) Clearly, B ⊂ A. Are there any other subset relations among A, B, C,


D, and I? Is any of these sets an element of another?
(b) Find a rule or pattern to define B in terms of A. (We could use
such a rule to write B in set-builder notation: B = {m ∈ A |
. . . something . . . }.
(c) Describe the set A × D. How many elements are there?
(d) Find (list the elements) each of the following sets: A \ B; B \ A;
A ∩ C; B ∩ A; D ∩ I; D ∪ I.

2. Consider the sets S = {x ∈ R | x2 + x = 0} and T = {x ∈ R | x2 +


x < 5}. (We used similar sets in Example 1, page 11.)

(a) Rewrite S and T in simpler forms. (One is a finite set and the other
an interval.)
(b) Decide whether each of the following statements is true or false, and
explain: S ⊂ N; S ⊂ T ; T ∩ Q = ∅; −2.8 ∈ Q \ T .
(c) Give the simplest possible description of the set U = {x ∈ R | x2 +
x < 0}.

3. Let A and B be subsets of R, and consider the two claims

(i) R \ (A ∪ B) = (R \ A) ∪ (R \ B) ;
(ii) R \ (A ∪ B) = (R \ A) ∩ (R \ B) .

(a) One of (i) and (ii) is true and the other false. Identify the false claim
and give specific sets A and B to show it is false.
(b) What happens in the special case that A = B?

i i

i i
i i

i i

14 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

4. Give specific examples of intervals I and J for which I ∩ J is (a) open;


(b) closed; (c) half-open; (d) open and unbounded. Is it possible in each
case to choose I and J so that neither I ⊂ J nor J ⊂ I?
5. Is it possible for both I and R \ I to be intervals? Can both I and R \ I be
bounded intervals? In each case, give an example or explain why not.
6. Can any interval have exactly 123456789 points? Why or why not?
7. From any set S we can create the new set P (S), the power set of S, con-
sisting of all subsets of S. If S = {1, 2}, for instance, then P (S) =
{ ∅, {1}, {2}, {1, 2} }.

(a) Find P (S) if S = {1, 2, 3}.


(b) Show that if S ⊂ T , then P (S) ⊂ P (T ).
(c) Let N10 = {1, 2, . . . , 10} and N11 = {1, 2, . . . , 10, 11}. Explain
why P (N11 ) has twice as many members as P (N10 ). (We’ll prove
this formally in a later section.)

8. Let N10 = {1, 2, . . . , 10}.

(a) Let S be the set of all three-member subsets of N10 . How many ele-
ments does S have?
(b) Let T be the set of all three-tuples (a, b, c) with a, b, and c in N10 .
How many elements does T have?
(c) Let S10 be the set of all permutations (i.e., orderings) of the elements
of N10 . How many elements does S10 have?
(d) Do any two of the sets N10 , S, T , S10 have nonempty intersection?

9. Let S be a set with n elements. Let S  be the set of all (n − 1)-element


subsets of S  . How many elements does S  have? Why?
10. Let N100 = {1, 2, . . . , 100}. Let A42 and A58 be the sets of all 42- and
58-member subsets of N100 , respectively. Show that A42 and A58 have the
same number of elements.
11. The xy-plane can be thought of as the Cartesian product R × R (hence the
notation R2 ). Sketch each of the following subsets of R × R.

(a) {1, 2, 3} × R
(b) R × {1, 2, 3}
(c) Z × N
(d) {(x, y) | y = x2 }

i i

i i
i i

i i

1.3. Sets 102: The Idea of a Function 15

(e) {(x, y) | x = sin y}


(f) {(x, y) | x2 + y 2 = −1}

12. A simple picture can be drawn in a n × m square grid by coloring each


square either black or white. Think of the grid as the Cartesian product
G = H × V , where H = {1, 2, . . . , n} and V = {1, 2, . . . , m}, with
lower-left corner (1, 1) and upper-right corner (n, m).

(a) Suppose the set of black squares is {(x, y) | x + y = m + n + 1}.


Draw the picture.
(b) Describe the set of black squares in a “checkerboard” picture (with
lower-left square black).
(c) What does the element (2, 3, black) in the set G × {black, white} rep-
resent in this context? What does the set G×{black, white} represent?
(d) A picture in the sense above can be thought of as an element of P (G).
Explain.

1.3 Sets 102: The Idea of a Function


In everyday mathematics we might discuss “the tangent function” or “the function
f (x) = x2 .” In a calculus course such language may be fine, but in other settings
we’ll need a more general description of functions—using the language of sets.

Definition 1.6. Let A and B be nonempty sets. A function f : A → B is a rule


for assigning to each “input” element a in A one and only one “output” element,
f (a), in B. Here A is the domain of f and B is the codomain.

In other words. Alternative language is available. A function f is sometimes


called a mapping, and we say that f maps a domain element a to a codomain
element b, sometimes called the image of a. In symbols, we might write f : a →
b, or just a → b if the function name is understood.

E XAMPLE 1. How is the “calculus description” f (x) = x2 related to the formal


definition?

S OLUTION
√ . The formula f (x) = x2 makes the rule perfectly clear:
√ For inputs
−3, 2, and 1.2345, the corresponding outputs are f (−3) = 9, f ( 2) = 2, and
f (1.2345) = 1.23452. The domain and the codomain, on the other hand, are open
to choice. In a calculus course we might, if pressed, use the natural domain—the
set of all real numbers for which the rule makes sense. For f (x) = x2 , that’s R

i i

i i
i i

i i

16 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

itself. (For g(x) = tan(x), the natural domain omits some real numbers.) In a
number theory course, we might use N as domain.
The codomain, too, is open to choice. For a given domain, we need only as-
sure that the codomain contains all possible outputs. With domain R, for instance,
we could use as codomain for f (x) = x2 any set that contains all the nonnegative
reals. This might be R itself, the infinite interval [0, ∞), or something stranger,
like (−42, ∞) or C. With domain N, we could reuse N as codomain, or choose
any set of integers that contains all positive perfect squares. ♦

The moral. The preceding example shows that a function is more than a formula.
A function is a 3-part package: a domain A, a codomain B, and a rule (which may
or may not be a symbolic formula) for assigning a unique output b = f (a) in B to
every input a in A. The notation f : A → B emphasizes this three-fold nature. In
practice the domain or codomain or both are sometimes understood from context,
or even ignored, but they’re always waiting in the wings.

Range and codomain. The range (or image set) of a function f : A → B is the
set of all outputs:
range of f = {f (a) | a ∈ A} .
Note that the range is always a subset—perhaps a proper subset—of the codomain.
For f : R → R given by f (x) = x2 , for instance, the range is the interval [0, ∞),
which omits all the negative numbers.

Function examples. A good way to explore functions is through examples and


non-examples, including some strange ones with strange names. (We’ll usually
stick with one-letter function names, although longer, more descriptive names are
perfectly legal.)

E XAMPLE 2. Consider the sets

A = {January, February, March, . . . , December} ;


N12 = {1, 2, 3, . . . , 12} ; P = {Alice, Bob, Carol, Dave} .

Is each of the following a function?


• M ONTH N UMBER : A → N12 , where M ONTH N UMBER(January) = 1,
M ONTH N UMBER (February) = 2, . . . , M ONTH N UMBER (December) = 12.
• W ORD L ENGTH : A → N12 , where W ORD L ENGTH(a) is the number of
letters in a.
• B IRTH M ONTH : P → A, where B IRTH M ONTH(p) is the month in which
p was born.

i i

i i
i i

i i

1.3. Sets 102: The Idea of a Function 17

• j : P → N12 , where j(p) = M ONTH N UMBER (B IRTH M ONTH(p)).

• S QUARE : N12 → N12 , where S QUARE (n) = n2 .

S OLUTION . All of M ONTH N UMBER, W ORD L ENGTH , B IRTH M ONTH, and j


are functions. In each case, every member of the domain is paired with one and
only one member of the codomain. Some of the rules are admittedly peculiar.
To find B IRTH M ONTH(Alice) and j(Alice), for instance, we would need more
information. Still, the rules make sense because everyone has a unique birth We could “fix” this problem by
month. By contrast, S QUARE has a problem: Squaring members of N12 produces choosing a larger codomain,
such as N.
results outside N12 . ♦

Seeing Functions
Graphs. Graphs are deservedly popular in elementary calculus. Properties like
smoothness, steepness, rising vs. falling, concavity, and existence of asymptotes
reflect and reveal a lot about functions.
A less familiar fact is that, like functions, graphs can also be described in
the language of sets. The graph of a calculus-style function, say, f (x) = x2 , is
a curve in the xy-plane, made up of points of the form (x, f (x))—in this case,
(x, x2 ). But the idea of a graph makes sense for any function:
Definition 1.7. Let f : A → B be a function. The graph of f is the set

G = {(a, b) | a ∈ A and b = f (a)} .

Observe:
• A graph is a set: The graph of f is a certain set of ordered pairs, and thus
a subset of the Cartesian product A × B.
• But not just any set: For f to be a function with domain A, its graph G
must contain one and only one point (a, b) for each a ∈ A. The graph of
a function f : R → R, for instance, must contain exactly one point of the
form (3, y). In pre-calculus lingo, this is the
vertical line test.
• Maybe a curve, maybe not: Graphs of calculus-style functions are often
nice curves. Indeed, a lot of beginning calculus is about connecting ge-
ometric properties of curves to analytic properties of functions. But some
functions have graphs that are nothing like curves. The graph of j in Ex-
ample 2, for instance, has points of the form (Carol, February)!
• Other “graphs” out there: Like other useful math words, “graph” has dif-
ferent meanings in different settings. The graph of an equation, for exam-
ple, is the set of points (x, y) for which x and y satisfy the equation. The

i i

i i
i i

i i

18 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

graph of x2 +y 2 = 1 is a circle, and therefore not the graph of any function.


In this book, “graph” will refer only to functions.

• One idea, two views: A function and its graph are so closely linked—either
one completely determines the other—that functions are sometimes de-
From this perspective, functions fined, rather than just visualized, as sets of ordered pairs. We’ll use both
are sets in their own right. of these viewpoints freely.

Other views. For some functions, geometric graphs make little sense, so we
use other descriptive devices—tables, diagrams, etc. To describe the function
B IRTH M ONTH in Example 2, for instance, we could use a table:

The B IRTH M ONTH function


input (person) Alice Bob Carol Dave
output (month) May December December August

We could also use a diagram to describe B IRTH M ONTH , showing the domain, the
codomain, and arrows connecting inputs p to their corresponding outputs h(p).
(In such a view, the range is the set of “arrowheads,” where incoming arrows
Draw your own diagram for “land.”)
B IRTH M ONTH. Yet another, even less formal notation is sometimes useful. To describe the
M ONTH N UMBER function, we could just write

January → 1, February → 2, March → 3, ..., December → 12

to convey the idea. (The → symbol is usually read as “maps to.”)

All Kinds of Functions


Functions come in many varieties. We will now define and illustrate, mainly using
“toy” functions, some properties a given function may or may not have.

Definition 1.8 (One-to-one functions). A function f : A → B is one-to-one (or


injective) if f (a1 ) = f (a2 ) whenever a1 and a2 are in A and a1 = a2 . In equiva-
Convince yourself of the lent words: f maps different inputs to different outputs. In equivalent symbols:
equivalence.
f (a1 ) = f (a2 ) =⇒ a1 = a 2 .

The next two examples will help illustrate the meaning of—and how to prove or
disprove—injectivity.

i i

i i
i i

i i

1.3. Sets 102: The Idea of a Function 19

E XAMPLE 3. The B IRTH M ONTH function from Example 2 is not one-to-one,


because B IRTH M ONTH (Bob) = B IRTH M ONTH(Carol) = December, even
though Bob = Carol. By contrast, M ONTH N UMBER, which maps each month Finding even one pair of inputs
to its number in the year, is one-to-one. The “inclusion” function i : Q → R that give the same output is
enough.
with rule i(x) = x is one-to-one, since outputs are inputs. The constant function
c : R → R with rule c(x) = 3 is at the opposite extreme—all inputs are mapped
to the same output.
The linear function L : R → R given by L(x) = 3x + 5 is also one-to-one.
To prove this, let’s check the equation in Definition 1.8, using some algebra:

L(x1 ) = L(x2 ) =⇒ 3x1 + 5 = 3x2 + 5 =⇒ 3x1 = 3x2


=⇒ x1 = x2 ,

as desired. ♦

Definition 1.9 (Onto functions). A function f : A → B is onto (or surjective) if, Using “onto” as an adjective
for every b ∈ B, there is some a ∈ A with f (a) = b. In equivalent words: Every sounds ugly, but everybody
does it.
element of the codomain is also in the range. In equivalent symbols:

{f (a) | a ∈ A} = B.

E XAMPLE 4. The function B IRTH M ONTH from Example 2 is not onto, because
no member of P was born in (say) March. The function M ONTH N UMBER : A → Finding even one such
N12 is onto, because the 12 months range in number from 1 to 12. The “inclusion” codomain member is enough.
i : Q → R with rule i(x) = x is not onto, because the codomain includes
irrationals, but the range does not.
Is the quadratic function q : R → R given by q(x) = x2 − 6x surjective?
The short answer is no: A little calculus or algebra shows that q(3) = −9 is the
minimum value, so the range of q is the interval [−9, ∞), a smaller set than the
codomain. We could make q surjective by using [−9, ∞), not R, as the codomain.

Bijective functions. A function that is both injective and surjective is called bijec-
tive, or, equivalently, a one-to-one correspondence. Our M ONTH N UMBER func-
tion is one bijection. Another is suggested by a few values: What are the domain and
codomain? What’s a good
1 → a, 2 → b, 3 → c, ..., 25 → y, 26 → z. name for this function?

Here are two bijections from calculus, this time in a matched pair:
 π π
f: − , → R, with rule f (x) = tan(x)
2 2
π π
g:R→ − , , with rule g(x) = tan−1 (x).
2 2

i i

i i
i i

i i

20 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

You can readily convince yourself, perhaps with graphs, that f and g are indeed
one-to-one and onto. But notice a little surprise: f and g are one-to-one cor-
respondences between an interval of finite length and the entire real line. Such
strange behavior is possible when infinite sets are involved; we will explore infi-
nite sets further in a later section.

New Functions from Old


Elementary calculus courses are full of complicated functions, like

f (x) = sin x + (1 + ex ) sin (x + ex ) ,

concocted in various ways from simpler ingredients. Tools like the product rule,
the chain rule, and u-substitution help us find derivatives and antiderivatives of
such built-up functions as appropriate combinations of simpler derivatives and
antiderivatives.

Composition. Among these familiar ways to combine functions, composition is


not quite like the others, requiring some special care with domains and codomains.
If f : A → B and g : B → C are functions, then we can compose f and g to
form the new function

g ◦ f : A → C, with rule g ◦ f (a) = g(f (a)).

This makes sense with respect Recall, especially, that order matters: The notation g ◦ f means that g follows f .
to nested parentheses—but it The two compositions g ◦ f and f ◦ g are seldom equal—even if both make good
goes against the usual grain of
reading from left to right.
sense.†

E XAMPLE 5. Which compositions make sense for the functions

M ONTH N UMBER : A → N12 ,


W ORD L ENGTH : A → N12 , and
B IRTH M ONTH : P → A

from Example 2?

†A minor technical point: Above, to avoid extra notation, we used the same symbol, B, both for
the codomain of f and for the domain of g. In fact, these sets need not be identical. What really
matters is that the composition rule g ◦ f (a) = g(f (a)) make good sense. This occurs as long as the
range of f is contained in the domain of g. As we have seen, a function’s codomain is often open to
some choice, so this subtlety seldom causes difficulty.

i i

i i
i i

i i

1.3. Sets 102: The Idea of a Function 21

S OLUTION . The compositions

W ORD L ENGTH ◦ B IRTH M ONTH : P → N12

and
M ONTH N UMBER ◦ B IRTH M ONTH : P → N12
make sense (the former is the function we called j in Example 2). For instance,

W ORD L ENGTH ◦ B IRTH M ONTH (Carol) = W ORDLENGTH (December) = 8

and

M ONTH N UMBER ◦B IRTH M ONTH(Carol) = M ONTH N UMBER(December) = 12.

Another possibility, S QUARE ◦ M ONTH N UMBER : A → N12 , fails right out


of the box, because S QUARE : N12 → N12 isn’t a function at all. But there is an We explained why in
easy fix: If we use the almost-identical function Example 2.

S QUARE : N → N, with rule S QUARE (n) = n2 ,

then the composition S QUARE ◦ M ONTH N UMBER : A → N makes good sense,


and (say)

S QUARE ◦ M ONTH N UMBER (March) = S QUARE (5) = 25.

Many other compositions, like

B IRTH M ONTH ◦ B IRTH M ONTH and B IRTH M ONTH ◦ W ORD L ENGTH ,

make no sense. ♦

Properties of composite functions. If both f and g are, say, injective, must g ◦ f


be injective too? We answer several such questions in the following theorem,
leaving some proofs to the exercises.

Theorem 1.10. Let f : A → B and g : B → C be functions.

(i) If both f and g are one-to-one, then so is g ◦ f .

(ii) If both f and g are onto, then so is g ◦ f .

(iii) If both f and g are bijective, then so is g ◦ f .

(iv) If g ◦ f is one-to-one, then so is f .

(v) If g ◦ f is onto, then so is g.

i i

i i
i i

i i

22 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Notes on proofs. We’ll prove (ii) and (iv), leaving (i) and (v) to the exercises.
Statement (iii) just combines (i) and (ii), so there is nothing new to prove.
To prove (ii) we need to show that for any c ∈ C there is some a ∈ A with
g ◦ f (a) = c. We can do this directly. For given c ∈ C, we know (because g is
onto) there exists b ∈ B with g(b) = c. Because f is onto there exists a ∈ A with
f (a) = b, and this a does the job: g ◦ f (a) = g( f (a) ) = g(b) = c, as desired.
To prove (iv) we’ll show that if f is not one-to-one, then g ◦ f cannot be one-
to-one either. (In math-speak, this is an indirect proof; more details on such things
in later sections.) Suppose, then, that a1 = a2 , but f (a1 ) = f (a2 ). Then we’d
have g( f (a1 ) ) = g( f (a2 ) ), which is just another way of saying that g ◦ f (a1 ) =
g ◦ f (a2 ). Thus g ◦ f is not one-to-one, and the proof is done.
Note, finally, that g need not be one-to-one just because g ◦ f is. The calculus
formula y = (ex + 1)2 illustrates this. (Let f (x) = ex + 1 and g(x) = x2 ; further
details are in exercises.)

Inverse Functions
Another important definition:
Definition 1.11 (Inverse functions). Let f : A → B and g : B → A be func-
tions. We say f and g are inverse functions if both

f ( g(b) ) = b for all b ∈ B and g( f (a) ) = a for all a ∈ A.

In this case we can write f = g −1 or g = f −1 .

Recall, first, that “inverse” has several meanings in mathematics. For instance,
the numbers 3 and −3 are additive inverses because 3+(−3) = 0. Similarly, 3 and
1/3 are multiplicative inverses because 3×1/3 = 1, the multiplicative identity. In
a similar spirit, two functions are inverses if composing them (rather than adding
or multiplying) produces identity functions:

f ◦ g(b) = b for all b ∈ B; g ◦ f (a) = a for all a ∈ A

The function M ONTH N UMBER : A → N12 of Example 2 has a natural inverse


function—let’s call it N UMBER M ONTH : N12 → A, with values as follows:

M ONTH N UMBER(January) = 1; N UMBER M ONTH (1) = January; . . .


M ONTH N UMBER (December) = 12; N UMBER M ONTH (12) = December.

By contrast, W ORD L ENGTH : A → N12 , which maps a month to its number of


letters, has no inverse function L ENGTH W ORD : N12 → A. One problem is that

W ORD L ENGTH (June) = 4 = W ORD L ENGTH(July),

i i

i i
i i

i i

1.3. Sets 102: The Idea of a Function 23

so there’s no clear choice for L ENGTH W ORD (4). Another problem is that no
month has one letter, so there’s no sensible value for L ENGTH W ORD (1).
These toy examples suggest an important general fact: a function f : A → B
has an inverse g : B → A if—but only if—f is both one-to-one and onto. In this
case, f and g simply “reverse” each other’s work: if f maps a to b, then g maps b
to a, and vice versa.

Relations
Let A be a nonempty set, and f : A → A any function on A. We can think of f
as its graph Gf = {(a, f (a)) | a ∈ A}. Note that Gf is a subset of A × A—but a A function and its graph are
subset with special properties that reflect the fact that f is a function. For instance, essentially the same thing.
Gf cannot contain two different elements of the form (a0 , a1 ) and (a0 , a2 ).

Definition 1.12 (Relation on a set). A relation R on a set A is any subset of A ×


A. If (x, y) ∈ R we write x R y, and say that x is related to y.

This may sound forbiddingly abstract, but familiar (if lightly disguised) examples
are all around us.

• Functions are relations: The graph of any function f : N → N is a subset


of N × N, so f is also a relation, and we could write x f y instead of y =
f (x).

• Extreme examples: The extreme (but uninteresting) cases are R = N × N


and R = ∅. In the first case all pairs of integers are related; in the latter, no
integer has any relatives, even itself.

• Equality: The set

E QUALS = {(n, n) | n ∈ N}

corresponds to the equality relation: each integer is related (i.e., equal) only
to itself. In this case, of course, we usually write n = n, not n E QUALS n.

• Order relations: The set

L ESS T HAN = {(m, n) | m < n}

is an order relation: each integer is related to every integer larger than


itself. Again we have a handy symbol, and we write 3 < 4 instead of the
more cumbersome 3 L ESS T HAN 4. (Similar relations correspond to other
ordering symbols: ≤, >, and ≥.)

i i

i i
i i

i i

24 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

• Divides: The set

D IVIDES = {(m, n) | m divides n evenly}

defines the “divides” relation, in which we find 3 D IVIDES 123456,


42 D IVIDES 42, and 1 D IVIDES n for all n. Number theorists use the handy
symbol m | n rather than m D IVIDES n.

Equivalence relations. The definition of a relation on A—any subset of A ×


A—is very, very general. In practice, many useful relations have some special
properties, with impressive names. An equivalence relation R on A is one that is

(i) reflexive: a R a for all a ∈ A;

(ii) symmetric: if a R b, then b R a;

(iii) transitive: if a R b and b R c, then a R c.

Equality (on any set) is the prototype and simplest—but not the only—example
of an equivalence relation. Consider, for example, the S AME B LOOD T YPE rela-
tion on the set of humans, where x S AME B LOOD T YPE y means (of course) that
x and y have the same blood type. It is easy to see that S AME B LOOD T YPE is
indeed an equivalence relation, which sorts people into four “families” (called
equivalence classes) based on their blood types: A, B, AB, or O. More examples
are in the exercises and later in this book.

Exercises
1. Each part following gives the rule (implicit in the name) for a possible func-
tion. For each rule, find a reasonable domain A and codomain B to create a
function. (Try to make A relatively large and then make B relatively small.)
Is your function injective? Is it surjective?

(a) M OTHER : A → B
(b) F IRST B ORN S ON : A → B
(c) E YE C OLOR : A → B
(d) B IRTHDAY : A → B

2. Find the natural domain for each of the following calculus-style functions.

(a) f (x) = sin(x + ex )


(b) g(x) = tan(x)

i i

i i
i i

i i

1.3. Sets 102: The Idea of a Function 25


(c) h(x) = x2 − 1

(d) h(x) = x2 + πx + 1 (give a decimal approximation)

3. Imagine a function f : [0, 1] → [0, 1] and its graph.

(a) How can you tell from its graph whether f is one-to-one?
(b) How can you tell from its graph whether f is onto?
(c) Find formulas for three different calculus-style functions f : [0, 1] →
[0, 1] that are one-to-one and onto, and such that f (0) = 1.
(d) Define f : [0, 1] → [0, 1] by setting f (x) = x for x ∈ Q and f (x) =
x2 for x ∈
/ Q. Is f one-to-one? Onto?

4. Consider the function W ORD L ENGTH : A → N12 , discussed in Exam-


ple 2, page 16, and let G be its graph.

(a) Describe the set G. (Hint: It is a set of ordered pairs; for instance,
(May, 3) ∈ G.)
(b) The W ORD L ENGTH function is not one-to-one. How does the graph
G reveal this?
(c) The WORD L ENGTH function is also not onto. How does the graph G
reveal this?

5. A certain function f has graph G = {(a, 1), (e, 2), (i, 3), (o, 4), (u, 5)}.

(a) What are the domain and the (smallest possible) codomain of f ?
(b) The function f is bijective. How can we tell this from the graph?
(c) Because f is bijective there is an inverse function, f −1 . What is the
graph of f −1 ?
(d) Can you think of a more descriptive names than f and f −1 for these
functions?

6. A certain function f has graph

G = { (Montana, 3), (Maine, 4), (Maryland, 10), (Massachusetts, 12),


(Michigan, 17), (Minnesota, 10), (Mississippi, 6), (Missouri, 11)}.

(a) What is the domain of f ? What is the range? What is a reasonable


codomain?
(b) Is f injective? How do you know?

i i

i i
i i

i i

26 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(c) Is f surjective? (The answer depends on your choice of codomain.)


(d) Can you think of a more descriptive name than f for this function?

7. Consider the linear function L : R → R given by L(x) = 3x + 2.

(a) Explain why L is both one-to-one and onto.


(b) Let M : R → R be given by M (x) = x−2
3 . Show that L ◦ M (x) =
M ◦ L(x) = x for all x ∈ R.

8. Consider the linear function L : R → R given by L(x) = ax + b, where a


and b are any real numbers, with a = 0.

(a) Explain why L is both one-to-one and onto.


(b) Find a formula for an inverse function M = L−1 . Check your answer
by showing that L ◦ M (x) = M ◦ L(x) = x for all x ∈ R.

9. (a) Consider the function f : R → R given by f (x) = xn . For which


positive integers n is f one-to-one and onto?
(b) Consider the function f : (0, ∞) → (0, ∞) given by f (x) = xn . For
which positive integers n is f one-to-one? What if n is negative?

10. Let f : A → B and g : B → C be functions.

(a) Show that if both f and g are one-to-one, then so is g ◦ f . (This is (i)
of Theorem 1.10, page 21.)
(b) Show that if g ◦ f is onto, then so is g. (This is (v) of Theorem 1.10,
page 21.)
(c) Consider the functions f (x) = ex + 1 and g(x) = x2 , both with
domain R and codomain R. Show that g ◦ f is one-to-one, but g is
not.

11. Consider the functions f (x) = x2 and g(x) = x, both with [0, ∞) as
domain and as codomain.

(a) Explain why f and g are inverse functions.


(b) Consider the function h : R → [0, ∞) with rule h(x) = x2 (formed
from f by tinkering with the domain). Explain why h and g are not
inverse functions.

12. The ordinary sine and arcsine functions are inverses as long as some care is
taken with domains and codomains. Work out the details—that is, specify
domains and codomains for these functions that make them inverses.

i i

i i
i i

i i

1.4. Proofs 101: Proofs and Proof-Writing 27

13. Explain why the S AME B LOOD T YPE relation, discussed at the end of this
section, is reflexive, symmetric, and transitive.
14. Consider the relation M OD 5 on Z, defined by M OD 5 = {(m, n) | 5 divides
m − n}.
(a) Show that M OD 5 is an equivalence relation.
(b) Find the set, denoted by [0], of all integers that are related (by Mod5,
of course) to 0. Do the same for [1], [2], [3], and [4]. (These are called
the equivalence classes for M OD 5.)
15. Let P be the set of (around 400,000) citizens of Minneapolis, Minnesota.
One possible relation on P is B ROTHER , defined by B ROTHER = {(x, y) |
y is x’s brother}. Notice that B ROTHER is transitive, but neither reflexive
(nobody is his own brother) nor symmetric (think about sisters). Notice
too that B ROTHER is not a function, because some Minneapolitans have no
Minneapolitan brothers, while others have more than one.
In each part following, decide whether the relation is (i) reflexive; (ii) sym-
metric; (iii) transitive; (iv) a function. Explain answers briefly.
(a) S AME L AST NAME
(b) A NDERSON = {(x, y) | x and y are Andersons}
(c) S IBLING
(d) M AYOR = {(x, y) | y is x’s mayor}
(e) O LDEST N EIGHBOR

1.4 Proofs 101: Proofs and Proof-Writing


Without proofs, mathematics would not exist. Proof is as fundamental to working
mathematicians as structured experiments are to chemists or biologists.
This is not to say that mathematics is nothing but proof. Calculations, hunches, See also the coda at the end of
experiments, and searches for patterns are all indispensable in mathematics, as this section.
they are in the sciences. But mathematical certainty, obtained through rigorous
proof, has no clear analogue in the other sciences, where theories are always open
to revision or falsification through experiments. The Pythagorean theorem, by
contrast, has been known to be true for at least 2500 years. Pythagoras recognized his
A first course in real analysis is a natural setting for learning about, and for proof as a big deal. He
celebrated, legend has it, by
practicing, mathematical proof. Many concepts and objects of real analysis— sacrificing 100 oxen.
sequences, functions, derivatives, etc.—are familiar, if perhaps only informally,
from calculus courses. The main theorems are mathematically powerful and in-
tuitively accessible. Finding and writing proofs takes care and practice, but the
reward is proportional to the effort.

i i

i i
i i

i i

28 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Mathematical Language and Literature


The beginning of wisdom is to call things by their right names.

The old Chinese sage who supposedly said so may have had other things in mind,
but the advice certainly applies to mathematics. Without clear and unambiguous
language—“right names”—we can’t know exactly what we are talking about, and
therefore we can’t produce really convincing proofs.
The moral is that care with language is just as important in mathematics as it
is in, say, the literary arts. Granted, poets and mathematicians use language very
differently: good poetry may rely on subtle allusions and shaded meanings, but
the best mathematical proofs are always clear, direct, and straightforward, even
when they convey difficult ideas. Both poems and proofs can be praised as ele-
gant, but the judgment depends on different standards. The good news is that we
mathematicians need not aspire to fancy artistry: clarity and directness of expres-
sion are less rarefied arts than practical skills, readily acquired and improved on
the job.
Following are some samples, phrased as advice, of characteristics of mathe-
matical writing.

Use standard symbols and notations. Using standard notations, of which we’ll
encounter many in this book, helps shorten, unclutter, and clarify mathematical
discussion—but only if notations are used consistently, and with care. For in-
stance, the notations (1, 3), [1, 3], and {1, 3} all have precise but different mean-
ings—one is an open interval, one is a closed interval, and one is a set with just
two members. Straying from these conventions is asking for trouble. It is far from
clear, for instance, what such notations as
√ √
[x | x2 > 2] and Q | (− 2, 2)

really mean. By contrast, the expressions

{x | x2 > 2} and {x ∈ Q | x2 < 2}

Or will be, once we have are clear and unambiguous.


defined all the ingredients.
Define everything. Everyone expects theorems, proofs, and calculations in math-
ematical writing. Less expected, but equally important, are formal definitions.
Words in everyday language have fluid meanings, with nuances that depend on
context. By contrast, words in mathematics have fixed, precise, agreed-upon
There are some exceptions, but meanings. A typical theorem claims that some mathematical object has some
not many. mathematical property. Without clear definitions of the objects and properties
under discussion, proof can’t get started.

i i

i i
i i

i i

1.4. Proofs 101: Proofs and Proof-Writing 29

E XAMPLE 1. Prove this claim: The set of rational numbers is closed under
addition.

D ISCUSSION . The mathematical object in question is the set of rational num-


bers. The claimed property, closure under addition, means that the sum of any
two rational numbers is another rational number.
It is easy enough to check that the claim holds for any particular pair of ratio-
nal numbers. For the rationals 3/5 and 2/7, for instance, we use a common de-
nominator to calculate the sum, 31/35, and observe that it is rational, as claimed.
A general proof, however, requires a general definition, and to this end we define
a rational number as any ratio of integers a/b, where b = 0. While we’re at it,
let’s also sharpen our description of the closure property: a set S is closed under
addition if r + s is a member of S whenever r and s are members of S. Now we
can restate the claim for our convenience:

If x and y are rational numbers, then so is x + y.

With clear definitions at hand we’re ready for a concise proof.

P ROOF. Since x and y are rational, we can write x = a/b and y = c/d, where
a, b, c, and d are integers, and b and d are nonzero. Now we use some fraction
arithmetic: See the common denominator?
a c ad bc ad + bc
x+y = + = + = ,
b d bd bd bd
a rational number, and the proof is done. ♦

Fair game? Few proofs are completely from scratch. Even the simple proof
above relies on some very basic properties of integers: sums and products of in-
tegers are always integers, and the product of nonzero integers is always nonzero.
(In this book we will freely assume and use such basic properties of integer arith-
metic.) Knowing just which assumptions are safe and which need proof can be
tricky—especially when assumptions are “understood” rather than stated explic-
itly. Learning to sort out such matters is part of the craft of proof.

Write in complete “sentences.” The quotes are there because mathematical sen-
tences in mathematics may include not just ordinary words but also symbols,
equations, inequalities, etc. For instance, it is fine to write

because x > 3 we know x2 > 9 and x3 > 27,

but it’s bad form to write

x > 3, x2 > 9, x3 > 27.

i i

i i
i i

i i

30 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

One problem with the latter is the lack of “connective tissue”: a reader can’t tell
whether you’re asserting that something implies something else, or just listing
your favorite inequalities. At any cost, be clear.

Use standard grammatical niceties. These devices—such as punctuation and


capital letters—are used in ordinary English to help the reader see clearly what’s
being said or implied. Consider, for instance, a notice supposedly posted near an
Australian beach:

Crocodiles don’t swim here

Would you swim here or not? Is the sign intended for human or for reptile readers?
In practice, many mathematical sentences convey complex ideas, and so nat-
urally have correspondingly complex structures. It is especially important, there-
fore, to write mathematics as clearly and unambiguously as possible, and to help
the reader decipher your meaning.

Write sentences that “scan.” Proofs and solutions must be not only correct but
also intelligible to a reader. An excellent way to assure the latter is to read each
sentence back to yourself. (Doing this silently may reduce ridicule from neigh-
bors.) A sentence with proper English grammar and syntax may be mathemat-
ically right or wrong; every mathematician has seen eloquent proofs that boil
down to nonsense. But an ungrammatical sentence is almost surely wrong or,
worse, meaningless to a reader.

Make sense. Ask carefully whether what you write makes sense by the strict
standards of mathematical writing. For instance, the sentence

For all Q, we have x2 ≥ 0.

is nonsensical (do you see why?) and hence neither true nor false. Your first job
is to write sentences that make sense. Your second job is to write sentences that
are true.

Watch word order. Because mathematical language conveys complex thoughts,


word order can be crucial. Consider these two statements:

For every positive  there exists an integer n such that 0 < 1/n < .
There exists an integer n such that 0 < 1/n <  for every positive .

We will study the Archimedean The first statement is true; it is a version of so-called Archimedean principle for
principle in Section 1.6. real numbers. The second statement is meaningful, but false.

i i

i i
i i

i i

1.4. Proofs 101: Proofs and Proof-Writing 31

Just don’t do “it.” The harmless-looking pronoun “it” commits countless crimes
in mathematics. Here, for example, is a confusing way to describe an important
connection between a function f and its derivative f  :

It’s maximum or minimum when it’s flat, and that happens when it’s
a zero of its derivative.

That’s way too many pronouns, and who knows what each refers to? Just say no:

A function f may have a maximum or minimum value where the


graph of f is flat. This can occur at a value of x for which f  (x) = 0.

Make it look easy. A musician planning a recital invests hours of practice and
study, and hits plenty of false notes. The recital itself skips all of this practice
and study, and most of the false notes. In the same way, a finished mathematical
proof should be the polished result, rather than the basic process, of whatever
informal thinking, experiments and false starts may have happened along the way.
It is sometimes helpful to hint at the investigative phase of proving a result, but it
is important not to confuse such material with the proof itself. Good proofs are
clear, concise, and couched in standard mathematical language.

Don’t say too much—or too little. Respect, but don’t overtax, your reader’s intel-
ligence and willingness to work. Ideas in your proof should be clear and accessi-
ble to your reader—someone with your own level of intelligence and knowledge.

1.4.1 Proof Language: A Lexicon


Mathematics, like every discipline, has its own body of technical language. Spe-
cialized vocabulary (“jargon” to its detractors) is sometimes impugned as will-
fully obscure, but exactly the opposite is true: well-chosen technical language is
essential to clear and concise discussion of technical subjects. To get these bene-
fits, of course, we’ll need to know and agree on what technical words mean. The
following little lexicon of important “proof words” begins that project. A general
warning: Some technical words, such as “statement,” have everyday meanings We could, but won’t, argue over
somewhat different from their mathematical uses. whether this is for better or for
worse.

Statement. A mathematical statement is a phrase or sentence that can reasonably


be called either true or false. Here are some possibilities:

P :3>5 Q : It is cloudy. R : It is raining. S : Life is good.

Statements P , Q, and R are all good examples. Statement P is obviously false,


but mathematically meaningful. Statements Q and R are also fine because, at a
given time and place, each is either clearly true or clearly false. Statement S is

i i

i i
i i

i i

32 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

too vague to make our cut, and we’ll leave the fun of debating it to colleagues
across campus.
Complex statements can be built up from simpler ones. Using ingredients
above, for instance, we can create blends like these:

if R then Q : If it is raining, then it is cloudy.

and
Q and not R : It is cloudy but not raining.

Variables. Some statements involve variables: symbols that stand in for unspec-
ified inputs. For such statements we sometimes use names like P (x) to emphasize
the presence of variables. Here are some examples:

P (x) : x2 < 3 Q(y) : y is Fred’s brother. R(x, y) : x2 + y 2 ≥ −3

The truth or falsity of such statements usually depends on the values of the vari-
ables involved. Here, for instance, P (7) is false, P (−1) is true, Q(Sue) is proba-
Things might change if we bly false, and Q(Ed) might be true. In this case R(x, y) happens to be true for all
allowed, say, imaginary number real number inputs x and y.
inputs.
Implication and equivalence. An implication is a statement of the form “if P
then Q”; we often write P =⇒ Q. This means, of course, that Q is true
whenever P is. With P : x > 3 and Q : x2 > 9, for example,

P =⇒ Q means x > 3 =⇒ x2 > 9

and
Q =⇒ P means x2 > 9 =⇒ x > 3.
Here, clearly, the implication P =⇒ Q is true: x2 > 9 does indeed hold
whenever x > 3. But the implication Q =⇒ P is false; try x = −42. An
important moral is that implication is, by default, a one-way street: P =⇒ Q is
no guarantee that Q =⇒ P .
Solving equations, as in linear If it happens that both P =⇒ Q and Q =⇒ P , then P and Q always
algebra, is all about searching have the same truth values, and are therefore called equivalent. The statements
for equivalent, but simpler,
equations.
P (x) : 2x + 5 = 11 and Q(x) : x = 3 are equivalent, for instance.

And, or. Given statements P and Q, we can form new statements ( P and Q )
and ( P or Q ). (The parentheses aren’t essential, but they help keep the right
things together.) “And” is used mathematically much as it is in everyday speech:
( P and Q ) is true if, but only if, both P and Q are true. “Or” is a little different:
We take ( P or Q ) to be true when either or both of P and Q is true. This conven-
tion, called the inclusive or, differs a bit from the exclusive or, sometimes written
xor, that’s common in everyday life: A child might be offered either candy or ice
cream, but not both.

i i

i i
i i

i i

1.4. Proofs 101: Proofs and Proof-Writing 33

Negation. The negation of a statement P is a new statement, which we’ll denote

not P ,
whose truth value is opposite to that of P . Negating simple statements is easy.
With
R : It is raining,
for instance, we have simply
not R : It is not raining.
Negating complicated statements can take some thought. Consider, for instance,
Goldbach’s conjecture: This famous unsolved problem
dates back to the 1740s, in
G : Every even integer greater than 2 is the sum of two primes. correspondence between
Christian Goldbach and
How would we negate G? We could, admittedly, write something like Leonhard Euler.

It is not the case that G,


but this is unhelpful. A better approach is to notice that G asserts that every even
integer has a certain property. To negate such a claim is to say that some even in-
teger does not have this property:
not G: Some even integer greater than 2 is not the sum of two primes.
In other words, to disprove G it is enough to find even one big even number that And achieve fame.
is not the sum of two primes. It’s been tried . . . .
In a similar spirit, De Morgan’s laws tell how to negate statements that involve
and and or: Named for a nineteenth-century
British mathematician.
not ( P and Q ) is equivalent to ( not P ) or ( not Q ) ;
not ( P or Q ) is equivalent to ( not P ) and ( not Q ) .
Notice, especially, that negating and statements produces or statements, and vice
versa.

The meaning of existence. Consider two typical, analysis-style statements about


real numbers: They happen to be true.
2
(i) For all x > 3, x + 9 > 6x.
(ii) sin x = x/2 for some x ∈ [1, 2].
Statement (i) says that a certain property holds for all x ∈ (3, ∞), while (ii) says
that a number with a certain property exists in the set [1, 2]. The for all and there
exists constructions are everywhere in mathematics, and have their own symbols:
∀ and ∃, respectively. Using these symbols we could rewrite

i i

i i
i i

i i

34 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(i) ∀x ∈ (3, ∞), we have x2 + 9 > 6x;

(ii) ∃x ∈ [1, 2] such that sin x = x/2;

or even just

(i) ∀x ∈ (3, ∞) ( x2 + 9 > 6x );

(ii) ∃x ∈ [1, 2] ( sin x = x/2 );

if brevity is really important.


The symbol ∀ is known as the universal quantifier; ∀xP (x) means that the
property P (x) holds for every x in some “universe” of discussion. Similarly, ∃ is
the existential quantifier; ∃x P (x) means that P (x) holds for at least one x.
The ∀ and ∃ symbols arise frequently in analysis, often together. For instance,
the statement
∀x ∈ R ∃n ∈ N such that x < n

says—truthfully—that every real number x is smaller than some integer. The


superficially similar-looking statement

∃x ∈ R such that ∀n ∈ N x < n

What does it say to you? says something different—and false.

Converse and contrapositive. For some reason, C-words are disproportionately


common among crucial components of concise corroborations. Can this be just
curious coincidence?
Which we dare not confuse . . . . An implication P =⇒ Q has both a converse and a contrapositive. The
converse of P =⇒ Q is the implication Q =⇒ P ; the contrapositive is the
implication ( not Q ) =⇒ ( not P ). If, say, P : x > 3 and Q : x2 > 9, then we
have

P =⇒ Q : x > 3 =⇒ x2 > 9 (the original);


2
Q =⇒ P : x > 9 =⇒ x > 3 (the converse);
2
( not Q ) =⇒ ( not P ) : x ≤ 9 =⇒ x ≤ 3 (the contrapositive).

As noted earlier, an implication and its converse need not have the same truth
value—and they do not in the present case. An implication and its contrapositive,
Common sense bears this out; on the other hand, always have the same truth value. This matters in mathematical
we explore it further in the practice, as we will see, because the contrapositive of a statement is sometimes
exercises.
easier to prove than the original.

i i

i i
i i

i i

1.4. Proofs 101: Proofs and Proof-Writing 35

Counterexample. For which integer powers p is 2p − 1 prime? Back-of-the-


envelope calculations show that this happens if p is 2, 3, 5, or 7; and so, running
out of envelope, we might guess that 2p − 1 is prime for all prime powers p. Not
so, alas: 211 −1 = 2047, which is not prime. In proof talk, 11 is a counterexample
to our hasty claim.
A counterexample is just what the name implies: a single example that coun-
ters an incorrect general claim. When, as above, the claim asserts that some
property P (x) holds for all x in a given set, a counterexample is simply some
x for which P (x) fails. Mathematicians love counterexamples, perhaps for the
pleasure they can offer in toppling grand theories with humble facts.

Coda: new-age proofs. Proofs are no less important now than they’ve ever been.
But modern viewpoints and, especially, modern technology have made new kinds
of mathematics possible—and sometimes require new kinds of proof. For exam-
ple, the four-color theorem (four colors suffice to color any planar map of “coun-
tries”) was posed in 1852, but proved only in 1976, with aid from a computer to
check hundreds of special cases. Computer-aided proofs are now common, but
they remain controversial.

Exercises
1. This problem is about three statements:

R : It is raining. S : It is sunny. C : It is cloudy.

In each part following, rewrite the given implication in ordinary language.


Then do the same for the converse and the contrapositive. Label all state-
ments as true or false.

(a) R =⇒ not S
(b) R =⇒ C
(c) R =⇒ (not S) and C
(d) C =⇒ not S

2. This problem is about three statements:

P : x > 3; Q : x < 4; R : 9 < x2 < 16.

In each part following, rewrite the given implication as simply as possi-


ble. Then do the same for the converse and the contrapositive. Label all
statements as true or false; no proofs needed.

i i

i i
i i

i i

36 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(a) P =⇒ R
(b) Q =⇒ R
(c) (P and Q) =⇒ R
3. In each part, write (as simply as possible) both the converse and the contra-
positive of the given implication. No proofs needed, but try to label each
statement as true or false. In all parts, a, b, an , etc. all stand for real num-
bers.
(a) If a and b are both rational, then a + b is rational.
(b) If a is irrational then 1/a is irrational, too.
(c) If a and b are both irrational, then ab is irrational.
(d) If a series an converges, then limn→∞ an = 0.
4. In each part, write (as simply as possible) the negation of the given state-
ment.
(a) At least one of a, b, and c is nonnegative.
(b) f (x) ≤ 3 for all x ∈ [2, 7].
(c) sin n is irrational for every positive integer n.
(d) ∃x ∈ R such that x2 = −1.
(e) ∀x ∈ R ∃y ∈ R such that xy = 1.

5. Negations. For each statement following, write the negation as simply as


possible. Then try to decide (some parts may be hard) whether each state-
ment is true or false; no proofs needed.
P : All dogs have fleas.
Q: Several dogs have fleas.
R: My dog, Spike, is flea-free.
S: 3 < 5.
√ √
T : n − 1 + n + 1 is irrational for every positive integer n.
√ √
U : n − 1 + n + 1 is rational for every positive integer n.
V : cos(x) < 1.001 for all x > 0.
W : cos(x) < 0 for all x ∈ [2, 3].
X: Every even integer n > 2 is the sum of two (not necessarily distinct)
primes.
Y : Every set of ten distinct numbers has a largest and a smallest element.
Z: Every subset of the interval [0, 1] contains a largest element.

i i

i i
i i

i i

1.5. Types of Proof 37

6. Counterexamples. At least three of the statements P–Z in the preceding


problem are false. Choose any three of these false statements. For each
one, carefully state a counterexample that shows the statement to be false.
7. Converses and contrapositives. In each part following is an implication: a
statement of the form “If P , then Q”. In each part, first write the converse
and the contrapositive of the given implication. Then label each of the three
statements as true or false; no need to prove anything.

(a) If x > 3 then x2 > 9.


(b) If x > 3 then x3 − 4x2 + 3x > 0.
(c) If a > 0 and b > 0 then |a + b| = |a| + |b|.

8. What is the contrapositive of the contrapositive of an implication? Explain.

9. Following are several possibly true but poorly-stated claims from elemen-
tary calculus. Fix each statement by replacing all instances of “it” and
“its” and “it’s” with clearer words or phrases. (An example appears on
page 31.)

(a) If it’s increasing for all x then its derivative is nonnegative.


(b) At its maximum either its derivative is zero or it does not exist.
(c) If its second derivative is positive for all x then it’s concave up.
(d) If a series converges then it goes to zero.

10. Each of the following sentences has one or more syntax errors. In each
case, make a clear (and true) sentence with as little editing as possible.

(a) If x2 = Q, then x = Q either.


√ √ 2
(b) 2 is not Q but 2 is Q.

(c) N ∈ R.
(d) sin (R) ⊆ [−1, 1].

1.5 Types of Proof


Mathematical assertions come in enormous variety. Here is a tiny sample, includ-
ing at least one that is false:
I: If a and b are rational numbers, then so is ab.

II: If a and b are irrational, then so is a + b.

i i

i i
i i

i i

38 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

III: If a is irrational, then so is 1/a.



IV: 5 is irrational.

V: There are infinitely many prime numbers.

VI: Every even integer from 4 to 100 is the sum of two primes.

VII: Every even integer greater than 2 is the sum of two primes.

VIII: A finite set with n elements has 2n subsets.

Proofs (and disproofs, when needed) come in similar variety; no simple taxonomy
is possible. Still, a few standard types of argument are so common that they appear
in every mathematician’s toolkit. We name and illustrate several of them in this
section.

Hypotheses and conclusions. A typical mathematical assertion (theorem, claim,


proposition, lemma, corollary, etc.) starts with one or more hypotheses and derives
a conclusion. This structure is often—but not always—explicit in the language it-
self. All of I–III above, for instance, have the general form of an implication: if
[hypothesis], then [conclusion].
For other assertions, including IV–VIII above, the hypotheses are implicit or
understood rather than stated explicitly. If, for some reason, we want to state
hypotheses more explicitly we could rewrite Claim IV, for instance, as

IV : If x2 = 2, then x is irrational.

Claim V is harder to restate in if–then form because its hypotheses, such as the
definition of a prime number, would be tedious to list.
The form of a claim often suggests possible strategies for proving or refuting
it. In the case of an if P then Q claim, for instance, we might attack either the
claim itself or its contrapositive, if not Q then not P. For broad claims like VII
and VIII, each of which covers infinitely many cases, we should expect to work
harder for a proof—or maybe look for even one counterexample as a disproof.

Direct Proof
A direct proof addresses a claim if P then Q in the “obvious” way—it starts with
P and derives Q. We illustrate with Claim I.

Remember, we’re assuming E XAMPLE 1. Prove directly (using basic properties of integer arithmetic) that if
integer basics. a and b are rational numbers, then ab is rational.

i i

i i
i i

i i

1.5. Types of Proof 39

S OLUTION . Because a and b are rational, we can write


x z
a= and b = ,
y w
where x, y, z, w are all integers, and y = 0 = w. Now we multiply:
x z xz
ab = × = ,
y w yw
which exhibits ab as the desired ratio of integers, and completes the proof.
Note, by the way, that with a few more words we could also establish that
ab = ba. (We did something similar with sums in Example 2, page 4.) ♦

Indirect Proof
An indirect proof, like a direct one, addresses a claim of the form if P, then Q. But
there is a twist: instead of showing that P implies Q, we prove the contrapositive
(but equivalent!) statement:

if (not Q) then (not P ).

An indirect proof may be the simplest choice when either P or Q is awkward, but
(not P ) or (not Q) is simpler. We illustrate with Claim III.

E XAMPLE 2. Prove indirectly: if a is irrational, then 1/a is irrational too.

S OLUTION . A direct argument seems awkward here because the hypothesis says
something negative about a. The contrapositive is simple and straightforward: if
1/a is rational, then a is rational.
This is easily shown. If 1/a is rational, then we can write 1/a = x/y for
some (nonzero) integers x and y. But then we have a = y/x, which shows that a
is rational, as desired. ♦

E XAMPLE 3. Discuss Claim II: If a and b are irrational, then so is a + b.

S OLUTION . The direct approach looks unpromising, as it did in Example 2. An


indirect proof might seem the next resort. But there is a√ catch: Claim II√is false,
and any counterexample will demolish it. If, say, a = 2 and b = − 2, then
both a and b are irrational, but a+ b = 0, which is rational, so our counterexample
is good. √
Our counterexample depends, of course, on the fact that 2 is irrational, as
we showed in Theorem √ 1.2, page 6. Observe, however, that any irrational number
would do in place of 2. ♦

i i

i i
i i

i i

40 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Proof by Contradiction
Proofs by contradiction are close kin to indirect proofs. In each case we first
assume that the conclusion fails, and then try to deduce a contradiction, either of
the hypothesis or of some other known fact. From the resulting absurdity we infer
that the original conclusion must have been true all along. (The method is also
known as reductio ad absurdum, Latin for “reduction to the absurd.”)

E XAMPLE 4. Prove Claim IV: 5 is irrational.

S OLUTION . We could tweak the proof of Theorem 1.2, page 6, but for variety
we’ll take an approach based on prime factorization: Every positive integer n
has a unique list of prime factors, some of which may be repeated. (For n = 60
the list is {2, 2, 3, 5}.) The key insight for our proof is about squaring: each
prime factor of n appears twice as often among the prime factors of n2 . (For
n2 = 602 , the prime factors are {2, 2, 2, 2, 3, 3, 5, 5}.) In particular, every square
integer has an even number of prime factors. So much said, we’re ready for a crisp
proof.

It is traditional, and helpful, to P ROOF. Assume, toward contradiction, that 5 is rational. Then we can write

label contradiction proofs up 5 = a/b for some positive integers a and b, and so
front.
√ a a2
5= =⇒ 5 = 2 =⇒ 5b2 = a2 .
b b
The last equation provides our contradiction. The right side is a square, and there-
fore has an even number of prime factors. But the left side has an odd number of
prime factors—an even number coming from b2 and one more from the 5. This
absurdity completes the proof. ♦

E XAMPLE 5. Prove Claim V: There are infinitely many prime numbers.

S OLUTION . The following beautiful proof is attributed to Euclid, a Greek math-


ematician who worked at Alexandria, Egypt, around 300 BCE. Euclid’s idea can
be phrased as a proof by contradiction.

P ROOF. Assume, toward contradiction, that there are only finitely many primes,
say p1 , p2 , p3 , . . . , pn . Now consider the number N = p1 p2 p3 · · · pn + 1. By its
N is one more than a multiple of construction, N is not divisible by any of the primes p1 , p2 , p3 , . . . , pn . Hence
each pi . either N is itself prime or N has at least one prime factor not among p1 , p2 ,
p3 , . . . , pn . Either way, the list {p1 , p2 , p3 , . . . , pn } could not have been com-
plete. This contradiction completes the proof. ♦

i i

i i
i i

i i

1.5. Types of Proof 41

Brute Force, Cases, Exhaustion, Enumeration


Satisfying as it is to dispatch broad claims with elegant proofs like Euclid’s, some
claims resist such treatment. Sometimes we just argue case-by-case, through
several—or even many—different parts of a general assertion. Such “brute force”
or “exhaustive” methods can be ugly, but sometimes there is no alternative. And Sometimes there is an
working through special cases, especially with a computer’s help, can reveal im- alternative, but it’s hard to find.
portant patterns.

E XAMPLE 6. Prove Claim VI: Every even integer from 4 to 100 is the sum of
two primes.

S OLUTION . Why not just prove Claim VII—every even integer greater than
two is the sum of two primes—and be done with it? That would indeed do
the job, but Claim VII is Goldbach’s conjecture, a famous problem dating to
the 1740s. Considering that Claim VII has already stumped the likes of Euler,
we’ll stick with Claim VI. Handling its 49 special cases is easy, although perhaps
tedious: Try some more!

4 = 2 + 2; 6 = 3 + 3; 8 = 3 + 5; ... 98 = 11 + 87; 100 = 7 + 93.


Proof by Induction
Mathematical induction is among every mathematician’s favorite power tools. It
is a simple, structured, and sometimes astonishingly powerful approach to prov-
ing whole families of claims at once. We illustrate the idea first informally, by
example.

E XAMPLE 7. Discuss Claim VIII: A set with n elements has 2n subsets.

S OLUTION . Claim VIII is really an infinite collection of propositions P (1),


P (2), P (3), . . . , one for each positive integer n. To emphasize this structure,
we can list the propositions individually (we may as well use {1, 2, . . . , n} as a
convenient n-member set):

P (1) : {1} has 2 subsets,


P (2) : {1, 2} has 4 subsets,
...
P (42) : {1, 2, . . . , 42} has 242 subsets.
...

i i

i i
i i

i i

42 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

It is easy in this case to check P (n) for small n, simply by listing. For P (1), the
Every set has ∅ as a subset. two subsets are {1} and ∅. For n = 2 the list is

∅, {1} , {2} , {1, 2} .

See the pattern? With n = 3 we get eight subsets, as expected: four from the n = 2 case plus four
more that include a 3:

∅, {1} , {2} , {1, 2} , {3} , {1, 3} , {2, 3} , {1, 2, 3} .

The basic ingredients of a proof should now be clear:

(i) a set with one element “obviously” has two subsets; and

(ii) adding a new element to any finite set doubles the total number of subsets
(every “old” subset generates a new one when we throw in the new element).

Hence sets with 1, 2, 3, 4, . . . elements have 2, 4, 8, 16, . . . subsets, as desired.


Induction, formally. Example 7 illustrates the usual setting for a proof by induc-
tion: a claim that some proposition P (n) holds for every positive integer n. To
prove such a claim by induction takes two (named) steps:
• The base case: Show that P (1) holds.

• The inductive step: Show that P (k) implies P (k + 1) for every positive
integer k. (Here P (k) is called the inductive hypothesis.)

We illustrate the idea (and the customary shop talk) by formalizing the proof
that, for all n, the set {1, 2, . . . , 42} has 2n subsets.

Proof (of Claim VIII, by induction): The base case n = 1 holds because the set
{1} has only itself and the empty set as subsets.
For the inductive step we assume the inductive hypothesis—that {1, 2, . . . , k}
has 2k subsets—and try to show that {1, 2, . . . , k, k + 1} has 2k+1 subsets. To
this end, note first that all 2k subsets of {1, 2, . . . , k} are also subsets of {1, 2, . . . ,
k + 1}. Every remaining subset of {1, 2, . . . , k + 1} contains k + 1, and so can be
formed by adding k + 1 to some subset of {1, 2, . . . , k}. Thus {1, 2, . . . , k, k + 1}
has 2 × 2k = 2k+1 elements, as desired, and the proof is complete. 

After one more simple example we’ll draw some conclusions.

n(n+1)
E XAMPLE 8. The identity 1 + 2 + 3 + · · · + n = 2 holds for all positive
integers n.

i i

i i
i i

i i

1.5. Types of Proof 43

S OLUTION . We’ll write P (n) for the identity above; for instance, P (10) says
that 1 + 2 + · · · + 10 = 10 · 11/2 = 55. This is easily checked directly, but
we’d rather prove P (n) for all integers n—just the right job for mathematical
induction.

P ROOF BY INDUCTION . The base case, P (1), holds by a trivial calculation—


both sides of the equation are 1.
For the inductive step we assume equation P (k) and derive P (k + 1). A little
algebra is all we need:

k(k + 1) adding k + 1 to both sides of


1 + 2 + · · · + k + (k + 1) = + (k + 1)
2  
P (k)
k (k + 1)(k + 2)
= (k + 1) +1 = by algebra
2 2

That the first and last quantities are equal is just what P (k + 1) asserts. The proof
is complete. ♦

Notes on the method. Mathematical induction is so useful and so ubiquitous in


mathematics that some general themes deserve mention.
• Not cheating: To many conscientious newcomers the inductive step in a
proof feels like cheating—assuming the desired result in order to prove it.
Caution is always wise, but here we’re OK: this part of the proof shows
only that P (k) implies P (k + 1), not that P (k) itself must hold.
• Dominoes, ladders, lily pads: Choose your favorite metaphor—different
authors use different real-world images to illustrate mathematical induction.
My favorite involves dominoes labeled P (1), P (2), P (3), etc., arranged in
the classical childhood manner (if only the child had infinitely many), so
that every P (n) falls to the right, toppling P (n + 1). The inductive idea is
now a domino theory: if (i) the first domino falls; and (ii) each domino fells
its right-hand neighbor, then all the dominoes fall (to the child’s infinite
delight).
Ladders (getting to the first rung is the base step) and frogs crossing lily
ponds, pad by pad, lead to similar stories—flesh out your own details.
• Other bases: Not every claim for which induction looks promising starts
with the n = 1 case. For instance, the inequality n2 < 2n fails for some
small integers, but holds whenever n ≥ 5. An inductive proof is possible, See the exercises.
with the small twist that the base case now corresponds to n = 5. Claim
VII (every even integer from 4 on is the sum of two primes) is another case
in point: an inductive proof would have base case n = 4. (Whether an
inductive proof can be found is another matter entirely.)

i i

i i
i i

i i

44 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

• Why induction works: Inductive proofs themselves may be hard or easy,


but the underlying “domino theory” is simple and plausible. A rigorous
proof that mathematical induction “works” depends on an axiom about the
natural numbers:

If S ⊆ N is such that (i) 1 ∈ S, and (ii) n + 1 ∈ S whenever


n ∈ S, then S = N.

We’ll take this basic fact, like others about the integers, as an axiom rather
than something to be proved.

Exercises
1. In each part of this problem, either prove or disprove the given claim. If you
prove the claim, indicate whether your proof is direct, indirect, by contra-
diction, or something else. If you disprove the√ claim, use a counterexample.
(It’s OK to assume known facts, such as that 2 is irrational.) In all cases,
x and y are real numbers.

(a) If x ∈ Q, then 2 + x ∈ / Q.

/ Q, then 2 + x ∈
(b) If x ∈ / Q.
(c) If x + y is irrational, then at least one of x and y is irrational.
(d) If p is a prime number, then 2p − 1 is prime.
(e) For all real numbers x and y, |x − y| ≤ x2 − y 2 .

2. In each part following, either prove or disprove the converse of the given
claim. If you prove the converse, indicate whether your proof is direct,
indirect, by contradiction, or something else. If you disprove
√ the converse,
use a counterexample. (Assume known facts, such as that 2 is irrational.)
In all cases, x and y are real numbers.

(a) If x ∈ Q, then 2 + x ∈ / Q.

/ Q, then 2 + x ∈
(b) If x ∈ / Q.
(c) If x + y is irrational, then at least one of x and y is irrational.

3. Consider the equation 1 + 3 + 5 + · · · + (2n − 1) = n2 .

(a) Check directly that the equation holds for n = 1 and for n = 10.
(b) Prove by induction that the formula holds for all positive integers n.
(c) Use (don’t reprove) the formula in Example 8 to give another proof
(not involving induction) of the equation above.

i i

i i
i i

i i

1.5. Types of Proof 45

4. Let r = 1 be a real number. Show by induction that for all positive inte-
gers n,
rn+1 − 1
1 + r + r2 + r3 + · · · + rn = .
r−1

5. Show that the inequality 2n < n! holds for all integers n > 3.
6. Guess a formula (in terms of n) for the sum
1 1 1 1
+ + + ··· + .
1·2 2·3 3·4 n · (n + 1)
Prove your answer by induction.
7. Show that

(1 + 2 + 3 + · · · + n)2 = 13 + 23 + 33 + · · · + n3

holds for all positive integers n. (Hint: Use the formula for 1 + 2 + · · · + n
in Example 8.)

8. A version of Theorem 1.3 says that if n is a positive integer and n is
rational, then n is a perfect square. Prove this using the following outline,
the idea of prime factorization, and the fact that a positive integer n is a
perfect square if and only if every prime factor of n appears to an even
power. See also Example 4, page 40.

If n = a/b, where a and b are positive integers, then squaring both sides
gives nb2 = a2 . Now factor each side of this equation as a product of
prime numbers. Because the right side is a square, each prime factor on the
right side appears to an even power, and so the same must be true on the
left. Each prime factor of b2 appears to an even power, and so (do you see
why?) each prime factor of n must also appear to an even power.
9. (a) Show that 5n > n! for positive integers n < 12.
(b) Show that 5n < n! for positive integers n ≥ 12.
10. (a) Guess a formula (in terms of n) for the sum 1 · 2 + 2 · 3 + 3 · 4 + · · · +
n · (n + 1). Prove your answer by induction.
(b) It is well known, and readily proved by induction, that

n
n(n + 1)(2n + 1) 
n
n(n + 1)
j2 = and j= .
j=1
6 j=1
2

Use these facts to give another proof of the result in (a).

i i

i i
i i

i i

46 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

11. Every calculus student knows that if f (x) = xn for any positive integer n,
then f  (x) = nxn−1 . Prove this by induction, assuming (i) if f (x) = x,
then f  (x) = x; and (ii) the product rule. (We’ll define the derivative, state
and prove the product rule, and firm up other ideas later in this book; here
the point is to see induction in a familiar setting.)
12. Another familiar calculus formula (see the preceding problem) says that
1 n
if g(x) = , then g  (x) = −
xn xn+1
for every positive integer n. Prove this by induction, assuming both the
n = 1 case and the product rule.

13. Claim: In any group of n kittens, if one is orange, then all are orange.
What is wrong with the following “proof” by induction?
Proof: The claim is trivial if n = 1, so the base case holds. To illustrate the
inductive step, assume the claim holds for n = 42. Suppose we’re given a
group of 43 kittens, including at least one—say, Hans—that’s orange. Any
other kitten—say Fritz—can be put in some 42-member group with Hans,
and so Fritz must also be orange by the inductive hypothesis. Thus all 43
kittens are orange, and the proof is done.

1.6 Sets 103: Finite and Infinite Sets; Cardinality


How “big” is a set?

Finite sets: few surprises. “Small” sets offer few surprises. It seems clear, for
instance, that S = {a, b}, with two elements, is “smaller” than T = {a, b, c}, with
three. Similarly, N42 = {1, 2, . . . , 42} is obviously “smaller” than F IFTY S TATES
= {Alabama, Alaska, . . . , Wisconsin, Wyoming}, even though the two sets have
completely different types of elements, while N26 and E NGLISH A LPHABET =
{a, b, c, . . . , z } have the same “size.”
“Measuring” sets by counting their elements works well for sets with finitely
many elements. For such sets, moreover, our intuition is usually reliable. If, say,
a set S has 427 elements and T  S, then T must be “strictly smaller,” with 426
elements or fewer..

Infinite sets: many surprises. Matters are very different for infinite sets. Con-
sider, for instance,

N = {1, 2, 3, 4, . . . and E = {2, 4, 6, 8 . . . }.

i i

i i
i i

i i

1.6. Sets 103: Finite and Infinite Sets; Cardinality 47

In one way E seems obviously “smaller”—it omits all of the (infinitely many!) odd
numbers in N. On the other hand, the mapping

1 → 2, 2 → 4, 3 → 6, ..., n → 2n, ...

is a one-to-one correspondence between N and E, so maybe the two sets have the
“same size.” Similarly, the interval (0, 1) is “shorter” than the interval (0, 2), but
the same mapping, x → 2x, is a one-to-one correspondence. An important aim
of this section is to develop useful ways of “measuring” infinite sets.

Cardinality: The Idea


So how should we gauge “size” for infinite sets? The answer for present purposes
involves cardinality. We need some clear definitions, and an excuse to drop all
those lawyerly quotation marks:
Definition 1.13. Two nonempty sets A and B have the same cardinality if there
is a function f : A → B that is both one-to-one and onto. In this case we write
A ∼ B.

Definition 1.14. A set A is finite if either A = ∅ or A ∼ {1, 2, . . . , n} for some


positive integer n. Otherwise, A is infinite.

Informally speaking, two sets have the same cardinality if there is a one-to-
one correspondence between them. We saw this above for N and E and also for
(0, 1) and (0, 2); thus, N ∼ E and (0, 1) ∼ (0, 2).

E XAMPLE 1. Show that (0, 1), (−2, 5), and (0, ∞) all have the same cardinality.

S OLUTION . It is enough to find one-to-one and onto functions f : (0, 1) →


(−2, 5) and g : (0, ∞) → (0, 1). Figure 1.1 hints at two of the many possibilities.
The function f shown is the linear function whose graph passes through
(0, −2) and (1, 5); its formula turns out to be f (x) = 7x − 2. The function g Check this easy calculation.
shown has formula g(x) = x/(1 + x). Graphs of f and g illustrate their one-to-
one and onto properties; honest proofs require the formulas.
To prove, for instance, that g is onto, we have to find, for each b ∈ (0, 1),
some a ∈ (0, ∞) with f (a) = a/(1 + a) = b. A little symbolic work reveals the
recipe:
a b
= b ⇐⇒ a = b + ab ⇐⇒ a − ab = b ⇐⇒ a = .
1+a 1−b
Thus, for any given b ∈ (0, 1), the positive number a = b/(1 − b) satisfies
g(a) = b. ♦

i i

i i
i i

i i

48 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

5
1
4

3 0.75

2
0.5
1

0.25
1
–1

–2 10 20

(a) Graph of f : (0, 1) → (−2, 5) (b) Graph of g : (0, ∞) → (0, 1)

Figure 1.1. Showing that sets have the same cardinality.

E XAMPLE 2. Show that N and Z have the same cardinality.

S OLUTION . The following table suggests one possible one-to-one correspon-


dence:
N: 1 2 3 4 5 6 7 8 9 ...
Z: 0 1 −1 2 −2 3 −3 4 −4 ...
The key property should be clear: every z ∈ Z appears once and only once in the
We can describe this second row. The integer z = −42, for instance, corresponds to n = 85. ♦
correspondence a little more
formally; see the exercises.
We’ve just seen that Z can be “paired up with” or “counted off against” N—
even though Z is, in another sense, a bigger set. The following definition captures
this possibility:

Definition 1.15. A nonempty set A is countable if either A is finite or A has the


same cardinality as N. In the latter case, A is countably infinite.

We’ve already seen several examples, including Z, of countably infinite sets.


We’ll show soon, too, that Q is countable. (This is probably surprising—after all,
between any two rationals lie infinitely many others, so Q might seem “larger”
than N.) We might wonder, then, whether any set of numbers, even R itself, is
uncountable, i.e., too big to be in one-to-one correspondence with N. The answer,
as we’ll see, turns out to be yes.

Working with Countable Sets


Finite sets. Finite sets have commonsense properties as far as cardinality is con-
As indeed we do in this book. cerned, at least if we assume some basic properties of the integers. Following are
some properties we will accept, without formal proofs, as intuitively reasonable.

i i

i i
i i

i i

1.6. Sets 103: Finite and Infinite Sets; Cardinality 49

• The pigeonhole principle: If a (finite!) hotel has fewer rooms than guests, We’ll revisit some of these facts
then at least one room must house at least two guests. This simple but useful in the exercises.
idea is known as the pigeonhole principle (trade rooms for nest boxes and
guests for pigeons). Here is a more formal statement:
Let f : A → B be any function, where A and B are finite sets,
and B has fewer members than A. Then f is not one-to-one.
• Subsets are finite, too: If A is a finite set and B ⊂ A, then B is finite, too.

• New finite sets from old: If A and B are finite sets, then A ∪ B, A ∩ B,
A \ B, and A × B are all finite.
• Listing and ordering: If A is any finite set, say with 42 elements, then we
can list the elements: A = {a1 , a2 , a3 , . . . , a42 }. If A happens to be a finite
set of real numbers, we can order our list from smallest to largest:

a1 < a2 < a3 < · · · < a40 < a41 < a42 .

Biggest and smallest members. The last property above has a useful form that
deserves special mention:
Fact 1.16. Every finite set of real numbers contains a maximum and a minimum
element.

The words “finite” and “contains” both matter. Some infinite sets, such as Z,
are unbounded, and therefore obviously lack maximum and minimum elements.
The case of a bounded infinite set, such as the open interval (1, 3), is a little
subtler. The problem is that 3 and 1—the obvious candidates for biggest and
smallest—are not members of (1, 3). The closed interval [1,3] does
contain maximum and minimum
Countably infinite sets. The set N is the “model” countably infinite set, but many elements.
other sets turn out to have the same cardinality as N. The following proposition
says, in effect, that N is the “smallest” infinite set.
Proposition 1.17. Let S be countably infinite, and let T ⊂ S be any nonempty
subset. Then T is either finite or countably infinite.

Notice the possible surprise: Every infinite subset of N—the odd numbers, the
primes, the powers of 2, the powers of 123456789—is in the sense of cardinality
just as “big” as N itself.
The idea of the proof is to list all the members of T :

t1 , t2 , t3 , . . . , t234 , . . . .

Such a list defines a nice one-to-one correspondence: 1 → t1 , 2 → t2 , . . . ,


234 → t234 , and so on. The details follow.

i i

i i
i i

i i

50 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Proof (sketch): By hypothesis, S is in one-to-one correspondence with N, so we


may as well assume right away that S = N. and that T ⊂ N. If T is finite we’re
done already, so we assume T is infinite.
To finish the proof we need a bijective function f : N → T . To start, let t1
It’s discussed in Section 1.1. be the smallest element of T (the well-ordering principle guarantees that there
is a smallest element), and set f (1) = t1 . Now let t2 be the smallest element
of T \ {t1 }, and set f (2) = t2 . Continuing, we set f (3) = t3 , where t3 is the
smallest element of T \ {t1 , t2 }, and so on. This process continues indefinitely
because T is infinite, and so does indeed construct a function f : N → T , as
desired. The method of construction assures that the ti are all different from one
another, and so f is one-to-one. The function f is also onto. If, say, t = 42 ∈ T ,
then there are at most 41 smaller members of T , so f (k) = 42 must hold for some
k ≤ 42. A similar argument works for every t ∈ T , so f is indeed onto, and the
proof is done. 
New countable sets from old. Proposition 1.17 gives one way of creating count-
able sets: start with a given countable set and take subsets. Propositions 1.18 and
1.19 describe some other operations that leave countability intact. You may be
surprised . . . .
Proposition 1.18. Let A and B be countable sets. The Cartesian product
A × B = {(a, b) | a ∈ A and b ∈ B}
is countable.
The proof is a little easier if Proof: We’ll take both A and B to be countably infinite. In this case, we have
either or both are finite.
A = {a1 , a2 , a3 , . . . } and B = {b1 , b2 , b3 , . . . } ,
The matrix extends infinitely and we can list all members of A × B in a “doubly-infinite matrix”:
upward and to the right, like the
first quadrant in the xy-plane. ... ... ... ... ...
(a1 , b3 ) (a2 , b3 ) (a3 , b3 ) (a4 , b3 ) . . .
(a1 , b2 ) (a2 , b2 ) (a3 , b2 ) (a4 , b2 ) . . .
(a1 , b1 ) (a2 , b1 ) (a3 , b1 ) (a4 , b1 ) . . .
Our last trick is to “count off” all the entries in this gigantic array—without miss-
ing any. One way to do this is to start at lower left and proceed along “northwest-
Find these entries in the big pointing” diagonals:
matrix.
(a1 , b1 ), (a2 , b1 ), (a1 , b2 ), (a3 , b1 ), (a2 , b2 ), (a1 , b3 ), (a4 , b1 ), . . . .
Do you see the pattern? What matters is that every point (ai , bj ) appears once,
but only once, in our list. These facts imply that the function f : N → A × B
given by n → nth entry in the list is the desired bijection. 

i i

i i
i i

i i

1.6. Sets 103: Finite and Infinite Sets; Cardinality 51

Proposition 1.19. Let A1 , A2 , A3 , . . . , An , . . . be a countable collection of sets,


all of them countable. Then the union


A1 ∪ A2 ∪ A3 ∪ · · · = Ai
i=1

is also countable.

Proof (sketch): Again we assume that each Ai is countably infinite, and list its
elements: Ai = {ai,1 , ai,2 , ai,3 , . . . }. As in the preceding proof, we can list all
elements of all the Ai in a big “matrix”:

... ... ... ... ...


a3,1 a3,2 a3,3 a3,4 ...
a2,1 a2,2 a2,3 a2,4 ...
a1,1 a1,2 a1,3 a1,4 ...

Just as before, this “matrix” has countably many entries, so we’re almost done.
But a minor subtlety needs attention: the Ai might have some elements in com-
mon, so some elements of the union might appear more than once in the “matrix.”
Luckily, this turns out not to matter, because the distinct elements of the union cor-
respond to some subset of the matrix entries, and we showed in Proposition 1.17
that such subsets are countable. 

Corollary 1.20. The set Q of rational numbers is countable.

Proof: It is enough, says Proposition 1.19, to write Q as a countable union of


countable sets. For i = 1, 2, 3, . . . , let
 
0 1 −1 2 −2
Ai = , , , , ,...
i i i i i

be the set of fractions a/i, where a ∈ Z. Now each Ai is clearly countable—it is A given rational, say 3/7,
in one-to-one correspondence with Z—and Q is the union of all the Ai .  appears not just in A 7 but also
in A14 , A 21 , and so on.

Uncountable Sets
The preceding propositions imply that many apparently large sets, such as Q, are
in fact no larger in cardinality than N. Might R itself be countable? The answer
is hardly obvious, but it turns out to be no, as the German mathematician Georg
Cantor showed around 1873.
Theorem 1.21. R is uncountable.

i i

i i
i i

i i

52 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

We’ll give a version of Cantor’s ingenious proof below, but first let’s consider
some striking implications of the theorem:
Corollary 1.22. The interval (0, 1) is uncountable. Every nonempty open interval
(a, b) is uncountable. The irrational numbers are uncountable.

All parts of the corollary say that the sets mentioned are, in cardinality, much
larger than the comparatively “sparse” set Q. Throw a dart at random at the real
line, and you’ll almost certainly hit an irrational.

Proofs of the corollaries. In Example 1 we showed that the intervals (0, 1),
We found explicit bijective (−2, 5), and (0, ∞) all have the same cardinality. Similar methods show that all
functions between these nonempty open intervals, including (−∞, ∞) (aka R), have the same cardinality.
intervals.
If the set P of irrationals were countable, then R = P ∪ Q would be the union of
two countable sets, and hence countable itself.

Cantor’s “diagonal” proof. Cantor uses the idea of infinite decimal expansion
to show that the interval (0, 1) is uncountable. The proof is by contradiction. If
(0, 1) were countable, we could list all of its elements in an infinite sequence:
x1 , x2 , x3 , . . . . Now each xi has an infinite decimal expansion, of the form
xi = 0.di1 di2 di3 di4 di5 . . . , where the dij are decimal digits, ranging from 0 to
9. Thus, we can write

x1 = 0.d11 d12 d13 d14 d15 . . .


x2 = 0.d21 d22 d23 d24 d25 . . .
x3 = 0.d31 d32 d33 d34 d35 . . .
x4 = 0.d41 d42 d43 d44 d45 . . .
x5 = 0.d51 d52 d53 d54 d55 . . .
... = ...

Here comes the clever part. Cantor uses the diagonal entries

d1,1 , d2,2 , d3,3 , d44 , d5,5 , . . .

in this array to produce a new number x0 = 0.e1 e2 e3 , . . . , which lies in (0, 1)


but all of whose digits differ from the corresponding diagonal entry:

e1 = d11 , e2 = d22 , e3 = d33 , e4 = d44 , ....

There are ten choices for each digit, so there are plenty of ways to choose the ei ,
Pun intended. and therefore countless possible numbers x0 . What matters is that x0 differs from
x1 in the first digit, from x2 in the second digit, from x3 in the third digit, and
so on. Thus x0 is nowhere among the original xi , which contradicts our original
assumption.

i i

i i
i i

i i

1.6. Sets 103: Finite and Infinite Sets; Cardinality 53

Exercises
1. Consider the functions f : (0, 1) → (−2, 5) and g : (0, ∞) → (0, 1)
defined in Example 1. (It is shown there that g is onto.)

(a) Show that f and g are both one-to-one on their domains.


(b) Show that f is onto.
(c) Show that f ◦ g is one-to-one and onto. What does this mean about
cardinality?

2. Let (a, b) and (c, d) be any two bounded intervals. Find a linear function
f : (a, b) → (c, d) that is one-to-one and onto. (Give an explicit formula
for f in terms of a, b, c, and d.)
3. Let A be a set with 42 elements and B a set with 43 elements, and let
f : A → B and g : B → A be functions. Can f be one-to-one? Onto?
What about g? Give examples of what can happen, and explain what can’t.
How is the pigeonhole principle involved?
4. Let S be a finite set. Use the pigeonhole principle to show that if f : S → S
is one-to-one, then f is also onto.
5. It can be shown that a set is S is infinite if and only if there exists a function
f : S → S that is one-to-one but not onto. (The “if” part is the claim in the
preceding problem.)

(a) Find a function f : N → N that is one-to-one but not onto. (There are
many possibilities.)
(b) Find a function g : R → R that is one-to-one but not onto. (There are
many possibilities.)
(c) Find a function h : R → R \ {1} that is one-to-one and onto.

6. Suppose that A ∼ B and B ∼ C. Use Definition 1.13 to show that A ∼ C.


7. Suppose A is infinite, B is finite, and B ⊂ A. Show that A \ B is infinite.
8. Let f : N → Z be the function described by the table in Example 2.

(a) Find a symbolic formula for f (n), perhaps using cases.


(b) Let g : Z → N be the other function described by the table in Exam-
ple 2 (read the table from bottom to top). Find a symbolic formula for
g(z), perhaps using cases.
(c) Show that both g ◦ f : N → N and f ◦ g : Z → Z are identity
functions.

i i

i i
i i

i i

54 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

9. We proved Proposition 1.19 (Q is countable) by writing Q as the union of


countably many countably infinite sets. We could, instead, write Q as a
nested union of countably many finite sets.

(a) For i ∈ N, let Qi be the set of rationals p/q (written in reduced form),
for which p2 + q 2 < i. How many members does Q3 have? What
about Q10 ? Can Qi = Qi+1 for some i? (Hints: Members of Qi
correspond to some, but not all, of the points inside the circle p2 + q 2
in the pq-plane. For Q3 and Q10 , just count these points.)
(b) Find an upper bound in terms of i for the number of elements in Qi .
∞
(c) Show that Q1 ⊆ Q2 ⊆ Q3 ⊆ . . . and that i=1 Qi = Q.

10. Show that [0, 1] and (0, 1) have the same cardinality by finding a function
f : [0, 1] → (0, 1) that is one-to-one and onto.
Hints: The claim seems reasonable, but finding a good function f is tricky.
Here is one possibility: Set f (0) = 1/2, f (1) = 1/3, f (1/2) = 1/4,
f (1/3) = 1/5, f (1/4) = 1/6, f (1/5) = 1/7, etc. For all other x, set
f (x) = x. Think about it, draw a graph, etc.; show that this function does
the job. (We’ll show later, by the way, that no continuous function f can
have the desired properties.)
11. Show that [0, ∞) and (0, ∞) have the same cardinality.
12. Use results from these problems to explain why all intervals in R have the
same cardinality.
13. A “book” is a finite string of characters from some finite “alphabet,” such
as the 128-character ASCII system. Is the set B of all possible “books”
finite, countably infinite, or uncountable?
14. A polynomial with integer coefficients is an expression of the form p(x) =
a0 + a1 x + a2 x2 + · · · + an xn , where n is a nonnegative integer and all
the ai are integers. The set of all such polynomials is denoted Z[x]. A
real number a is called√algebraic if √p(a) = 0 for some p in Z[x]. If, say,
p(x) = x2 − 2, then p( 2) = 0, so 2 is algebraic.

(a) Show that Z[x] is countable.


(b) Show that every rational number is algebraic.
(c) Show that the set of algebraic numbers is countable.
(d) A real number that is not algebraic is called transcendental. Show that
the set of transcendental numbers is uncountable. (Note: Showing that
a particular number is transcendental is usually difficult. But “nearly
every” number is transcendental.)

i i

i i
i i

i i

1.7. Numbers 102: Absolute Values 55

1.7 Numbers 102: Absolute Values


Recall the familiar absolute value function:

x if x ≥ 0;
|x| =
−x if x < 0.

In beginning calculus this function is a favorite example of mildly bad behavior—


it’s continuous but has no derivative at x = 0. We’ll use the same example later,
too, but the absolute value also plays a much more basic role in real analysis: it
measures the size, or magnitude, of a quantity. Such questions—how big? how
close?—are crucial in real analysis; so, therefore, are equalities and inequalities
with absolute values.
The absolute value has a nice geometric interpretation:

If x and a are real numbers on a number line, then |x − a| is the


distance between x and a.

This simple idea is surprisingly helpful in making sense of expressions that in-
volve absolute values.

E XAMPLE 1. Which real numbers x satisfy (i) |x − 3| < |x + 2|? What about
(ii) |3x − 7| < 5?

S OLUTION . Both inequalities are slightly awkward algebraically because of the


need to handle positive and negative cases separately. Distance interpretations can
help—a lot. Inequality (i), recast as |x − 3| < |x − (−2)|, now says simply that x
is closer to 3 than to −2. This means, in turn, that x lies left of 1/2, the midpoint
of (−2, 3); equivalently, x < 1/2. Make a sketch.
Inequality (ii) can also be interpreted in distance language, after a little rear-
rangement: Is all the algebra OK?

7 7 5
|3x − 7| < 5 ⇐⇒ 3 x − < 5 ⇐⇒ x − < .
3 3 3

The last version makes the meaning clear: x lies within distance 5/3 from 7/3.
Equivalently, x ∈ ( 2/3, 4 ). ♦

Absolute Truths
We collect some key properties of absolute values in two theorems. The first is
easy; proofs are omitted or left as exercises.

i i

i i
i i

i i

56 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Theorem 1.23. Let x and y denote arbitrary real numbers; assume k > 0.

(a) − |x| ≤ x ≤ |x|.

(b) |x| = |−x| ; |x − y| = |y − x|.

(c) |x| < k ⇐⇒ −k < x < k.

(d) |x| > k ⇐⇒ x>k or x < −k.

(e) |x · y| = |x| · |y|.

We explain the name below. The next theorem is important enough to have its own name.

Theorem 1.24 (Triangle inequality). Let x and y be any real numbers. Then

|x + y| ≤ |x| + |y| .

The reverse triangle inequality says

|x − y| ≥ | |x| − |y| | .

On proofs. The triangle inequality follows from several bits of Theorem 1.23.
From (a), we get

− |x| ≤ x ≤ |x| and − |y| ≤ y ≤ |y| .

Adding these inequalities gives

− (|x| + |y|) = − |x| − |y| ≤ x + y < (|x| + |y|) ,

which is equivalent, by part (c) of Theorem 1.23, to |x + y| ≤ |x|+|y|, as desired.


The reverse triangle inequality can be derived from the standard triangle in-
equality; see the exercises.

Variations on a theme. The triangle inequalities are often used in forms slightly
different from the “vanilla” versions in the theorem. Following are some exam-
ples; observe occasional uses of Theorem 1.23:

(i) |x − y| = |x + (−y)| ≤ |x| + |y| ;


(ii) |x − y| = |x − a + a − y| ≤ |x − a| + |a − y| = |x − a| + |y − a| ;
(iii) |x| − |y| ≤ |x − y| ≤ |x| + |y| .

Note especially what (ii) says about distance: the trip from x to y is no longer
than the sum of the distances from x to a and from a to y. This should sound
reasonable—stopping at a enroute shouldn’t shorten the trip from x to y—and it

i i

i i
i i

i i

1.7. Numbers 102: Absolute Values 57

helps explain the allusion to triangles. Note also (iii), which traps |x − y| between
upper and lower bounds.
In fact, triangle-type inequalities hold in quite general mathematical settings,
some beyond the scope of this book. The basic triangle inequality |x + y| ≤
|x| + |y| holds for complex numbers x and y, for instance, if |x| denotes the length
of x considered as a vector in the plane. Generalizing in another direction, related
facts like
|x1 + x2 + · · · + x100 | ≤ |x1 | + |x2 | + · · · + |x100 |
and  
1 1
f (x) dx ≤ |f (x)| dx
0 0

also hold, and are sometimes called triangle inequalities.

E XAMPLE 2. Suppose we know that |x − 7| < 0.01, |y − 7| < 0.02, and


|z − 7| > 0.03. What can be said about |x − y|, |x − z|, |xy|, and |x/y|?

S OLUTION . Triangle inequalities help. To estimate |x − y| we have

|x − y| = |x − 7 + 7 − y| ≤ |x − 7| + |y − 7| < 0.01 + 0.02 = 0.03.

For |x − z| there is no upper bound (why?), but the reverse triangle inequality
gives a lower bound:

|x − z| = |(x − 7) − (z − 7)| ≥ |z − 7| − |x − 7| > 0.03 − 0.01 = 0.02.

To estimate |xy| and |x/y| we notice first that 6.99 < |x| < 7.01 and 6.98 <
|y| < 7.02. Thus, These bounds follow from the
triangle inequality; common
x |x| 7.01 sense works, too.
|xy| = |x||y| ≤ 6.99 · 6.98 ≈ 48.79 and = ≤ ≈ 1.004. ♦
y |y| 6.98

Exercises
1. Find all real values of x that satisfy the given inequality; express answers
in interval notation.

(a) |2x + 7| < 11


(b) |2x + 7| > 11
(c) 2x2 + 7 < 11
(d) |x − 3| < |x + 1|
(e) x2 − 4 < 0.07

i i

i i
i i

i i

58 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

2. Suppose that |x − 3| < 0.07 and |y − 5| < 0.04.

(a) Show that |5x − 15| < 0.35.


(b) Show that |x + y − 8| < 0.11.
(c) Show that 14.5328 < xy < 15.4728.
(d) Show that |y − 4| > 0.96.

3. This problem is about the reverse triangle inequality (RTI).

(a) Use the ordinary triangle inequality to prove the RTI.


(b) Each side of the RTI can be interpreted as the distance between two
numbers. What does the RTI say in this language?
(c) Under what conditions on x and y is the RTI actually an equation?

4. The triangle inequality (TI) for three summands follows from the ordi-
nary TI:

|x1 + x2 + x3 | = |(x1 + x2 ) + x3 | ≤ |x1 + x2 |+|x3 | ≤ |x1 |+|x2 |+|x3 | .

Show by induction that the TI holds for n summands, where n ≥ 2.

5. The triangle inequality |x + y| ≤ |x| + |y | also holds for vectors x and y
in the plane, where |x| denotes the length of x. Draw a picture to illustrate
this fact; make note of the triangle. When does equality hold?

6. This problem explores a connection between the absolute value and the
maximum or minimum of two quantities.

(a) Show that if x and y are real numbers, then

x + y + |x − y|
max{x, y} = .
2
(b) Find a similar formula for the minimum of x and y.
(c) Let f : I → R and g : I → R be functions defined on an interval
I. Find a formula involving the absolute value for the new function
h : I → R defined by h(x) = max{f (x), g(x)}.
(d) Let f (x) = sin x and g(x) = ex , and let h(x) be defined as in the
preceding part. Use technology to plot f , g, and h together in an
interval that shows clearly what’s happening.

7. Let  be a positive number, and suppose |x − 7| <  and |y − 7| < . Show


that |x − y| < 2.

i i

i i
i i

i i

1.8. Bounds 59

8. (a) Suppose that |x − 1| < 0.5. Show that x > 0.5.


|c| |c|
(b) Suppose that c = 0 and |x − c| < 2 . Show that |x| > 2 .

9. Yet another triangle-type inequality has the form


 1  1
f (x) dx ≤ |f (x)| dx.
0 0

Discuss, perhaps with a picture, why this is plausible. How are Riemann
sums involved? (No formal proof is possible until we define the integral!)

1.8 Bounds
Theorems and proofs in real analysis often turn on boundedness. We’ll prove
later, for instance, that a continuous function defined on a closed and bounded
interval I = [a, b] is itself bounded on I. To make sense of such a claim re-
quires clear meanings for all its words—which include two somewhat different
instances of the b-word. In this section we start to unpack the idea and language We’ll also need to define
of boundedness in several settings. “continuous,” of course.

Definition 1.25. Let S be a nonempty set of real numbers.

• S is bounded above if there exists a number M with s ≤ M for all s ∈ S;


here M is an upper bound for S.

• S is bounded below if there exists a number m with s ≥ m for all s ∈ S;


in this case m is a lower bound for S.

• S is bounded if it is bounded both above and below.

It is clear, for instance, that all three of the sets {1, 2, 3}, [1, 3], and (1, 3) are
bounded above by 3 and below by 1, while the interval (1, ∞) has the same lower
bound, but no upper bound.
Here are some basic notes on the idea and language of boundedness:

• Many choices: Upper and lower bounds are far from unique. For {1, 2, 3},
[1, 3], and (1, 3), for instance, −42 and 42 also work as lower and upper
bounds. These may seem unlikely choices, but in practice we sometimes
care more about the existence (or absence) of bounds than about particular
numerical values.

i i

i i
i i

i i

60 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

And similarly for sets • Unboundedness: A set is unbounded if it is not bounded. The definition is
unbounded above or far from surprising, but deciding whether a set is bounded or unbounded
unbounded below.
can be challenging. What do you think about
 
1 1 1 1 1 1
1, 1 + , 1 + + , 1 + + + , . . .
2 2 3 2 3 4

and  
1 1 1 1 1 1
1, 1 + , 1 + + , 1 + + + , . . . ,
2 2 4 2 4 8
for example?

• Boundedness and absolute values: Absolute values—which measure mag-


nitude—have a natural connection to boundedness. Indeed:

Fact 1.26. Let S ⊂ R be a nonempty set. S is bounded if and only if there


exists M > 0 such that |s| ≤ M for all s ∈ S.

We outline the (easy) proof in the exercises.

E XAMPLE 1. Let S and T be nonempty sets of real numbers. Prove some basic
properties of bounded sets:

(a) If S ⊂ T and T is bounded, then S is bounded, too.

(b) If S is finite, then S is bounded.

(c) Let |S| = {|s| | s ∈ S}. Then S is bounded if and only if |S| is bounded.

(d) Let S + T = {s + t | s ∈ S, t ∈ T } and ST = {st | s ∈ S, t ∈ T }. If S


and T are bounded, then so are S + T and ST .

S OLUTION . These facts follow directly from the definition of boundedness.


Claims (a) and (c) are left to the exercises; claim (b) follows from the fact that
every finite set of numbers has a largest and a smallest member. For (d), note first
that, by assumption, there are positive numbers MS and MT with |s| ≤ MS and
See the triangle inequality? |t| ≤ MT for all s ∈ S and t ∈ T . Hence we have

|s + t| ≤ |s| + |t| ≤ MS + MT and |st| = |s||t| ≤ MS MT

for all s and t in question, and the claims about boundedness follow. ♦

i i

i i
i i

i i

1.8. Bounds 61

Getting Edgy: sup, lub, inf, and glb


The interval I = (−3, 42], like every bounded set, has infinitely many upper and
lower bounds. But there is something obviously special about −3 and 42: the
former is the greatest lower bound and the latter the least upper bound for I. The
following definition formalizes these properties—and introduces some impressive
Latin synonyms.
Definition 1.27 (Supremum and infimum). Let S ⊂ R be a nonempty set. A num-
ber α is the infimum of S, and we write α = inf(S) (or α = glb(S)) if
(i) α is a lower bound for S; and
(ii) if α is any lower bound for S, then α ≥ α .
A number β is the supremum of S, and we write β = sup(S) (or α = lub(S)) if
similar inequalities hold for upper bounds.

This may all seem, for now, like a lot of fuss over not much. Indeed, there is little
interesting to be said about sups and infs of simple sets, like bounded intervals.
We will see soon, however, that the existence of real sups and infs for more general
bounded sets—a property called completeness—is essential in the theory of real
analysis. Here, for the moment, are some simpler notes on the definition.
• Do they exist? If S is unbounded above (or below), then, obviously, S has
no supremum (or infimum). Every bounded set of real numbers, by con-
trast, has a real supremum β and a real infimum α. We discuss this subtle
property and its implications carefully in the next section.
• In or out? The interval I = (−3, 42] contains its supremum but not its
infimum; including or excluding intervals’ endpoints shows that all such
combinations are possible. If a set S contains its supremum β (or infimum
α), then β is the maximum (or minimum) element of S.
• Only one? We said “the” in the preceding definition, and this is justified: a
set S has at most one supremum and one infimum. The proof is easy. If β1
and β2 are both suprema for S, then we’d have both β1 ≤ β2 and β2 ≤ β1 ,
and so β1 = β2 .

Elbow room. Every member of I = (0, 1) is positive, but I pushes right up


against 0 in that members of I can be found within any given distance of 0. By
contrast, I leaves 1.003 a little “elbow room”: no member of I is within 0.003 of
1.003. This distinction, which comes up often in real analysis, can be described
efficiently in terms of boundedness.
Definition 1.28. If a is a number and S ⊂ R is a nonempty set, then S is bounded
away from a if, for some δ > 0, |s − a| > δ for all s ∈ S.

i i

i i
i i

i i

62 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

For I = (0, 1) and a = 1.003, for example, we can use δ = 0.003 (or any smaller
value of δ). Just as clearly, no positive δ works for I = (0, 1) and a = 0.

E XAMPLE 2. The interval I = (2, 3) is bounded away from π because |π −x| >
0.14 for all x ∈ (2, 3). By contrast, 3 ∈
/ I, but I is not bounded away from 3,
since I has members within any small distance δ from 3. The set N is bounded
away from π, but Q is not, since for any δ > 0, no matter how small, there are
rational numbers within δ of π. ♦

E XAMPLE 3. Let S = {s1 , s2 , . . . , sn } be a finite set of real numbers, with


a∈/ S. Show that S is bounded away from a.

S OLUTION . The idea is that, since S is finite, one of the si must be closest
to a. More precisely, let di = |si − a| be the distance from si to a. Then
D = {d1 , d2 , . . . , dn } is a finite set of positive numbers, and so has a minimum
member, say d1 . (Every finite set of numbers has largest and smallest elements;
Any positive δ smaller than d1 see Fact 1.16, page 49.) Now it is clear that δ = d1 /2 works in Definition 1.28.
works, too. ♦

Functions and Bounds


Boundedness for functions is much like that for sets, but the jargon is slightly
different:

Definition 1.29. Let f be a real-valued function and A a subset of the domain of


f . If f (a) ≤ M for all a ∈ A, then f is bounded above by M on A. If f (a) ≥ m
for all a ∈ A, then f is bounded below by m on A. If f is bounded above and
below on A, then f is bounded on A.

E XAMPLE 4. Let

f (x) = sin x, g(x) = x3 − 5x2 + 7x + 13, and h(x) = 1/x.

On which sets A are f , g, and h bounded or unbounded?

S OLUTION . The function f is least interesting. Because −1 ≤ sin(x) ≤ 1 for


all real x, f is bounded (above by 1 and below by −1) on every set
A ⊂ R. Sharper bounds can be found on some smaller sets, of course. If, say,
sin x increases on this interval. A = [0.36, 1.27] and a ∈ A, then 0.353 ≈ sin 0.36 ≤ sin a ≤ sin 1.27 ≈ 0.955.
We know (informally for now) from elementary calculus that g(x)—like every
odd-degree polynomials—“blows up” for large (positive or negative) values of x.
Thus, g is unbounded on unbounded sets like [0, ∞), (−∞, 42), and R itself. On

i i

i i
i i

i i

1.8. Bounds 63

the other hand, g is bounded on every bounded set A. If, say, A is the interval
[−K, K] and a ∈ A, then we have Thanks, triangle inequality.

|g(a)| = a3 − 5a2 + 7a + 13 ≤ a3 + 5 a2 + 7 |a| + 13


≤ K 3 + 5K 2 + 7K + 13;

the last quantity is an upper bound. (With more work we might find a smaller
upper bound.)
The function h behaves somewhat differently: although bounded on some
infinite intervals, such as [0.00017, ∞) and (−∞, −0.24), h is unbounded on
some finite intervals, like (0, 1) and (−0.24, 0). ♦

Exercises
1. Consider the sets EW of all non-hyphenated English words and WITP of
all words in this problem. Let f be the function with rule

f (word) = number of letters in word.

(a) Is f bounded above and/or below on EW? Can you give good upper
and lower bounds? Explain.
(b) Find upper and lower bounds for f on the set WITP.

2. Consider the real-valued function g whose domain is the set GCES of gram-
matically correct English sentences, and has rule

g(sentence) = number of words in sentence.

Is g bounded on GCES? Can you give upper and lower bounds? What
bounds apply g on the subset SITP of sentences in this problem?
3. We suggested in Example 4, page 62, that every bounded set S ⊂ R is
contained in some interval of the form [−K, K]. Prove this.
4. Consider the interval I = [−10, 10]. Find good upper and lower bounds for
each of the following functions defined on I. Use the triangle inequality or
ideas from elementary calculus.
1
(a) f (x) = .
1 + x2
(b) g(x) = 3x2 + 2x − 7.
(c) h(x) = sin2 x + cos2 x + x.
5. Do the preceding problem, but replace the interval I with the interval J =
[−K, K], where K > 0. (Answers may depend on K, of course.)

i i

i i
i i

i i

64 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

6. Let f (x) = Ax + B, where A and B are any real constants, and let I be
the interval [−K, K], where K > 0. Find sharp (i.e., best possible) upper
and lower bounds for f on I. (Hint: Handle the cases A > 0, A = 0, and
A < 0 separately.)
7. Prove parts (a) and (c) of Example 1, page 60.
8. Is each of the following sets bounded? If so, give upper and lower bounds.
If not, why not? (It’s OK to use ideas from elementary calculus.)
 
1 1 1 1 1 1
(a) 1, 1 + , 1 + + , 1 + + + , . . .
2 2 3 2 3 4
 
1 1 1 1 1 1
(b) 1, 1 + , 1 + + , 1 + + + , . . .
2 2 4 2 4 8
 
ln 1 ln 2 ln 3 ln 4
(c) , , , ,...
1 2 3 4
 1 2 3 4 
2 2 2 2
(d) , , , , . . .
12 22 32 42
(e) {tan(x) | x ∈ R}
 
(f) x ∈ R | x3 − 5x2 + 7x − 1234 = 0
9. Show that if S is bounded and f (x) = ax + b, then f is bounded on S.
10. We remarked in this section that a set S of real numbers is bounded if and
only if there is some M > 0 such that |s| ≤ M for all s ∈ S.

(a) Suppose S has upper and lower bounds a and b, respectively. Find an
M that satisfies the condition above.
(b) Suppose M satisfies the condition above. Find upper and lower bounds
for S.
(c) Prove the statement at the beginning of this exercise.

11. Let S ⊂ R be a nonempty set with 0 ∈


/ S.
(a) Can S be both (i) unbounded; and (ii) bounded away from 0? Either
give an example or explain why none is possible.
(b) Show that S is bounded away from 0 if and only if the set T = {1/s |
s ∈ S} is bounded.
(c) Show that S is bounded away from 0 if and only if there is an open
interval I = (a, b) with 0 ∈ I and S ∩ I = ∅.
12. In each of the following cases either give an example or say why none can
exist.

i i

i i
i i

i i

1.9. Numbers 103: Completeness 65

(a) A set of positive numbers that is bounded away from one but not from
zero.
(b) A number a such that Q is bounded away from a.
(c) A set S that is bounded away from a = 42 but not bounded away
from any other integer.
13. This problem is about the intervals I = [0, 1] and J = (2, 3).

(a) Show that if a ∈


/ I, then I is bounded away from a.
(b) Does J have the property described in (a)? Why or why not?
(c) Does N have the property described in (a)? Explain.

14. Show that if S ⊂ R is a finite set, then S contains both sup(S) and inf(S).
15. Let S ⊂ R be bounded, with β = sup(S). Show that S is not bounded
away from β.

1.9 Numbers 103: Completeness


There are many, many rational numbers. Indeed, between any two particular
rationals lie infinitely many others. Between zero and one, for instance, we find
1 1 1 1 1
, , ,..., , ,....
2 3 4 507 508
Between any two of these, say 1/507 and 1/508, lie infinitely many others; and
between any two of those . . . . Who could ask for more?
We could, and we do. There are just not enough rational numbers out there
to permit the sort of analysis—or even algebra—that we want to do. We have
seen, for instance, that there is no rational, exact solution to the simple-looking
equation x2 = 2, even though rational numbers like 1.4142135 (too small) and
1.4142136 (too big) come very, very close.
The real numbers have no such gaps. Somewhere between all those too-
small rational numbers x (with x2 < 2) and the too-big √ rational numbers y (with
y 2 > 2) is a real number r that deserves the name 2 because r2 = 2 exactly.
We will take this “gap-free” property, known technically as completeness, as an
axiom: a defining property of the real numbers rather than a claim that requires
proof.

The Completeness Axiom for R. Every nonempty set of real numbers


that is bounded above has a supremum. In symbols: If S ⊂ R,
S = ∅, and S is bounded above, then there is a real number β such
that β = sup(S).

i i

i i
i i

i i

66 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Like other succinct mathematical statements, this one can use some unpacking:
• What about infs? For brevity, the completeness axiom mentions only sups.
But the story is similar for infs: Every nonempty set that is bounded below
has an infimum. The inf version, moreover, follows easily from the sup
See the exercises. version.
• The real advantage: The completeness axiom guarantees that every bounded
Rational numbers are also real. set of rationals has a supremum—which may or may not be a rational num-
ber. By contrast, the supremum of a bounded set of reals must be real. In
this sense R is complete, while Q is incomplete.
• In or out? We know already that the sup and the inf of a given set may
or may not lie within the set. It is pretty obvious, for instance, that the
half-closed interval (1, 2] contains its supremum but not its infimum. For
more complicated
 sets, things may be less  clear. Consider, for example,
the set S = r ∈ Q | r2 ≤ 152399024 . A little thought shows that S
is bounded, so the completeness axiom guarantees that √ a sup and an inf
exist. We might
√ also guess (correctly!) that sup(S) = 152399024 and
inf(S) = − 152399024, but do these numbers lie inside or outside S?
The question boils down to This is far from clear at a glance—and the completeness
√ axiom is no help
whether 152399024 is a perfect at all. To decide, we’d need to discover whether 152399024 is rational,
square. It isn’t . . . quite.
and this takes a little effort.

Using Completeness: Order Properties of R


The following theorem collects some useful properties of the real numbers as an
ordered set. Most are familiar; the surprise, if any, is the role that completeness
plays in their proofs.

Theorem 1.30 (Order properties of numbers).


• N is unbounded: Given any real number M , there exists a positive integer
n with n > M .
• Squeezing in: For every positive number , no matter how small, there ex-
1
ists a positive integer n such that 0 < n < .
• The Archimedean principle: Given real numbers a and b with 0 < a < b,
there exists a positive integer n with na > b.

More on the Archimedean principle. The Archimedean principle can be thought


of geometrically. The challenging case occurs when a is small and b is large, as
suggested in Figure 1.2.

i i

i i
i i

i i

1.9. Numbers 103: Completeness 67

a 2a 3a b na

0 0.01 5003.47

Figure 1.2. Archimedes in motion: a long trip in short steps.

The principle says that steps of size a, no matter how short, will eventually
complete a trip of length b, no matter how long. As Archimedes (around 250 BCE)
might have put it, a positive number a, no matter how small, is not “infinitesimal”:
successive multiples a, 2a, 3a, . . . will eventually exceed any proposed bound b.
Proof: To show that N is unbounded, assume toward contradiction that no integer
n exceeds M . Then M is an upper bound for N, and so, by the completeness
axiom, N must have a real supremum, say β. Because β is the least upper bound,
β − 1 is not an upper bound, and so n0 > β − 1 must hold for some positive
integer n0 . But then n0 + 1 > β, which contradicts our assumption that no
integer exceeds β. Thus N is unbounded, as claimed.
The remaining claims turn out to be lightly disguised versions of the result
just shown. For the Archimedean principle, note that, for positive a and b,
b
na > b ⇐⇒ n> .
a
But we’ve just shown that N is unbounded, so the right-hand inequality must hold
for sufficiently large n.
Proof of the “squeezing-in” principle is left as an exercise. 

Nested Intervals
A collection of intervals I1 , I2 , I3 , . . . is called nested if

I1 ⊇ I2 ⊇ I3 ⊇ I4 ⊇ . . . .

Here is a nested collection of open intervals:


1 1 1
(0, 1) ⊇ 0, ⊇ 0, ⊇ 0, ⊇ ....
2 3 4
Observe that, although each interval In contains infinitely many points, the inter-
section of the full collection is empty.
The story is different for closed intervals. The nested collection
     
1 1 1
[0, 1] ⊇ 0, ⊇ 0, ⊇ 0, ⊇ ....
2 3 4

i i

i i
i i

i i

68 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

has exactly one point of intersection—the number 0. The following theorem de-
scribes the situation in general; completeness is the key.
Theorem 1.31 (The nested intervals theorem). Consider a nested infinite col-
lection
I1 ⊇ I2 ⊇ I3 ⊇ I4 ⊇ . . .
of closed and bounded intervals. The intersection

I1 ∩ I2 ∩ I3 ∩ I4 ∩ . . .

contains at least one point. If the intervals’ lengths shrink to zero, then the inter-
section is a single point.

Proof (sketch): We sketch the main idea, leaving some details to exercises. If we
write In = [an , bn ] for all positive integers n, then the nesting condition means

a 1 ≤ a2 ≤ a3 ≤ · · · ≤ b 3 ≤ b 2 ≤ b 1 .

In particular, the “left endpoint set” A = {a1 , a2 , a3 , . . . } is bounded above. By


completeness, we can set α = sup A, and it is readily shown that α lies in all the
In . A similar argument shows that β = inf{b1 , b2 , b3 , . . . } lies in all the In . If
the lengths of the In shrink to zero, then α = β. 

Rationals and Irrationals: Tightly Packed


We mentioned casually at the beginning of this section that between any two given
rational numbers lie infinitely many other rational numbers. A little more is true,
and now we can prove it.
Theorem 1.32. Let x and y be any two real numbers, with x < y.

(a) The interval (x, y) contains at least one rational and one irrational number.
(b) The interval (x, y) contains infinitely many rationals and infinitely many
irrationals.

Proof: Claim (b) looks much stronger than (a), but showing that (a) implies (b)
is surprisingly easy. Let’s suppose, toward contradiction, that (a) holds but (x, y)
contains only finitely many rationals r1 , r2 , . . . , rn . Then one of these, say rn ,
Recall: Every nonempty finite is largest. But then the interval (rn , y) must contain no rationals, which contra-
set of reals has a maximum dicts (a). Exactly the same proof applies to irrational numbers, so we conclude
element.
that (a) implies (b).
To prove (a) we’ll use Theorem 1.30. For convenience, we’ll handle here only
the special case 0 ≤ x < y, and mop up remaining cases as exercises. If we
set  = y − x, then the squeezing-in part of Theorem 1.30 says that for some

i i

i i
i i

i i

1.9. Numbers 103: Completeness 69

integer n the rational number


√ r = 1/n lies in the interval (0, )—as does the
irrational number p = r/ 2. Note that 0 < p < r < y – x.
To finish the proof, we show that at least one of r, 2r, 3r, 4r, . . . (all are
rational) and at least one of p, 2p, 3p, 4p, . . . (all are irrational) lie inside (x, y).
This is intuitively reasonable—for both sequences, the “jumps” are too small to
miss (x, y) entirely. To put it formally, say for p, 2p, 3p, 4p, . . . , consider the
set S = {np | n ∈ N and np < y}. By the Archimedean principle, np > y
for sufficiently large n, which amounts to saying that S is finite. Hence S has a
largest element, say n0 p, with n0 p < y but (n0 + 1)p ≥ y. But now

(n0 + 1)p ≥ y =⇒ n0 p ≥ y − p > y − (y − x) = x,

and so x < n0 p < y, as desired. The proof that x < m0 r < y for some positive
integer m0 is almost identical. 

Exercises
1. We said in this section that completeness of R guarantees that the number
two has a real square root. Let’s prove it.

(a) Let S = {x | x2 < 2}. Explain why S has a least upper bound; call
it β.
(b) We’d like to show that β 2 = 2. First suppose toward contradiction
that β 2 < 2, and set h = (2 − β 2 )/5. Show that (β + h)2 < 2, and
derive a contradiction.
(c) Prove by contradiction that β 2 > 2 is also impossible. (Hint: Set
k = (β 2 − 2)/4 and consider β − k.)

2. Use the completeness axiom for sups to prove the analogous result for infs:
if S ⊂ R, S = ∅, and S is bounded below, then there is α ∈ R such
that α = inf(S). (Hint: Given a nonempty set S, look at the new set −S
defined by −S = {−s | s ∈ S}. Apply the completeness axiom to −S and
interpret the result.)

3. The list 12 , 13 , 14 , . . . , n1 , . . . suggests an explicit “recipe” for an endless


collection of rational numbers between 0 and 1.

(a) Give a similar recipe for an endless list of rationals between 0 and
1
507 .
1
(b) Give a similar recipe for an endless list of rationals between 2 and 13 .
(c) Let a and b be any two rationals, with a < b. Give a recipe (involving
a and b) for an endless list of rationals between a and b.

i i

i i
i i

i i

70 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

4. Use the unboundedness of N (the first part of Theorem 1.30) to prove the
squeezing-in principle (the second part of Theorem 1.30).
5. Our statement of the Archimedean principle (part of Theorem 1.30) in-
cludes the hypothesis 0 < a < b.

(a) Is the claim true if 0 < b ≤ a? Give a proof or counterexample.


(b) Is the Archimedean claim true or false if we replace the hypothesis
0 < a < b with a < b? What if 0 = a < b?

6. Part (a) of Theorem 1.32 says that every interval (x, y) contains at least one
rational and one irrational. The proof given above assumed that 0 ≤ x < y.

(a) Show that the same result holds if x < 0 < y. (Hint: Apply the result
already proved to the new interval (X, Y ) = (0, y).)
(b) Show that the result still holds if x < y ≤ 0. (Hint: Look at the new
interval (X, Y ) = (−y, −x).)

7. The completeness axiom says this: if S ⊂ R is bounded above, then S has


a supremum β, and β ∈ R.

(a) Is the italicized statement true or false if R is replaced (in both places)
by Z? Explain.
(b) Is the italicized statement true or false if R is replaced (in both places)
by Q? Explain.

8. In each case, find a nested collection I1 ⊇ I2 ⊇ . . . of intervals as


described.

(a) Each In is open, the In are nested, and the intersection is the single
point 3.
(b) Each In is closed, no two In are equal, and the intersection is the
interval [−3, 42].
(c) Each In is open, no two In are equal, and the intersection is the inter-
val [−3, 42].

9. This problem is about some details in the proof of Theorem 1.31, page 68;
see the notation there.

(a) Prove that, for all m and n, am ≤ bn .


(b) Prove that α ≤ bn for all n.
(c) Prove that, for all n, an ≤ α ≤ β ≤ bn .

i i

i i
i i

i i

1.9. Numbers 103: Completeness 71

10. It is well known that every number has an infinite decimal expansion. For
instance, we can write
1
= 0.3333333 . . . ; π = 3.1415926 . . . ; 42 = 42.0000000 . . . .
3
Here is a slightly subtler fact: every infinite string of decimal digits
corresponds to a unique real number β. Use the completeness axiom to
explain why. (Hint: For convenience, consider only strings of the form
0.d1 d2 d3 d4 d5 . . . , where each di is a decimal digit. Use these digits to
construct a bounded set with supremum β.)

i i

i i
i i

i i

i i

i i
i i

i i

CHAPTER 2
Sequences and Series

2.1 Sequences and Convergence


An infinite sequence is a list a1 , a2 , a3 , . . . of real numbers, indexed by the posi-
tive integers. Here are some examples:
1 1 1 1
a1 , a2 , a3 , a4 , . . . , a42 , . . . = 1, , , , ..., ,...;
2 3 4 100
b1 , b2 , b3 , b4 , . . . , b42 , . . . = 1, −1, 1, −1, . . . , −1, . . . ;
c1 , c2 , c3 , c4 . . . , c42 , . . . = sin 1, sin 2, sin 3, sin 4, . . . , sin 42, . . . ;
f1 , f2 , f3 , f4 , . . . , f42 , . . . = 1, 1, 2, 3, . . . , 267914296, . . . ;
1 2 3 5 433494437
g1 , g2 , g3 , g4 , . . . , g42 , . . . = , , , , ..., ,....
1 1 2 3 267914296
Observe:
• Words and notations: A particular entry an in a sequence is called its nth
term. Notice that the subscript, or index variable name, is arbitrary: an and
ai and even ax can all mean the same thing. For the entire sequence we The ax notation is legal but
write {an }∞
n=1 , or just {an }; the braces emphasize the fact that a sequence
unwise, since x usually denotes
a “continuous” variable.
is a set.
• Sequences as functions: A sequence {an } is, among other things, a real-
valued function, with domain N. Writing, say, a(42) rather than a42 can
help emphasize this viewpoint.
• Sequence rules: Like other functions, sequences are often defined by sym-
bolic rules. Among the sequences above, for example, we have the rules
an = 1/n, bn = (−1)n+1 , and cn = sin n.
Not every sequence (or function, for that matter) has such a simple recipe.
The sequence {fn } above is the famous Fibonacci sequence, which is de-
fined recursively:
f1 = 1; f2 = 1; fn = fn−2 + fn−1 if n ≥ 3.
The sequence {gn } can be built (can you guess how?) from {fn }.

73

i i

i i
i i

i i

74 2. Sequences and Series

• Converge or diverge? It is clear at a glance that {an } converges to the limit


zero. Sequences {bn } and {fn } presumably diverge, because the former
never settles on any single limit, while the latter blows up in size. Precise
definitions, which we’ll give in a moment, will formalize these intuitions
Calculating some decimal and lead to rigorous proofs. Whether {cn } and {gn } converge or diverge
values might help us guess. may be harder to guess.

Convergence and Divergence


Informally speaking, a sequence {an } converges to a limit, say 3, if the numbers
an “approach” 3 as n “tends to infinity.” Such an intuitive view can be useful,
but it’s too vague to permit careful proofs. The words in quotes are especially
important—but especially unclear as written. We need a formal definition:
Definition 2.1. Let {an } be a sequence and L a number. We say {an } converges
to L if for every  > 0 there exists a number N so that
|an − L| <  whenever n > N .
In this case L is the limit, and we write limn→∞ an = L, or just an → L. If no
such L exists, we say {an } diverges.
The definition is subtle, and deserves some unpacking:
• Greek letters: The Greek letter  (lower-case epsilon) is traditionally used
in mathematics to denote small positive quantities. Later we’ll use δ (lower-
case delta), as well, for similar purposes.
•  measures “nearness”: The inequality |an − L| <  means that an is
within  of L. If  is very small then an is very near to L.
• N measures “waiting time”: The definition requires that every term an with
n > N be within  of L. The number N says how long we need to wait
for this happy outcome. If, say,  = 0.001 and N = 234.7, then we’re
guaranteed that a235 , a236 , a237 , and all following terms are within 0.001
of the limit.
• Symbolic shorthand: The heart of the definition can be written compactly
in symbols:
∀ > 0 ∃N ∈ N such that n > N =⇒ |an − L| < 

Using the definition: notes on proofs. Our concise definition can lead, ideally,
to equally concise proofs. But such polished products can seem both impressive
and mysterious, like a Ferrari with the hood up. To raise the hood a bit, we’ll
often precede formal proofs with informal discussion—but keep the two separate.
We start with some positive and negative examples.

i i

i i
i i

i i

2.1. Sequences and Convergence 75

1
E XAMPLE 1. Prove that the sequence {an } with an = n converges to zero. In
symbols, limn→∞ n1 = 0.

D ISCUSSION . The fact that an → 0 seems obvious; how could it be otherwise?


To invoke the definition, we work with the desired inequality, |an − L| < . Here
we have
1 1 1 1
|an − L| = = , and <  ⇐⇒ n > .
n n n 
(The first calculation works because—but only because—both n and  are posi-
tive.) Now we’re getting somewhere: N = 1/e does what the definition requires, Clearing out pesky absolute
and we’re ready for a slick and seamless proof. value bars is a big help.

P ROOF. Let  > 0 be given. Set N = 1/. This N “works” because if n > N ,
then
1 1 1
|an − L| = = < = ,
n n N
which is what the definition requires. ♦

E XAMPLE 2. Let xn = (3n + 2)/(n + 5). Show that {xn } converges.

D ISCUSSION . First we need a candidate for L; a little thought or plugging in


large numbers suggests L = 3. As in Example 1, we manipulate the desired
inequality in search of a suitable N . This time we need a little more algebra: Again the annoying absolute
value eventually vanishes.
3n + 2 3n + 2 − 3(n + 5) −13 13
|xn − L| = −3 = = =
n+5 n+5 n+5 n+5
and
13 13 13
<  ⇐⇒ < n + 5 ⇐⇒ − 5 < n.
n+5  
13
So N =  − 5 does the job, and we’re ready for another brief proof.

P ROOF. Let  > 0 be given. Set N = 13  − 5. This N “works” because if


n > N , then (omitting some routine algebra in the second equality) we have
3n + 2 13 13 13
|xn − L| = −3 = < = 13 = ,
n+5 n+5 N +5  −5+5

just as the definition requires. ♦

E XAMPLE 3. Show that the oscillating sequence b1 , b2 , b3 , b4 , · · · = 1, −1, 1,


−1, . . . diverges.

i i

i i
i i

i i

76 2. Sequences and Series

D ISCUSSION . As in Example 1 the claim is hardly surprising. The new twist is


to prove a negative: No number L works in the definition. One approach involves
the fact that no single number L can be close (within 0.01, say) to both 1 and −1.

P ROOF. Assume, toward contradiction, that {bn } converges to any number L.


Let  = 0.01 and choose N as in the definition. If n0 is any odd integer with
n0 > N , then we have

|bn0 − L| = |1 − L| < 0.01 =⇒ L ∈ (0.99, 1.01).

Similarly, if n1 is an even integer with n1 > N , then

|bn1 − L| = |−1 − L| < 0.01 =⇒ L ∈ (−1.01, −0.99).

Thus L lies in two disjoint intervals, which is absurd. ♦

Seeing Sequences and Convergence


Like ordinary graphs in a calculus course, geometric views of sequences and con-
vergence help us visualize their behavior—good and bad. Different views are
possible.

Points on a line. Selected terms of a sequence {an } can be plotted as labeled


points on a line. The resulting diagrams are crude and limited, but they can illumi-
nate properties of sequences and convergence. Figure 2.1, for example, illustrates
the –N condition for convergence: All terms an with n > N lie within  of L.

Points in a plane. Terms of {an } can also be viewed as points (n, an ) on the
graph of the function a : N → R. Figure 2.2 offers glimpses of two sequences,
{1/n} and {sin n}. One converges to zero (as we’ve proved!); the other looks un-
Proving this is another matter. likely to converge to anything. Such graphs can reveal a lot, but never everything—
a sequence has infinitely many terms, and a picture shows only a tiny sample.
Sequence graphs can also show how  and N interact. The idea is to express
the key definition in graphical language: for any  > 0, no matter how small,
there is some N on the (horizontal) n-axis so that all graph points to the right of
N lie inside an “-band” around the horizontal line y = L, as Figure 2.3 suggests.

a1 a2 a4 a237 a238 aN a(N+1) a(N+1) a3 a5

L−є L L+є

Figure 2.1. Convergence: a one-dimensional view.

i i

i i
i i

i i

2.1. Sequences and Convergence 77

0.25
1.0

0.20

0.5
0.15

0.10 10 20 30 40 50

0.05 – 0.5

10 20 30 40 50 – 1.0

(a) A look at the sequence {1/n} (b) A look at the sequence {sin n}

Figure 2.2. Graphical views of two sequences.

L+є
L
L–є

n
0 10 20 30 40 50

Figure 2.3. What convergence means graphically.

Properties of Sequences
Sequences, like other real-valued functions, may or may not have various behav-
ioral properties. Here are some typical definitions:

Definition 2.2. Let {an } be a sequence of real numbers.

• Boundedness: {an } is bounded above if there exists M such that an ≤ M


for all n ∈ N ; it is bounded below if there exists m such that an ≥ m for
all n.
• Monotonicity: {an } is increasing if an ≤ an+1 for all n ∈ N ; {an } is
decreasing if an ≥ an+1 for all n ∈ N . {an } is monotone if it is either
increasing or decreasing.
• Strictness: {an } is strictly increasing if an < an+1 for all n ∈ N . {an } is
strictly decreasing if an > an+1 for all n ∈ N .

i i

i i
i i

i i

78 2. Sequences and Series

The sequence {1/n}, for example, is strictly decreasing and bounded (above and
below), while the Fibonacci sequence is increasing and unbounded (above).
The following two theorems link these properties to convergence and diver-
gence. Neither statement is surprising, but the formal proofs are nice exercises—
and left as exercises—in using the definition. Some pre-proof discussion follows
each result.
Theorem 2.3. If a sequence {an } is (i) monotone, and (ii) bounded, then {an }
converges.

Almost-a-proof discussion. Let’s assume that {an } is increasing; a similar proof


works for the decreasing case. Since the set {an } is bounded, it has a supremum,
Nice to see it turn up again. by the completeness axiom. Let’s call the supremum L, and show that L is the
limit, too. To this end, let  > 0 be given; we’re done if we find any N that
“works” for this .
Here’s the trick. Because L is the supremum, L −  is not an upper bound
for {an }, and so there must be some term, aN , with L −  < aN . The punchline
is that this N “works”: If n > N , then an ≥ aN because {an } is increasing;
therefore, we have
L −  < aN ≤ an ≤ L < L + ,
as desired.
Theorem 2.4. If a sequence {an } converges, then {an } is bounded both above
and below.

Discussion. Suppose {an } converges to L. If we set  = 1, then—by the defini-


We could play the same game tion—there is some N such that L − 1 < an < L + 1 for all n > N . In particular,
with smaller , but there’s no the “upper tail” {aN +1 , aN +2 , aN +3 , . . . } is bounded (above by L + 1 and below
need.
by L − 1). Now the “front end” {a1 , a2 , . . . , aN } is a finite set, and hence also
bounded. Thus the entire sequence {an } is the union of two bounded sets, and is
therefore bounded.

Beyond the basics: inequalities. The sequences in Examples 1 and 2 led to


relatively simple inequalities and, in turn, to relatively simple recipes for N in
In Example 2, we found N = terms of . Sequences with more complicated definitions may require more clev-
13/ – 5. erness. Fortunately, a little creativity with inequalities can dramatically simplify
the work. Following are two examples.

E XAMPLE 4. Show that the sequence {zn } with


1
zn = √
n+ n+1+5
converges to zero.

i i

i i
i i

i i

2.1. Sequences and Convergence 79

D ISCUSSION . But for the annoying denominator {zn } resembles {1/n}, which
converges to zero (see Example 1). To show that zn → 0, too, for given  > 0,
we need to find N for which
1 1
|zn − 0| = √ = √ <
n+ n+1+5 n+ n+1+5
whenever n > N . This looks clumsy, but a simple inequality brings radical
improvements:
1 1
|zn − 0| = √ < .
n+ n+1+5 n
Now it is easy to see that
1 1
<  ⇐⇒ n > ,
n 
which means that N = 1/ “works.” We assemble the parts in the concise proof.

P ROOF. Let  > 0 be given. Set N = 1 . If n > N then Check each step; note the key
inequality.
1 1 1 1
|zn − 0| = √ = √ < < =
n+ n+1+5 n+ n+1+5 n N
as the definition requires. ♦

E XAMPLE 5. Let wn = 4n/(2n − 85); show that {wn } converges to 2.

D ISCUSSION . This time the key quantity |wn − L| takes the form Check the final calculation.

4n 170
|wn − L| = −2 = ;
2n − 85 2n − 85
we want
170
|wn − L| = <
2n − 85
to hold for large n. It would be nice to drop the absolute value—alas, the de-
nominator, 2n − 85, may be negative. The good news is that this happens only
for n ≤ 42. If n > 42, then we can indeed drop the absolute value in good
conscience, and solve our inequality without undue fuss: But check all algebra carefully.

170 170 170 85


= <  ⇐⇒ + < n.
2n − 85 2n − 85 2 2
The last inequality is what we wanted—a value of n beyond which |wn − L| < .
Here comes the proof.

i i

i i
i i

i i

80 2. Sequences and Series

P ROOF. Let  > 0 be given. Set N = 170 85


2 + 2 . (Note that N > 42.) This N
works, since if n > N , then we have
 
 170 
since n ≥ 43 |wn − 2| =   = 170
2n − 85  2n − 85
170 170
a nice collapse! < = 170 = ,
2N − 85  + 85 − 85

as the definition requires. ♦

Exercises
1. If a sequence {xn } converges, then for any given  > 0 there is some N
that “works” in the sense of the definition. For the sequence {1/n} the
following table shows values of N associated with values of :

 1.000 0.100 0.010 0.001


N 1 10 100 1000

Make a similar table (same values of ) for each sequence following. Try
to choose N as small as possible.
 
(a) n12
 
(b) √1n
 
1
(c) 1+ln n

2. This problem is about –N tables for convergent sequences, like those in
the preceding problem (with  = 1, 0.1, 0.01, 0.001 in the first row).

(a) Explain why all entries in the second row can be the same.
(b) Consider the sequence {xn } with xn = 0 for all n. What goes in the
second row?
(c) Consider the sequence {yn } with yn = 1/d(n), where d(n) is the
number of base-ten digits in n. (For example, y123456 = 1/6.) What
goes in the second row?

3. Suppose that {xn } converges to 5.

(a) Show that there is some N such that xn ∈ (4.9, 5.1) for all n > N .
(b) Show that there is some N such that xn > 4.999 for all n > N .
(c) Show that the set {xn | xn > 6} is finite.

i i

i i
i i

i i

2.1. Sequences and Convergence 81

4. Suppose that {xn } does not converge.

(a) Is it possible that xn = 3 for infinitely many n? If so, give an example.


If not, explain why not.
(b) Is it possible that xn = 3 for all but finitely many n? If so, give an
example. If not, explain why not.

5. Suppose that {xn } converges to 4.

(a) Is it possible that xn = 4 for infinitely many n? If so, give an example.


If not, explain why not.
(b) Is it possible that xn > 4 for infinitely many n and xn < 4 for
infinitely many n? If so, give an example. If not, explain why not.

6. Suppose that {xn } is unbounded above. Use the definition of convergence


to show that {xn } does not converge to L = 1000.

7. Prove that each of the following sequences converges. (Example 2, page 75,
is similar.)

2n
(a) {an }, with an = .
3n + 5
2n + 300000
(b) {bn }, with bn = .
3n + 5
2n
(c) {cn }, with cn = 2 .
3n + 5

8. Guess and then prove a limit for each sequence following. (Examples 4 and 5
may be helpful.)

2n
(a) {an }, with an = .
3n − 5
2n
(b) {bn }, with bn = .
3n + sin n + 5
2n
(c) {cn }, with cn = (−1)n 2 .
3n + 5

9. Convert the informal discussion after Theorem 2.3, page 78, into a concise
proof that a bounded, decreasing sequence converges.

10. Convert the informal discussion after Theorem 2.4, page 78, into a concise
proof.

i i

i i
i i

i i

82 2. Sequences and Series

11. In this section we mentioned the Fibonacci sequence {fn }, defined by f1 =


f2 = 1 and fn = fn−2 +fn−1 for n ≥ 3. It is clear that {fn } is unbounded,
but how fast does {fn } increase? We explore this question in this problem.
Let’s show first, by induction, that fn < 2n for n ≥ 1. Because the Fi-
bonacci sequence is defined using two previous terms, it is convenient to
take both n = 1 and n = 2 as base cases.
The claim is obvious for n = 1 and n = 2. For the inductive step, we
suppose the claim holds for all n up through k (with k ≥ 2) and show, as
follows, that it holds for n = k + 1:

fk+1 = fk−1 + fk < 2k−1 + 2k < 2k + 2k = 2k+1 ,

as desired.

(a) Show by induction that fn > 1.5n for all n ≥ 11. (It is easy to check
with technology that the inequality is false for smaller n.)
(b) It can also be shown by induction (as in the preceding problem) that
fn > 1.6n for all “sufficiently large” n. Use technology to decide
which n have this property.
1
12. Consider the sequence {gn } defined by g1 = 1 and gn+1 = 1 + gn .

(a) Write out the first few terms of the sequence to see the Fibonacci
numbers pop up.
(b) Prove by induction that gn ≤ 2 for all n.
(c) Observe (with technology) √ that {gn } appears to hop back and forth
across the number φ = (1+ 5)/2 ≈ 1.618 (this is the famous golden
ratio). Prove this by showing (algebraically; no induction needed) that
(i) if gn > φ then gn+1 < φ; and (ii) if gn < φ then gn+1 > φ.

13. Here is a second, “unofficial” definition of convergence to a number L:


{xn } converges to L if, for every  > 0, we have |xn − L| <  for all but
finitely many n.

(a) Show that {1/n} converges to zero in the sense above.


(b) Show that if xn → 0 in the sense above, then xn → 0 in the “official”
sense defined in this section.
(c) What does it mean for a sequence {xn } not to converge to zero in the
sense above? (Negate the unofficial definition.)
(d) What does it mean for a sequence {xn } not to converge to zero in the
official sense? (Negate the official definition.)

i i

i i
i i

i i

2.2. Working with Sequences 83

14. From any given sequence {xn } we can form the related sequence {yn } =
{5xn +2}. Use the definition of convergence to show that if {xn } converges
to 42, then {yn } converges to . (First fill in the blank.)
15. Some sequences {xn } have –N tables (in the sense of Exercise 1, above)
of the following form:

 1.0 0.1 0.01 0.001 0.0001 0.00001 ...


N 0 0 0 0 0 0 ...

Which sequences are these?


16. Some sequences {xn } have –N tables (in the sense of Exercise 1, above)
of the following form:

 1.0 0.1 0.01 0.001 0.0001 0.00001 ...


N 5 5 5 5 5 5 ...

Which sequences are these?


17. Show that every real number β is the limit of an increasing sequence of
rational numbers. (Hint: Use the idea of infinite decimal expansion; see
Exercise 10, page 71.)

2.2 Working with Sequences


New Sequences from Old
As with other functions, “old” sequences can be combined in various ways to
form “new” ones. Naturally enough, convergence and divergence properties of a
built-up sequence reflect properties of the building blocks.
Theorem 2.5 (Algebra with convergent sequences). Let {an } and {bn } be con-
vergent sequences. Let a, b, and c be real numbers, with an → a and bn → b.
• Sums and differences: The sequence {an ± bn } converges to a ± b.

• Constant multiples: The sequence {can } converges to ca.

• Products: The sequence {an · bn } converges to a · b.

• Quotients: If b = 0 and bn = 0 for all n, then the sequence {an /bn }


converges to a/b.

Let’s use the theorem first; proofs come later.

i i

i i
i i

i i

84 2. Sequences and Series

E XAMPLE 1. InExample 2, page 75, we used the definition of convergence to


3n+2
show that n+5 converges to three. Could Theorem 2.5 have helped?

S OLUTION . Yes. Basic algebra gives

3n + 2 3 + 2/n 3 · 1 + 2 · n1
= = ,
n+5 1 + 5/n 1 + 5 · n1

which shows the original sequence as a combination of the much simpler se-
quences {1}, and {1/n}, which converge to 1 and 0, respectively. Now Theo-
rem 2.5 implies that

3 · 1 + 2 · n1 3·1+2·0
→ = 3,
1 + 5 · n1 1+5·0

as expected.
We just assumed, of course, that {1} and {1/n} do indeed converge to one
and zero. These claims need proof, too, but the proofs are easy—and need to be
done just once. ♦

E XAMPLE 2. Let {an } and {bn } be divergent sequences, and let {cn } be a
convergent sequence. Can the sum {an + bn } converge? Can it diverge? What
about {an + cn }?

S OLUTION . Theorem 2.5 says nothing about sums of divergent sequences. But
easy examples show that {an } and {bn } can either converge or diverge. With
an = n and bn = π − n, for example, we get an + bn = π for all n, so {an + bn }
Find your own example where converges.
{an + bn } diverges. Theorem 2.5 does help with {an + cn }; let’s call it {dn } for the moment. If
{dn } were convergent, then the difference {dn − cn } = {an } would converge,
too, contradicting our assumption. Thus, {an + cn } diverges. ♦

E XAMPLE 3. A sequence {sn } is defined recursively by

sn−1 1
s1 = 2.0 and sn = + for n > 1.
2 sn−1

The first few terms (rounded) are 2.0, 1.5, 1.41667, 1.41422, 1.41421, . . . . What
is happening here? Why?

i i

i i
i i

i i

2.2. Working with Sequences 85


S OLUTION . The numbers suggest convergence to 2, but can we be certain?
The answer is yes—if we invoke appropriate theorems. The definition implies
that sn > 0 for all n. It’s also true (and proved in exercises) that {sn } is decreas-
ing, and so Theorem 2.3, page 78, implies that {sn } converges to some limit L.
Invoking different parts of Theorem 2.5 lets us find L. Because sn → L, we know
sn−1 1 L 1
sn = + =⇒ L = + ,
2 sn−1 2 L
√ √
which implies, in turn, that L2 = 2, or L = 2. ♦ L = − 2 is clearly impossible
since all sn are positive.
Proving Theorem 2.5. Theorem 2.5 contains few surprises. Concerning sums,
for instance, it should seem reasonable that if an ≈ a and bn ≈ b for large n, then
also an + bn ≈ a + b for large n. Rigorous proofs are another matter, of course.
The definition of convergence is all about inequalities; therefore, so are con-
vergence proofs. Here, we’ll need to show that inequalities like
an a
|(an + bn ) − (a + b)| < , |an bn − (a ± b)| < , and − <
bn b
hold for large n. What we have to work with are

|an − a| <  and |bn − b| < ,

which do hold for large n, by hypothesis. The trick is to parlay these simpler
inequalities into proofs of their more complicated cousins. The triangle inequality
will come in very handy; watch for it in the following proof. Watch for a technical trick, too.

Proof (for sums): Let  > 0; we need to choose N so that |(an + bn ) − (a+ b)| <
 whenever n > N . Set  = /2; note  > 0. Because an → a, there is a number
N1 that “works” for  :

n > N1 =⇒ |an − a| <  .

Similarly, there exists N2 such that

n > N2 =⇒ |bn − b| <  .

Now let N be the larger of N1 and N2 . If n > N , then both n > N1 and n > N2 ,
and so

|(an + bn ) − (a + b)| = |(an − a) + (bn − b)|


≤ |an − a| + |bn − b| <  +  = ,

where we used the triangle inequality at the line break. This shows that N works
in the desired sense, and completes the proof. 

i i

i i
i i

i i

86 2. Sequences and Series

Working with products. To prove our claim about products we will use the cor-
responding properties for sums (just proved) and for constant multiples (left as an
We’ll see this again. exercise). The proof starts with a standard analyst’s trick: subtracting and adding
the same quantity:

an bn = an bn − an b + an b = an (bn − b) + an b.

The result for constant multiples shows that an b → ab; we’ll be done if we can
also show that an (bn − b) → 0. The key insight, as we will see in the formal
proof, is that the {an } are bounded.

Proof (for products): First we write an bn = an (bn − b) + an b. By the result for


sums, it’s enough to show that

an b → ab and an (bn − b) → 0.

And left as an exercise. That an b → ab follows from the property of constant multiples that we assumed.
To show an (bn − b) → 0, observe first that the convergent sequence {an } is
bounded (Theorem 2.4, page 78, says so); in other words, there exists M > 0
with |an | ≤ M for all n. Now let  > 0 be given; note that /M > 0, too. Since
bn → b, there exists N such that |bn − b| < /M when n > N . This N works
for {an (bn − b)}, because if n > N , then

|an (bn − b) − 0| = |an | |bn − b| ≤ M |bn − b| < M = ,
M
as desired. 

Quotients. To show an /bn → a/b requires—even to make sense—that b = 0


and bn = 0 for all n. If we assume this, it is enough to show that 1/bn → 1/b, for
then the result for products gives an · 1/bn → a · 1/b, as desired. We will outline
a proof that 1/bn → 1/b in the exercises.

Squeezing. The algebraic methods of Theorem 2.5 don’t immediately help with
the sequence {sin n/n}, which has a trigonometric ingredient. Still, we expect
the sequence to converge to zero because the numerator remains tamely bounded,
while the denominator “blows up.” More precisely, we know
1 sin n 1
− ≤ ≤
n n n
for all n. Both the left- and right-hand sequences converge to zero, and we expect
them to “squeeze” the middle sequence to the same limit. That intuition is correct:
Theorem 2.6 (The squeeze principle). Let {an }, {bn }, and {cn } be sequences
such that an ≤ bn ≤ cn for all n. If an → L and cn → L, then bn → L, too.

i i

i i
i i

i i

2.2. Working with Sequences 87

Proof: For given  > 0, we need to find N such that n > N implies |bn − L| < ,
or, equivalently, L −  < bn < L + .
Because an → L we can choose N1 so

n > N1 =⇒ L −  < an < L + .

Similarly, there is N2 so

n > N2 =⇒ L −  < cn < L + .

Now let N = max{N1 , N2 }. This N works for {bn }, since if n > N then

L −  < an ≤ bn ≤ cn < L + ,

as desired. 

Theorem 2.6 points to additional “squeeze-like” properties of sequences.

Proposition 2.7 (More squeezing). Let {xn }, {an }, and {bn } be sequences and
L a number.

(a) xn → 0 ⇐⇒ |xn | → 0

(b) If an → L, then |an | → |L|.

(c) If |an | → 0 and {bn } is bounded, then an bn → 0.

Proof: Claim (a), left as an exercise, is a basic application of the definition.


Claims (b) and (c) follow from (a) by judicious squeezing. For (b), notice first
that an − L → 0 by hypothesis, and so |an − L| → 0, according to (a). The
reverse triangle inequality now gives our squeezing inequality: Here one sequence is constant.

0 ≤ ||an | − |L|| ≤ |an − L|

Since the right-hand sequence tends to zero, so must the middle one, as we aimed
to show.
For (c), we first use boundedness of {bn } to choose B > 0 with |bn | ≤ B for
all n. This leads to another squeezing inequality:

0 ≤ |an bn | ≤ B |an | .

Again, the left- and right-hand sequences tend to zero (the constant multiple B
does no harm) and therefore squeeze the middle sequence to the same limit. 

i i

i i
i i

i i

88 2. Sequences and Series

Sequences to order. Sequences with specified properties can often be made to


order, as the following sample suggests. We’ll call it a lemma because such se-
The German Hilfsatz, or quences are often used in proofs of other results. (Lemmas are junior-grade theo-
“helping sentence,” is more rems, normally used to prove something else.)
descriptive.
Lemma 2.8. Let L be any number. There exist sequences {rn } and {pn }, both
converging to L, with rn ∈ Q and pn ∈ / Q for all n. If desired, {rn } and {pn }
and can be chosen to be either strictly increasing or strictly decreasing.

About proofs. If L is rational, then the sequences defined by



1 2
rn = L + and pn = L +
n n
are strictly decreasing and converge to L. Other cases are left to the exercises.

Divergence to Infinity
Sequences like {n} and {−n3 } clearly have no finite limit, but they misbehave
less seriously than, say, the zig-zag sequence {1, −2, 3, −4, . . . }. The following
definition formalizes these ideas.
Definition 2.9. A sequence {xn } diverges to infinity if for every M > 0 there
exists a number N such that

xn > M whenever n > N.

In this case, we write limn→∞ xn = ∞, or just xn → ∞.

Observe:
• Divergence to −∞: A similar definition holds for divergence to −∞: For
given M > 0 there must exist N with xn < −M whenever n > N .
• Big M , small : For ordinary convergence we focus mainly on small posi-
tive values of ; here the challenging values of M are large.
• Convergence or divergence? Some authors refer to convergence to ∞; we
prefer to reserve “convergence” for finite limits.
• Unboundedness and divergence to infinity: An unbounded sequence need
not diverge to ±∞, as {1, −2, 3, −4, . . . } illustrates. An unbounded mono-
tone sequence, on the other hand, must diverge to ±∞; see Example 5.
• Zero or infinity? A sequence {xn } of positive terms diverges to ∞ if and
only if {1/xn } converges to 0. (Proofs follow directly from the definitions;
see the exercises.) A similar result holds for negative sequences.

i i

i i
i i

i i

2.2. Working with Sequences 89

Swept away: a comparison test. Here’s an unsurprising claim about comparing


one sequence to another:

If an ≤ bn for all n and an → ∞, then bn → ∞, too.

(A similar claim holds for sequences tending to −∞.) Proofs follow easily from
the definitions; see the exercises. The surprise is how powerful this straightfor-
ward idea can be in applications.

E XAMPLE 4. The sequences {hn } and {sn } given by

1 1 1 1 1 1 1 1
hn = + + + ··· + , sn = + √ + √ + ··· + √
1 2 3 n 1 2 3 n

are positive and increasing. Do they diverge to infinity?

S OLUTION . In a word, yes. Observe first that sn ≥ hn for all n, so it is enough


to show that hn → ∞. One approach is to recall from elementary calculus that If using unproved calculus
results seems like cheating, see
 n
1 1 1 1 dx the exercises for another
hn = + + + · · · + > = ln n. approach.
1 2 3 n 1 x

It is well known that ln n → ∞, and so both {sn } and {hn }, being larger, are
also “swept away” to ∞. ♦

E XAMPLE 5. Prove concisely that if {xn } is unbounded and increasing, then


xn → ∞.

S OLUTION . Let M > 0 be given. Since {xn } is unbounded, there exists N


with xN > M . This N works in the definition: if n > N then, since {xn } is
increasing, we have xn ≥ xN > M , as desired. ♦

Exercises
1. Prove the following part of Theorem 2.5, page 83: If an → a and c is any
constant, then can → ca. (Hint: The result is trivial if c = 0, so assume
c = 0.)

2. Another part of Theorem 2.5, page 83, says that an /bn → a/b if b = 0 and
bn = 0 for all n. To complete the proof sketched in this section, we need to
show that 1/bn → 1/b.

(a) Explain why | b1n − 1b | = 1


|bn b| |bn − b|.

i i

i i
i i

i i

90 2. Sequences and Series

(b) We will show just below that the sequence {1/|bnb|} is bounded, say
by M > 0. Assuming this for the moment, prove that 1/bn → 1/b.
(Hint: The preceding identity gives | b1n − 1b | < M |bn − b|. Now argue
as in the proof for products of sequences.)
(c) Show in two steps that {1/|bnb|} is bounded.
(i) Show that the set {bn } is bounded away from zero—i.e., there
is some δ > 0 such that |bn | ≥ δ for all n. (Hints: Let  =
|b|/2 > 0. Since bn → b there is an integer N such that
|bn − b| <  when n > N ; note that |bn | > |b|/2 for all such n.
The remaining set {|b1 |, |b2 |, . . . , |bN |} is a finite set of positive
numbers, and so has a positive minimum. Use these facts to find
a suitable value of δ.)
(ii) Show that 1/|bnb| < 2/(δ|b|) for all n .

3. Prove part (a) of Proposition 2.7: xn → 0 ⇐⇒ |xn | → 0.

4. This problem is about Lemma 2.8, page 88.



(a) What does the lemma say if L = 2?
strictly decreasing sequence {pn } with pn ∈
(b) Find a√ / Q for all n and
pn → 2.

√a strictly increasing sequence {rn } with rn ∈ Q


(c) Describe how to find
for all n and rn → 2.

5. Consider the sequence {sn } in Example 3, page 84. Show by induction that
{sn } is strictly decreasing; i.e., show sn+1 < sn for all n ≥ 1.

6. Consider the sequence {sn } given by

1 1 1
sn = + √ + ··· + √ .
1 2 n

We showed in Example 4, page 89, that {sn } diverges√to infinity. Give


another comparison proof, this time with the sequence { n}.

7. Consider again the sequence {hn } in Example 4, page 89. Observe that

1 1 1 1
h2n = hn + + ··· + ≥ hn + n · = hn + .
n+1 2n 2n 2

Use this idea to prove (without calculus) that {hn } diverges to infinity.

i i

i i
i i

i i

2.2. Working with Sequences 91

8. The sequence {Sn } given by

1 1 1 1
Sn = + 2 + 2 + ··· + 2
1 2 3 n
is clearly increasing, so it either converges or diverges to infinity. Which
happens? To decide we work with the similar series {Tn } given by

1 1 1 1
Tn = + 2 + 2 + ··· + 2 .
1+1 2 +2 3 +3 n +n

(a) Use technology to evaluate some terms of both {Sn } and {Tn }. Do
they appear to converge or diverge?
(b) Guess a simple formula for Tn ; prove your guess by induction.
(c) Conclude from the preceding part that Tn → 1.
(d) Prove that {Sn } converges to some limit L ≤ 2. (Hint: Show first
that Sn ≤ 2Tn for all n ≥ 1.)

9. Let {xn } be a sequence of positive terms.

(a) Prove that if xn → ∞, then −xn → −∞. (The converse is also true,
and the proof is almost identical.)
(b) Show that xn → ∞ if and only if 1/xn → 0.
(c) State and prove a similar claim for sequences of negative terms. (Use
the first two parts.)
√ √
10. Suppose an > 0 for all n and an √→ 3. Show that an → 3. (Hint:

Show first by algebra that | an − 3| < |an − 3|.)

11. Use theorems from this section (not the definitions of convergence) to dis-
cuss each of the following limits. It is OK to assume such basic facts as
1/n → 0, but say what you’re assuming.
 
2n + 3 sin n
(a)
5n + cos n
 
(b) n2 + 1
 
(c) n2 + n − n
 2 
n + arctan n
(d)
n+2

i i

i i
i i

i i

92 2. Sequences and Series

2.3 Subsequences
Basic Ideas
Any given sequence x1 , x2 , x3 , x4 , . . . has many, many subsequences: new infi-
nite sequences, such as

x1 , x3 , x5 , x7 , . . . , x1 , x4 , x9 , x16 , . . . , and x123 , x124 , x125 , x126 , . . . ,

formed by choosing, in order, any infinite subset of the original xn . The last
example could be called an upper tail subsequence, formed simply by skipping
over an initial string. Order matters, and repetitions aren’t allowed, so

x2 , x1 , x4 , x3 , x6 , x5 , . . . and x1 , x1 , x2 , x2 , x3 , x3 , . . .

are not considered subsequences of the “parent” {xn }.


Subsequences may or may not behave much like their parents. If, say,

x1 , x2 , x3 , x4 , · · · = 1, 2, 1, 2, . . . ,

then {xn } has no single limit, and therefore diverges. But the subsequences

x1 , x3 , x5 , · · · = 1, 1, 1, . . . and x2 , x4 , x6 , · · · = 2, 2, 2, . . .

obviously converge to 1 and 2, respectively. Still other subsequences, such as

x3 , x6 , x9 , x12 , . . . and x1 , x10 , x100 , x1000 , . . .

may or may not converge. By contrast, the sequence {yn } with

y1 , y2 , y3 , y4 , · · · = 1.0, 0.1, 0.01, 0.001, . . .

converges to zero—and so does every one of its subsequences, including

y1 , y3 , y5 , . . . y83 , . . . and y1 , y10 , y100 , . . . , y1041 , . . . .

Stranger examples are possible.

E XAMPLE 1. (A walk along the rationals.) Because Q is countably infinite, it


can be listed as a sequence r1 , r2 , r3 , r4 , . . . . Is there a subsequence consisting
entirely of positive integers? Must some subsequence converge to zero?

i i

i i
i i

i i

2.3. Subsequences 93

S OLUTION . Yes and yes. Lacking rigorous definitions, we’ll argue (very!) in- Coming soon.
formally.
To find a subsequence of positive integers, imagine walking from left to right
along the rational sequence, underlining each term that happens to be a positive
integer. The result might look like this:

r1 , r2 , r3 , r4 , r5 , r6 , . . . , r23 , r24 , r25 , . . . , r1234 , r1235 , . . . .

The process never stops because the supply of positive integers is infinite, so we
have our desired subsequence:

r2 , r3 , r24 , r1235 . . . .

To find a subsequence that converges to zero, recall first that for every positive
, no matter how small, the interval (−, ) contains infinitely many rationals. To
find our desired subsequence, therefore, we walk again from left to right along the
original sequence. At some position, say a9 , we find a9 ∈ (−1, 1). Continuing
our rightward walk, we find, say,

a17 ∈ (−0.1, 0.1), a137 ∈ (−0.01, 0.01), a2988 ∈ (−0.001, 0.001),

and so on. We never need to stop because, at any stage, we’ve left behind only
finitely many of the infinite family of residents of (−, ). ♦

Similar reasoning shows that any listing {rn } of Q has subsequences consist-
ing entirely of prime numbers or entirely of fractions with denominator 424242.
It is less obvious—but true—that {rn } has an increasing subsequence with limit
π, a decreasing subsequence with limit e, a decreasing subsequence of integers
diverging to −∞, and countless other subsequences of interest. We sort out such
possibilities in this section.

Formalities. The idea of subsequences is simple enough but the notation takes
some getting used to. To create a subsequence from a given sequence {an } means
to choose a strictly increasing sequence of subscripts

n1 < n2 < n3 < n4 < n5 < . . . ,

and use them to form the subsequence

an1 , an2 , an3 , an4 , an5 , . . . .

If, say, n1 = 4, n2 = 7, n3 = 11, n4 = 29, . . . , then the subsequence has the


form
a4 , a7 , a11 , a29 , . . . .
The entire subsequence is denoted {ank }; note the double subscript.

i i

i i
i i

i i

94 2. Sequences and Series

The process can be described precisely in the language of functions. Recall,


first, that a sequence {an } is a function a : N → R, with a(1) = a1 , a(2) = a2 ,
etc. From this viewpoint a subsequence is formed by composition, as the formal
definition says:

Definition 2.10 (Subsequence). Let {an } be a sequence, regarded as a function


a : N → R. A subsequence {ank } of {an } is a composite function a◦n : N → R,
where n : N → N is any strictly increasing function.

Observe:
• A useful inequality: The definition implies a simple inequality that is use-
ful in proofs: nk ≥ k for all k. A formal proof might involve induction
or the pigeonhole principle, but the idea is mainly common sense—the kth
term of a subsequence can’t appear before the kth term of the parent se-
quence.
• Another subsequence: The subsequence indices n1 , n2 , n3 , n4 , . . . for
{ank } form still another subsequence—a strictly increasing subsequence
of {1, 2, 3, . . . }.

E XAMPLE 2. Let {an } be a sequence. Interpret the subsequences

a1 , a 3 , a 5 , a 7 , . . . and a2 , a4 , a6 , a8 , . . .

in functional language and notation. What can be said about {an } if both subse-
quences converge to three?

S OLUTION . For the “odd” subsequence we have n(1) = 1, n(2) = 3, and


n(42) = 83; in general, n(k) = nk = 2k − 1. Thus,

a ◦ n(k) = a(n(k)) = a(2k − 1)

for all k. In ordinary sequence notation, we can write {ank } = {a2k−1 }; notice
that k, not n, is now the index variable. For the “even” subsequence similar
reasoning gives {ank } = {a2k }.
If both subsequences {a2k−1 } and {a2k } converge to three, then it is reason-
A bit laboriously. able to expect the parent sequence {an } to do so as well. To prove this let  > 0
be given. By hypothesis, there exist numbers K1 and K2 such that

k > K1 =⇒ |a2k−1 − 3| <  and k > K2 =⇒ |a2k − 3| < .

Now it turns out that N = max {2K1 , 2K2 } “works” for  in the parent sequence.

i i

i i
i i

i i

2.3. Subsequences 95

To see why, suppose n > N . If n = 2k happens to be even, then n = 2k >


2K2 , and so k > K2 , which implies that

|an − 3| = |a2k − 3| < .

If n = 2k − 1 is odd, then n = 2k − 1 > 2K1 , and so k > K1 , and we see

|an − 3| = |a2k−1 − 3| < .

Thus we have |an − 3| <  for all n > N , and the proof is complete. ♦

Properties of Subsequences
Every infinite sequence {xn } has countless subsequences. What can be said about Uncountably many, in fact.
such an enormous set? The answer is, “quite a lot”: subsequences often “inherit”
their parents’ basic properties.
Theorem 2.11. Let {xn } be a sequence and L a number.
(a) If {xn } converges to L, then every subsequence {xnk } converges to L, too.
(b) If {xn } diverges to ±∞, then every subsequence {xnk } diverges to ±∞,
too.
(c) If {xn } has subsequences converging to different limits, then {xn } di-
verges.

About proofs. Key to both proofs is the fact, mentioned above, that, for any sub-
sequence, nk ≥ k for all k. To prove (a), let  > 0 be given. By hypothesis there
exists N that works for {xn } in the sense that |xn − L| <  whenever n > N .
The key fact above implies that the same N works for {xnk }; if k > N then
nk ≥ k > N , and so |xnk − L| < , as desired.
The proof of (b) is similar, and (c) follows immediately from (a). Further
details are left to exercises.

Monotone subsequences. Following is a striking property of every sequence;


we’ll make good use of it below in proving this section’s marquee result, the
celebrated Bolzano–Weierstrass theorem.
Proposition 2.12. Every sequence has a monotone subsequence.

Proposition 2.12 is easy to state, but it’s a bit tricky to prove anything about all “Nontrivial,” in math-speak.
sequences—convergent or divergent, bounded or unbounded, tame or wild. Here,
for instance, is a randomly-chosen stretch (from n = 125 to n = 130) of terms
from the sequence {n cos(n2 )}:

. . . , 35.617, −4.847, 126.746, −106.052, −128.983, −25.531, . . . .

i i

i i
i i

i i

96 2. Sequences and Series

It is hard to see much pattern there, but Proposition 2.12 guarantees that some-
where in there is an increasing subsequence, a decreasing subsequence, or maybe
both.
We’ll sneak up on a proof of Proposition 2.12 through two technical lemmas
about special cases.
Lemma 2.13. Every unbounded sequence {xn } has a monotone subsequence
that diverges to ±∞.

Proof (sketch): For a sequence {xn } unbounded above, we’ll find an increasing
sequence {xnk } with xnk > k for all k. Since {xn } is unbounded above, we can
choose n1 so xn1 > 1. Now the “upper tail”

xn1 +1 , xn1 +2 , xn1 +3 , xn1 +4 , . . .

Do you see why? is also unbounded above, and so we can choose n2 with n2 > n1 and xn2 >
max{2, xn1 }. Then we choose n3 > n2 with xn3 > max{3, xn2 }. Continuing
this process produces the desired subsequence. A similar construction produces a
strictly decreasing subsequence if {xn } is unbounded below. 

Lemma 2.14. Let {xn } be a bounded sequence, with infimum α and supremum β.
If α ∈/ {xn }, then there is a decreasing subsequence {xnk } with xnk → α. If
β∈ / {xn }, then there is an increasing subsequence {xnk } with xnk → β.

Proof (sketch): To save a little labor we’ll use Lemma 2.13 and some fancy alge-
bra. In the case β ∈
/ {xn }, we define a new sequence {yn } by the rule
1
yn = .
β − xn
Do you see why? Now {yn } is unbounded above, and so Lemma 2.13 guarantees that there is an
increasing subsequence {ynk } with ynk → ∞. But this implies that
1
= β − xnk → 0.
ynk
This implies, in turn, that {xnk } is increasing, with limit β. A similar argument
applies if α ∈
/ {xn }. 

At last we can prove Proposition 2.12. Watch for the completeness axiom to
pop up, and for Lemma 2.14 to provide the key technical insight.
Proof (of Proposition 2.12): Let {xn } be our sequence. If {xn } is unbounded,
we’re done, by Lemma 2.13. So we’ll assume that
(i) {xn } is bounded, and (ii) {xn } has no increasing subsequence,
and use these assumptions to construct a decreasing subsequence.

i i

i i
i i

i i

2.3. Subsequences 97

To get started, let β1 = sup{x1 , x2 , x3 , . . . }. (Assumption (i) and the com-


pleteness axiom guarantee that β1 exists.) The key observation is that β1 is in the
set {x1 , x2 , x3 , . . . }. Otherwise, says Lemma 2.14, some increasing subsequence
would converge to β1 . Thus, we can find n1 with xn1 = β1 ; this is the first term
of our desired subsequence.
To continue, we set

β2 = sup {xn1 +1 , xn1 +2 , xn1 +3 , . . . } ,

Again, β2 exists by the completeness axiom, and Lemma 2.14, applied this time
to the upper tail sequence

xn1 +1 , xn1 +2 , xn1 +3 , xn1 +4 . . . ,

implies that β2 = xn2 for some n2 > n1 . It is clear, too, that β2 ≤ β1 , as β2


bounds a smaller set than does β1 .
Continuing this process indefinitely produces the desired decreasing subse-
quence {xn1 , xn2 , xn3 , . . . }, and the proof is complete. 

A big theorem. It is now easy to prove a famous theorem, which we’ll use re-
peatedly. We’ve done all the hard work. Starting in the very next section.

Theorem 2.15 (Bolzano–Weierstrass). Every bounded sequence {xn } has a con-


vergent subsequence.

Proof: By Proposition 2.12, {xn } has a monotone subsequence {xnk }, which is


also bounded because {xn } is. By Theorem 2.3, page 78, every monotone and
bounded sequence converges. 

Exercises
1. The Bolzano–Weierstrass theorem (BWT) says that if a sequence {xn } is
bounded, then {xn } has a convergent subsequence.

(a) State the converse and the contrapositive of the BWT. Disprove the
false one.
(b) Consider the sequences {yn } and {zn } defined by yn = sin n and
zn = sinn n . What can be said about their subsequences? Is the BWT
helpful? Is it needed?
(c) Show (assuming the BWT) that every sequence {xn } has either (i) a
convergent subsequence, or (ii) a subsequence that diverges to ±∞.
Can both (i) and (ii) occur?

i i

i i
i i

i i

98 2. Sequences and Series

2. Give an example in each part as indicated; no proofs needed.

(a) A sequence with subsequences converging to 1, 2, and 3.


(b) A convergent sequence with a subsequence of positive terms and an-
other subsequence with negative terms.
(c) A sequence with subsequences converging to 0 and to ∞.
(d) A positive sequence with monotone subsequences converging to 0 and
to ∞.
(e) A sequence of positive integers with subsequences that converges to
every positive integer.

3. Because Q is countably infinite, we know that it can be written as a se-


quence.

(a) Explain why the set of nonnegative rationals can also be written as a
sequence, say, {pn }.
(b) Give a reason why {pn } cannot be monotone.
(c) Although {pn } itself is not monotone, it must have a monotone sub-
sequence of positive integers. Explain why.

4. Let {xn } be any sequence of numbers and its upper tail subsequence {xnk }
given by x4242 , x4243 , x4244 , . . . . Show that xn → L if and only if
xnk → L.

5. Consider the sequence {xn } defined by xn = (−1)n n+1


n
.

(a) Find the subsequences {x2k } and {x2k−1 }. What are their limits?
(No proofs needed.) What does the answer imply about convergence
of {xn }?
(b) Let {xnk } be any subsequence of {xn }. Show that if {xnk } con-
verges, then it must converge either to 1 or to −1.

6. Let {xn } be a sequence that does not converge to three.

(a) Show by an example that xn = 3 can hold for infinitely many n.


(b) Show that there exists some  > 0 and a subsequence {xnk } such that
|xnk − 3| >  for all k.

7. Show that if {xn } diverges and x0 is any number, then there exists  > 0
and a subsequence {xnk } such that |xnk − x0 | >  for all k. (In other
words, some subsequence {xnk } is “bounded away from x0 .)

i i

i i
i i

i i

2.4. Cauchy Sequences 99

8. This problem is about Theorem 2.11, page 95.


(a) Prove Theorem 2.11(b).
(b) State the contrapositive of Theorem 2.11(a). How is this related to
Theorem 2.11(c)?
9. Let {xn } be a sequence and x0 a number. Show that xn → x0 if and only
if xnk → x0 for every monotone subsequence {xnk }.
10. Suppose the sequence {xn } converges to x0 . Show that there exists a sub-
sequence {xnk } with |xnk − x0 | < 1/10k for all k. (In other words, some
subsequence converges rapidly to x0 .)
11. Let {xn } be a sequence and x0 a number.
(a) Show that xn → x0 if and only if for every  > 0 the set {n | xn ∈ /
(x0 − , x0 + )} is finite.
(b) Show that some subsequence {xnk } converges to x0 if and only if for
every  > 0 the set {n | xn ∈ (x0 − , x0 + )} is infinite.

2.4 Cauchy Sequences


The obvious way to prove that a sequence {xn } converges is to know or guess a
limit, say L, and then show that xn ≈ L for large n (in the precise sense of the
definition). For some sequences no obvious candidate for L presents itself, but
we may know instead that the xn are close to each other for large n. Consider,
for instance, the sequence {sn }:
1 1 1 1 1 1
1, 1 − , 1 − + , 1 − + − , . . . .
3 3 5 3 5 7
Here are approximate numerical values for the first few sn :
1.00, 0.667, 0.867, 0.724, 0.835, 0.744, 0.821, 0.754, 0.813, . . . .
Successive sn appear to jump back and forth across smaller and smaller intervals.
Does {sn } approach some limit?
In this particular case the answer is classical. Our sequence {sn } is derived
from the famous Leibniz series
1 1 1 1 1 1
1− + − + − + − ...,
3 5 7 9 11 13
which has been known for at least 300 years to converge to π/4 ≈ 0.7854. More
generally, {sn } illustrates the notion of a Cauchy sequence, named for the French
mathematician Augustin–Louis Cauchy (1789–1857), a key figure in the devel-
opment of real analysis.

i i

i i
i i

i i

100 2. Sequences and Series

Cauchy Basics
The formal definition describes precisely what we mean by “close to each other
for large n.”

Definition 2.16. A sequence {xn } is Cauchy if, for every  > 0, there exists N
such that
|xn − xm | <  whenever n > m > N.

Observe:
• Similar, but different: The definition resembles that for convergence, but
with a key difference: no limit L is mentioned.
• Not just consecutive terms: The definition requires that all terms with large
index be close to each other. This applies not only to consecutive terms, like
x12345 and x12346 , but also to any two terms with large index, like x12345
and x98765 .
• A minor convenience: The condition n > m in the definition is sometimes
convenient in proofs. This apparent asymmetry is actually harmless, be-
cause the case n = m is trivial, and we lose no generality in using n to
denote the larger of two indices.


E XAMPLE 1. As we know, the sequence {1/n} converges to zero, while { n}
diverges to infinity. Is either sequence Cauchy?

S OLUTION . The sequence {1/n} is Cauchy. Intuitively, we expect that, since


terms approach zero, they must also stay close to each other. To prove this for-
mally, let  > 0 be given, and set N = 1/. This N “works,” since if n > m > N ,
Note where we use n > m. then
1 1 1 1 1 1
|xn − xm | = − = − < < = ,
n m m n m 1/
as the definition requires.

The sequence {√ n} is not Cauchy—even√though the difference between suc-
cessive terms (like 123456 ≈ 351.363 and 123457 ≈ 351.364) tends to zero.
We can prove this formally by showing that if  = 1, then no N works in the sense
of the definition. Indeed, let N be any positive number, and let k be any positive
integer with k 2 > N . If we set m = k 2 and n = (k + 1)2 , then
√ √
n > m > N but n − m = 1 = ,

and so the definition is not satisfied. ♦

i i

i i
i i

i i

2.4. Cauchy Sequences 101

E XAMPLE 2. The sequence {sn } at the beginning of this section is Cauchy.


Explain why.

S OLUTION . The key idea, on which a formal proof can be based, is the se-
quence’s back-and-forth behavior:
s 2 < s4 < s6 < s8 < · · · < s 7 < s5 < s3 < s1 ,
combined with the fact that the distance between successive terms tends to zero.
If, say,  = 0.001, we could set N = 1000, and observe that if n > m > 1000,
then
1
s1000 < sn , sm ≤ s1001 = s1000 + ,
1001
which implies that sn and sm lie within 1/1001 of each other. ♦

Morals from the examples. The examples suggest, correctly, a close connec-
tion between sequence convergence and the Cauchy property. Indeed, the two
properties turn out to be equivalent. As we’ll see, it is easy to show that every
convergent sequence is also Cauchy. The fact that every Cauchy sequence con-
verges is deeper, and proving it takes a little more work. The Bolzano–Weierstrass
theorem—another convergence guarantee—will be useful.

Properties of Cauchy Sequences


First we pick two low-hanging fruits.
Proposition 2.17. If {xn } converges, then {xn } is Cauchy.

The basic idea is that if both xn and xm are eventually close to a limit L, then
they must also be close to each other. The proof makes this precise.
Proof: Suppose xn → L. For given  > 0, we can choose N such that |xn −L| <
/2 whenever n > N . This N works in the Cauchy sequence definition, because Why is it OK to use /2, not ?
if n > m > N , then
 
|xn − xm | ≤ |xn − L| + |xm − L| < + = ;
2 2
we used the triangle inequality in the first step. 
Proposition 2.18. If {xn } is Cauchy, then {xn } is bounded.

Proof: For  = 1, choose N as in the Cauchy definition. Now fix any integer
m0 with m0 > N . If n > m0 , then we have |xn − xm0 | < 1, or, equivalently,
xm0 − 1 < xn < xm0 + 1. In particular, the set {xm0 , xm0 +1 , xm0 +2 , . . . } is
bounded (above by xm0 + 1 and below by xm0 − 1). Since the remaining terms
{x1 , x2 , . . . xm0 −1 } form a finite set, the entire sequence {xn } is bounded. 

i i

i i
i i

i i

102 2. Sequences and Series

Combining Proposition 2.18 with the Bolzano–Weierstrass theorem lets us prove


Watch for another /2 trick. our main theoretical result.

Theorem 2.19. A sequence {xn } converges if and only if {xn } is Cauchy.

Proof: Proposition 2.17 is the “only if” part. To prove the “if” part, suppose that
{xn } is Cauchy. Proposition 2.18 implies that {xn } is bounded; by the Bolzano–
Weierstrass theorem, {xn } has a subsequence {xnk } that converges to some limit,
say, L. To complete the proof, we’ll show that the full sequence {xn } also con-
verges to L.
Let  > 0 be given. Since {xn } is Cauchy, we can choose N1 such that

|xn − xm | < /2 whenever n > m ≥ N1 .

Because {xnk } converges to L, we can choose a member of the subsequence, say


Infinitely many possible xN xN , with N > N1 and |xN − L| < /2. Now this N works in the definition of
exist; any one will do. convergence of {xn } to L, because if n ≥ N , then
 
|xn − L| ≤ |xn − xN | + |xN − L| < + = ,
2 2
as desired. 

E XAMPLE 3. A “random walk” sequence a1 , a2 , a3 , . . . is produced iteratively,


with help from a fair coin. First we flip the coin and set a1 = 1 if heads show
and a1 = −1 otherwise. Then we flip again and set a2 = a1 + 1/2 for heads and
a2 = a1 − 1/2 for tails. We flip again at each stage, and set

an + 21n if heads,
an+1 =
an − 21n if tails.

Particular values of ak depend, of course, on random coin flips. Here’s what


Some decimals are rounded. happened on one try:

−1, −1.5, −1.25, −1.125, −1.1875, −1.1563,


−1.1406, −1.1484, −1.1445, −1.1426, −1.1436, ....

Must every such sequence converge?

S OLUTION . Yes, thanks to Theorem 2.19. The sequence {an } is Cauchy—no


matter how the coin falls. To prove this formally observe first that, for any an and
am with n > m, we have

i i

i i
i i

i i

2.4. Cauchy Sequences 103

1 1 1
|an − am | = ± ± ± · · · ± n−1
2m 2m+1 2
1 1 1
≤ m + m+1 + · · · + n−1
2 2 2
1 1 1 1
= m−1 + 2 + · · · + n−m
2 2 2 2
1
< m−1 .
2
Now for given  > 0, we can choose N with 1/2N −1 < . This N works in the
Cauchy definition, because if n > m ≥ N , then, as just shown,
1 1
|an − am | < ≤ N −1 < ,
2m−1 2
as desired. ♦

Cauchy, convergence, completeness: crucial C-words. This section’s main re-


sult, that Cauchy sequences converge, is not obvious; proving it took planning
and effort. The work is worthwhile because it guarantees that sequences like
those of Example 3, for which the terms become close together in a strong sense,
do indeed have specific numerical limits. Without such guarantees it would be
difficult, for example, to define the integral of a function (another kind of limit)
unambiguously. As we’ll do later.
Another C-word—completeness—is at the heart of Theorem 2.19. Complete-
ness appears implicitly in the proof, by way of the Bolzano–Weierstrass theorem,
which itself required the completeness axiom. (We invoked it in proving Proposi-
tion 2.12, page 95, for example.) Indeed, completeness is sometimes defined not
in terms of the supremum (as was done earlier; see page 65) but rather in terms of
Cauchy sequence convergence. We pursue this connection briefly in the exercises.

Exercises
1. Show that each of the following sequences either is or is not Cauchy. (Use
the definition, not theorems.)
(−1)n
(a) {xn }, where xn = n .
(−1)n
(b) {yn }, where yn = 1234 .
(c) {zn }, where zn = n+1
n
.
sin n
(d) {wn }, where wn = n2 +1 .

2. Let {xn } and {yn } be Cauchy sequences and C a constant. Use Defini-
tion 2.16 to show that {xn + yn } is Cauchy, too.

i i

i i
i i

i i

104 2. Sequences and Series

3. Let {xn } be a Cauchy sequence such that x1 = 0 = x10 = x100 = x1000 =


. . . . Use Definition 2.16 (not theorems) to show that {xn } converges to
zero.
4. Let {xn } be a Cauchy sequence, with xn ∈ Z for all n. Show that {xn }
is “eventually constant”—i.e., there exists N > 0 such that xn = xm
whenever n > m ≥ N .
5. As we said at the end of this section, completeness can be defined using
Cauchy sequences: a subset A ⊆ R is complete if every Cauchy sequence
{xn } contained in A has a limit in A. Use this definition below.

(a) The set Q of rational numbers is not complete. Show this by finding a
Cauchy sequence {rn } of rational numbers that has no rational limit.
(b) Is the set Z of integers complete?
(c) Show that [0, 1] is complete but (0, 1] is not.

6. From any given sequence {xn } we can form the related sequence {yn } =
{5xn + 2}.

(a) Use the definition of a Cauchy sequence (not theorems) to show that
if {xn } is Cauchy, then so is {yn }.
(b) Use any convenient theorems to give a shorter (not necessarily better)
proof that if {xn } is Cauchy, then so is {yn }.

7. Let {an } be a Cauchy sequence. Show that if {xn } is a sequence such that
|xn − xm | ≤ 42 |an − am | for all n and m, then {xn } is Cauchy, too.
8. This problem is about the sequence {an } in Example 3, page 102.

(a) Under what circumstances is {an } monotone?


(b) Suppose the first six coin tosses show HT HT HT . Find the smallest
interval in which the limit can lie.
(c) Explain why −2 < an < 2 for all n (regardless of the coin tosses).

9. Consider the {πn } defined by π1 = 3.1, π2 = 3.14, π3 = 3.141, . . . ; for


each n, πn shows the first n decimal digits of π. Show (use the definition,
not theorems) that {πn } is Cauchy.
10. This problem is about the fact that if {xn } and {yn } are Cauchy sequences,
then {xn yn } is Cauchy, too.

(a) Use Theorem 2.19, page 102, and any other already-proved results to
explain why the fact holds.

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 105

(b) (Harder.) Prove the same fact without using Theorem 2.19, page 102.
(Hints: An algebraic trick and the triangle inequality give

|xn yn − xm ym | = |xn yn − xn ym + xn ym − xm ym |
≤ |xn yn − xn ym | + |xn ym − xm ym | .

Now use boundedness of both {xn } and {yn } (Proposition 2.18) to


complete the proof.)

11. Let {an } be a sequence for which successive terms are “very close”:
|an+1 − an | ≤ 1/2n+1 for all n. Show that {an } is Cauchy. (Hint: For
any n and m with n > m, we have

|an − am | ≤ |am+1 − am | + |am+2 − am+1 | + · · · + |an − an−1 |


1 1 1
≤ m+1 + m+2 + · · · + n .
2 2 2
How large can the last expression be?)

2.5 Series 101: Basic Ideas


An infinite series is a sum with infinitely many summands, or terms:


a k = a 1 + a2 + a3 + . . . .
k=1

Here are two important examples, each of which we will revisit:



 ∞

1 1 1 1 1 1 1
= 1 + + + ...; = 1 + + + + ....
2k−1 2 4 k 2 3 4
k=1 k=1

As usual for infinite processes, some obvious questions arise. Is there some limit
(or “infinite sum”) to which the series converges? How do we decide? If a series
has a limit, how do we find it?
A first observation is that series are close kin to sequences—about which we
already know a lot. Indeed, every series ak corresponds in a natural way to
a certain sequence {An } whose properties tell us “everything” about the series. We’ll define it in a moment.
The flaw in this happy scenario is that, in practice, getting one’s hands directly on
the sequence {An } can be difficult. Much of what follows can be thought of as
strategy for getting around this problem.
Enough generalities.

i i

i i
i i

i i

106 2. Sequences and Series

∞
Definition 2.20. For a given series k=1 ak = a1 + a2 + a3 + . . . , the sequence
of partial sums is given by

A1 = a1 , A2 = a1 + a2 , ..., An = a1 + a2 + · · · + an , ....
n
In general, An = k=1 ak .

E XAMPLE 1. Describe the partial sum sequences for the two series illustrated
above. Do they have limits?

S OLUTION . The series



 ∞
 1 1 1
ak = =1+ + + ...
2k−1 2 4
k=1 k=1

comes from the geometric family, in which successive terms differ by a constant
Much more about geometric multiple. Here we have
series soon.
1 3 1 1 7 1 15
A1 = 1, A2 = 1 + = , A3 = 1 + + = , A4 = A3 + = , ....
2 2 2 4 4 8 8
Now it is easy to guess—and to prove by induction—that

2n − 1 1
An = n−1
= 2 − n−1 .
2 2
Clearly, An → 2, so it makes sense to write 1 + 12 + 14 + 18 + · · · = 2. We’ll
sanctify this below with a formal definition.
The series
∞ ∞
1 1 1 1
hk = = 1 + + + + ...
k 2 3 4
k=1 k=1

More soon about this, too. is the famous harmonic series. Here are the first few partial sums Hn , also known
as harmonic numbers:
1 3 1 1 11 1 25
H1 = 1, H2 = 1 + = , H3 = 1 + + = , H 4 = H3 + = .
2 2 2 3 6 4 12
Thanks, technology; values are No pattern seems obvious, so let’s try some numerical experiments:
rounded.
H10 = 2.929, H433 = 6.649, H7881 = 9.549, H12345 = 9.998.

The Hn are clearly increasing, but slowly. And mysteries remain: is the sequence
By Theorem 2.3 page 78 {Hn } bounded, and therefore convergent, or do the harmonic numbers diverge to
infinity?

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 107

It turns out—as you probably know, and as we will review in exercises—that


{Hn } diverges to infinity. This has been known for at least 650 years, thanks to
the French philosopher and bishop Nicole Oresme. The moral for now is that this
partial sum sequence has no simple formula, and so requires some work-around
effort to analyze. This state of affairs is typical—most series don’t have partial
sum sequences with nice, “closed form” expressions. Exceptions, like the first
series above, are precious. ♦

Series: The Basics


Our systematic discussion starts, as usual, with a formal definition.

Definition 2.21. Let k=1 ak be a series of numbers, and {An } its sequence

of partial sums. If {An } converges to a finite limit A, then we say k=1 ak
∞ ∞
converges to the sum A, and write k=1 ak = A. Otherwise, k=1 ak diverges.

Notes on notation. Sigma notation packs a lot of information into a small suit-
case—and so may need careful unpacking. For instance, all of the following
expressions mean exactly the same thing: Convince yourself by writing out
some terms.

 ∞
 103
 ∞ ∞
 ∞

1 1 1 1 1 1
; ; + ; ; .
k j=1
j j=1
j j=104 j j=0
j+1 z=13
z − 12
k=1

With due care taken, such cosmetic differences won’t cause trouble. For typo-

graphical economy, moreover, we will write just ak , not k=1 ak , when con-
fusion seems unlikely.
As another example of notational alternatives, note that the equation

 
n
ak = lim ak = A
n→∞
k=1 k=1

is a highly compressed form of the definition of convergence of a series ak to


the sum A. There is no shame—and often added clarity—in expanding things a
bit, so we might write, instead, Efficiency isn’t everything.

a1 + a2 + a3 + · · · = lim (a1 + a2 + a3 + · · · + an ) = A.
n→∞

∞ 1
E XAMPLE 2. Does the series k=1 1/(k 2 + k) = 2 + 16 + . . . converge? If so,
to what limit?

i i

i i
i i

i i

108 2. Sequences and Series

Try some by hand. S OLUTION . By a happy coincidence, the partial sums follow a nice pattern:
1 2 3 100
S1 = , S2 = , S3 = , ..., S100 = , ...
2 3 4 101
Now it is easy to guess a formula for Sn , and to see that Sn → 1. (See the
exercises for details.) ♦

Nonnegative terms, increasing sums. Getting one’s hands on directly on partial


sums can be difficult, as we’ve said. Things are simpler for a nonnegative series
ak : one for which ak ≥ 0 for all k. In this case the partial sum sequence
{A1 , A2 , A3 , . . . } is increasing:

a1 ≤ a 1 + a 2 ≤ a 1 + a 2 + a 3 ≤ a1 + a 2 + a 3 + a 4 ≤ . . . .

By Theorem 2.3, page 78, there are only two possibilities: Either {An } converges,
or it diverges to infinity. If we can somehow rule out either alternative, the other
must apply.

Algebra with convergent series. Convergent series, like convergent sequences,


allow basic algebraic operations; the following theorem has a counterpart for se-
quences in Theorem 2.5, page 83. Proofs of the following theorem, too, follow
easily from those for sequences.
Theorem 2.22 (Algebra with convergent series). Let an and bn be con-
vergent sequences, with respective sums A and B.
• Sums and differences: (an ± bn ) converges to A ± B; equivalently,
  
(an ± bn ) = an ± bn .

• Constant multiples: can converges to cA; equivalently,


 
can = c an .

Proof: We will leave the proof for sums as an exercise. For constant multiples
we want to show, in effect, that the distributive law applies to (convergent) infinite
sums. To do this, we need to show that the sequence of partial sums

ca1 , ca1 + ca2 , ca1 + ca2 + ca3 , . . .

converges to cA. This follows from the distributive law for finite sums, and from
what we already know about sequences. By the distributive law, we can rewrite
the preceding sequence as

ca1 , c(a1 + a2 ), c(a1 + a2 + a3 ), . . . , c(a1 + a2 + . . . an ), . . . ,

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 109

or, equivalently, as
cA1 , cA2 , cA3 , . . . , cAn , . . . ,
where {An } is the sequence of partial sums of an . But we know by hypothesis
that An → A, and the constant multiple rule for sequences implies that cAn →
cA, as desired. 

E XAMPLE 3. Does the series



 1 1 1 1 1 1
+ =1+1+ + + + + ...
2k−1 k 2 2 4 3
k=1

converge or diverge? Why?

S OLUTION . It diverges. The given series is the sum of two simpler series—
one convergent and one divergent—discussed in Example 1. In fact, every such
sum diverges. To see why, suppose that an converges and bn diverges. If
(an + bn ) were convergent, then, by Theorem 2.22, the series
 
bn = ( (an + bn ) − an )

would also converge, against our assumption. ♦

Detecting Convergence and Divergence


Theorem 2.22 is nice to know. But it is of little use unless we know that some
particular series converge or diverge. To this end, we need reliable methods for
deciding whether a given series converges or diverges. We address that deficit
next, starting with a simple test for divergence.

Proposition 2.23 (nth term test). If a series n=1 an converges, then the se-
quence {an } converges to zero.

In practice, the contrapositive is especially useful:

if {an } does not converge to zero, then an diverges.

The converse,

if an → 0 then an converges,
Don’t give in. (The harmonic
is tempting but false: a series an may diverge even if an → 0. series is one counterexample.)

i i

i i
i i

i i

110 2. Sequences and Series

Watch the difference Proof: Observe first that, for all n > 1,
“telescope.”
An − An−1 = (a1 + · · · + an−1 + an ) − (a1 + · · · + an−1 ) = an .

Now convergence of an means that An → A for some number A. But then


An−1 → A, too; therefore,

lim an = lim (An − An−1 ) = lim An − lim An−1


n→∞ n→∞ n→∞ n→∞
= A − A = 0,

as claimed. 

Geometric series: the nicest examples. Proposition 2.23 sometimes helps us


identify divergent series. But we would still like a good source of convergent
series; the geometric family fits that bill.
A geometric series is one of the form


ark−1 = a + ar + ar2 + ar3 + . . . ,
k=1

where a and r are any fixed numbers; notice the common ratio r of each summand
to its predecessor. The first series discussed above, for instance, is geometric, with
ratio r = 1/2:

  ∞
1 1 1 1
=1+ + + ··· = 0.5k−1 .
2k−1 2 4 8
k=1 k=1

Here is another example:

3 + 3.3 + 3.63 + 3.993 + 4.3923 + 4.83153 + 5.314683 + . . . .

The geometric form may be slightly hidden in the numbers, but it is easy to check
that successive terms have common ratio r = 1.1, and so the standard geometric

template k=1 3 × 1.1k−1 fits the pattern.
It’s readily proved by induction. Geometric series satisfy a useful algebraic equation:

1 − rn
a + ar + ar2 + ar3 + · · · + arn−1 = a (∗)
1−r

holds if r = 1, n is a positive integer, and a is any number. This pretty formula


tells us, almost instantly, whether any geometric series converges and, if so, to
what limit.

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 111

Proposition 2.24. Let a and r be any real constants, with a = 0.



(a) If |r| < 1, then k=1 a rk−1 converges to a
1−r .

(b) If |r| ≥ 1, then k=1 a rk−1 diverges.
We can infer, for instance, that ∞ k=1 0.5
k−1
converges to 2—as we proved in

Example 1. By contrast, k=1 3 × 1.1 k−1
diverges—as the numerical evidence
suggests, and as the nth term test also implies.
Proof (sketch): Convergence and divergence of series are all about partial sums,
and Equation (∗) above tells almost the whole story. If r = ±1 we have

n
1 − rn
a rk−1 = a .
1−r
k=1

What happens to the right side as n → ∞? The answer depends entirely on the
rn in the numerator—and that depends, in turn, on the value of r. If |r| < 1, then
rn → 0, and so
1 − rn 1
a →a ,
1−r 1−r
as claimed. If |r| > 1, then {arn } is unbounded, and so the series (badly!) fails
the nth term test, and so diverges.
The remaining cases (r = ±1) are much simpler, and left to the exercises. 

E XAMPLE 4. Proposition 2.24 and Theorem 2.22 justify calculations like the
following: Watch the tricky index change
from k to j.

 ∞
 ∞
 ∞
 j−1 ∞
 j−1
3k + 4k 3k 4k 3 4
= + = +
5k 5k 5k j=1
5 j=1
5
k=0 k=0 k=0
1 1 15
= + = = 7.5.
1 − 3/5 1 − 4/5 2
Similarly,
1 1 1 1 1 1 1 1
π+e+ − + − + ... = π + e + 1− + − + ...
3 6 12 24 3 2 4 8

1
k−1
1
=π+e+ −
3 2
k=1
1 1 2
=π+e+ = π + e + ≈ 6.082.
3 1 + 1/2 9
Numerical experiments support these results. According to Mathematica,
50
 50
1
k−1
3k + 4k 1
≈ 7.4993; π+e+ − ≈ 6.0821. ♦
5k 3 2
k=0 k=1

i i

i i
i i

i i

112 2. Sequences and Series

Comparison and comparison testing. Compare these two series:



 1 1 1 1 1 1
= + + + + + ...;
2k−1 1 2 4 8 16
k=1

 1 1 1 1 1 1
= + + + + + ....
2k−1 + 1 2 3 5 9 17
k=1

The first series we recognize—it is geometric and converges to two—but what


about the second? Does it also converge, or might its partial sums diverge to
infinity?
Comparing the two series suggests some common-sense guesses. Because
each term of the second series is less than its counterpart in the first, we expect
the second series, like the first, to converge, and to some limit less than two.
Sampling some partial sums {Sn } from this series adds some credence:
S10 ≈ 1.2625479, S20 ≈ 1.2644979, S30 ≈ 1.2644998, ....
Comparing series for size in this simple way is valid—and useful. Details are in
the following theorem and proof.
Theorem 2.25 (Comparison test). Let ak and bk be series, with 0 ≤ ak ≤
bk for all k.
(a) If bk converges to a number B, then ak converges to a number A,
with A ≤ B.
(b) If ak diverges, then bk diverges, too.
Proof: Let {An } and {Bn } be the partial sum sequences for ak and bk .
Because {An } and {Bn } are increasing sequences, each converges if—but only
if—it is bounded above. By hypothesis,
An = a1 + a2 + a3 + · · · + an ≤ b1 + b2 + b3 + · · · + bn = Bn
for all n. If {Bn } happens to be bounded above, then certainly {An } is also
bounded above, and we have
A = sup{An } ≤ sup{Bn } = B.
In this case An → A and Bn → B, as (a) claims. Part (b) follows from part (a).

E XAMPLE 5. Does each of the following series converge or diverge? What can
be said about limits?

 ∞
 ∞

2k − 1 1 sin k
(a) (b) (c)
3k 2k − 1 2k
k=1 k=1 k=1

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 113

S OLUTION . Series (a) converges by comparison to a convergent geometric


series:
2k − 1 2k
k
< k
3 3
holds for all k ≥ 1, and so

 ∞

2k − 1 2k
< = 2.
3k 3k
k=1 k=1

We can evaluate (a) exactly if we recognize it as the difference of two convergent


geometric series:

 ∞
 ∞

2k − 1 2k 1 1
= − =2− .
3k 3k 3 k 2
k=1 k=1 k=1

Series (b) sums the reciprocals of odd integers:



 1 1 1 1 1
= + + + + ....
2k − 1 1 3 5 7
k=1

The harmonic series 11 + 12 + 13 +. . . comes to mind, but term-by-term comparison


goes the wrong way. A better strategy is to multiply the harmonic series by 1/2:

 1 1 1 1 1
= + + + + ....
2k 2 4 6 8
k=1

The resulting series diverges (why?), and is comparable to series (b), which there-
fore also diverges. ∞
For series (c), comparison with k=1 1/2k is tempting, but some terms of (c)
may be negative, and so Theorem 2.25 doesn’t apply. Still, numerical evidence
suggests convergence; here are some (approximate) partial sums Sn :

s5 ≈ 0.588433, s10 ≈ 0.59333, s15 ≈ 0.59285, s20 ≈ 0.59284.

The case for convergence looks strong, but we don’t (quite yet) have a proof. ♦

Absolute Convergence
Series (c) from Example 5 stumped us. The next theorem comes just in time. It’s a triangle inequality, but for
  infinitely many summands.
Theorem 2.26. If |ak | converges then ak converges too, and
 
∞   ∞
 
 a n ≤ |an | .
 
k=1 k=1

i i

i i
i i

i i

114 2. Sequences and Series

Let’s polish off series (c) from Example 5 before proving this. Clearly,

|sin k| 1
< k
2 k 2
for all k, and so Theorem 2.25 guarantees that the left-hand series converges,
to some positive limit less than one. Theorem 2.26, in turn, says that series (c)
We don’t know exactly where. converges too, to a limit somewhere in the interval (−1, 1).

The proof, informally. Suppose |an | converges. To show that an converges,


too, we need to prove that the partial sum sequence {An } converges. Since we
have no specific limit in mind, we will show that {An } is a Cauchy sequence, and
We worked hard to prove the then invoke Theorem 2.19, page 102.
theorem; here comes the Observe first that, because |an | converges, its partial sum sequence
payoff.
C1 = |a1 |, C2 = |a1 | + |a2 |, C3 = |a1 | + |a2 | + |a3 |, . . .

is convergent, and therefore Cauchy. We will use this fact and the triangle in-
equality to show that {An } is Cauchy, too.
Let  > 0 be given. Because {Cn } is Cauchy we can choose N such that
|Cn − Cm | <  whenever n > m > N . The same N turns out to work for {An },
Watch for the (finite) triangle because if n > m > N , then
inequality.
|An − Am | = |(a1 + · · · + am + am+1 + · · · + an ) − (a1 + . . . am )|
= |am+1 + am+2 + · · · + an |
≤ |am+1 | + |am+2 | + · · · + |an |
= Cn − Cm = |Cn − Cm | < .

Thus, {An } is Cauchy and hence also convergent.


Invoking the triangle inequality again gives

|An | = |a1 + a2 + · · · + an | ≤ |a1 | + |a2 | + · · · + |an | = Cn

for all n, and so


 
ak = lim |An | ≤ lim Cn = |ak | .
n→∞ n→∞

This finishes the proof.

Conditional convergence. A series ak for which |ak | converges is called


absolutely convergent. Theorem 2.26 says that every absolutely convergent series
is also convergent in the ordinary sense. The converse, however, is false: A series
ak may converge while |ak | diverges. A series with this property is called
conditionally convergent.

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 115

E XAMPLE 6. The alternating harmonic series The signs alternate.


 k+1 1 1 1 1 1
(−1) = 1 − + − + − ...
k 2 3 4 5
k=1

is conditionally convergent. Explain why. Can anything be said about limits?

S OLUTION . Taking absolute values of all terms gives the ordinary harmonic
series
1 1 1 1
1+ + + + + ...,
2 3 4 5
which we know to diverge. To see why the alternating version converges, consider
the partial sums {Sn }:
1 1 1 1 1 1 1 1 1 1
1, 1 − , 1 − + , 1 − + − , 1 − + − + . . . .
2 2 3 2 3 4 2 3 4 5
Here’s a (rounded) numerical view of S1 , . . . , S10 :

1.00, 0.500, 0.833, 0.583, 0.783, 0.617, 0.760, 0.635, 0.746, 0.646, . . . .

Notice the pattern: Successive partial sums alternately increase and decrease, but
with smaller and smaller gaps. In particular, for any N , every term Sn with n > N
lies between SN and SN +1 . If n > 1000, for example, then

0.69265 ≈ S1000 ≤ Sn ≤ S1001 ≈ 0.69365.

The same holds for two terms. If n > m > 1000, then both Sn and Sm lie
between 0.69265 and 0.69365, and so lie within 0.001 of each other. Using this
idea we can prove that {Sn } is Cauchy, and hence convergent. We leave details
to the exercises.
So what is the limit? The striking but far-from-obvious exact answer turns
out to be ln 2 ≈ 0.69315. A rigorous proof is beyond our scope, but numerical
evidence shows we are in the ballpark. ♦

Exercises
1. For each series following, find a formula or simple rule for the partial sums
Sn . Then decide whether the series converges or diverges, and to what
limit.

(a) k=1 0 = 0 + 0 + 0 + . . .

(b) k=1 42 = 42 + 42 + 42 + . . .

k=1 (−1) = −1 + 1 − 1 + . . .
k
(c)

i i

i i
i i

i i

116 2. Sequences and Series


(d) k=1 k = 1 + 2 + 3 + ...

(e) k=1 0.99k−1

(f) k=1 1/(k 2 + k) (Hint: Guess a formula for Sn ; prove it by
induction.)

2. This problem is about partial sums Hn of the harmonic series (see Exam-
ple 1, page 106).

(a) Oresme’s (fourteenth-century) proof uses inequalities like the follow-


ing:
1 1 1 1 1 1 1 1 1 1 1
+ > ; + + + > ; + ··· + > .
3 4 2 5 6 7 8 2 9 16 2
Deduce that H2n > n
2, and so Hn → ∞.
(b) Consider the inequality
1 1 1 1 1 1 1
H2n = +
1+ + + + + ···+ +
2 3 4 5 6 2n − 1 2n
3 1 1 1 1
≥ + + + . . . = + Hn .
2 2 3 n 2
Use this to show (again) that {Hn } diverges. (Hint: If {Hn } con-
verges, then the subsequence {H2n } converges to the same limit.)
(c) Yet another proof that Hn converges follows from the inequality Hn >
ln n for all positive integers n. Lacking a formal definition of ln n, we
can’t prove this rigorously. Instead, draw a picture illustrating the in-
equality; consider ln n to be the area under the graph y = 1/x from
x = 1 to x = n.

3. Decide whether each of the following series converges or diverges. The


comparison test may be useful in some parts.

∞ 1
(a) k=1
k + 2k
∞ k
(b) k=1
2k 2 − 1
∞ k
(c) (Hint: Compare to a geometric series.)
k=1
3k
∞ k2 + 2
(d) k=1
3k 2 + 4
4. A telescoping series is one for which the partial sums Sn “collapse” to
some shorter, simpler form.

i i

i i
i i

i i

2.5. Series 101: Basic Ideas 117

∞
(a) For the series k=1 ( k1 − k+1
1
), write out (by hand) S2 and S5 . Do you
see the “telescoping” behavior? Find a formula
∞ for Sn and deduce the
limit. (Note: This series, rewritten as k=1 1/(k 2 + k), appears in
an earlier problem.)
∞
(b) For the series k=1 ( k1 − k+2 1
), find a formula for Sn and then find
the limit. (Hints: Write out, say, S10 to see the pattern for Sn .)
∞
(c) For the series k=1 ( k1 − k+101
), find a formula for Sn and then find
the limit. (Hints: Use ideas from the preceding parts. No proofs
needed, but check your claim numerically, using technology.)

5. Prove the claim about sums and differences in Theorem 2.22, page 108.
(Note that the claim amounts to saying that addition is commutative for
convergent infinite sums; we already know that addition is commutative
for finite sums.)

6. This problem ties up some loose ends concerning


Proposition 2.24, page 111,

which addresses convergence and divergence of k=1 a rk−1 .

(a) How does the series look if r = 1? What if r = −1? Prove (using
partial sums) that the series diverges in both of these cases.
(b) In the proof of Proposition 2.24 we used several reasonable-seeming
facts about convergence and divergence of the sequence {rn }, de-
pending on the value of r. Prove them, as follows:
(i) If r and L are any real numbers and rn → L, then rn+1 → L,
too.
(ii) If r and L are any real numbers and rn → L, then rn+1 =
r rn → r L.
(iii) If r = 0 and rn → L, then L = 0. (Hint: Use the two preceding
parts.)
(iv) If 0 ≤ r < 1, then rn → 0. (Hint: Use a theorem about
monotone sequences.)
(v) If −1 < r ≤ 0, then rn → 0. (Hint: Squeeze.)
(vi) If |r| ≥ 1, then {rn } diverges. (Hint: It is enough to explain
why rn → 0 is impossible.)

7. This problem is about the alternating harmonic series. See Example 6,


page 115, where we said that the partial sum sequence {Sn } is Cauchy.

(a) Claim: For any positive integer N , every partial sum Sn with n ≥ N
is between (or equal to one of) SN and SN +1 . Prove this for N =
1000. (A general proof is similar.)

i i

i i
i i

i i

118 2. Sequences and Series

(b) Show that, for any  > 0, we can find N such that |SN − SN +1 | < .
(c) Use the preceding parts to show that {Sn } is Cauchy.

8. This problem explores implications of Theorem 2.22, page 108. Through-


out, let ck be a convergent series and let dk be a divergent series.

(a) Use Theorem 2.22 to show that dk /10 diverges.


(b) Can ck dk converge? Can it diverge? Give examples or proofs as
needed.
(c) Let A be a constant. Can Ack diverge? Give a proof or counterex-
ample.
(d) Is it possible that dk ≤ ck for all k? If so, give an example. If not,
why not?
∞ ∞
9. Let k=1 ak and k=1 bk be two series, and suppose that ak = bk when-
ever k > 42.

(a) Show that ak converges if and only if bk converges.



(b) Suppose that k=1 ak = 100 and that bk = ak + k 2 for 1 ≤ k ≤ 42.

Find k=1 bk .

10. Let ak be a series with positive terms. Show that if ak converges,


then a2k converges, too. (Hint: Compare the series ak and a2k .)

11. In discussing geometric series we invoked the formula

1 − rn
a + ar + ar2 + ar3 + · · · + arn−1 = a
1−r
for the partial sums of a geometric series with r = 1. Prove by induction
that this formula holds for all positive integers n.

2.6 Series 102: Testing for Convergence


and Estimating Limits
The preceding section was about definitions and basic ideas. Now we proceed
to deeper investigation of the two main questions about any given series: Does it
converge? If so, to what limit?
We start by expanding our catalog of “known” series.

i i

i i
i i

i i

2.6. Series 102: Testing for Convergence and Estimating Limits 119

Meet the family: p-series. A p-series has the form



 1 1 1 1 1 1
= p + p + p + p + p + ...,
kp 1 2 3 4 5
k=1

where p is any fixed number. With p = 1 we have the harmonic series, which
we’ve shown to diverge. With p = 2 we get

 1 1 1 1 1
= 1 + 2 + 2 + 2 + 2 + ...,
k2 2 3 4 5
k=1

which converges, as we’ll prove in two different ways. The general story on
convergence and divergence is simple:
∞ 1
Proposition 2.27. The p-series k=1 kp converges if p > 1 and diverges if p ≤ 1.

Notes toward a proof. For p ≤ 1, divergence follows by comparison to the har-


monic series: For all integers k > 1, we have

1 1
k p ≤ k, and so > .
kp k
Because the harmonic series diverges, so must every p-series with p ≥ 1.
Showing convergence for p > 1 takes a little more effort. We illustrate the It gets easier when we know
argument for p = 1.3 and leave a general proof to the exercises. about integrals.
As with any positive series, convergence occurs if the partial sum sequence
{Sn } is bounded above. “Our” proof of this uses some clever algebraic book- It’s probably centuries old.
keeping to show that the subsequence

S1 , S3 , S7 , S15 , S31 , . . . , S2n −1 , . . .

is bounded above; this implies, in turn, that the entire sequence {Sn } is bounded
above. The idea is to group summands into blocks of length 1, 2, 4, 8, . . . , and Do you see why?
then estimate the contribution of each block. We illustrate this for S31 . The
inequality holds because the first term in each block is largest, and the last equality
comes from counting the terms in each block:
1 1 1 1 1 1 1 1
S31 = 1 + + 1.3 + 1.3 + . . . + 1.3 + 1.3 + . . . + 1.3 + 1.3 + . . . + 1.3
21.3
 3 4
   7 8
   15   16  31 
1 1 1 1 1 1 1 1
< 1 + 1.3 + 1.3 + 1.3 + . . . + 1.3 + 1.3 + . . . + 1.3 + 1.3 + . . . + 1.3
2  2  4  4  8  8  16  16 
2 4 8 16 1 1 1 1
= 1 + 1.3 + 1.3 + 1.3 + 1.3 = 1 + 0.3 + 0.3 + 0.3 + 0.3 .
2 4 8 16 2 4 8 16

i i

i i
i i

i i

120 2. Sequences and Series

Here comes the punchline: The last quantity can be rewritten in geometric form:
1 1 1 1
S31 < 1 + + + 0.3 + 0.3
20.3 40.3
8 16
 2  3  4
1 1 1 1
= 1 + 0.3 + + +
2 20.3 20.3 20.3
∞  k−1 ∞

1 1
< 0.3
≈ 0.81225k−1 = ≈ 5.326.
2 1 − 0.81225
k=1 k=1

Now we are getting somewhere. We’ve shown, by painstaking calculation, that


Mathematica says S1000 ≈ 3.51 S31 , and (by the same argument) all partial sums S2n −1 , are bounded above by
and S2000 ≈ 3.59; the numerical the sum—about 5.326—of a convergent geometric series. This completes the
evidence is reassuring but only
anecdotal.
proof for p = 1.3; other exponents p > 1 can be handled similarly.

Sharper Tests for Convergence


Now that we understand the convergence behavior for two important families—
geometric and p-series—we can study convergence and divergence more effec-
tively. First we need some more discriminating convergence tests.

Limit comparison test. The ordinary comparison test (Theorem 2.25, page 112)
is simple and powerful, but can be hard to apply. The limit comparison test can
simplify the work.
 
Theorem 2.28 (Limit comparison test). Consider two series ak and bk with
positive terms, and suppose that {ak /bk } converges to a finite limit L.
 
(a) If bk converges, then ak converges, too.
 
(b) If L = 0, then either both ak and bk converge or both diverge.
Before proving the theorem, let’s try it out.
∞
E XAMPLE 1. We showed in Example 2, page 107, that the series k=1 bk =
 ∞ 2
k=1 1/(k + k) converges, with sum 1. Use limit comparison to deduce that
some other series converge.
 
S OLUTION . We have already shown that the p-series ak = 1/k 2 con-
verges, but the proof was laborious. Limit comparison is easier. Here is the key
limit:
ak 1/k 2 k2 + k 1
lim = lim 2
= lim 2
= lim 1 + = 1,
k→∞ bk k→∞ 1/(k + k) k→∞ k k→∞ k

which implies (again) that 1/k 2 converges.

i i

i i
i i

i i

2.6. Series 102: Testing for Convergence and Estimating Limits 121

Similar arguments apply to uglier series. If, say,



 ∞
 k 2 + 7k − 3 sin k
ak = ,
2k 4 − k
k=1 k=1

then a look at powers of k in the numerator and denominator suggests limit com-
parison with 1/k 2 . The strategy turns out to work: Note the algebra with sequence
limits.
k2 +7k−3 sin k
2k4 −k k 4 + 7k 3 − 3k 2 sin k
lim 1 = lim
k→∞
k2
k→∞ 2k 4 − k
1 + 7/k − 3/k 2 · sin k 1
= lim 3
= .
k→∞ 2 − 1/k 2

Because the limit is finite, the ugly series converges. ♦

We’ll prove Theorem 2.28 using two auxiliary facts, each of interest in its own
right.

Proposition 2.29. Suppose ak = bk for all k > N , where N is any constant.


Then either both ak and bk converge (not necessarily to the same limits) or
both diverge.

Proof (sketch): The trick is to compare the partial sum sequences {An } and {Bn },
which turn out to resemble each other. Here is the idea for N = 42; a general
proof is almost identical. If ak = bk for k > 42, and we know n > 42, then

An = a1 + · · · + a42 + a43 + · · · + an
= a1 + · · · + a42 + b43 + · · · + bn
= (a1 + · · · + a42 ) − (b1 + · · · + b42 ) + (b1 + · · · + b42 ) + b43 + · · · + bn
= A42 − B42 + Bn .

Thus, An = A42 − B42 + Bn for n ≥ 42, which implies that the sequences
{An } and {Bn } either both converge or both diverge. If, in fact, Bn → B, then
An → A42 − B42 + B. 

Proposition 2.30 (Bounded comparison test). Consider two series ak and


bk with positive terms, and suppose that the sequence {ak /bk } is bounded
above.

(a) If bk converges, then ak converges, too.

(b) If ak diverges, then bk diverges, too.

i i

i i
i i

i i

122 2. Sequences and Series

Proof: The hypothesis means that, for some positive number M , we have ak <
The second series is a constant M bk for all k. Now if bk converges, then M bk also converges. By the
multiple of the first. (ordinary) comparison test, ak must also converge, as claimed in (a). Part (b)
is the contrapositive of (a). 

The limit comparison test is a special case of Proposition 2.30, so the proof is
easy.
Proof (of Theorem 2.28): Because {ak /bk } converges, it is also bounded above,
and so Proposition 2.30 implies part (a).
Now suppose, as in (b), that L = 0. In this case {bk /ak } converges to 1/L,
Sorting out the a’s and b’s is a and we can apply (a) to conclude that if ak converges, bk must do so, too.
little confusing . . . but it all works This establishes the claim in (b) about convergence; the statement about diver-
out.
gence is equivalent. 

The ratio test. For a geometric series, the ratio of successive terms is a constant r,
and convergence depends on the magnitude of r. The ratio test generalizes this
principle to a large class of series that, although not geometric, behave “in the
limit” something like geometric series. The theorem makes these ideas precise.
Theorem 2.31 (Ratio test). Consider a series ak with positive terms, and sup-
pose that the sequence {ak+1 /ak } converges to a finite limit L.

(a) If L < 1 then ak converges.


(b) If L > 1 then ak diverges.
(c) If L = 1 the test is inconclusive; ak may converge or diverge.

Let’s try it out.

E XAMPLE 2. What does the ratio test say about


 1 ∞
1 1 1 1
1+ + + + + ··· = ?
1 2 6 24 k!
k=0

What does it say about the harmonic series?

S OLUTION . The ratio test says that the first series converges. The ratio in ques-
tion collapses nicely:
ak+1 1/(k + 1)! k! 1 ·2 · ···· k 1
= = = = .
ak 1/k! (k + 1)! 1 · 2 · · · · · k · (k + 1) k+1
The last quantity converges to zero as k → ∞, so the ratio test guarantees con-
vergence.

i i

i i
i i

i i

2.6. Series 102: Testing for Convergence and Estimating Limits 123

The limit-of-ratios calculation is just as easy for the harmonic series:


ak+1 1/(k + 1) k
= = → 1 as k → ∞.
ak 1/k k+1
Because the limit is one, however, the ratio test says nothing. The wasted work
is annoying, but only mildly so: we knew already from other arguments that the
harmonic series diverges. ♦ The ratio test wasn’t the right
tool for this job.
Proof (of the ratio test): We prove (a) and leave (b) and (c) to the exercises. Given
L < 1, as in (a), choose any real number r with L < r < 1. Then the geometric Plenty of choices exist.
series 1 + r + r2 + . . . converges, and we’ll use “bounded comparison” (Propo-
sition 2.30) to show that ak converges, too.
Doing so requires a basic observation about limits and an algebraic trick. The
observation is that, because ak+1 /ak → L and L < r, there must be a number N
such that
ak+1
< r whenever k > N.
ak
To complete the proof, using Proposition 2.30, we’ll show that the sequence
{ak /rk } is bounded. To do this it is enough to assume k > N . In this case, The remaining terms, with
we can write (here comes the algebraic trick) k ≤ N, form a finite set.

ak ak ak−1 ak−2 aN −1 aN
= ...
rk ak−1 ak−2 ak−3 aN r k
aN rk−N aN aN
< r · r · 
r · . . . r · k = = N.
r rk r
k − N factors

Now the last quantity is constant (independent of k), and so the sequence is
bounded, as desired. 

Not-necessarily-positive series. Most of our convergence tests require positive


series, and so don’t apply directly to series like

 sin k sin 1 sin 2 sin 3 sin 4
= + + + + ...
2k 1 4 8 16
k=1

and
∞
(−1)k−1 1 1 1 1 1
√ = √ − √ + √ − √ + √ − ...,
k=1
k 1 2 3 4 5
which have both positive and negative terms. What can we do?
We’ve already seen one work-around: test |ak |, not ak , for convergence.
Theorem 2.26, page 113, guarantees that if the former converges, so does the
latter. Indeed, we already used this method (Example 5, page 112) to show that
the first series converges.

i i

i i
i i

i i

124 2. Sequences and Series

This approach fails for the second series, however, because

∞
(−1)k−1 1 1 1
√ = √ + √ + √ + ...,
k=1
k 1 2 3

It’s a p-series with p = 1/2. which diverges. We need another


√ strategy.
The series (−1)k−1 / k resembles the alternating harmonic series
(−1)k−1 /k, which we’ve shown to converge. (See Example 6, page 115.)
The former series turns out to converge, too, and for essentially the same reasons.
The following theorem applies to these and to other alternating series—ones for
which successive terms alternate in sign. It is convenient to write such a series in
the form
∞
(−1)k−1 ak = a1 − a2 + a3 − . . . ,
k=1

A series that starts with where ak ≥ 0 for all k.


–a1 + a 2 – . . . needs a tiny

k=1 (−1)
change in notation, but no new k−1
Theorem 2.32 (Alternating series test). Let ak be an alternating
ideas.
series such that

(i) the sequence {ak } is positive and decreasing: a1 ≥ a2 ≥ a3 ≥ · · · > 0;

(ii) ak → 0 as k → ∞.

Then the series converges, and the limit S lies between any two successive partial
sums Sn and Sn+1 .

∞ √
k=1 (−1)
k−1
E XAMPLE 3. Finish off the series / k.

S OLUTION . Conditions (i) and (ii) of the theorem hold for our series:

1 1 1 1
√ > √ > √ > · · · > √ → 0,
1 2 3 k

as needed. Thus our series converges to some limit S, which lies between any two
successive partial sums. For instance, we have

S100 ≈ 0.55502 < S < 0.65453 ≈ S101

and
S1002 ≈ 0.58911 < S < 0.62068 ≈ S1003 . ♦

i i

i i
i i

i i

2.6. Series 102: Testing for Convergence and Estimating Limits 125

Proof (of Theorem 2.32): The proof depends on an nice pattern among the partial
sums:
S2 ≤ S4 ≤ S6 ≤ S8 ≤ · · · ≤ S 7 ≤ S5 ≤ S3 ≤ S1 .
All of these inequalities hold because the terms alternate in sign but decrease in
size. The reasons are straightforward but pretty, and best thought through for
oneself. Start small; see, e.g., why
In particular, the odd-index subsequence S1 , S3 , S5 , . . . is decreasing and S 5 ≥ S 8.
bounded below (by any even-index term, such as S8 ), while the even-index sub-
sequence S2 , S4 , S6 , . . . is increasing and bounded above. Hence both of these
subsequences converge. They tend to the same limit, moreover, because
S2k − S2k−1 = a2k ,
and the right side tends to zero as n tends to infinity. This implies, finally, that
{Sn } itself converges, as desired, and that the limit, S, satisfies the main ine-
quality:
S 2 ≤ S4 ≤ S6 ≤ S8 ≤ · · · ≤ S ≤ · · · ≤ S7 ≤ S5 ≤ S3 ≤ S1 . 

Estimating Limits
We have now acquired and sharpened several tools for detecting whether a lot of
series converge or diverge. That’s nice, but what about the limits themselves? The
bad news is that exact limits may be hard or impossible to find. (The family of
geometric series is a rare but important exception.) The good news is that the same
tools, cleverly employed, can also help us estimate limits with good precision.

E XAMPLE 4. We used the ratio test in Example 2 to show that the series

 1 1 1 1 1 1
=1+ + + + + + ...
k! 1 2 6 24 120
k=0

converges. What can we say about a limit?

S OLUTION . Listing the first few (rounded) partial sums Sn ,


1, 2, 2.5, 2.66667, 2.70833, 2.71667, 2.71806, 2.71825, 2.71828, 2.71828,
suggests a limit somewhere near S10 ≈ 2.71828. Could the limit be the number e?
Can we be sure? The Sn are strictly increasing, after all, so what would prevent,
say, S123456789 > 3? How much can the rest of our series


1 1 1 1
+ + + ··· = ,
11! 12! 13! k!
k=11

contribute, at most?

i i

i i
i i

i i

126 2. Sequences and Series

The comparison test idea gives a quick (if slightly crude) answer. Since

1 1 1 1 1 1
< 10 , < 11 , < 12 , ...,
11! 2 12! 2 13! 2
we can compare with a geometric series, for which we do know a limit:

1 1 1 1 1 1 1
+ + + · · · < 10 + 11 + 12 + · · · = 9 ≈ 0.002.
11! 12! 13! 2 2 2 2
This tells us that S10 ≈ 2.71828 underestimates the true limit by less than 0.002,
so we can have confidence in (at least) the first three digits. ♦

Bounding the tail: lessons from Example 4. For any convergent series ak
and any partial sum Sn we can write


ak = (a1 + a2 + · · · + an ) + (an+1 + an+2 + . . . ) = Sn + Rn ,
k=1


where Rn = k=n+1 ak is the nth upper tail, or remainder.
The idea illustrated in Example 4 is to bound the tail: If we can somehow
show that |Rn | is small, then the limit S = Sn + Rn must be close to the finite
sum Sn , which we can compute without any worries over convergence. Upper
tails are often bounded by comparison to suitable geometric series, for which
(atypically) we can find exact limits.
We should confess, finally, that the exact limit of the series in Example 4 is
well known to be e ≈ 2.71828182846. A rigorous proof requires methods we
haven’t developed; our point here is that reasonable accuracy is available using
basic arguments.

E XAMPLE 5. An alternating version of the series in Example 4 looks like this:

 (−1)k ∞
1 1 1 1 1
1− + − + − + ··· = .
1 2 6 24 120 k!
k=0

What can we say about a limit?

S OLUTION . First, there is a limit. We showed in Example 2 that our series


Says Theorem 2.26, page 113. converges absolutely, and so it also converges in the ordinary sense. Second, our
tail estimate from Example 4 can be recycled here:
The last inequality comes from
comparison to the geometric
series. 1 1 1 1 1 1 1
|R10 | = − + − + ... ≤ + + + ··· < 9.
11! 12! 13! 11! 12! 13! 2

i i

i i
i i

i i

2.6. Series 102: Testing for Convergence and Estimating Limits 127

For the present series we find S10 ≈ 0.367879, and we conclude that the exact
limit lies somewhere within about 0.002 of S10 .
But we can do better—with less work—using Theorem 2.32, which guaran-
tees that the exact limit lies between any two successive partial sums. Calculating
S9 ≈ .3678792 and S10 ≈ 0.3678795 gives us about six decimal places of accu-
racy. Again, our estimate plays well with the exact limit, which can be shown by
other methods to be 1/e ≈ 0.367879441. ♦

Exercises
1. Use methods of this section to prove as efficiently as possible that each
series converges or diverges. (These same series appeared in exercises for
the preceding section; now we know more techniques.)

 1
(a)
k + 2k
k=1
∞
k
(b)
2k 2 − 1
k=1
∞
k
(c) (Hint: Compare to a geometric series.)
3k
k=1
∞
k2 + 2
(d)
3k 2 + 4
k=1

2. Prove or disprove that each of the following series converges.



 100k
(a)
k!
k=1
∞
sin k
(b)
1.0001k
k=1
∞
k2 + k + 1
(c)
k3 + k2 + k + 1
k=1
∞
(−1)k
(d)
ln ln(k + 1)
k=1

3. Throughout this problem, let ak be a series with positive terms.

(a) Show that if ak converges, then a2k converges, too. (Hint: Use
limit comparison.)

i i

i i
i i

i i

128 2. Sequences and Series

(b) Give examples to show that if ak diverges, then a2k may either
converge or diverge.

4. In the situation and notation of Proposition 2.28, page 120, show that if
bk diverges and ak /bk → ∞, then ak diverges, too. (Hint: If ak /bk →
∞, then bk /ak → 0.)
5. Complete and prove the following version of Proposition 2.29, page 121:
Consider two series ak and bk such that ak = bk for k > N . If bk
diverges, then ak diverges, too. If bk converges to B, then ak
converges to .
6. In Example 2, page 122, we used the ratio test to show that ∞ k=0 1/k!
converges. Prove the same thing using the comparison or limit comparison
test.

7. Let {Sn } be the partial sum sequence for the series √1
k=1 k . Show that

Sn > n for all n; conclude that the series diverges.
8. In our proof sketch for Proposition 2.27, page 119, we showed that 1/k p
converges if p = 1.3. Show in a similar way that 1/k p converges for
every p > 1. (Hint: Writing p = 1 + s simplifies the algebra slightly; then
s plays the role of 0.3 in the given proof.)

9. Consider the series k=1 1/(2k−1 + 1), which converges to some limit S.

(a) Explain why the series converges.


(b) Maple says that that the tenth partial sum is S10 ≈ 1.26255. Give an
upper bound for R10 , the corresponding upper tail.
(c) Use results of the previous part to give a small interval guaranteed to
contain S.

10. Consider the series ∞ k=1 (−1)


k−1
(1/(2k−1 + 1)) (the alternating version
of the series in the preceding problem).

(a) Explain why this series converges to some limit S.


(b) Find an interval of length less than 0.001 that is guaranteed to con-
tain S.
(c) By how much can the partial sum S100 differ from the S? Why?
∞ 1
11. For any p-series k=1 kp with p > 0, it can be shown that all upper tails
satisfy

  ∞
1 dx
Rn = < .
kp n xp
k=n+1

i i

i i
i i

i i

2.7. Lim sup and lim inf: A Guided Discovery 129

(a) Draw a picture to illustrate this inequality. (Leaf through any standard
calculus text, if necessary.)
∞ 1
(b) Estimate k=1 k3 with error less than 0.001. (Technology will be
helpful.)

2.7 Lim sup and lim inf: A Guided Discovery


This brief section, designed for self-study, explores two useful generalizations of
the “ordinary” limit of a sequence: the limit superior and the limit inferior (also
known as the upper limit and the lower limit, respectively). Results of this section are not
needed in later sections of the
Defining the lim sup. Given any bounded sequence {xn }, we can define the new book.
sequence {vn } We will discuss unbounded
sequences below.
v1 = sup{x1 , x2 , x3 , . . . }; v2 = sup{x2 , x3 , x4 , . . . }; ...
vn = sup{xn , xn+1 , xn+2 , . . . }.

(We’ll call this the sup-sequence associated to {xn }.)


Now we can give the definition:

lim sup xn = lim vn .


n→∞

In brief: lim sup xn = limn→∞ sup {xk | k ≥ n}.

Basic problems.
1. For each of the following sequences {xn }, find the corresponding sequence
{vn }; then find lim sup xn .

(a) {xn } = {1, 1, 1, 1, . . . }.


 
3 4 5 6
(b) {xn } = 2, , , , , . . . .
2 3 4 5
 
3 3 4 4
(c) {xn } = 2, , − , , − , . . . .
2 2 3 3
 
1 2 3 4
(d) {xn } = 1, , , , , . . . .
2 3 4 5

2. Why must all the vi exist in the sup-sequence? Why must {vn } have a
limit? (Cite appropriate theorems.)
3. How are lim xn and lim sup xn related to each other for a bounded se-
quence {xn }? Can one exist but not the other? Can both exist but be
different?

i i

i i
i i

i i

130 2. Sequences and Series

The lim inf. The lim inf is closely analogous to the lim sup.

1. Carefully state an appropriate definition for the lim inf of a bounded se-
quence. Then find lim inf xn for each of the example sequences in the first
problem.
2. Find a sequence {xn } with lim sup xn = 5 and lim inf xn = −2.
3. Prove that if lim sup xn = 5 and lim inf xn = 5, then lim xn = 5, too.
4. It seems reasonable that lim inf xn ≤ lim sup xn for any bounded sequence
{xn }. Prove this. What happens if the two are equal?

Algebra with the lim inf and the lim sup. The ordinary limit has nice algebraic
properties: for example, lim (xn + yn ) = lim xn + lim yn (assuming that both
limits on the right side exist). Do lim inf and lim sup have similar properties?

1. Suppose lim sup xn = S, lim inf xn = I, and k is a constant. What can


be said about lim sup kxn and lim inf kxn ? (Hints: Experiment with your
example from above, and with several possible values of k.)
2. If lim sup xn = L and lim sup yn = M , what can be said about lim sup(xn
+ yn )? (Show that lim sup(xn + yn ) ≤ L + M .)

Unbounded sequences. If {xn } is unbounded above, then the sup-sequence


{vn } doesn’t exist, but it is natural to define lim sup xn = ∞. Similarly, if {xn }
is unbounded below, then we define lim inf xn = −∞.

1. Find the lim sup and the lim inf of the sequence −1, −2, −3, −4, . . . . Find
a sequence {xn } with lim sup xn = ∞ and lim inf xn = −∞.
2. Show that every sequence (bounded or not) has a lim sup and a lim inf.
3. If lim sup xn = +∞, must lim xn = +∞, too? If lim sup xn = −∞,
must lim xn = −∞, too?

Lim sups, lim infs, and subsequences. The lim sup and the lim inf of a se-
quence {xn } are closely connected to subsequences of {xn }, as the following
proposition suggests.
Proposition 2.33. Let {xn } be a sequence.

(a) If {xn } is unbounded above (so lim sup xn = ∞), then some subsequence
{xnk } diverges to infinity.
(b) If {xn } is bounded above, with lim sup xn = L, then some subsequence
{xnk } converges to L.

i i

i i
i i

i i

2.7. Lim sup and lim inf: A Guided Discovery 131

Proof: Claim (a) is essentially Lemma 2.13, page 96.


To prove claim (b), let’s construct a subsequence {xnk } such that, for all k,

1
L− ≤ xnk ≤ vk = sup{xk , xk+1 , . . . ,
k
where {vk } is the usual sup-sequence. Now the sequences at left and right both
clearly converge to L, so our subsequence {xnk } is “squeezed” to the same limit.
To construct the desired subsequence, observe first that L − 1 < L ≤ v1 .
Thus L − 1 is not an upper bound for {x1 , x2 , x3 , . . . }, so we can find xn1
with L − 1 < xn1 ≤ v1 , as desired. Similarly, L − 1/2 is not an upper
bound for {xn1 +1 , xn1 +2 , xn1 +3 , . . . }, so there is some xn2 with n2 > n1 and
L − 1/2 < xn2 ≤ vn2 ≤ v2 , as desired. Continuing this process produces the
desired subsequence {xn1 , xn2 , xn3 , . . . }. 

Use these ideas in the following problems.

1. Show that if lim sup xn = 5, then there is a subsequence {xnk } that con-
verges to 5. Could some other subsequence converge to 6? To 4? Explain
your answers.

2. Show that if {xn } has a subsequence {xnk } that converges to 5, then

lim inf xn ≤ 5 ≤ lim sup xn .

3. Show that if lim sup xn = ∞, then there is a subsequence {xnk } with


xnk → ∞.

More on the “sup-sequence.” The following problems explore further the cor-
respondence between the original sequence {xn } and the “sup-sequence” {vn }.
We can ask, for instance, about “inverting” this correspondence.

1. For each of the following sequences {vn }, find (if possible) two different
sequences {xn } that give the same sup-sequence {vn }.
 
3 3 4 4
(a) {vn } = 2, 2, , , , , . . .
2 2 3 3
(b) {vn } = {2, 2, 2, 2, 2, 2, . . . }
(c) {vn } = {2, 1.1, 1.01, 1.001, 1.0001, . . .}

2. For which sequences {vn } can there be more than one associated sequence
{xn }? State and prove a claim.

i i

i i
i i

i i

i i

i i
i i

i i

CHAPTER 3
Limits and Continuity

3.1 Limits of Functions


This chapter is about continuous functions and their properties. As a foretaste,
consider this reasonable-sounding claim about a function f :
If f (−1) = −2 and f (1) = 5, then f (a) = 0 for some a ∈ (−1, 1).
Is this true? If a graph passes through the points (−1, −2) and (1, 3), must it
also cross the x-axis somewhere in between? Must there also be an input b with
f (b) = π?
Both answers turn out to be “yes”—but only if the function f is continuous
everywhere along the input interval [−1, 1]. In this case, answers follow from the
famous intermediate value theorem, which we will carefully state and prove later
in this chapter. To prove such results we’ll draw on earlier work with complete-
ness, suprema and infima, limits, the Bolzano–Weierstrass theorem, and more.
Our work starts, as usual, with clear definitions of words like “limit” (as applied
to functions) and “continuous.”

Defining Limits of Functions


Most of us emerge from elementary calculus courses with a rough and ready view
of function limits. To say that limx→3 f (x) = 5, for example, means something
like

f (x) approaches 5 as x approaches 3, or f (x) ≈ 5 when x ≈ 3.

These views are not incorrect, but they are too vague to be useful for building
theory or proving theorems. What exactly does “approaches” mean? How close
to 3 must x be for x ≈ 3 to hold? We need a precise definition.
Definition 3.1 (Limit of a function). Let f be a function whose domain includes
an open interval I containing a, except perhaps for x = a. Let L be a number.
We write limx→a f (x) = L if, for every  > 0, there exists δ > 0 such that

|f (x) − L| <  whenever x ∈ I and 0 < |x − a| < δ.

133

i i

i i
i i

i i

134 3. Limits and Continuity

Observe, right away, two important subtleties about domains:


• At x = a: The value f (a) itself need not be defined for the limit to exist at
x = a. Indeed, the whole point of finding such a limit is often to do with a
“missing” or mysterious function value. If f (a) is defined, that’s fine, but
it’s irrelevant to the definition, which avoids all mention of f (a).
• Near x = a: For the key –δ condition to make good sense–let alone hold
true—f (x) must be defined for all x (other than a) that are within δ of
a. We will sometimes summarize these conditions by requiring that the
domain of f include some set of the form I \ {a}, where I is any open
interval containing a.

E XAMPLE 1. Let f (x) = (3x2 − 3)/(x − 1). Use Definition 3.1 to show that
limx→1 f (x) = 6.

S OLUTION . Note first that all is well with domains: f (1) is undefined, but f (x)
makes good sense for all other x. Next, for x = 1 we have

3x2 − 3 3(x − 1)(x + 1)


f (x) = = = 3x + 3,
x−1 x−1
and so
|f (x) − 6| = |3x + 3 − 6| = |3x − 3| = 3 |x − 1| .
Thus,

3 |x − 1| <  ⇐⇒ |x − 1| < .
3
This shows that δ = /3 “works” for any given , and we’re ready for the brief
formal proof.
Let  > 0 be given, and set δ = /3. This δ works, because if 0 < |x− 1| < δ,
then
3x2 − 3
|f (x) − 6| = − 6 = 3 |x − 1| < 3δ = ,
x−1
where we used factoring in the second equality.
Note that the preceding paragraph stands on its own as a proof—the discussion
beforehand is there “only” for motivation. ♦

E XAMPLE 2. Let a and k be any constants. It is no surprise that

lim x = a and lim k = k,


x→a x→a

but how do these facts follow from Definition 3.1?

i i

i i
i i

i i

3.1. Limits of Functions 135

L+є L+є

L L

L–є L–є

a–δ a a+δ a–δ a a+δ

(a) A good δ (b) A bad δ

Figure 3.1. Picturing function limits.

S OLUTION . With f (x) = x for the first limit f (x) = k for the second, verifying
Definition 3.1 is an easy exercise. ♦

Picturing limits. Function limits can be understood graphically. For any given 
and δ, we can look at the tiny rectangular “window” in the xy-plane, centered at
(a, L), in which L −  < y < L +  and a − δ < x < a + δ. This window has
“half-height”  and “half-width” δ; two possibilities are shown in Figure 3.1.
From this viewpoint, the –δ condition is satisfied if the graph of f stays
inside this rectangle all the way from left to right, as in Figure 3.1(a). If the graph
“escapes” at top or bottom, as in Figure 3.1(b), the chosen δ does not work for the
given . The limit is L if, for any choice of  (the half-height), there exists some
good half-width δ.

E XAMPLE 3. The function



1 if x ∈ Q
f (x) =
0 if x ∈
/Q
is called the characteristic function of the set Q. Does limx→0 f (x) exist? It is useful in illustrating “bad”
behavior; we’ll see it again. Can
you picture the graph?
S OLUTION . The (unsurprising) answer is no. To prove this formally, suppose
toward contradiction that L is a limit, and set  = 0.001. By our assumption,
there must be some δ > 0 with
|f (x) − L| < 0.001 whenever x ∈ (−δ, δ).
But (as we’ve shown) every interval (−δ, δ) contains both rational and irrational
numbers. If s is such a rational and t an irrational, then both
|f (s) − L| = |1 − L| < 0.001 and |f (t) − L| = |0 − L| < 0.001,
which is clearly absurd. ♦

i i

i i
i i

i i

136 3. Limits and Continuity

The next example illustrates what can—and cannot—be inferred from the ex-
istence of a limit.

E XAMPLE 4. Let f be a function for which limx→a f (x) > 0. Must f (x) > 0
also hold for x near a? What can be said if limx→a g(x) = 0?

S OLUTION . Concerning f , the answer is yes—except at x = a, where we know


nothing. To see why, suppose limx→a f (x) = L > 0, and set  = L/2. By
definition of the limit, there is some δ > 0 that “works” for this  in the sense that
L
|f (x) − L| < whenever 0 < |x − a| < δ.
2
Rewriting these inequalities gives
L
f (x) > >0 whenever x ∈ (a − δ, a + δ) and x = a,
2
as desired.
Concerning g, the answer is “not much.” Near x = a the function g could be
positive (if, say, g(x) = (x − a)2 ) or negative (if, say, g(x) = −(x − a)2 ). Or
perhaps g(x) = x − a, which changes sign at x = a. ♦

Basic Properties of Limits


Limits of functions have a lot in common with limits of sequences. This is hardly
surprising—sequences are functions, after all—but it’s a good thing, because
most of our hard work with sequence limits will transfer readily to function limits.
It is easy to prove, for instance, that function limits have the same nice algebraic
Limits respect sums, products, properties that sequence limits enjoy. The following technical lemma helps clarify
quotients, etc. the connection.
Lemma 3.2. Let f (x) be defined on I \ {a}, where I is an open interval contain-
ing a, and let L be a number. The following are equivalent:

(i) limn→∞ f (xn ) = L for every sequence {xn } ⊂ I \ {a} with xn → a.


(ii) limx→a f (x) = L

Proof: To show that (i) implies (ii), let’s assume that (ii) fails and construct a
Let’s prove the contrapositive, in sequence {xn } that violates (i).
other words. For (ii) to fail means that there is some positive , say 0 , for which no δ > 0
works. In particular, δ = 1 fails, so there must be some x1 in I \ {a} such that

0 < |x1 − a| < 1 but |f (x1 ) − L| ≥ 0 .

i i

i i
i i

i i

3.1. Limits of Functions 137

Because δ = 1/2 also fails, there is some x2 with

0 < |x2 − a| < 1/2 but |f (x2 ) − L| ≥ 0 .

Continuing in this way, we construct a sequence {xn } of points in I \ {a} such


that, for each n,
1
0 < |xn − a| < but |f (xn ) − L| ≥ 0 .
n
In particular, {f (xn )} does not converge to L. On the other hand, {xn } converges
to a; the squeeze principle assures this because

1 1
a− < xn < a +
n n
for all n. Thus our sequence {xn } violates (i), as desired, and we’ve shown that
(i) =⇒ (ii).
Showing (ii) =⇒ (i) is easier; we’ll leave it as an exercise. 

Lemma 3.2 lets us exploit earlier work with sequences to find, without much
effort, a lot of function limits that would be tedious or difficult to handle from
scratch.

E XAMPLE 5. Let f (x) = (3x2 + 5x + 2)/(2x − 7). Use Lemma 3.2 to prove
that limx→5 f (x) = 102
3 .

S OLUTION . Proving such a thing straight from the –δ definition could get ugly.
With Lemma 3.2, it is easy.
To get started, let {xn } be any sequence with xn → 5. By Lemma 3.2, it is
enough to show that

3x2n + 5xn + 2 102


lim f (xn ) = lim = .
n→∞ n→∞ 2xn − 7 3
This, in turn, follows from different parts of Theorem 2.5, page 83, which allows
algebraic combinations like the following for limits of sequences: No worries here about zero
denominators.
3x2n + 5xn + 2 3(lim xn )2 + 5(lim xn ) + 2
lim =
n→∞ 2xn − 7 2(lim xn ) − 7
3 · 52 + 5 · 5 + 2 102
= = ,
2·5−7 3
as claimed. ♦

i i

i i
i i

i i

138 3. Limits and Continuity

New function limits from old. The following theorem does for functions what
Theorem 2.5, page 83, does for sequences.
Theorem 3.3 (Algebra with limits). Let f (x) and g(x) be defined for all inputs x
in I \ {a}, where I is any open interval containing a, and suppose that
lim f (x) = L and lim g(x) = M.
x→a x→a

Then
lim (f (x) ± g(x)) = lim f (x) ± lim g(x) = L ± M ;
x→a x→a x→a
lim (f (x) · g(x)) = lim f (x) · lim g(x) = L · M ;
x→a x→a x→a
f (x) limx→a f (x)
lim = if M = 0.
x→a g(x) limx→a g(x)
Observe:
• Existence: Theorem 3.3 is more than a recipe for calculating new limits
from old; it is also a guarantee that various limits (those on the left of each
equation) actually exist. In the case of quotients, for existence, one might
reasonably worry about small or vanishing denominators; Theorem 3.3 as-
sures us that all is well if M = 0.
• Something to combine: The how-to-combine-limits rules in Theorem 3.3
aren’t much good until we have some already-proved basic limits to com-
bine. The good news is that a few very, very basic limits, such as
lim x = a and lim k = k
x→a x→a

We addressed these in go a long way. Applying Theorem 3.3, repeatedly as necessary, lets us cal-
Example 2. culate limits like these without too much effort:
3x2 + 5x + 2 3 · 52 + 5 · 5 + 2
lim = = 34;
x→5 2x − 7 2·5−7
5+2
317x2 − 5 x+3
x+2
317 · 52 − 5 5+3
lim = ≈ 0.5117.
x→5 42.075 − x5 42.075 − 55
(We calculated the first limit, a bit differently, in Example 5.)
Proof: All parts of Theorem 3.3 follow easily when we combine the analogous
results for sequences (Theorem 2.5, page 83) with Lemma 3.2, above. Concerning
products, for instance, we consider any sequence {xn } in I \ {a}. By hypothesis,
the new sequences {f (xn )} and {g(xn )} converge to L and M , respectively.
By Theorem 2.5, the product sequence {f (xn )g(xn )} converges to LM , and
Lemma 3.2 assures us that limx→a f (x)g(x) = LM , too. The remaining parts
are similar. 

i i

i i
i i

i i

3.1. Limits of Functions 139

Squeezing functions. A squeeze principle works for function limits. We’ve al-
ready proved the sequence version (Theorem 2.6, page 86):
Proposition 3.4 (The squeeze principle). Let f (x), g(x), and h(x) be defined
for all inputs x in I \ {a}, where I is an open interval containing a, and suppose
that
f (x) ≤ g(x) ≤ h(x) for all x ∈ I \ {a}.
If limx→a f (x) = L and limx→a h(x) = L, then limx→a g(x) = L, too.
The proof, like that of Theorem 3.3, amounts to combining the sequence version
with Lemma 3.2. We’ll leave that to the exercises.
The limit-squeezing idea is simple. The tricky bit in practice is to find helpful
squeezing inequalities.

sin x
E XAMPLE 6. Squeeze something to find limx→0 x sin(1/x) and limx→0 x . Plotting these functions might
be useful.

S OLUTION . The fact that |x sin(1/x)| ≤ |x| for all x = 0 suggests a simple
squeezing inequality:
1
− |x| ≤ x sin ≤ |x|.
x
Clearly, ±|x| → 0 as x → 0, so the middle quantity tends to zero, too.
Finding a good squeezing inequality for the second limit takes more effort.
Here is one possibility:
sin x 1
cos x ≤ ≤ if x ∈ (−1, 1) and x = 0.
x cos x
This does the job: Since cos x → 1 as x → 0, the left- and right-hand functions
tend to 1, and hence so does the middle function. The squeezing inequality needs
proof too, of course; we’ll leave that to the exercises to avoid distraction. ♦

Beyond Vanilla: More Limit Varieties


We’ll find uses for several variations on the basic limit theme discussed above.
Here are some samples of limits at infinity and infinite limits:
4x + 3 1  
lim = 2; lim 2 = ∞; lim x2 − x3 = ∞.
x→∞ 2x + 1 x→0 x x→−∞

Here are some one-sided limits:


x x−3
lim ln x = −∞; lim √ = 0; lim = −1.
x→0 + x→0 1 +
+ x x→3 |3 − x|

Following are several formal definitions; we leave some others, all in the same Familiar functions from calculus
spirit, as exercises. As with Definition 3.1, each part here involves some technical seldom cause trouble on this
assumption about domains, needed to ensure that the key inequalities make sense. score.

i i

i i
i i

i i

140 3. Limits and Continuity

Definition 3.5 (Variant limits). Let f be a function and let a and L be real
numbers.
• Right-hand limit: Let f (x) be defined for all inputs x in some open interval
I = (a, b). We say limx→a+ f (x) = L if, for every  > 0, there exists
δ > 0 such that

|f (x) − L| <  whenever x ∈ I and a < x < a + δ.

• Left-hand infinite limit: Let f (x) be defined for all inputs x in some open
interval I = (b, a). We say limx→a− f (x) = −∞ if, for every M > 0,
there exists δ > 0 such that

f (x) < −M whenever x ∈ I and a − δ < x < a.

• Limit at infinity: Let f (x) be defined for all inputs x in some open interval
I = (b, ∞). We say limx→∞ f (x) = L if, for every  > 0, there exists
N > 0 such that

|f (x) − L| <  whenever x ∈ I and x > N .

• Infinite (two-sided) limit: Let f (x) be defined for all inputs x in an open
interval I containing a, except perhaps at x = a. We say limx→a f (x) = ∞
if, for every M > 0, there exists δ > 0 such that

f (x) > M whenever x ∈ I and 0 < |x − a| < δ.

• Infinite limit at infinity: Let f (x) be defined for all inputs x in some open
interval I = (b, ∞). We say limx→∞ f (x) = ∞ if, for every M > 0, there
exists N > 0 such that

f (x) > M whenever x > N.

E XAMPLE 7. Prove these limits:


1 3x + 2 2x
(a) lim = 0; (b) lim = 3; (c) lim+ √ = 0.
x→∞ x x→∞ x+5 x→0 1+ x

S OLUTION . Note first that the functions in all three limits are fine as regards
domains. The first is defined for x > 0, the second for x > −5, and the third for
x ≥ 0.
Limits (a) and (b) have close analogues for sequences—limn→∞ n1 = 0 and
limn→∞ (3n + 2)/(n + 5) = 3—and the proofs for functions are almost identical
to those for sequences. For (b), for instance, we proved the sequence version in

i i

i i
i i

i i

3.1. Limits of Functions 141

Example 2, page 75, and the function version is almost the same. First, we see
that for any positive ,
3x + 2 3x + 2 − 3(x + 5) 13
−3 = = .
x+5 x+5 x+5
(It is OK to drop the absolute value because x + 5 > 0 certainly holds for the
large positive x in which we’re interested.) Now
13 13
<  ⇐⇒ − 5 < x,
x+5 
and so for any given  > 0 we can set M = 13/. This M works in the appropriate
definition, because if x > M , then (skipping some details from just above)
3x + 2 13 13
−3 = < = ,
x+5 x+5 M
as desired. Limit (a) is left to you.
For (c), only positive x matter, and so
2x 2x 
√ −0 = √ < 2x <  ⇐⇒ x< .
1+ x 1+ x 2
Thus, for given  > 0 the value δ = /2 works: if 0 < x < δ, then
2x
√ − 0 =< 2x < 2δ = ,
1+ x
as the definition requires. ♦

All in the limit family. All of these limit variants are close kin to each other. Limits
at infinity, for instance, are one-sided in the sense that ∞ is approachable only
from below, and −∞ only from above. The following proposition makes some of Similar results apply to limits
this kinship explicit: that involve −∞.

Proposition 3.6. Let a and L be finite numbers, and f a function.


(i) limx→a f (x) = L if and only if limx→a+ f (x) = limx→a− f (x) = L.
 
(ii) limx→∞ f (x) = L if and only if limx→0+ f x1 = L.
1
(iii) limx→∞ f (x) = ∞ if and only if limx→∞ f (x) = 0.

Observe, especially, what the proposition says about existence: if the limits on
either side of “if and only if” exist, then so must the limits on the other side.
We will leave formal proofs to the exercises, but illustrate the idea of (i) with an
example.

i i

i i
i i

i i

142 3. Limits and Continuity

0.4

0.2

– 0.4 – 0.2 0.2 0.4

– 0.2

– 0.4

Figure 3.2. A piecewise-defined function.

E XAMPLE 8. Figure 3.2 shows the function



x/2 if x < 0,
g(x) =
2x sin(1/x) if x > 0.

Show that limx→0 g(x) = 0.

S OLUTION . Let  > 0 be given; we need a δ > 0 that works for . Because of
g’s peculiar two-sided nature, we’ll first find positive numbers δleft and δright that
Here “right” and “left” mean work for  on the left and on the right of zero, respectively.
x > 0 and x < 0, respectively. Matters are simplest on the left. There g(x) = x/2, and so
x
|g(x) − 0| = < ⇐⇒ |x| < 2,
2
which means that δleft = 2 works (and also that limx→0− g(x) = 0). On the
right, we have g(x) = 2x sin(1/x), and so

|g(x) − 0| = |2x sin(1/x)| ≤ |2x| <  ⇐⇒ |x| < ,
2
which means that δright = /2 works (and that limx→0+ g(x) = 0).
Combining these results means that |g(x) − 0| <  holds for all nonzero x in
the asymmetric interval

(−δleft , δright ) = (−/2, 2) .

Obviously, |g(x) − 0| <  also holds for nonzero x in the (smaller) symmetric
interval (−δleft , δleft ). This means that δ = δleft = /2 works for  in the desired
limit. We’re done. ♦

i i

i i
i i

i i

3.1. Limits of Functions 143

More algebra. These newfangled limits—if finite—enjoy all of our by-now-


familiar algebraic and squeezing properties. Infinite limits, on the other hand,
need special care.

E XAMPLE 9. Find and prove (or re-prove) these limits:

1 3x + 2 
lim √ ; lim ; lim x2 − 1000x; lim x2 + 2x − x.
x→∞ x + x+3 x→∞ x + 5 x→∞ x→∞

S OLUTION . The first limit yields to squeezing. For all x > 0, we have

1 1
0< √ < ;
x+ x+3 x

since limx→∞ x1 = 0, we must have limx→∞ 1/(x + x + 3) = 0, too.
We found the second limit from scratch in Example 7. With algebra we can
reduce the limit to something simpler (also handled in Example 7):

3x + 2 3 + 2/x 3 + 2 lim 1/x 3+0


lim = lim = = .
x→∞ x+5 x→∞ 1 + 5/x 1 + 5 lim 1/x 1+0

The limit limx→∞ x2 − 1000x involves the difference of two quantities, each
tending to infinity. Which tendency “wins”? It is easy to guess that x2 over-
whelms 1000x for large x, and so, presumably limx→∞ x2 − 1000x = ∞. Alge-
bra helps confirm this. For any given M > 0, we have

x2 − 1000x = x(x − 1000) > M if x > M and x ≥ 1001,

so we can use N √ = max M, 1001 in the appropriate definition. Check details for yourself.
The function x2 + 2x−x is another difference of two quantities that diverge
to infinity. Plotting the function or plugging in large values of x suggests that the Try it.
limit is one. We can show this algebraically—with a little effort. The trick is to
multiply and divide by the conjugate expression:
√  √ 
 x2 + 2x − x x2 + 2x + x
x2 + 2x − x = √
x2 + 2x + x
2x 2
= √ =  .
2
x + 2x + x 1 + 2/x + 1

√and denominator by x in the last equality.) This


(We divided numerator is progress:
to show that limx→∞ x2 + 2x−x = 1 it remains only to show that 1 + 2/x →
1 as x → ∞. We’ll leave this reasonable-seeming result to the exercises. ♦

i i

i i
i i

i i

144 3. Limits and Continuity

Exercises
1. We said in Example 2 that if a and k are any constants, then

lim x = a and lim k = k.


x→a x→a

Use Definition 3.1 to prove this.

2. Guess a value for each of the following limits; prove your answers using
Definition 3.1, page 133.

(a) lim 2x + 3
x→1

x2 − 1
(b) lim
x→−1 x + 1

x2 + x − 2
(c) lim
x→1 x−1
2 + sin x
(d) lim x
x→0 3 − cos x

3. For a function f and an input x = a it may (or may not) happen that
limx→a f (x) = f (a). If f (x) = 3x + 5, for instance, it is easy to show that
limx→42 f (x) = 3 · 42 + 5 = f (42). (At a domain endpoint, we’d use the
appropriate one-sided limit.)
In each case following, decide whether this happens. If so, prove it; if not,
say why not. (Theorem 3.3, page 138, may be useful.)

(a) f (x) = x2 ; a = 42.


(b) f (x) = x2 ; a = any constant.
x2 − 4
(c) f (x) = ; a = 2.
x−2
x2 − 4
(d) f (x) = ; a = 3.
x−2

(e) f (x) = x, a = 0 .
(f) f (x) = |x|; a = 0.
(g) f (x) = 1 + πx + ex2 + πex3 ; a = any constant.

4. Prove Proposition 3.4. (One way is to use Theorem 2.6, page 86, and
Lemma 3.2.)

5. Show that (ii) implies (i) in Lemma 3.2.

i i

i i
i i

i i

3.1. Limits of Functions 145

6. In Example 6, we used the squeezing inequality


sin θ 1
cos θ ≤ ≤ .
θ cos θ
(We said x, not θ.) Show as follows that this holds for nonzero θ in
(−π/2, π/2).

(a) Explain why it is good enough to show this for θ ∈ (0, π/2).
(b) Give a geometric proof of the (equivalent) inequality sin θ cos θ ≤
θ ≤ tan θ. (Hint: Draw the angle θ into the first quadrant of the
unit circle in the usual way. Then find right triangles whose areas
represent the left- and right-hand quantities above. What area does θ
represent?)

7. We defined several variations on the basic limit theme in Definition 3.5.


Here we explore two more members of the family.

(a) Give a precise definition for the expression limx→−∞ f (x) = L.


(b) Give a precise definition for limx→0− g(x) = L.
(c) Use the preceding parts to show that limx→−∞ f (x) = L if and only
if limx→0− f (1/x) = L.

8. This problem explores limit properties of the function f (x) = x.

(a) Let a > 0. Show limx→a f (x) = f (a) = a. Use an –δ proof; the
inequality
√ √ |x − a| |x − a|
x− a = √ √ ≤ √
x+ a a
may help.
(b) Show limx→0+ f (x) = f (0) = 0. Use an –δ proof.

 claimed in Example 9 that 1 + 2/x → 1 (or, equivalently, that
(c) We
1 + 2/x − 1 → 0) as x → ∞. Deduce this by showing that the
squeezing inequality 0 < 1 + 2/x − 1 < 2/x holds for all x > 0.
9. Use a computer plotting utility in this problem, which explores the graphi-
cal interpretation of Definition 3.1, page 133. No proofs needed. Through-
out, let f (x) = x2 − 6x.

(a) Assume (it is easy to show, but don’t bother) that limx→1 f (x) = −5.
For  = 0.01, find a positive δ that works, and illustrate your answer
by sketching the graph of f in a well-chosen window of half-height 
and half-width δ.

i i

i i
i i

i i

146 3. Limits and Continuity

(b) It is a fact that limx→100 f (x) = 9400. For  = 0.01, find a positive δ
that works, and illustrate your answer by sketching the graph of f in
a well-chosen window of half-height  and half-width δ.
(c) It is true that limx→10 f (x) = 40. Set  = 0.01. Does δ = 0.001
work in this case? Sketch the graph of f in an appropriate window to
illustrate your answer.

10. Suppose that f (x) = 0 if x = 0 and f (0) = 42. Explain carefully why
limx→a f (x) = 0 for all real numbers a.

11. Suppose that g(x) = 0 if x ∈


/ Z and g(n) = 42 if x ∈ Z. Explain carefully
why limx→a g(x) = 0 for all real numbers a.

12. Suppose that h(x) = 42 if x = 1, 1/2, 1/3, . . . and h(x) = 0 otherwise.


What can be said about limx→a h(x)? Why?

13. Let S be a finite set of real numbers. Suppose that j(s) = 42 if s ∈ S


and j(x) = 0 for all other real x. Show that limx→a j(x) = 0 for all real
numbers a.

14. Explain why the function g in Example 8, page 142, satisfies the squeez-
ing inequality −|2x| ≤ g(x) ≤ |2x|. Use this to give another proof that
limx→0 g(x) = 0.

3.2 Continuous Functions


In everyday use the word “continuous” means something like “unbroken” or
“without gaps.” In elementary calculus, calculus, for instance, a continuous func-
tion may be thought of as one whose graph can be drawn without lifting the pencil.
Such views can be useful, but they need sharpening for mathematical purposes.
Even sharp ones. Pencils are not mathematical objects; to get started we need to describe continuity
in mathematical language. Function limits are the key.

Definition 3.7 (Continuity of a function at a point). Let the function f be defined


for all inputs x in an open interval I containing a. We say f is continuous at x = a
if, for every  > 0, there exists δ > 0 such that

|f (x) − f (a)| <  whenever x ∈ I and |x − a| < δ.

Otherwise, f is discontinuous at x = a.

i i

i i
i i

i i

3.2. Continuous Functions 147

Observe:
• In terms of limits: All those ’s and δ’s suggest a lurking limit. Sure enough,
the definition boils down to this:
lim f (x) = f (a).
x→a

In words: The value f (a) is also the limit of f (x) as x approaches a.


• No domain gap allowed: For f to be continuous at a it is necessary—but
not sufficient—that limx→a f (x) exist. Two additional requirements apply:
(i) the value f (a) must exist; (ii) f (a) must be the limit.

• What if a is an endpoint? Is the function f (x) = x continuous at x = 0?
The answer will turn out to be yes—but note that the definition above
doesn’t say either way, because f is not defined on any open interval con-
taining x = 0. Later we will treat the case where x = a is an endpoint of a
function’s domain; right now we will stick to the basic version.
• No surprises: Continuity of f at a means, roughly speaking, that f “springs
no surprises” at a: The value f (a) can be inferred from values f (x) for x
near a. In terms of  and δ, the condition is that f (x) stays within  of f (a)
as long as x stays within δ of a.
Let’s see some examples and non-examples.

x2 −4x−5
E XAMPLE 1. Where is the function f (x) = x2 −25 continuous? Can any
discontinuities be “fixed”?

S OLUTION . The live question for any given a is whether


x2 − 4x − 5 a2 − 4a − 5
lim f (x) = lim = = f (a).
x→a x→a x2 − 25 a2 − 25
Thanks to algebraic properties of limits the answer is yes—except perhaps at Summarized in Theorem 3.3,
a = ±5, where the denominator vanishes. So f is continuous at all a = ±5. page 138.
What if a = ±5? The short answer is that f is discontinuous at both points,
because both f (5) and f (−5) are undefined. On the other hand, factoring gives
(x − 5)(x + 1) x+1
f (x) = =
(x − 5)(x + 5) x+5
for x = ±5, from which it is easy to see (or prove, but we won’t bother) that
6
lim f (x) = , but lim f (x) does not exist.
x→5 10 x→−5

This means, in turn, that we can make f continuous at a = 5 by defining f (5) =


Plot f to see for yourself; a gap
3/5, but that the discontinuity at a = −5 is there to stay. A look at the graph of f might appear at x = 5,
suggests the same conclusion. ♦ depending on the technology.

i i

i i
i i

i i

148 3. Limits and Continuity

0.5

– 0.5

–1
–1 – 0.5 0 0.5 1

Figure 3.3. A function continuous at only one point.

E XAMPLE 2. Consider the functions



⎪ 
⎨−1 if x < 0, x if x ∈ Q,
sign(x) = 0 if x = 0, and g(x) =

⎩ 0 if x ∈
/ Q.
1 if x > 0,

Figure 3.3 hints at the graph of g.

Sketch your own. S OLUTION . As its graph suggests, the sign function is discontinuous at a = 0,
because limx→0 sign(x) does not exist. But the sign function is continuous at all
a = 0, because (as the graph also suggests) limx→a sign(x) = ±1 = sign(a).
Formal proofs are straightforward; see the exercises.
The function g is stranger, and its graph is much weirder than Figure 3.3
suggests. For example, neither “line” contains any unbroken segment, but each
“line” contains infinitely many points, so densely packed that between any two
points lie infinitely many more.
Bizarre as g seems, it is not hard to show that g is continuous at a = 0 but
discontinuous elsewhere. To show continuity at a = 0, we need to check that
limx→0 g(x) = g(0) = 0. This follows from the squeezing inequality

− |x| ≤ g(x) ≤ |x|.

Since the left- and right-hand quantities clearly tend to zero, so must g(x).
For a = 0, on the other hand, limx→a g(x) does not exist. One way to prove
this is to consider two sequences {rn } and {pn }, each converging to a, with
Such sequences do exist. rn ∈ Q and pn ∈ / Q for all n. Then we have

i i

i i
i i

i i

3.2. Continuous Functions 149

g(rn ) = rn → a while g(pn ) = 0 → 0;

thus, limx→a g(x) does not exist, and so g is discontinuous. ♦

Continuity at domain endpoints: use one-sided limits. The domain of f (x) =



x includes the point 0, but nothing to the left of 0, and so the basic defini-
√ apply. Still, it seems reasonable to call f continuous at 0, because
tion can’t
f (x) = x ≈ f (0) = 0 for all positive x near 0. The following definition offers
a natural way out of this mild impasse.
Definition 3.8 (Continuity at a left endpoint). Suppose that f is defined on an in-
terval I = [a, b), but not on any open interval containing a. We say f is continu-
ous at x = a if, for every  > 0, there exists a number δ > 0 such that

|f (x) − f (a)| <  whenever x ∈ I and a ≤ x < a + δ.

Equivalently, f is continuous at x = a if limx→a+ f (x) = f (a).

The idea for continuity at a right endpoint is essentially the same. In practice, We leave it to you.
endpoint continuity comes up less often than the standard version—after all, an
interval has only two endpoints, but infinitely many points in between.

E XAMPLE 3. Check that the function f (x) = x is continuous at x = 0.
√ √
S OLUTION . We only need to show that limx→0+ x = 0 = 0. Doing so is
straightforward. For any  > 0, the choice δ = 2 works:
√ √
if 0 < x ≤ δ, then 0 < x ≤ δ = ,

as desired. ♦

Continuity on a set. As Examples 1 and 2 illustrate, a function may be con-


tinuous at some points of its domain, and discontinuous elsewhere. Here is the
pertinent definition:
Definition 3.9 (Continuity on a set). A function f is continuous on a set S if f is
continuous at each point a ∈ S.

We showed in Example 2, for instance, that the strange function g is contin-


uous on the set {0}, but not on any larger set. The sign function, by contrast, is
continuous on the complementary set R \ {0}, and √ the function f in Example 1
is continuous on R \ {−5, 5}. The function f (x) = x in Example 3 is continu-
ous on [0, ∞). It is possible to concoct terribly-behaved functions, continuous on
small or strange sets, but continuity is the rule for the familiar functions studied
in calculus.

i i

i i
i i

i i

150 3. Limits and Continuity

New Continuous Functions from Old


As we’ve already done with limits, sequences, and other objects, we can combine
“old” functions in various ways to produce new ones. We will show, next, that
combining continuous ingredients usually produces continuous results.

Elementary functions. The standard functions of calculus have formulas, such as


 cos x  cos x
exp(x2 + 5x + sin x), sin , and arctan ln .
x 3x + 1
Such functions—even the nasty ones—are called elementary, because they’re
built up, using composition and algebra, from simpler basic “elements,” like x2 ,
sin x, and ln x.
Elementary functions come in families. Here are several:
• polynomials: functions of the form p(x) = a0 + a1 x + a2 x2 + · · · + an xn ,
where n is any positive integer and the ai are constants;
• rational functions: functions of the form r(x) = p(x)/q(x), where p and
q are polynomials;
• exponential and trigonometric functions: exp x, sin x, cos x, tan x, sec x,
csc x, cot x.
• inverse functions: logs, inverse trigonometric functions, roots, etc., such as

ln x, arctan x, x;
• hybrids: functions formed from those above by composition and algebraic
combinations.
Are elementary functions continuous? The short answer is yes—but only at
points a where their formulas make good sense. (If a happens to be a domain
endpoint, then continuity is understood in the sense of Definition 3.8.) In other
words, an elementary function is continuous throughout its natural domain. This
domain condition is often clear at a glance. The middle function above, for in-
stance, is obviously undefined at x = 0, so there’s no hope of continuity there.
The right-hand function, by contrast, has an uglier natural domain—both the arc-
tangent and the log might cause trouble.
Showing continuity of elementary functions, even ugly ones, on their natural
domains is easy once we know that the basic functions (x2 , 1/x, sin x, ex , ln x,
etc.) are all continuous on their domains. We address this problem briefly below—
but only briefly to keep focus on our main concerns.
Proposition 3.10. Each of the functions
c(x) = k (any constant), i(x) = x, sin x, arctan x, ex , ln x
is continuous on its natural domain.

i i

i i
i i

i i

3.2. Continuous Functions 151

Continuity of c and i at any input a amounts to nothing more than that limx→a c =
c and limx→a x = a; both claims are very easy to show. Proving continuity of
the remaining functions rigorously takes more effort—starting with clear defini-
tions of these functions. We omit details here, but see the exercises for further
discussion.

Continuous combinations. Now that we have some continuous functions to com-


bine, let’s combine some, both algebraically and with composition.

Proposition 3.11 (Algebraic combinations are continuous). Suppose that func-


tions f and g are continuous at a point a. Then the functions

f
f ± g, f g, and
g

are all continuous at a (for f /g we require g(a) = 0).

Proposition 3.12 (Composites are continuous). Suppose g is continuous at a


and f is continuous at b = g(a). Then the composite function f ◦ g(x) = f (g(x))
is continuous at x = a.

Proof (s): Proving Proposition 3.11 boils down to verifying algebraic properties
of limits. We’ve done that already; see Theorem 3.3 (page 138) and its proof.
We’ll prove Proposition 3.12 in good –δ style. For simplicity we’ll assume The proof involves two δ’s,
that f and g are defined on open intervals about b and a, respectively. To this end, chosen one after the other.
let  > 0 be given. Since f is continuous at b, there exists δ1 > 0 such that In other words, a and b are not
domain endpoints.
|f (y) − f (b)| <  whenever |y − b| < δ1 .

Similarly, since g is continuous at a and δ1 > 0 there exists a δ2 > 0 so that

|g(x) − b| < δ1 whenever |x − a| < δ2 .

To finish the proof, note that this δ2 works for the original  > 0:

|x − a| < δ2 =⇒ |g(x) − g(a)| < δ1


=⇒ |f (g(x)) − f (g(a))| < ,

as desired.  We will explore another proof,


using sequences, in the
exercises.
Now we can put the pieces together.

Proposition 3.13 (Elementary functions are continuous). The elementary func-


tions are continuous at all points of their natural domains.

i i

i i
i i

i i

152 3. Limits and Continuity

About proofs. The general point is that elementary functions are combinations,
of the types treated in Propositions 3.11 and 3.12, of the continuous functions
discussed in Proposition 3.10. For instance, writing the polynomial p(x) = 3x2 +
πx − 7 in the form

3x2 + πx − 7 = 3 · x · x + π · x − 7

shows explicitly that p is built by multiplication and addition from constant func-
tions and the function i(x), both of which are continuous according to Proposi-
tion 3.10.
Continuity of all six basic trigonometric functions on their domains follows
from continuity of the sine function and such identities as

sin x 1
cos x = sin (x + π/2) ; tan x = ; sec x = .
cos x cos x
In a similar way, the functions

3x2 + 5x − 7 cos x
r(x) = and g(x) = arctan ln
x2 − 1 3x + 1

are built up from functions shown (or claimed) to be continuous in Proposi-


tion 3.10. A full proof for all cases would require rigorous definitions and proofs
of continuity for logarithmic, inverse trigonometric, and other such functions.

Exercises
1. Let A, B, and c be any real numbers. Use the –δ definition to show that
f (x) = Ax + B is continuous at c. Does it matter if A = 0?

2. Suppose that f is continuous on R and that f (x) = 0 if x is rational. Show


that f (x) = 0 for all x.

3. (a) Show that f (x) = |x| is continuous at every a ∈ R.


(b) Show that if g : I → R is continuous on I, then so is h(x) = |g(x)|.

4. If f : I → R and g : I → R are any functions defined on I, then


we can form new functions max{f, g} and min{f, g} in the “obvious”
way: max{f, g}(x) = max{f (x), g(x)} for all x ∈ I, and similarly for
min{f, g}.

(a) Sketch graphs of max{f, g} and min{f, g} if f (x) = sin x and g(x) =
cos x on I = [−2π, 2π].

i i

i i
i i

i i

3.2. Continuous Functions 153

(b) Show that

|f (x) − g(x)| + f (x) + g(x)


max{f (x), g(x)} = .
2
Find a similar fact “formula” for min{f (x), g(x)}.
(c) Show that if f and g are continuous on I, then so are max{f, g} and
min{f, g}. (Hint: Use (b) and the preceding problem.)

5. We said in Example 2, page 148, that the sign function is discontinuous at


a = 0 but continuous everywhere else. Prove this in two parts:

(a) limx→0 sign(x) does not exist;


(b) limx→a sign(x) = sign(a) if a = 0.

6. Suppose f (3) = 5 and f is continuous at 3. Show that there exists δ > 0


such that 4.999 < f (x) < 5.001 for x ∈ (3 − δ, 3 + δ).

7. Suppose f (3) > 5 and f is continuous at 3. Show that there exists δ > 0
such that f (x) > 5 for x ∈ (3 − δ, 3 + δ).

8. Let f be the function whose graph consists of the two line segments joining
(0, 0), (1, 1), and (2, −1). Show that f is continuous at x = 0 and at x = 1.
(In fact, f is continuous on all of [0, 2].)

9. A function f has a removable discontinuity at a point x = a if (i) f is


discontinuous at a; but (ii) we can define (or redefine) f (a) so that f be-
comes continuous at x = a. In each part, decide whether the function has a
removable discontinuity at the given point. If so, explain how to remove it.
If not, why not?

1
(a) f (x) = ; a = 0.
x
x2 − 4
(b) f (x) = ; a = −2.
x+2
1
(c) f (x) = x sin ; a = 0.
x
10. Let I be an open interval containing zero, and f : I → R any function that
is bounded on I. Define a new function g : I → R by g(x) = xf (x).

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


(b) Suppose a = 0. Show that g is continuous at x = a if and only if f is
continuous at x = a.

i i

i i
i i

i i

154 3. Limits and Continuity

3.3 Why Continuity Matters: Value Theorems


In the preceding section we defined continuity of functions, and investigated many
examples and a few non-examples. In this section we explore some good-behavior
properties of continuous functions. Most notable are two famous theorems on
“intermediate” and “extreme” values of continuous functions.

Questions of values. Continuity is a form of good behavior, so it’s natural to


wonder what other pleasant properties continuous functions might have. Some
such properties concern output values of a function f . We might reasonably hope,
for instance, that if f (1) = −7 and f (2) = 42, then for any number v between
−7 and 42 (the value v is “intermediate” between f (1) and f (2)) there should
be some input c between 1 and 2 with f (c) = v. The famous intermediate value
theorem (Theorem 3.16 in this section) guarantees that this happy outcome does
indeed occur, provided that f is continuous on the entire interval [1, 2]. In short, a
continuous function f “assumes all intermediate values” between f (1) and f (2).
Put graphically, the claim sounds reasonable: If the graph of f starts at height −7
and ends at height 42, then it must pass through all “intermediate” heights along
the way. A rigorous proof is another matter.
Another value-related question concerns extremes: Must the function f above
achieve smallest and largest values somewhere on the interval [1, 2]? If f happens
to be increasing, there is no question: f (1) = −7 and f (2) = 42 are clearly
the desired “extreme values.” But arbitrary continuous functions can be much
choppier; must every one achieve maximum and minimum values? The famous
extreme value theorem (Theorem 3.17 in this section) says yes—again provided
that f is continuous on the entire interval [1, 2].

Properties of Continuous Functions


Our proofs of the big “value theorems” depend on some basic properties of contin-
uous functions. These properties are of independent interest, offering new insight
into what continuity means.

We made up the fancy name. Sticky inequalities. Our first such property says, roughly, that if a continuous
function satisfies a strict inequality at a point, then the same inequality holds
(“persists”) for inputs near that point.
Proposition 3.14 (The Principle of Persistent Inequalities (PoPI)). Let f be con-
tinuous at c and defined on an interval I containing c; let K be any constant. If
f (c) < K then there is some δ > 0 such that

f (x) < K for all x ∈ (c − δ, c + δ) .

(A similar PoPI holds if f (c) > K.)

i i

i i
i i

i i

3.3. Why Continuity Matters: Value Theorems 155

30

20

10

0
0.2 0.4 0.6 0.8 1.

– 10

– 20

– 30

Figure 3.4. The function h(x) = sin(1/x)/x; badly unbounded near x = 0.

Proof: For simplicity, we handle the case where c is not an endpoint of I. The
case where c is an endpoint is similar.
Supposing, then, that f (c) < K, we set  = K − f (c) > 0, and choose δ > 0
according to the definition of continuity of f at c. This δ satisfies our present
claim, because if |x − c| < δ, then

|f (x) − f (c)| <  = K − f (c).

In particular, we have

f (x) − f (c) < K − f (c) =⇒ f (x) < K,

as desired. 
Boundedness. What, if anything, does continuity have to do with boundedness
of a function f on an interval I? It is clear from easy examples that a continuous
function f need not be bounded on I, even if I itself is bounded. For instance, the
functions
1 1 1 sin (1/x)
f (x) = , g(x) = + , and h(x) =
x x x−1 x
are all continuous on I = (0, 1), but f is unbounded above on I, g is unbounded
above and below, and h behaves even worse. As Figure 3.4 suggests, h is un-
bounded both above and below on every interval (0, ). But there’s good news
about continuous functions on closed intervals, and the proof involves an old
friend.
Proposition 3.15. Let f be continuous on the closed and bounded interval [a, b].
Then f is bounded on [a, b]; that is, there exist numbers m and M such that

m ≤ f (x) ≤ M for all x ∈ [a, b].

i i

i i
i i

i i

156 3. Limits and Continuity

Proof: We will show that any function f with the given properties is bounded
above; the proof for lower bounds is similar. Suppose, toward contradiction, that
f is unbounded above. Because one is not an upper bound there must be some
x1 ∈ [a, b] with f (x1 ) > 1. Because two is also not an upper bound, there is
x2 ∈ [a, b] with f (x2 ) > 2. Continuing this process, we can construct a sequence

x1 , x2 , x3 , . . . with f (xn ) > n for all n.

Below by a and above by b. Now the sequence {xn } is bounded and so, by the Bolzano–Weierstrass theorem,
has a subsequence {xnk } that converges to some limit x0 ∈ [a, b].
Here comes our contradiction. Because f is continuous at x0 and xnk → x0 ,
we must have f (xnk ) → f (x0 ), too. This is impossible: for all k we have

f (xnk ) > nk ≥ k.

This means that the sequence {f (xnk )} is unbounded, and hence divergent. 

Proposition 3.15 applies, by the way, to the three functions f , g, and h discussed
above—as long as we restrict domains to closed intervals, such as [0.002, 0.9998],
on which all three functions are continuous. (On this interval, −500 < h(x) <
500, for instance.)

Two Big Theorems


With Propositions 3.14 and 3.15 at the ready we can prove our two main theorems.

Theorem 3.16 (Intermediate value theorem (IVT)). Let f be continuous on [a, b],
with f (a) = f (b); let v be any number between f (a) and f (b) (i.e., f (a) < v <
f (b) or f (b) < v < f (a)). Then there exists c in (a, b) with f (c) = v.

Proof: We discuss the case f (a) < v < f (b); the argument for the case f (b) <
v < f (a) is similar.
a ∈ S, for instance. Consider the set S = {x ∈ [a, b] | f (x) < v}. Because S is nonempty and
By b, for instance.
bounded above, it has a least upper bound—say, c—somewhere in [a, b]. We’ll
show that c has all the properties claimed in the theorem.
Our first claim is that f (c) ≤ v. This is trivial if c ∈ S. If c ∈
/ S, then there is
a sequence {sn } of members of S with sn → c. Because f is continuous at c we
must have f (sn ) → f (c), and since f (sn ) < v for all n it follows that f (c) ≤ v.
We see, too, that c = b, since we know f (b) > v.
That’s Proposition 3.14, To complete the proof, we show that f (c) < v is impossible; the PoPI is the
page 154. key. Indeed, if f (c) < v holds, then the PoPI says that f (x) < v must also hold
for x in some small interval (c − δ, c + δ). This is absurd—we chose c so that
f (x) ≥ v for all x > c. Thus f (c) = v, as desired. 

i i

i i
i i

i i

3.3. Why Continuity Matters: Value Theorems 157

Theorem 3.17 (Extreme value theorem (EVT)). If f is continuous on [a, b], then
f assumes both a maximum and a minimum value on [a, b]. That is, there exist
xmin and xmax in [a, b] such that
f (xmin ) ≤ f (x) ≤ f (xmax ) for all x ∈ [a, b].
Notice especially the important words “assumes,” “maximum,” and “minimum”:
The theorem guarantees that f achieves, not just approaches, biggest and smallest
values on [a, b].
Proof: Consider the output set We defined “range” in
Section 1.4.
R = range(f ) = {f (x) | x ∈ [a, b]} .
Proposition 3.15 says that R is a bounded set of real numbers. Since R is also
nonempty, the completeness axiom guarantees the existence of an infimum α and
a supremum β. To finish the proof, we need only show that α and β are members
of the range. With help—again—from Bolzano and Weierstrass we’ll handle the
case for β. The case for α is almost
Recall first that, since β = sup(R), there is a sequence {yn } contained in identical.
R with yn → β. (If β ∈ R, there is no harm done—we can just take yn = β
for all n.) Now for each yn there is at least one xn in [a, b] with f (xn ) = yn .
Choosing any one of these for each n produces a new sequence {xn } such that,
for all n,
a ≤ xn ≤ b and f (xn ) = yn .
The sequence {xn } itself need not converge, but the Bolzano–Weierstrass theo-
rem guarantees that some subsequence {xnk } converges, to a limit we’ll call xmax ;
clearly, xmax ∈ [a, b]. Since f is continuous at xmax and xnk → xmax , we must
have
f (xmax ) = lim f (xnk ) = lim ynk = lim yn = β,
k→∞ k→∞ n→∞
as claimed. 
Bad values. Both the IVT and the EVT may fail, of course, if important hy-
potheses are violated. For example, the function f (x) = 1/x is continuous on the
open interval I = (0, 1), but assumes neither a maximum nor a minimum value
(for different reasons) on I. And the sign function, defined but discontinuous See Example 2, page 148.
on the closed interval [−10, 10], assumes only one intermediate value between
Which one?
f (−10) = −1 and f (10) = 1. (On the other hand, the sign function does assume
maximum and minimum values.)

Using the Value Theorems


The intermediate and extreme value theorems (IVT and EVT) are essential and
versatile tools for studying continuous functions. We illustrate with several brief
examples.

i i

i i
i i

i i

158 3. Limits and Continuity

Continuous functions map intervals to intervals. If f : I → R is any function


whose domain is an interval, then the range of f can be almost any subset of R.
For a constant function, for example, the range is just one point, while the sine
Don’t confuse the sine and sign function has range [−1, 1], and the range of the sign function is the three-point set
functions. {−1, 0, 1}. For continuous functions, the picture is simpler.

Proposition 3.18. If I is an interval and f : I → R is continuous, then the range


The range might be an infinite of f is either a single point (if f is constant) or an interval.
interval, like R.
Proof: Let J denote the range. Recall what it means to be an interval: if u ∈ J
and w ∈ J (we might as well assume u < w) and v is any number such that
u < v < w, then we need to show that v ∈ J, too. This follows immediately
from the IVT. We know that u = f (a) and w = f (b) for some a and b in I, that f
is continuous on [a, b], and that v is “intermediate” between u and w, and so the
IVT assures that f (c) = v for some c between a and b, as we needed to show. 

“Root” seems less ambiguous; Odd-degree polynomials have real roots. A number r is a root (or a zero) of a
we’ll use it. function f if f (r) = 0. Thus, p(x) = x2 − 1 has roots ±1, q(x) = x2 + 1 has no
real roots, and

s(x) = x5 − 15x4 + 85x3 − 225x2 + 274x − 120


= (x − 1)(x − 2)(x − 3)(x − 4)(x − 5)

has roots 1, 2, 3, 4, and 5. Deciding whether an arbitrary function has any roots, let
alone finding them, can be challenging, but the IVT offers some encouragement
for a large class of polynomials.

Proposition 3.19. Every polynomial function

p(x) = an xn + an−1 xn−1 + · · · + a1 x + a0

of odd degree (an = 0 and n is odd) has at least one real root.

About the proof. Every polynomial function is continuous everywhere. If we can


find any a and b with p(a) < 0 and p(b) > 0, then the IVT will guarantee that
p(r) = 0 for some root r between a and b. Finding such a and b for an odd-degree
polynomial p(x) is indeed possible, because

lim p(x) = ±∞, while lim p(x) = ∓∞,


x→∞ x→−∞

and so p(x) must assume both positive and negative values. If, say, p(x) = x3 −
7x2 + 5x + 3, then p(0) = 3 while p(−1) = −13, so p must have a root in the
Plotting p. interval (−1, 0). We leave a more formal proof to the exercises.

i i

i i
i i

i i

3.3. Why Continuity Matters: Value Theorems 159

Fixed points. A number a is a fixed point of a function f if f (a) = a. (Equiva-


lently, a is a root of the new function f (x) − x.) As with roots, the IVT can help
assure that fixed points exist.

E XAMPLE 1. Show that if f : [0, 1] → [0, 1] is continuous on [0, 1], then f has
a fixed point.

S OLUTION . Note a crucial hypothesis about the codomain: 0 ≤ f (x) ≤ 1 for See it in the notation?
all x ∈ [0, 1]. This means, geometrically, that the graph of f stays inside the
square window [0, 1] × [0, 1] in the xy-plane. Our problem amounts to showing
that this graph touches or crosses the line y = x at least once. This may seem Sketch for yourself.
obvious, but we want proof, and the IVT will help.
The trick is to look at the new function g(x) = f (x) − x; note that g is also
continuous on [0, 1]. Note also that
(i) g(0) = f (0) ≥ 0; (ii) g(1) = f (1) − 1 ≤ 0.
If either g(0) = 0 or g(1) = 0, we’re done already, so we may as well assume
that both (i) and (ii) are strict inequalities. In this case, the IVT guarantees that
g(x) = 0 holds for some x ∈ (0, 1), as we aimed to show. ♦

Maximum-minimum problems. Many hoary old problems of elementary calcu-


lus—enclose as much area as possible in a rectangular pigpen, one side up against
the barn, with 100 yards of fence—depend implicitly on the EVT. The functions
to be maximized or minimized are typically continuous and defined on closed in-
tervals, and so the EVT guarantees that the desired maximum or minimum exists.
Sometimes the functions and intervals in question are lightly disguised.

E XAMPLE 2. Suppose a and b are nonnegative numbers with a + b = 3. Is there


a maximum possible value of ab2 ? Of b/a? If so, what are these values? How is
the EVT involved?

S OLUTION . If we write b = 3 − a, then it is natural to consider the functions


b 3−a 3
p(a) = ab2 = a(3 − a)2 and q(a) = = = − 1;
a a a
our question is whether these functions achieve maximum values for a ∈ [0, 3]. It
is clear at a glance that q(a) → ∞ as a → 0+ , so q is not continuous on [0, 3], At the formula or at a graph.
and all EVT bets are off. The polynomial function p, by contrast, is continuous
on [0, 3], and so the EVT guarantees that a maximum exists—but gives no clue
how to find it. With calculus methods (taboo for now, as we haven’t gotten to See the exercises for a
derivatives) it is easy to show that the maximum value, four, is attained when non-calculus strategy.
a = 1. ♦

i i

i i
i i

i i

160 3. Limits and Continuity

Continuous inverses. Important calculus functions often come in “inverse pairs,”


like

f (x) = ex and g(x) = ln x;


2

f (x) = x and g(x) = x;
f (x) = tan x and g(x) = arctan x.

With due care taken for domains, the inverse relationship means that f (a) = b if
and only if g(b) = a. For the last pair, for instance, we have f (1.2) = tan 1.2 ≈
2.57215, while g(2.57215) = arctan(2.57215) ≈ 1.2.
It is natural to hope in this situation that if either of f and g is continuous,
then so is its “partner.” (Knowing this might be practically useful—sometimes
it is easier to show directly that one rather than the other is continuous.) The
following proposition addresses this situation.

Proposition 3.20. Let f : I → J and g : J → I be inverse functions, where I


and J are open intervals. If f is continuous on I, then g is continuous on J.

Proof: Since f has an inverse, it must be one-to-one on I, and this leads to a


useful claim:

If f is one-to-one and continuous on an interval I, then f is strictly


monotone on I.

Using the IVT. The claim should seem plausible; we’ll leave its proof as an exercise. Assuming
the claim, we will handle the case where f is strictly increasing; the case for
decreasing f is similar.
Let b ∈ J be given. Then g(b) = a for some a ∈ I; note that also f (a) = b.
To see that g is continuous at b, let  > 0 be given. Since I is an open interval
and a ∈ I, we may as well assume that the small closed interval [a − , a + ] is
If necessary, we can always contained in I. Because f is increasing, we know that f (a − ) < f (a) = b <
take  smaller. f (a + ). To complete the proof, we now choose any δ > 0 so that

f (a − ) < b − δ < b + δ < f (a + ) .

To see that this δ works for the original , consider any y in J with

f (a − ) < b − δ < y < b + δ < f (a + ) .

Applying the strictly increasing function g to all parts of this inequality, we get

(a − ) < g (y) < g (b + δ) < (a + ) ,

which is another way of saying that |g(y) − a| < . 

i i

i i
i i

i i

3.3. Why Continuity Matters: Value Theorems 161

Exercises
1. Consider a function f : R → R and a domain point c ∈ R. We say that f is
locally bounded at x = c if there is some δ > 0 and some M > 0 such that
|f (x)| < M whenever x ∈ (c − δ, c + δ). (In other words, f is bounded on
some open interval centered at c.)

(a) Show that f (x) = x2 is locally bounded at x = 42. (Find specific


values of δ and M ; there are many possibilities.)
(b) Show that if f is continuous at c, then f is locally bounded at c.
(c) Find a function f : R → R that is locally bounded but not continuous
at x = 0. Explain why your example works.
(d) Find a function f : R → R that is not locally bounded at x = 0.
Explain why your example works. (Be sure your example is defined
for all inputs x.)

2. This problem revisits Proposition 3.19, page 158. Throughout, let p(x) =
xn + an−1 xn−1 + · · · + a1 x + a0 , where n is odd.

(a) Explain why limn→∞ p(x) = ∞. (Similarly, limn→−∞ p(x) =


−∞.)
(b) Use the definition of a limit at infinity to show that there exists b ∈ R
with p(b) > 0. (For similar reasons, there is a ∈ R with p(a) < 0.)
(c) In practice, it is often easiest to find a and b as above by (educated!)
guessing. (Plotting may also work, but that’s too easy.) Use this ap-
proach and the IVT to show that q(x) = x5 − x4 − x3 − x2 + x+ 1 has
at least three roots. Can you also find the roots exactly, by algebra?

3. Find examples of polynomials as prescribed. No formal proofs needed, but


describe your answers clearly.

(a) A polynomial of degree 5 with one root.


(b) A polynomial of degree 4 with 3 roots.
(c) A polynomial of degree 42 with no roots.
(d) A polynomial of degree 42 with 41 roots.

4. A function f : R → R achieves a maximum value at xmax if f (xmax ) ≤


f (x) for all x ∈ R, and similarly for a minimum value at xmin . For instance,
f (x) = cos x achieves its maximum value at x = 0 and its minimum value
at x = π.

i i

i i
i i

i i

162 3. Limits and Continuity

(a) What, if anything, does the EVT guarantee about maximum and min-
imum values of a continuous function f : R → R defined on all of R?
(b) No odd-degree polynomial achieves a maximum or a minimum value
on R. Explain why. (See an earlier problem.)
(c) Every even-degree polynomial q(x) achieves either a maximum or a
minimum value on R. Explain why. (Hint: This is just a little harder.
Note that either (i) q(x) → ∞ as x → ±∞, or (ii) q(x) → −∞
as x → ±∞. Show that q achieves a minimum in case (i) and a
maximum in case (ii).)
(d) Can an even-degree polynomial q(x) achieve both a maximum and a
minimum value on R? Explain.
3
5. This problem is about the functions p(a) = a(3 − a)2 and q(a) = a −1
discussed in Example 2, page 159.

(a) Does p assume a minimum on [0, 3]? If so, what is it? What does the
EVT say?
(b) Does q assume a minimum on (0, 3]? If so, what is it? What does the
EVT say?
(c) We said, but didn’t prove, in Example 2 that the maximum value of p
on [0, 3] is p(1) = 4. Prove it now, in two steps:
(i) Factor p(a) − 4 (one factor is a − 1).
(ii) Use your factorization to explain why p(a) − 4 ≤ 0 when a ∈
[0, 3].

6. Let P be an odd-degree polynomial. Show that P (x) = π for at least one


real input x. (Hint: See Proposition 3.19, page 158.)
7. Does f (x) = x2 − 2x achieve maximum and/or minimum values some-
where in (−1, 2)? What about a supremum or infimum?
8. In each part following, either give an example or explain why none can
exist.
(a) A function f : (0, 1) → R, continuous on (0, 1), that achieves a
maximum but not a minimum on (0, 1).
(b) A function g : [0, 1] → R, continuous on [0, 1], whose range contains
π and e but not 3.
(c) A polynomial function p : R → R, with range [−3, ∞).
(d) A polynomial function q : R → R, with range (−3, ∞).
(e) A function r : R → R, continuous on R, with range (−3, ∞).

i i

i i
i i

i i

3.4. Uniform Continuity 163

9. (a) Find a continuous function f : (0, 1) → R whose range is [0, 1).


(b) Find a continuous function f : (0, 1) → R whose range is [0, 1].
(c) Is there a continuous function f : [0, 1] → R whose range is (0, 1])?
Why or why not?
10. Let f : R → R be a continuous function such that f (x) is a rational number
for every real number input x. Show that f must be a constant function.
11. The Principle of Persistent Inequalities (Proposition 3.14, page 154), de-
scribes a nice property of continuous functions. Here we investigate two
“one-sided” versions of the PoPI.
A function f satisfies the PoPILTV (the “less-than” version of the PoPI) at
x = c if, for every number K with f (c) < K, there exists δ > 0 such that
f (x) < K whenever x ∈ (c − δ, c + δ). The PoPIGTV (the “greater-than”
version) is the same, except that the condition f (x) < K is replaced by
f (x) > K.

(a) Suppose f is continuous at x = c. The ordinary PoPI says that f


satisfies the PoPILTV. Show that f also satisfies the PoPIGTV.
(b) Suppose g(x) = 1 if x > 0 and g(x) = 0 otherwise. Show that g
satisfies the PoPIGTV but not the PoPILTV at x = 0.
(c) Suppose h(x) = 1 if x = 0 and h(x) = 0 otherwise. Which of the
PoPIGTV and the PoPILTV does h satisfy at x = 0?
(d) Show that a function f : R → R is continuous at x = c if and only if
f satisfies both the PoPIGTV and the PoPILTV at x = c.

12. Let f : [a, b] → R be continuous on [a, b]. Show that if f attains either its
maximum or its minimum value at an interior point c, then f is not one-to-
one.
13. Let I be an interval (open or closed) and suppose that f : I → R is contin-
uous and one-to-one. Show that f is strictly monotone.

3.4 Uniform Continuity


Here’s a definition with many familiar ingredients—but a new adjective:
Definition 3.21 (Uniform continuity). Let I ⊆ R be an interval and f a function
defined on S. We say f is uniformly continuous on I if for each  > 0 there exists
δ > 0 such that

|f (x) − f (y)| <  whenever x, y ∈ I and |x − y| < δ.

i i

i i
i i

i i

164 3. Limits and Continuity

What’s new here? What’s wrong with ordinary continuity, over which we’ve
worked hard? We’ll address these good questions right after some basic examples.

E XAMPLE 1. Both f (x) = 3x + 5 and g(x) = x2 are continuous on I = R.


Are they also uniformly continuous on R? Why or why not?

S OLUTION . The function f is uniformly continuous. For any inputs x and y, we


have
|f (x) − f (y)| = |3x + 5 − 3y − 5| = 3 |x − y| .
Thus, for any  > 0, the value δ = /3 does what Definition 3.21 asks:

|f (x) − f (y)| <  whenever x, y ∈ R and |x − y| < δ = .
3
The function g is not uniformly continuous. Showing this takes a little doing,
but it is worthwhile to illustrate key ideas. We’ll do it by setting  = 1 and
showing that no positive δ works. Indeed, let any fixed δ > 0 be given. First
We showed long ago that this is we choose an integer n with 1/n < δ, and set x = n + 1/n and y = n. Then
possible. |x − y| = 1/n < δ, but
2
1 1
|g(x) − g(y)| = x2 − y 2 = n+ − n2 = 2 + > 2 > .
n n2

Thus, our attempted δ failed, and so would any other. ♦

Uniform vs. ordinary continuity. As Example 1 suggests, uniform continuity is


a strictly stronger property than ordinary continuity. A function that is uniformly
continuous on I is also continuous on I in the ordinary sense, but the converse
is false: A function (like g(x) = x2 on R) may be continuous but not uniformly
continuous on I. Here are two ways to view the difference:

• One δ-size fits all: Ordinary continuity of f on I means that, having first
specified a ∈ I and  > 0, we can then choose δ > 0 so that |f (x) − f (a)|
<  whenever x ∈ I and |x − a| < δ. In particular, δ may depend both on
 and on a.
In uniform continuity, by contrast, δ may depend on  but not on a. In this
case, |f (x) − f (y)| <  holds for any pair of inputs x and y in I. For
given , in other words, a single choice of δ works “uniformly” across the
interval I.
• Window dimensions: A function f is continuous at a if limx→a f (x) =
See Figure 3.1, page 135. f (a). In Section 3.1 we described this condition graphically: For any given

i i

i i
i i

i i

3.4. Uniform Continuity 165

1.4
100.4

є+ 1
є+ 100

1
100

1–є 100 – є

0.6 99.6

0.6 1–δ 1 δ+ 1 1.4 9.6 10 – δ 10 δ + 10 10.4

(a) A given , a good δ (b) Same , bad δ

Figure 3.5. Why f (x) = x2 is not uniformly continuous on R.

 > 0 we can choose δ > 0 so that the graph of f stays inside the rectangu-
lar “window”
[a − δ, a + δ] × [f (a) − , f (a) + ]
all the way from left to right, never escaping out the top or bottom. (This
window has dimensions 2δ × 2.) A function f : I → R is continuous
on I if, at every point of the graph, such a window can be found for every
“half-height” , no matter how small.
To say that f : I → R is uniformly continuous means, in this language, that
for given  > 0 we can choose some δ > 0 so that a 2δ × 2 window works
at every point of the graph. This perspective suggests what went wrong
with g(x) = x2 in Example 1: as g rises more and more steeply over its
domain, its graph tends more and more to escape from the top or bottom of
a given window. Figure 3.5 gives some idea of the problem.
A function may be uniformly continuous on one set but not on another.

E XAMPLE 2. The function f (x) = x2 is not uniformly continuous on R. Is f


uniformly continuous on I = [−3, 42]? Is f uniformly continuous on (−2, 17)?

S OLUTION . Yes, and yes—and the second yes follows immediately from the
first. If any f is uniformly continuous on a set S, then f is automatically uni-
formly continuous on any smaller set S  ⊂ S.
Informally speaking, the first “yes” applies because f is “steeper” at x = 42
than anywhere else on I = [−3, 42]. Therefore, any δ that “works” for a given 
at x = 42 will also work elsewhere in I, where the graph is less steep.

i i

i i
i i

i i

166 3. Limits and Continuity

Before starting the formal proof, note that for any x and y we have

|f (x) − f (y)| = x2 − y 2 = |x − y| |x + y| .

Now consider the last factor, |x + y|: For x and y in [−3, 42] I we have

|x + y| ≤ |x| + |y| ≤ 42 + 42 = 84.

Putting the pieces together produces a key inequality: |f (x) − f (y)| ≤ 84 |x − y|


for all x and y in I. This done, we’re ready for our (very short!) formal proof.
Let  > 0 be given. Set δ = /84. This δ works, since if x, y ∈ I and
|x − y| < δ, then

|f (x) − f (y)| = |x − y| |x + y| ≤ 84 |x − y| < 84δ = ,

as desired. ♦

This section’s main theorem covers several of the preceding examples.

Theorem 3.22. If f is continuous on a closed and bounded interval [a, b], then f
is uniformly continuous on [a, b].

Proof: Let  > 0 be given, and assume, toward contradiction, that no δ > 0
works in the sense of Definition 3.21. Then δ = 1/n must fail for every positive
integer n. This means that, for each n, there must exist xn and yn in [a, b] such
that
1
|xn − yn | < but |f (xn ) − f (yn )| ≥ .
n
The two sequences {xn } and {yn } so constructed are obviously bounded; apply-
ing the Bolzano–Weierstrass theorem to {xn } produces a subsequence {xnk } that
converges to some limit x0 ∈ [a, b]. Now we extract the same subsequence {ynk }
from {yn }; because
1 1
|xnk − ynk | < ≤
nk k
for all k, we must have both xnk → x0 and ynk → x0 .
Now a contradiction looms. Since f is continuous at x0 , we must have both

f (xnk ) → f (x0 ) and f (ynk ) → f (x0 ).

This is incompatible with our original arrangement that

|f (xnk ) − f (ynk )| > 

for all k, and so the proof is done. 

i i

i i
i i

i i

3.4. Uniform Continuity 167

Staying close. If uniform continuity seems forbiddingly technical or obscure,


that’s because we worked our way up to it gradually, via ordinary continuity at
points and on sets. In another sense, however, uniform continuity of a function f
on a set S is the cleanest and simplest version possible:

f (x) and f (y) are within  whenever x and y are within δ.

We will exploit this view later, when we study integrals. This basic idea—that
f “preserves closeness”—translates naturally to Cauchy sequences, which are all
about closeness.

Proposition 3.23. If f is uniformly continuous on I and {xn } ⊂ I is a Cauchy


sequence, then {f (xn )} is a Cauchy sequence, too.

Proof: Let  > 0 be given. By hypothesis there is some δ > 0 that works in the
sense of uniform continuity of f on I. Because {xn } is a Cauchy sequence, we
can choose N so that Yes, we mean δ, not .

|xn − xm | < δ whenever n > m > N .

Because xn , xm ∈ I for all n, our choice of δ implies that

|f (xn ) − f (xm )| <  whenever n > m > N ,

as required. 

E XAMPLE 3. Let f (x) = 1/x. Use Proposition 3.23 to show that f is not
uniformly continuous on I = (0, ∞). Is f uniformly continuous on [1, ∞)?

S OLUTION . We could use the definition to show directly that f is not uniformly
continuous (see the exercises), but using Proposition 3.23 is shorter. We can sim-
ply observe that the sequence {1/n} is contained in I and Cauchy, while the
output sequence {f (xn )} = {n} is surely not Cauchy.
On the interval [1, ∞), by contrast, f is uniformly continuous. To see this,
note that for x, y ∈ [1, ∞) we have

1 1 y−x
|f (x) − f (y)| = − = ≤ |y − x| .
x y xy

This implies that, for any  > 0, the choice δ =  works in the definition of
uniform continuity. ♦

i i

i i
i i

i i

168 3. Limits and Continuity

Staying bounded. Let f : I → R be continuous on a bounded interval I. If


I = [a, b] is closed, then the EVT guarantees (among other things) that f is
bounded on I. On an open interval I = (a, b), by contrast, a continuous function
may well be unbounded—as is f (x) = 1/x on (0, 1). But uniformly continuous
functions behave better, as the following proposition shows. The proof involves
ingredients that are familiar by now.
Proposition 3.24. Let I be any bounded interval I, open or closed. If f is uni-
formly continuous on I, then f is bounded on I.

Proof: Suppose toward contradiction that f is unbounded above. (A similar ar-


gument applies if f is unbounded below.) Then we can choose x1 , x2 , x3 , . . . , all
in I, such that

f (x1 ) > 1, f (x2 ) > 2, f (x3 ) > 3, ....

By the Bolzano–Weierstrass theorem, some subsequence {xnk } is convergent—


and therefore Cauchy. Now Proposition 3.23 says that the image subsequence
{f (xnk )} is also Cauchy—and therefore bounded. This is impossible, because
we chose the xn such that f (xnk ) > nk > k for all k. 

Exercises
1. Throughout this problem, let f (x) = x2 and  = 1. Since f is continuous
at c = 1, we can find some δ > 0 such that |f (x) − f (1)| < 1 when
|x − 1| < δ.

(a) Show that δ = 2 − 1 ≈ 0.4142 “works” in the situation described
above.

(b) Show that δ = 101 − 10 ≈ 0.0499 works for c = 10. (As before,
f (x) = x2 and  = 1.)
(c) In the spirit of the preceding parts, find values of δ that work for c = 1,
c = 10, c = 100, and c = 1000. How do these values reflect the fact
that f is not uniformly continuous on R?
(d) Now let g(x) = 10x + 3 and (again)  = 1. As in the preceding part,
find values of δ that work for c = 1, c = 10, c = 100, and c = 1000.
How do these values reflect the fact that f is uniformly continuous on
R?
(e) The function f is uniformly continuous on the interval I = [1, 1000].
Find a value of δ that works for  = 1 in Definition 3.21.

2. Let I and J be any intervals, with I ⊆ J, and let f be a function. Show that
if f is uniformly continuous on J, then f is uniformly continuous on I, too.

i i

i i
i i

i i

3.4. Uniform Continuity 169

(This is not a trick question—the claim is indeed simple or even obvious.


The point is to give a proof based on the definition.)
3. Let f (x) = x3 .
(a) Show directly from the definition that f is uniformly continuous on
[−3, 42). (Hint: a3 − b3 = (a − b)(a2 + ab + b2 ).)
(b) Use Theorem 3.22 and the claim in the preceding problem to show
(again) that f is uniformly continuous on [−3, 42).
4. Use Definition 3.21 (not theorems) in each part.
(a) f (x) = 5 is uniformly continuous on R.
(b) g(x) = 2x + 7 is uniformly continuous on R.
(c) h(x) = x2 + 7 is uniformly continuous on [−100, 42].
(d) l(x) = 1/x is not uniformly continuous on (0, 1).
5. Use either Definition 3.21 or appropriate theorems in each part.
(a) f (x) = x3 is not uniformly continuous on R.

(b) g(x) = x is uniformly continuous on [1, ∞).
(c) h(x) = cos(1/x) is not uniformly continuous on (0, 1).
(d) k(x) = x sin(1/x) is uniformly continuous on (0, 1). (Hint: If we set
k(0) = 0, then k is continuous on [0, 1].)
6. Show that if f is uniformly continuous on an interval I, then it is also
continuous in the ordinary sense.
7. Assume in all parts that both f and g are uniformly continuous on an inter-
val I.
(a) Show that f + g is uniformly continuous on I.
(b) Give an example to show that f g need not be uniformly continuous
on I (even though f g is continuous in the ordinary sense).
(c) Show that if I = [a, b] is closed and bounded, then f g is uniformly
continuous on I.
(d) Show that if both f and g are bounded on I, then f g is uniformly
continuous on I. (This is a little harder.)
8. A function f : I → R is called Lipschitz continuous (after a nineteenth-
century German mathematician) on I if, for some constant K, the ine-
quality
|f (x) − f (y)| ≤ K |x − y|

i i

i i
i i

i i

170 3. Limits and Continuity

holds for all x and y in I. The sine function, for instance, is Lipschitz
continuous (with K = 1) on R, because (as can be shown)

|sin x − sin y| ≤ |x − y|

for all x, y ∈ R. Lipschitz, like uniform, continuity is a ‘stronger” version


of ordinary continuity.

(a) Show that if f is Lipschitz continuous on I, then it is also uniformly


continuous on I.
(b) Show that f is Lipschitz continuous on I if and only if the ratio
|(f (x) − f (y))/(x − y)| is bounded for x, y ∈ I, x = y.

(c) We know (how?) that g(x) = x is uniformly continuous on [0, 1].
Show that g is not Lipschitz continuous on [0, 1]. (Hint: One approach
is to let xn = 1/n and yn = 2/n for positive integers n, and then
study the ratio in the preceding part.)

9. Let f : R → R be a function. The condition

∀ > 0 ∃δ > 0 such that |x − y| < δ =⇒ |f (x) − f (y)| < 

defines uniform continuity of f on R. What does each of the following


conditions say about f on R? Must such an f also be uniformly continuous
on R? If not, give an example.

(a) ∀ > 0 and ∀δ > 0, |x − y| < δ =⇒ |f (x) − f (y)| < .


(b) ∃ > 0 such that ∀δ > 0, |x − y| < δ =⇒ |f (x) − f (y)| < .
(c) ∀ > 0 ∃δ > 1 such that |x − y| < δ =⇒ |f (x) − f (y)| < .
(d) ∀ > 1 ∃δ > 0 such that |x − y| < δ =⇒ |f (x) − f (y)| < .

10. Claim: Suppose f is uniformly continuous on the half-open interval (0, 1].
Then we can “extend f ” (i.e., define f (0)) to be uniformly continuous on
the closed interval [0, 1].
Prove this in the following steps:

(a) Set f (0) = limn→∞ f (1/n). Explain why this makes sense—i.e.,
explain why the limit exists. (Hint: The sequence 1, 1/2, 1/3, . . . is
Cauchy; apply Proposition 3.23, page 167.)
(b) (This is a little harder.) To show that f is uniformly continuous on
all of [0, 1], let  > 0. Set  = /2, and choose δ > 0 that “works”
for  in the definition of uniform continuity of f on (0, 1]. Show
that this δ works for  in the definition of uniform continuity of f

i i

i i
i i

i i

3.4. Uniform Continuity 171

on [0, 1]. (Hint: It is enough to show that |f (x) − f (0)| <  when
|x − 0| < δ. To do this, choose any n0 such that 0 < 1/n0 < x
and |f (1/n0 ) − f (0)| < /2. (Why is this possible?) Then use the
triangle inequality.)

11. Use Definition 3.21, not theorems, to show that f (x) = x √ is uniformly

continuous
√ on [0, 1]. (Hint: Prove first that if x ≥ y ≥ 0, then x− y ≤
x − y.)

12. Use Definition 3.21, not theorems, to show that f (x) = 1/(x2 + 1) is uni-
formly continuous on R.

i i

i i
i i

i i

i i

i i
i i

i i

CHAPTER 4
Derivatives

4.1 Defining the Derivative


Calculus at last. We’ve worked hard to develop important calculus ingredients:
functions, limits, continuity, etc. At last we are ready to put them together; we’ll
treat derivatives in this chapter and integrals in the next. Many derivative and
integral formulas and calculations are, of course, already familiar from elementary
calculus. The new twist is to derive such “known” facts rigorously, and to put
them in theoretical context.
First comes the key definition:
Definition 4.1 (Derivative at a point). Let f be a function defined on an open in-
terval I, and let a be a point in I. We say f is differentiable at a, with derivative
f  (a), if the limit
f (x) − f (a)
f  (a) = lim
x→a x−a
exists.
Let’s test it on some familiar well- and ill-behaved functions.

E XAMPLE 1. Find, if possible, derivatives at a = 3 for the functions


c(x) = 5, (x) = 2x + 7, q(x) = x2 , and a(x) = |x − 3| .
What general facts do the calculations suggest?

S OLUTION . The limit calculation for c(x) is easy:


c(x) − c(3) 5−5
c (3) = lim = lim = 0.
x→3 x−3 x→3 x − 3

Thus, c (3) = 0. Since the value x = 3 played no important role in the calcula-
tion, we’d guess (correctly) that c (a) = 0 for all a.
Finding  (3) is easy, too:

 (x) − (3) 2x + 7 − 13 2x − 6
(3) = lim = lim = lim = 2.
x→3 x−3 x→3 x−3 x→3 x − 3

173

i i

i i
i i

i i

174 4. Derivatives

Thus,  (3) = 2, and (almost) the same calculation shows that  (a) = 2 for all
See the exercises. inputs a.
Watch for a factoring trick. For q, we need another limit calculation:
q(x) − q(3) x2 − 9
q  (3) = lim = lim = lim (x + 3) = 6
x→3 x−3 x→3 x − 3 x→3

Thus, q  (3) = 6. This time the calculation looks a bit different away from x = 3,
so we defer (just briefly) finding q  (x) for other inputs.
The derivative a (3), if it exists, is the value of

a(x) − a(3) |x − 3| 1 if x > 3,
lim = lim = lim
x→3 x−3 x→3 x−3 x→3 −1 if x < 3.

Left- and right-hand limits do From the last form, we see that a (3) does not exist. ♦
exist at x = 3, but they are
unequal.
The results of Example 1 won’t surprise any calculus veteran. Let’s see what
Sketch these functions to see happens with some stranger functions, one of them an old friend.
the idea; no technology needed.

E XAMPLE 2. Are the functions


 
1 if x ∈ Q, x2 if x ≥ 0,
f (x) = and g(x) =
0 if x ∈ / Q, 0 if x < 0

differentiable at x = 0?

S OLUTION . The short answers are no and yes. The limits in question are
f (x) g(x)
lim and lim .
x→0 x x→0 x
Look what happens along a The first limit clearly fails to exist, so f is not differentiable at x = 0. For the
rational sequence tending to second limit, we just note that
zero, and see the exercises.

g(x) x if x ≥ 0,
=
x 0 if x < 0,

and so
g(x)
g  (x) = lim = 0. ♦
x→0 x

Different Views of the Derivative


The derivative is defined formally as a limit, but it has several familiar and useful
interpretations. We review several briefly.

i i

i i
i i

i i

4.1. Defining the Derivative 175

Average and instantaneous rates. The expression

f (x) − f (a)
,
x−a
known as a difference quotient, can be thought of as the average rate of change of
f (x) with respect to x over the input interval between a and x. The derivative is
the limit of such rates as x approaches a, and so can be seen as the instantaneous
rate of change of f when x = a.
We won’t dwell now on the connection between derivatives and rates. But we
should acknowledge that the idea is among the best and most useful ever had—by
anybody. The power of calculus to describe and predict real-world change, from
falling apples to celestial mechanics, is hard to overstate. As Isaac Newton and
others discovered, calculus is the right “language” in which to express physical
laws and to deduce their consequences.

Slopes. In elementary calculus, f  (a) is sometimes described simply as the “slope


of the graph” of f at x = a. To be a bit more precise, note that the difference
quotient
f (x) − f (a)
x−a
is the slope of a certain secant line, which passes through the points (x, f (x))
and (a, f (a)) on the graph of f . If the derivative exists, then the limiting value
f  (a) can also be thought of as a slope, this time of the tangent line to the graph at
x = a. Observe, too, that slope is itself a rate (of ascent, in this case), and hence
a special case of the rate-of-change interpretation discussed above.

Linear approximation. Thinking of derivatives as slopes is simple and helpful,


especially for well-behaved functions. But subtleties can arise. What is really And deservedly popular in
meant, for example, by the slope of a curve at a point? What if the graph of f is elementary calculus courses.
not a smooth curve at all, but ragged or broken? To skirt such problems, we can
consider linear functions, for which no such troubles arise.

Definition 4.2 (Linear approximation). Let f be a function and a a domain point


for which f  (a) exists. The linear approximation to f at a (also known as the
first-order approximation) is the linear function a defined by

a (x) = f (a) + f  (a)(x − a).

Observe some basic properties of the linear approximation:


• Simplest examples: If f (x) = x2 and a = 2, then

2 (x) = f (2) + f  (2)(x − 2) = 4 + 4(x − 2) = −4 + 4x.

i i

i i
i i

i i

176 4. Derivatives

15
0.010

10
0.005

5
0.000

0 – 0.005

–5 – 0.010
–4 –2 0 2 4 – 0.10 – 0.05 0.00 0.05 0.10

(a) Two ordinary tangent lines (b) A stranger tangent line

Figure 4.1. Two views of linear approximation.

If f (x) = x2 and a = 0, then

0 (x) = f (0) + f  (0)(x − 0) = 0 + 0(x − 0) = 0.

• Shared values—up to a point: The functions f and a “agree to first order”


at x = a:
f (a) = a (x) and f  (a) = 
a (a).

(The second fact holds because a , being linear, has constant derivative.)
Away from x = a, anything can happen. In the case of f (x) = x2 and
l3 (x) = 9+6(x−3), for example, we have f (−42) = 1764 and f  (−42) =
−84, while 3 (−42) = −261 and 3 (−42) = 6.
• Graphical views: The close connections between f and a are reflected in
their respective graphs. Indeed, the graph of a is in a natural sense the
line that “best fits” the f -graph at x = a. In elementary calculus parlance,
this line is called the tangent line at x = a. The word “tangent” suggests
“touching,” and in many cases this line does indeed “touch but not cross”
the graph of f at the point (a, f (a)), as illustrated in Figure 4.1(a). But in
other cases the graphs of f and a are seriously intertwined, as Figure 4.1(b)
and the following example illustrate. With such possibilities in mind we
will usually refer to “linear approximation” rather than “tangent lines.”

E XAMPLE 3. Show that the function f : R → R, shown in Figure 4.1(b) and


defined by 
x2 sin(1/x) if x = 0,
f (x) =
0 if x = 0,
is differentiable at a = 0. What is the linear approximation there?

i i

i i
i i

i i

4.1. Defining the Derivative 177

S OLUTION . The limit in question is


f (x) − f (0) x2 sin(1/x)
f  (0) = lim = lim = lim x sin(1/x),
x→0 x−0 x→0 x−0 x→0

which we’ve already shown (by squeezing; see Example 6, page 139) to be zero.
Thus f  (0) = 0, and so the corresponding linear approximation—also visible in
Figure 4.1(b)—is just

0 (x) = f (0) + f  (0)(x − 0) = 0.

The calculation was easy, but the situation is still undeniably strange: The graph
of f crosses its tangent line infinitely often in every open interval (−δ, δ) around
a = 0. In the interval (−.001, .001), for instance, we have f (1/(kπ)) = 0 for all
integers k with |kπ| > 1000. ♦

Magnification. A useful geometric alternative to the derivative-as-slope view in-


volves magnification factors. If f  (a) = m (for magnification), then for x near a
we have
f (x) − f (a)
≈ m, or f (x) − f (a) ≈ m(x − a),
x−a
which implies, in turn, that

|f (x) − f (a)| ≈ |m| |x − a| .

Interpreting absolute values as distances, we see that the distance between outputs
f (x) and f (a) is about |m| times the distance between inputs x and a.
If f (x) = x2 , for instance, we have f  (3) = 6, and f maps the small input
interval (2.95, 3.05) to the output interval (.7025, 9.3025), which is six times as
long.

Derivatives as Functions
For a given function f the derivative f  (a) depends on a. If, say, f (x) = x2 , then,
as we have seen, f  (a) = 2a holds for every input a, and we might simply write
f  (x) = 2x. It is natural, in other words, to think of f  as a function in its own
right, derived in a special way from f . Hence the term derivative
To avoid “symbol-creep” it is convenient to use the same input symbol, often function.
x, for both f and f  . Thus we might write something like
f (t) − f (x)
f  (x) = lim
t→x t−x
when we want to think of both f and f  as functions of x. The difference with
earlier versions of the derivative limit is entirely notational—no new mathematics
is involved.

i i

i i
i i

i i

178 4. Derivatives


E XAMPLE 4. If f (x) = x, what’s f  (x)? How are the domains of f and f 
related to each other?

See the factoring trick? S OLUTION . Let’s calculate. For x > 0, we have
√ √ √ √
 f (t) − f (x) t− x t− x
f (x) = lim = lim = lim √ √ √ √
t→x t−x t→x t−x t→x ( t + x)( t − x)
1 1 1
= lim √ √ =√ √ = √ ,
t→x t+ x x+ x 2 x

as we learned back in elementary calculus.


No derivative f  (0) exists in this case. One problem is that f is not defined
on any open interval containing 0, as the definition requires. Thus f  has domain
(0, ∞)—a proper subset of [0, ∞), the domain of f . ♦

Increase, decrease, and derivatives. As elementary calculus experience sug-


gests, properties of the derivative function f  reflect corresponding properties of
f . Where f  is positive, for instance, we expect f to be increasing, and where f 
takes large positive values, we expect f to be rapidly increasing. These expecta-
tions will turn out to be well-founded, but giving precise proofs is a little trickier
than one might expect. We’ll return to such matters later in this chapter.

Higher Derivatives
The function f  may be differentiable in its own right, to produce a new function
f  , the second derivative of f . Repeating the process produces higher-order
derivatives f  , f (4) , f (5) , and so on. If f (x) = x2 , for example, then we have

f  (x) = 2x, f  (x) = 2, f  (x) = 0 = f (4) (x) = f (5) (x) = . . . .

Higher derivatives, better approximation. The linear (or first-order) approxima-


tion a (x) = f (a) + f  (a)(x − a) “matches” f at x = a in the sense that

f (a) = a (a) and f  (a) = 


a (a).

Using second derivatives we can go a step further. The quadratic (aka second-
order) approximation to f at x = a is a quadratic function that fits f even more
closely than does a :

f (a) = qa (a) and f  (a) = qa (a) and f  (a) = qa (a).

If, say, f (x) = cos x and a = 0, then we have (as you know from calculus)

f (0) = cos 0 = 1; f  (0) = − sin 0 = 0; f  (0) = − cos 0 = −1.

i i

i i
i i

i i

4.1. Defining the Derivative 179

1.0

0.5

 
– – 2 2


– 0.5

– 1.0

Figure 4.2. Linear and quadratic approximations to the cosine function.

Thus, 0 (x) = 1 + 0x = 1, and basic calculus shows that q0 (x) = 1 − x2 /2


“agrees” with f in the desired sense:

q(0) = 1; q0 (0) = 1; f  (0) = −1.

(We will give a general formula for qa in the next section.) Given the extra match-
ing derivative, we expect q0 to approximate f even better near x = 0 than does
0 . Figure 4.2 doesn’t disappoint.

Properties of Differentiable Functions


Any function f for which f  (a) exists must be in some sense “nice” at x = a.
The next theorem describes the most basic such form of good behavior.

Differentiability and continuity. A function continuous at a point need not be dif-


ferentiable there. The function h(x) = |x|, for instance, is continuous but not
differentiable at a = 0. (At all other inputs h is both continuous and differen- We showed something very
tiable.) But the converse assertion is true: similar in Example 1.

Theorem 4.3 (Differentiability implies continuity). If f is differentiable at a, then


f is also continuous at a.

About the proof. To illustrate the idea, suppose f (3) = 42 and f  (3) = 7. To
show continuity of f at x = 3, we need to show that limx→3 f (x) = 42, or,
equivalently, that limx→3 ( f (x) − 42 ) = 0. The calculation involves a little
trick:
f (x) − 42 f (x) − 42
lim (f (x) − 42 ) = lim (x − 3) = lim · lim (x − 3)
x→3 x→3 x−3 x→3 x−3 x→3
= 7 · 0 = 0,

as desired. The general proof is similar, and left as an exercise.

i i

i i
i i

i i

180 4. Derivatives

Digging deeper. The following lemma delves a little further into good-behavior
implications of differentiability.
Lemma 4.4. Let f be a function defined in an open interval containing x = a,
and suppose f  (a) exists.
(i) If f  (a) = 0, then f (x) = f (a) for all x = a in some interval (a − δ, a + δ).
(ii) If f  (a) = 0, then—for every  > 0, no matter how small—there exists δ > 0
such that
|f (x) − f (a)| ≤  |x − a|
whenever |x − a| < δ.
(iii) If f has a local minimum or local maximum at x = a, then f  (a) = 0.

Proof: All parts follow from closer looks at the defining limit:
f (x) − f (a)
f  (a) = lim .
x→a x−a
To prove (i), suppose f  (a) = 0 and set  = |f  (a)| > 0. Because the preceding
limit exists, we can choose δ > 0 so that
f (x) − f (a)
− f  (a) <  = |f  (a)|
x−a
whenever |x − a| < δ. In particular, we must have f (x) = f (a) for all such x;
See for yourself. otherwise the inequality above fails.
Claim (ii) essentially just restates the existence of the key limit. Because
f  (a) = 0, we have

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


0 = lim = lim .
x→a x−a x→a x−a
By definition of the limit, for given  > 0 there exists δ > 0 such that, whenever
|x − a| < δ, we have

f (x) − f (a)
< , or, equivalently, |f (x) − f (a)| <  |x − a| ,
x−a
as claimed.
We’ll sketch a proof of (iii) assuming that f has a local minimum at x = a;
Polishing the proof is an the proof for a local maximum is similar. In this case there is an open interval
exercise. I = (a − δ, a + δ) with f (a) ≤ f (x) for x ∈ I. In particular,

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


≥0 if x > a and ≤ 0 if x < a.
x−a x−a

i i

i i
i i

i i

4.1. Defining the Derivative 181

0.004

0.002

0.000

– 0.002

– 0.004

– 0.4 – 0.2 0.0 0.2 0.4

Figure 4.3. The function f (x) = x − sin x: very flat near x = 0.

These inequalities imply, respectively, that


f (x) − f (a) f (x) − f (a)
lim ≥0 and lim ≤ 0,
x→a+ x−a x→a− x−a
from which the only possible conclusion is that f  (a) = 0. 

E XAMPLE 5. If f (x) = sin x and g(x) = x − sin x, then f  (0) = 1 and



g (0) = 0. What does Lemma 4.4 say about f and g at a = 0? We’ll prove these things in the
next section.

S OLUTION . Claim (i), applied to f , says that sin x = sin 0 = 0 for x in


some interval (−δ, δ). This is no surprise—even the big interval (−π, π) works.
Claim (ii), applied to g, says something more interesting. If, say,  = 0.01, then
(ii) says that for x in some interval (−δ, δ),
|x − sin x| ≤ 0.01 |x| .
Figure 4.3 illustrates graphically what this means—especially about how closely
x approximates sin x near x = 0. The function g shows, finally, that the converse
to claim (c) is false: Even though g  (0) = 0, g attains neither a maximum nor a
minimum at 0. ♦

Exercises
1. Suppose f  (x) exists for all x. Every calculus student knows that if g(x) =
f (x) + 3, then g  (a) = f  (a) for all a. Show this using Definition 4.1,
page 173.
2. Use Definition 4.1, page 173, to find each of the following derivatives, or
to show that it doesn’t exist.

i i

i i
i i

i i

182 4. Derivatives

(a) f  (1) if f (x) = 42.


(b) g  (1) if g(x) = x3 .
(c) h (1) if h(x) = x42 . (Hint: The difference quotient reduces to a nice
form.)
(d) k  (1) if k(x) = 1/(x + 3).
(e) m (1) if m(x) = 42 + x3 + x42 + 1/(x + 3). (Hint: Use a fact about
limits of sums.)

3. (a) Use Definition 4.1, page 173, to show that if f (x) = 1/x and c = 0,
then f  (c) = −1/c2 .

(b) Prove by induction: (1/xn ) = −n/xn+1 for all integers n ≥ 1.
(Note: It is OK to use the product rule; we’ll prove it in the next
section.)

4. Assume in this problem that f : R → R is differentiable at x = 0.

(a) Show that if f is strictly increasing, then f  (0) ≥ 0. (Hint: Look at


the sign of (f (x) − f (0))/(x − 0).)
(b) Suppose that |f (x)| ≤ |x| for all x. What can be said about f  (0)?

5. Assume in this problem that f : R → R is differentiable at x = 0.

(a) Show that if f (x) ≥ f (0) for x > 0, then f  (0) ≥ 0. (Hint: Consider
limx→0+ (f (x) − f (0))/(x − 0).)
(b) Show that if f (x) ≥ f (0) for x < 0, then f  (0) ≤ 0. (Hint: Consider
limx→0− (f (x) − f (0))/(x − 0).)
(c) What do the preceding parts say about a derivative at a minimum
point? (We will explore this famous connection more carefully later.)

6. Consider continuous functions f : R → R and g : R → R, with f (0) =


0 = f  (0). Show that f g is differentiable at x = 0, and (f g) (0) = 0. (Use
Definition 4.1; the product rule doesn’t apply.)

7. Consider continuous functions f : R → R and g : R → R such that


(i) f (0) = 0; (ii) f  (0) = 2; and (iii) g(0) = 3. Show that f g is differen-
tiable at x = 0; find (f g) (0).

8. Consider the function defined by



−x2 if x < 0,
f (x) =
x2 if x ≥ 0.

i i

i i
i i

i i

4.2. Calculating Derivatives 183

(a) Show that f is continuous at x = 0. (Hint: Use left- and right-hand


limits.)
(b) Is f differentiable at x = 0? Prove your answer.

9. Suppose f (x) is differentiable at x = 2, with f  (2) = 3. Let g(x) =


4f (x) + 5. Show that g is also differentiable at x = 2, with g  (2) = 12.

10. Suppose f (x) is differentiable at x = 2, with f  (2) = 3. Let g(x) =


f (x + 4) + 5. Show that g(x) is differentiable at x = −2. What is g  (−2)?
Interpret the result geometrically.

11. Consider the function defined by



x2 if x < 1,
f (x) =
3x − 2 if x ≥ 1.

(a) Show that f is continuous but not differentiable at x = 1.


(b) Modify the definition of f as little as possible to make f differentiable
at x = 1.

12. Let f : R → R be any function such that |f (x)| ≤ x2 for all x. Show that
f  (0) = 0.

13. Let f : (−1, 1) → R be any bounded function.

(a) Define a new function g : (−1, 1) → R by g(x) = xf (x). Show that


g is continuous at x = 0.
(b) Define a new function h : (−1, 1) → R by g(x) = x2 f (x). Show
that h is differentiable at x = 0.

4.2 Calculating Derivatives


Familiar Rules
Calculus veterans know well how to apply derivative rules (product, quotient,
chain, etc.) in calculations like this one: Or even worse.

  4
x2 sin(3x) + 4 ln x = 3x2 cos (3x) + 2x sin (3x) + .
x
Our interest here is less in applying the rules—you’ve suffered enough—than
in stating them precisely and proving them rigorously. After all, derivatives are
limits, so algebraic properties of limits—like those in Theorem 3.3—will be key.

i i

i i
i i

i i

184 4. Derivatives

Algebraic combinations. We have seen several ways to combine “old” functions


f and g to form new ones. The combinations f + g, f − g, f · g, and f /g are
constructed algebraically, while f ◦ g, g ◦ f , and f ◦ g ◦ f ◦ g involve composition.
See page 151. Propositions 3.11 and 3.12 say that if f and g are continuous at the domain points
in question, then so are all the combinations just mentioned.
We do need to avoid division by
zero in combinations like f / g. We want to show now that similar properties hold for derivatives: if f and
g are differentiable, and due care is taken with domains, then combinations are
differentiable, too. We also expect that derivatives of combinations will be built,
somehow, from derivatives of f and g.
Theorem 4.5 (Derivatives of algebraic combinations). Suppose that f and g are
functions differentiable at a; let C and D be constants. Then the functions
f
f ± g, Cf + Dg, f g, and
g
are all differentiable at a (for f /g we need g(a) = 0), with derivatives as follows:
• Linear combinations: (Cf + Dg) (a) = Cf  (a) + Dg  (a).

• Products: (f g) (a) = f  (a)g(a) + f (a)g  (a).


 
• Quotients: f g(a)f  (a)−f (a)g (a)
g (a) = g(a)2 .

Notes on the theorem. Proofs follow or are left to the exercises. First, some
informal observations:
• Useful formulas—and more: The theorem not only justifies some well-
loved techniques from elementary calculus but also guarantees that, under
the given hypotheses, all indicated derivatives exist. This existence follows,
as we will see, from corresponding properties of limits.
• Sums and constant multiples: Both the sum rule and the constant multiple
rule for derivatives are (easy) special cases of the result for linear combina-
tions. Setting C = D = 1, for instance, gives one of these old favorites.
• Linear combinations and linear transformations: The rule for linear com-
binations can be phrased succinctly in the language of linear algebra: Dif-
ferentiation is a linear transformation from one vector space to another.
(Vectors, in this case, are functions.)
• Approximate thinking: One view of the theorem concerns linear approxi-
mation. By hypothesis, both f and g have linear approximations f,a and
g,a at x = a:
f (x) ≈ f,a (x) = f (a) + f  (a)(x − a);
g(x) ≈ g,a (x) = g(a) + g  (a)(x − a).

i i

i i
i i

i i

4.2. Calculating Derivatives 185

The theorem tells, in effect, how to combine f,a and g,a to create new
linear approximations to functions like f + g, f g, and f /g. For example,
the linear combination rule, says that for x near a we have Following minor
re-arrangement.
3f (x) + 2g(x) ≈ 3 f,a (x) + 2 g,a (x)
= (3f  (a) + 2g  (a)) (x − a) + 3f (a) + 2g(a),

which should seem reasonable. Still more succinctly, we have 3f +2g,a =


3 f,a + 2 g,a . The situation for products and quotients is a little more com-
plicated; see the exercises.

Proof: All parts follow from manipulating the limits that define the derivatives in
question. We treat one part in detail and leave the rest to the exercises.
For products, the theorem claims that

f (x)g(x) − f (a)g(a)
lim = f (a)g  (a) + f  (a)g(a);
x→a x−a

implicit, of course, is the claim that the limit exists. To see why, we manipulate
the difference quotient limit, starting with a clever trick:

f (x)g(x) − f (a)g(a) f (x)g(x) − f (a)g(x) + f (a)g(x) − f (a)g(a)


lim = lim add and subtract the same thing
x→a x−a x→a x−a
f (x) − f (a) g(x) − g(a)
= lim g(x) + lim f (a) algebra with limits
x→a x−a x→a x−a
f (x) − f (a) g(x) − g(a)
= lim g(x) lim + lim f (a) lim more limit algebra
x→a x→a x−a x→a x→a x−a
= g(a) f  (a) + f (a)g  (a).

Note especially the last step, in which we evaluated four limits, of which only one
(the third) is completely trivial. The second and fourth limits define f  (a) and
g  (a), which we’ve assumed to exist, and the first, limx→a g(x) = g(a), holds
because g is continuous at x = a.  Why? See Theorem 4.3,
page 179.

E XAMPLE 1. Finding derivatives of polynomials and rational functions, like

3x7 − 5x + 2
p(x) = 3x7 − 5x + 2 and q(x) = ,
x3 − x

is easy for calculus veterans. How is Theorem 4.5 involved?

i i

i i
i i

i i

186 4. Derivatives

S OLUTION . Theorem 4.5 guarantees, first, that the derivative functions p (x)

and q (x) exist. To prove that p(x)—or any polynomial function—is differen-
Or prove . . . it’s easy. tiable for all x, we only need to observe that f (x) = x is differentiable, with
f  (x) = 1 for all x. Now Theorem 4.5 implies that power functions like

x · x = x2 , x2 · x = x3 , ..., x41 · x = x42 , ...

are all differentiable in their own right, and that the familiar derivative formulas
hold for all positive integer powers:
     
x2 = 2x, x3 = 3x2 , ... x42 = 42x41 , ....

(In the exercises, we will discuss two proofs, one by induction.)


We notice, too, that all polynomials are linear combinations of power func-
tions, and so the theorem guarantees that all polynomials have derivatives. The
function q(x)—like every rational function—is a quotient of differentiable func-
tions, and so Theorem 4.5 guarantees differentiability except at roots of the de-
nominator. For q there are three such roots; we will explore this function in more
detail in the exercises. ♦

E XAMPLE 2. What does Theorem 4.5 say about derivatives of f (x) = (x2 +1)15
and g(x) = sin x/ex ?

S OLUTION . The product rule in Theorem 4.5 can help with f (x) if—but only
if—we’re willing to multiply out the 15th power. That is tedious for a human but
no big deal for, say, Mathematica:

(x2 +1)15 = x30 +15x28 +105x26 +455x24 +1365x22 +3003x20 +· · ·+15x2 +1.

The result is easy, if laborious, to differentiate term by term. A wiser plan involves
the chain rule; see below.
Differentiating g requires the quotient rule, of course, but first we need deriva-
tives of the numerator and the denominator. Although familiar from elementary
calculus, the formulas
 
( sin x ) = cos x and ( ex ) = ex

are far from obvious, and we’ll defend them below. Assuming them for the mo-
ment, the rest is easy. Since numerator and denominator are differentiable, and the
denominator never vanishes, the quotient function is differentiable, with deriva-
tive

sin x ex cos x − ex sin x cos x − sin x
= = . ♦
ex ex · ex ex

i i

i i
i i

i i

4.2. Calculating Derivatives 187

Composition and the chain rule. Theorem 4.5 says nothing about functions like
h(x) = sin(x2 ) and k(x) = sin(sin(sin(ex ))), built by composition of differen-
tiable functions. Theorem 4.6 assures us that such composites are indeed differ-
entiable, and describes how the respective derivatives are combined. As always, due care for
domains is necessary.
Theorem 4.6 (The chain rule). Suppose that g is differentiable at a and f is dif-
ferentiable at b = g(a). Then f ◦ g is is differentiable at a, and

(f ◦ g) (a) = f  (g(a)) · g  (a).

E XAMPLE 3. The functions f (x) = sin x and g(x) = x2 are differentiable for
all x. Use the chain rule to differentiate
  
f ◦ g(x) = sin(x2 ) and f ◦ f ◦ g(x) = sin sin x2 .

S OLUTION . The chain rule applies directly to f ◦ g: We could substitute x for a, but
why bother?

(f ◦ g) (a) = f  (g(a)) · g  (a) = cos(a2 ) · 2a.

For f ◦ f ◦ g we have to dig deeper:

(f ◦ f ◦ g) (a) = f  (f ◦ g(a)) · (f ◦ g) (a)


= f  (f ◦ g(a)) · f  (g(a)) · g  (a);

we used the earlier calculation in the last step. Substituting the formulas for f and
g gives the final answer:
  
(f ◦ f ◦ g) (a) = cos sin a2 · cos(a2 ) · 2a;

the three-fold product represents two uses of the chain rule. ♦

Here, before the proof, are some comments on the chain rule and why it is
plausible.
• Why multiply? The chain rule says that the derivative of a composition is
a certain product of derivatives. Thinking of derivatives as magnification
factors suggests why multiplication is the right thing to do. Suppose, say, We discussed the magnification
that g  (a) = 2 and f  (b) = 3. Then “lens” g and “lens” f magnify distances view in the preceding section.
by factors of 2 and 3, respectively, and so we expect six-fold magnification
on inputs sent first through g and then through f . Microscopes use the same
principle.
• It works for linear functions: We can just calculate, without fancy proofs,
that the chain rule holds for linear functions f and g. If f (x) = Ax + B
and g(x) = Cx + D, then f  (x) = A and g  (x) = C for all x, and

f ◦ g(x) = Ag(x) + B = A (Cx + D) = ACx + (AD + B) ,

i i

i i
i i

i i

188 4. Derivatives

and so

(f ◦ g) (x) = AC,
as expected.
• It works for nonlinear functions, too: Differentiable functions are closely
approximated by linear functions, and so it is reasonable to hope that dif-
ferentiable functions might satisfy the same chain rule. This turns out to be
true; the formal proof explains why.

Notes on a proof. We’re given that both limits

g(x) − g(a) f (y) − f (b)


lim = g  (a) and lim = f  (b)
x→a x−a y→b y−b

exist, where b = g(a), and we need to prove the related claim

f (g(x)) − f (g(a))
lim = f  (b) · g  (a) = f  (g(a)) · g  (a).
x→b x−a
First we apply some clever algebra:

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


= ·
x−a g(x) − g(a) x−a
f (y) − f (b) g(x) − g(a)
= · ,
y−b x−a

where y = g(x) and b = g(a). This looks promising. If x → a, then y → b


(because g is continuous at a), and so

f (g(x)) − f (g(a)) f (y) − f (b) g(x) − g(a)


lim = lim · lim
x→a x−a y→b y−b x→a x−a
= f  (b) · g  (a),

just as we were hoping to show.


This argument works just fine—and shows that the chain rule holds—for most
Look at the first denominator on functions f and g. But one technical flaw needs attention: The key factorization
the right.
f (g(x)) − f (g(a)) f (g(x)) − f (g(a)) g(x) − g(a)
lim = lim · lim
x→a x−a x→a g(x) − g(a) x→a x−a

makes good sense if, but only if, g(x) = g(a) for all x = a in some interval
containing a. For most functions g, this is the case, but there are exceptions. If g
is constant, for instance, then our factorization is nonsense for all inputs x. But
all is not lost: if g is constant, then f ◦ g is also constant, and so, clearly, both

i i

i i
i i

i i

4.2. Calculating Derivatives 189


g  (a) = 0 and (f ◦ g) (a) = 0,

and the chain rule still holds!


We’re ready for the formal proof. As often happens, a special case takes some
extra effort.

Proof (of the chain rule): We treat two cases separately.

Case 1: g  (a) = 0. In this case, g(x) = g(a) for all x = a in some interval
containing a. We can therefore argue as above to obtain the chain rule. See Lemma 4.4, page 180.


Case 2: g  (a) = 0. In this special case, we’ll show that (f ◦ g) (a) = 0—again,
as the chain rule claims. For notational simplicity, let’s assume that a = f (a) = 0. It makes no difference
Our claim then is that, for any  > 0, we can find δ > 0 with mathematically.

f (g(x))
≤ or, equivalently, |f (g(x))| ≤  |x|
x

whenever x ∈ (−δ, δ).


To see this, let  > 0 be given; we can assume WLOG that  < 1. Note first Challenging values of  are near
that, because the limit zero.
f (x)
f  (0) = lim
x→0 x

exists, the function f (x)


x is bounded for x in some open interval (−δ1 , δ1 ). In
other words, for some M > 0 we have

f (x)
≤ M, or, equivalently, |f (x)| ≤ M |x|
x

whenever x ∈ (−δ1 , δ1 ). We’ll assume, again WLOG, that M ≥ 1.


Next, because g  (0) = 0, we can choose δ2 > 0 so that

g(x)  
≤ or, equivalently, |g(x)| ≤ |x|
x M M

whenever x ∈ (−δ2 , δ2 ). Finally, let δ be the smallest of δ1 , δ2 , and 1. This δ


“works,” because if |x| < δ, then

|g(x)| < |x| ≤  |x| < δ < δ ≤ δ2 ,
M
and so

|f (g(x))| < M |g(x)| < M |x| =  |x| .
M
This proves the chain rule. 

i i

i i
i i

i i

190 4. Derivatives

Derivatives of Elementary Functions


In Section 3.2, we discussed the “elementary functions” of calculus, built by com-
bining basic function “elements”: power functions, trigonometric functions, ex-
ponential functions, and their inverses. Proposition 3.10, page 150, says that every
We didn’t prove every detail such elementary function is continuous throughout its natural domain. A similar
rigorously. claim holds for differentiability:
Proposition 4.7 (Elementary functions are differentiable). Let f be an elemen-
tary function defined on an open interval I containing a. Then f is differentiable
at a.

We’ve already done most of the work. Theorems 4.5 and 4.6 guarantee that a
built-up function like
cos x + ex
f (x) = sin
ln (2 + x2 )
is indeed differentiable (except perhaps at endpoints of its domain), provided
that its basic building blocks—including the sine, cosine, exponential, and log
functions—are all themselves differentiable functions. Proving this rigorously
for every basic elementary function takes some work. That isn’t our top priority,
More details are in the so we give only some brief samples here.
exercises.

E XAMPLE 4 (Trigonometric derivatives). All six standard trigonometric deriva-


We proved the first in tive formulas follow from two basic limits:
Example 6, page 139. The
second follows from the first. sin h cos h − 1
lim = 1 and lim = 0.
h→0 h h→0 h
How? Why?

S OLUTION . All the remaining derivative formulas follow from the one formula

(sin x) = cos x and from algebraic properties of sines and cosines. For example,
we have
  π    π
( cos x ) = sin x + = cos x + = − sin x;
2 2
notice the chain rule implicit in the second equality, and two formulas relating
sines and cosines. Here is another, this time thanks to the quotient rule:

sin x cos2 x + sin2 x
( tan x ) = = = sec2 x.
cos x cos2 x
To prove that ( sin x ) = cos x, we’ll use the well-known addition formula
for sines:
sin(x + h) = sin(x) cos(h) + cos(x) sin(h).

i i

i i
i i

i i

4.2. Calculating Derivatives 191

This will come in handy as we wrestle with the difference quotient:

 sin(x + h) − sin(x)
( sin(x) ) = lim
h→0 h
sin(x) cos(h) + cos(x) sin(h) − sin(x)
= lim
h→0 h
cos(h) − 1 sin(h)
= sin(x) lim + cos(x) lim
h→0 h h→0 h
= sin(x) · 0 + cos(x) · 1 = cos(x),

as desired. ♦


E XAMPLE 5 (Exponential derivatives). The exponential derivative (ex ) = ex
follows from the single limit

eh − 1
lim = 1.
h→0 h
How? Why?

S OLUTION . Assuming the limit above, we have

 ex+h − ex ex eh − ex eh − 1
( ex ) = lim = lim = ex lim = ex ,
h→0 h h→0 h h→0 h

as expected. ♦

Derivatives of inverse functions. One loose end remains untied concerning dif-
ferentiability of elementary functions: handling inverses of differentiable func-
tions. (Logarithmic and√exponential functions are inverses, for instance, as are
f (x) = x3 and g(x) = 3 x.) It turns out that inverses of differentiable functions
are indeed differentiable—if the usual care is taken with domains of definition
and to avoid division by zero. Here is the key result:

Proposition 4.8 (Derivatives of inverse functions). Let f : I → J and g : J →


I be inverse functions, where I and J are open intervals. Suppose f is differen-
tiable at a ∈ I and f  (a) = 0. Then g is differentiable at f (a), and

1
g  (f (a)) = .
f  (a)

Figure 4.4 illustrates the idea.

i i

i i
i i

i i

192 4. Derivatives

y
g(x)

f (x)

f (a)

x
f (a) a

Figure 4.4. Derivatives of inverse functions f and g.

Notes on a proof. If we assume for the moment that g is differentiable at f (a),


the rest is easy, thanks to the chain rule. By definition of inverse functions, we
have g(f (x)) = x for all x ∈ I. Differentiating both sides gives

1
g(f (x)) = x =⇒ g  (f (x)) · f  (x) = 1 =⇒ g  (f (a)) =
f  (a)

whenever f  (a) = 0.
The harder part turns out to be showing what we assumed above: that g  (f (a))
exists. Figure 4.4 makes that assumption look reasonable, but proving it rigor-
ously takes us a bit off our main course. We omit the detour.

E XAMPLE 6 (Differentiating the natural log). Use Proposition 4.8 to differentiate


ln x.

S OLUTION . If f (x) = ex and g(x) = ln x, then we know f and g are inverses,



and f (x) = ex . From Proposition 4.8, we have

1 1
g  (f (a)) = , or g  (ea )) = .
f  (a) ea

Writing b = ea gives the familiar formula g  (b) = ( ln b ) = 1b . ♦

i i

i i
i i

i i

4.2. Calculating Derivatives 193

Exercises
1. We said in this section that f (x) = xn for any positive integer n, then
f  (x) = nxn−1 . For one inductive proof (using the product rule) see Prob-
lem 11, page 46.
Another approach is to work directly with the definition:

f (x) − f (a) xn − an
f  (a) = lim = lim .
x→a x−a x→a x − a

(a) Note that x2 −a2 = (x−a)(x+a) and x3 −a3 = (x−a)(x2 +ax+a2 ).


Find (proof optional) an analogous formula for xn − an .
(b) Use your formula from (a) to prove the derivative rule.

2. Let f , g, and h be everywhere differentiable functions.



(a) Use the product rule to explain why (f gh) = f  gh + f g  h + f gh .
(b) State a “three-deep chain rule” for the composition f ◦ g ◦ h.

(c) State a formula for the second derivative (f ◦ g) (a).

(d) State a “product-chain hybrid” rule for (f ◦ (gh)) (a).
(e) Consider the special case where f (x) = Ax + B for some constants
A and B. What is (f ◦ g) (a)? What does this have to do with the
linear combination rule (Theorem 4.5, page 184)?

3. Suppose f and g are both differentiable at x = a, with derivatives f  (a)


and g  (a). Use properties of limits to show that the linear combination
h(x) = 3f (x) − 42g(x) is also differentiable at a. What is h (a)?

4. Prove the claim about linear combinations in Theorem 4.5, page 184.
5. This problem outlines a proof—assuming both the product rule and the
chain rule, which we proved separately—of the quotient rule part of The-
orem 4.5, page 184. Assume throughout that f and g are differentiable at
x = a and that g(a) = 0.

(a) Assume (it is easy to show) that the function k(x) = 1/x is differen-
tiable for all x = 0, with k  (x) = −1/x2 . Use this and the chain rule
to find h (a), where h(x) = 1/g(x).
(b) Apply the product rule to f (x)/g(x) = f (x) · 1/g(x) to deduce the
quotient rule as stated in Theorem 4.5.

6. Use Theorem 4.5 and the fact that (sin x) = cos x to find derivatives of the
other five standard trigonometric functions.

i i

i i
i i

i i

194 4. Derivatives

7. Find derivatives of the following functions (assuming that derivatives of


sin x, cos x, and ex are known).

(a) sin (cos (ex ))


(b) sin x · cos x · ex
sin x
(c)
cos x · ex
sin x
(d)
cos (ex )

8. Consider the function

3x7 − 5x + 2
q(x) = .
x3 − x

The quotient rule guarantees that q is differentiable except at zeros of the


denominator.

(a) Use technology to plot q; notice the two vertical asymptotes. How are
they related to derivatives?
(b) The number one is a root of the denominator, but the graph of q has
no vertical asymptote there. Why not?
(c) The value q(1) is undefined in the formula above. What value of q(1)
makes q differentiable at x = 1? Why?

9. Let f : R → R be everywhere differentiable, with f (a) = 0, and let


g = f 2 . Show that g(a) = g  (a) = 0.

10. A function f is said to vanish to order k at x = a if f (a) = 0 = f  (a) =


f  (a) = · · · = f (k−1) . Suppose that f vanishes to order three at x = a and
g vanishes to order four. What can be said about the product function f g?
Can you prove your answer? (Hint: What does the product rule say about
higher derivatives, like (f g) , (f g) , etc.?)

11. Let g : R → R be everywhere differentiable, with g  (n) = 0 for all inte-


gers n.

(a) Let f : R → R be another everywhere differentiable function. Show


that (f ◦ g) (n) = 0 for all integers n.
(b) Let h(x) = cos (πx) · g(x). Show that h (n) = 0 for all integers n.

i i

i i
i i

i i

4.3. The Mean Value Theorem 195

4.3 The Mean Value Theorem


The mean value theorem (MVT) is a marquee result of real analysis. As the inter-
mediate value theorem (IVT) and the extreme value theorem (EVT) do for con-
tinuous functions, the mean value theorem addresses a natural and fundamental
property of differentiable functions.

Theorem 4.9 (The mean value theorem). Suppose f : [a, b] → R is continuous


on [a, b] and differentiable on (a, b). Then there exists c ∈ (a, b) such that

f (b) − f (a)
f  (c) = .
b−a
Like the IVT and the EVT, the MVT says that a certain function—f , this
time—assumes a certain “mean” (or “average”) value. Unexciting as this might
seem, it turns out to be a big deal, with surprisingly broad and deep implications.
We explore several before proving the theorem.

The graphical view. The MVT equation says something about slopes on the
graph of f : At some point c between a and b, the tangent line is parallel to the
secant line joining (a, f (a)) and (b, f (b)). Figure 4.5 illustrates this. The (linear)
secant line function, labeled L(x) in the picture, will play a role in the proof.

The horizontal case: Rolle’s theorem. If we add to the other hypotheses the
requirement that f (a) = f (b), then the conclusion takes a slightly simpler form:

Theorem 4.10 (Rolle’s theorem). Suppose f : [a, b] → R is continuous on [a, b]


and differentiable on (a, b), and that f (a) = f (b). Then f  (c) = 0 for some
c ∈ (a, b).

y
f (x)
L(x)
f (b)

f (a)

x
a c b

Figure 4.5. The mean value theorem illustrated.

i i

i i
i i

i i

196 4. Derivatives

f (x)

f (0)

x
0 c1 c2 b

Figure 4.6. Rolle’s theorem: two possible c-values.

In graphical terms, the new hypothesis says that the graph has the same height
More than one possible c is fine at x = a and at x = b; the conclusion says that the graph has a horizontal tangent
with Rolle. somewhere in between. Figure 4.6 shows two such horizontal tangents.

The units might be miles and Car talk. If f (t) is the position of a car at time t, then (f (b) − f (a))/(b − a)
hours. is the car’s average velocity over the time interval [a, b], and f  (t) is the car’s
instantaneous velocity at time t. At some intermediate time c, says the MVT (and
common sense), these two velocities must be equal. Rolle’s version sounds even
more intuitive: if a car starts and ends at the same position, then it must be stopped
at some instant in between.

When is a function constant? It is obvious, and easy to prove, that a constant


function has zero derivative. The converse—a function with constant zero deriva-
tive is constant—is less obvious than it might seem. For example, the function

1 if x > 0
s(x) =
−1 if x < 0

is nonconstant, but s (x) = 0 for all x = 0. If we rule out such “disconnected”


domains, the converse is true—but the proof requires the MVT. Here are the de-
tails.
Proposition 4.11. Let I be an open interval and f : I → R a function. If
f  (x) = 0 for all x ∈ I, then f is constant on I.

Proof: Let s and t be any two points in I. By the MVT, there is a point c between
s and t for which
f (s) − f (t)
f  (c) = .
s−t
Since the left side is zero, so is the right, which means f (s) = f (t), as desired.

i i

i i
i i

i i

4.3. The Mean Value Theorem 197

Proving the Mean Value Theorem


Proving the MVT takes some effort—not unexpectedly, given the theorem’s im-
portance and usefulness. Fortunately, we’ve already done most of the hard work.
We’ll argue in three short steps:
• Step 1: Show that if f : [a, b] → R is as hypothesized, and f has a local
maximum or local minimum at c ∈ (a, b), then f  (c) = 0.
• Step 2: Use Step 1—and another famous “value theorem”—to prove Rolle’s
theorem.
• Step 3: Apply Rolle’s theorem in a clever way to deduce the MVT.

About Step 1. Our Step 1 claim should be familiar, for at least two reasons.
First, it lurks behind most of those classic maximum–minimum problems of ele-
mentary calculus. Second, we’ve already proved it (and a bit more), as part (c) of Find the largest rectangular
Lemma 4.4, page 180. Let’s move on. pigpen . . . one side is a river . . . .

About Step 2. We assume that g : [a, b] → R is continuous on [a, b] and differ-


entiable on (a, b), and that g(a) = g(b); we need to show that g  (c) = 0 for some
c ∈ (a, b). We use g, not f, to avoid
To apply Step 1, we invoke the EVT: Because g is continuous on [a, b], it as- confusion in Step 3.
sumes both maximum and minimum values somewhere on that closed interval. If The extreme value theorem;
both the maximum and the minimum are assumed at endpoints, then the maxi- see page 157
mum and minimum values are equal, and so g is constant. In this case, g  (c) = 0
for all c ∈ (a, b), and we’re done already. The alternative is that at least one of the
maximum and the minimum is attained somewhere in (a, b). In this case Step 1
applies, and again we’re done.

About Step 3. Rolle’s theorem is more than a junior-grade version of the MVT.
With a little ingenuity, the latter can be deduced from the former. The trick is A common one in analysis.
to apply Rolle’s theorem not to the function f given in the MVT, but to another
function g, cleverly contrived from f . We sketch the argument, leaving details to
the exercises.

1. Let L(x) be the linear function whose graph joins the points (a, f (a)) and
(b, f (b)); see Figure 4.5. Notice some properties of L:

f (b) − f (a)
(i) L(a) = f (a); (ii) L(b) = f (b); (iii) L (x) = for all x.
b−a

2. If we set g(x) = f (x) − L(x), then g(a) = 0 = g(b). By Rolle’s theorem,


there exists c ∈ (a, b) with g  (c) = 0. This c satisfies the conclusion of the
MVT, and the proof is complete.

i i

i i
i i

i i

198 4. Derivatives

Calculus Friends Revisited: Using the MVT


Standard ideas of elementary calculus link properties of a function f to those of its
derivatives f  and f  . Using the MVT, we can prove many such facts—and some
but not all of their converses. The following proposition offers some samples.

Proposition 4.12. Suppose that f : I → R is differentiable at all points of an


open interval I.

f need not be strictly increasing. (i) f  (x) ≥ 0 for all x ∈ I if and only if f is increasing on I.

(ii) If f  (x) > 0 for all x ∈ I, then f is strictly increasing on I.

(iii) If f  (x) = 0 for all x ∈ I, then f is monotone on I.

Proof (s): For the “only if” part of (i), suppose that f  (x) ≥ 0 for all x ∈ I. To
show f is increasing, let s and t be in I, with s < t. By the MVT, we have, for
some c between s and t,

f (t) − f (s)
= f  (c) or, equivalently, f (t) − f (s) = f  (c)(t − s).
t−s

By hypothesis, the rightmost quantity is nonnegative. This implies that f (t) ≥


f (s), which means that f is increasing, as claimed.
For the “if” part of (i), suppose that f is increasing on I. For any x ∈ I, we
have
f (t) − f (x) f (t) − f (x)
f  (x) = lim = lim ,
t→x t−x t→x + t−x
where the first equality holds by definition of f  (x) and the second by a familiar
See Proposition 3.6, page 141. property of limits. Because f is increasing, we have

f (t) − f (x)
≥0
t−x

for all t ∈ I with t > x. Thus f  (x) is the limit of a nonnegative expression, and
so must itself be nonnegative.
This completes the proof of (i); we leave remaining parts to the exercises. 

Onward and Upward with the MVT


The mean value theorem has many and varied uses. Here we’ll briefly glimpse
two of them.

i i

i i
i i

i i

4.3. The Mean Value Theorem 199

Darboux’s theorem: derivatives and intermediate values. The intermediate value


says that a continuous function f : I → R defined on an interval I has the “inter-
mediate value property”:
If s and t are in I and f (s) < v < f (t), then f (c) = v for some v
between s and t.
It was widely believed in the nineteenth century that functions with the interme-
diate value property must be continuous.
This is false. In the late 1800s, Jean Gaston Darboux proved (essentially) the
following theorem (a proof, based on the mean value theorem, is outlined in the
exercises):
Theorem 4.13 (Darboux’s theorem). Suppose f : I → R is continuous on [a, b]
and differentiable on (a, b). Then f  has the intermediate value property.

Another well-known fact—also proved in exercises—is that a derivative func-


tion (f  in the notation above) need not be continuous.

E XAMPLE 1. Consider the function f (x) = x2 sin(1/x); set f (0) = 0. Discuss


the derivative f  .

S OLUTION . For x = 0 the function is clearly differentiable; standard derivative


rules apply. At x = 0, the derivative is also differentiable, but discontinuous.
Details will be explored in the exercises. ♦

Taylor’s theorem: the MVT generalized. The mean value theorem equation can
be rewritten to say that, under the appropriate hypotheses, we have

f (b) = f (a) + f  (c)(b − a)

for some number c between a and b. This equation can be thought of as saying that
f (b) approximates f (a) with error no larger than the last term. Taylor’s theorem,
dating from around 1700 and named for the Scottish mathematician Brook Taylor,
offers a more powerful version of such an approximation. Here is a special case:
Theorem 4.14 (Taylor’s theorem, n = 3). Suppose f , f  , f  , and f  all exist
and are continuous on [a, b]. Then, for some input c in [a, b], we have
f  (a) f  (c)
f (b) = f (a) + f  (a)(b − a) + (b − a)2 + (b − a)3 .
2 6
A proof is outlined in the exercises. Here is an application.

E XAMPLE 2. What does Taylor’s theorem say about f (x) = cos x for a = 0
and b = 1?

i i

i i
i i

i i

200 4. Derivatives

S OLUTION . Applying Taylor’s formula gives


cos(0) 2 sin(c) 3 1 sin(c)
cos 1 = cos(0) − sin(0) · 1 − ·1 + ·1 =1− + .
2 6 2 6
Now, for c ∈ [0, 1] we have sin c ≤ sin 1 ≈ 0.84, so the last summand above
can’t exceed 0.14. This means that cos 1 differs from 0.5 by less than 0.14, which
is easily checked to be true. (In fact, cos 1 ≈ 0.54.) So Taylor’s theorem might
help us calculate cosines in an emergency. ♦

Exercises
1. Let f : R → R be a differentiable function, and suppose that f has n real
roots. Use Rolle’s theorem to show that f  has at least n − 1 real roots.
Give an example to show that f  may have more than n − 1 real roots.
2. (a) Use algebra to show that p(x) = x3 + x has exactly one (real) root.
(b) Use Rolle’s theorem to show (again) that p(x) = x3 + x has exactly
one root. (Hint: If there are two roots, Rolle’s theorem leads to a
contradiction.)
(c) Show that q(x) = x13 + x11 + x9 + x7 + x5 + x3 + x has exactly one
root.
(d) Show that r(x) = x13 + x11 + x9 + x7 + x5 + x3 + x + 987, 654, 321
has exactly one root.
3. Let f (x) = x3 + ax + b, where a and b are fixed real numbers.

(a) Explain why f (x) must have at least one root, regardless of the values
of a and b.
(b) Give examples (i.e., specific values of a and b) to show that f (x) can
have one, two, or three roots. No formal proofs needed, but say briefly
why your examples work.
(c) Prove that f can have no more than three roots. (Hints: (i) Take it as
given that a quadratic polynomial can have at most two roots; (ii) use
Rolle’s theorem.)
(d) Show that if a > 0, then f has exactly one root.

4. Use Rolle’s theorem to show by induction that a nonconstant polynomial p


of degree n has at most n roots. (Hint: If p has degree n, then p has degree
n − 1.)
5. Suppose f : [a, c] → R has derivatives f  and f  , both continuous on [a, b],
and assume that there exists b in (a, c) with f (a) = f (b) = f (c).

i i

i i
i i

i i

4.3. The Mean Value Theorem 201

(a) Show that there exists x1 and x2 with a < x1 < x2 < c and f  (x1 ) =
f  (x2 ) = 0.
(b) Show that there exists x0 with a < x0 < c and f  (x0 ) = 0.
(c) State a generalization of these hypotheses that guarantees there exists
x0 with f (42) (x0 ) = 0.

6. Let f : R → R have continuous derivatives f  and f  , and suppose that


f (0) = 0, f (1) = 1, and f (2) = 2. Show that f  (x0 ) = 0 for some x0 in
(0, 2).

7. Suppose that f : R → R is periodic with positive period a (i.e., f (x + a) =


f (x) for all x), and that f has continuous derivatives of all orders. Show
that f  , f  , f  , . . . all have infinitely many roots.

8. Suppose f : R → R has first and second derivatives f  : R → R and


f  : R → R.

(a) Show that if f  (x) > M for all x in an interval I, then f (b) − f (a) >
M (b − a) for all inputs a and b in I with b > a.
(b) Suppose f (0) = 0, f  (0) = 0 and f  (x) > 2 for all x > 0. Show
that f (x) > x2 for all x > 0.

9. In each part, find all possible values of c as described in the MVT.

(a) f (x) = 3x + 5; [a, b] = [1, 7].


(b) f (x) = 3x2 + 5x + 7; [a, b] = [1, 7].
(c) f (x) = x100 ; [a, b] = [0, 1].
(d) f (x) = 3x2 + 5x + 7; [a, b] = [a, b] (the answer involves a and b).
(e) If f is any quadratic function and [a, b] any interval, then the MVT
equation holds with c taken to be the midpoint of [a, b]. Make this
precise and prove it.

10. In each part following, decide whether a value of c can be found as de-
scribed in the MVT. If so, find one. If not, say which of the MVT hypothe-
ses is not satisfied.

(a) f (x) = |x| ; [a, b] = [−1, 1].


2
(b) f (x) = x − 10x + 21 ; [a, b] = [4, 6].
(c) f (x) = x2 − 10x + 21 ; [a, b] = [2, 4].

i i

i i
i i

i i

202 4. Derivatives

11. Suppose f (t) is the eastward velocity of a car at time t, with all quanti-
ties measured in appropriate units. What does Rolle’s theorem say in this
setting? (Hint: f  (t) measures eastward acceleration.)
12. One hypothesis of the MVT is that f : [a, b] → R be continuous on all of
[a, b]. Give an example (as simple as possible) to show that this hypothesis
is necessary—i.e., find a function f : [a, b] → R, differentiable throughout
(a, b), for which the MVT fails.
13. Suppose f and g are functions continuous on [a, b] and differentiable on
(a, b).
(a) Use results in this section to show that if f  (x) = g  (x) for all x ∈
(a, b), then f (x) = g(x)+C for some constant C. (This is sometimes
called an identity theorem for differentiable functions.)
(b) Suppose that f  (x) = g  (x) + 5 for all x ∈ (a, b). What can be said
about f (x) and g(x)? Why?
14. Antiderivative
! tables in elementary calculus books are full of formulas like
Forget the C on a test and lose cos x dx = sin x + C.
a point.
(a) Why exactly is the C there? What does this have to do with the MVT?
!
(b) A very fussy professor might find fault with the formula dx x =
ln |x| + C. Explain. (Hint: Consider domains.)

15. Give a detailed proof of Step 3 in the proof of the MVT. In particular, give
an explicit formula for L(x) and use it to verify the other claims.
16. This problem is about various parts of Proposition 4.12, page 198.

(a) State (don’t prove) versions of (i) and (ii) that involve the word “de-
creasing.”
(b) Prove (ii) carefully; mimic the proof of (i).
(c) Prove (iii).

17. Let f : R → R be differentiable for all x, with f  (x) < 1 for all x and
f (0) = 0.

(a) Show that f (x) < x for all x > 0.


(b) Does a similar inequality hold for x < 0? Explain.

18. Let f : R → R be differentiable for all x. Suppose that f  (x) > 1 for all x.
Show that the graph of y = f (x) can intersect the graph of y = x no more
than once.

i i

i i
i i

i i

4.3. The Mean Value Theorem 203

19. Let f : R → R be differentiable for all x. Suppose that f  (x) < 1 for all x
and that f (0) = 0. Show that f (x) < x for all x > 0. Must f (x) < x hold
also for x < 0? Why or why not?
20. Let f : R → R be differentiable for all x. Suppose that f  (x) > 1 for all x.
Show that the graph of y = f (x) can intersect the graph of y = x no more
than once.
21. A function f : R → R is called a contraction if the inequality
|f (x) − f (y)| ≤ |x − y|
holds for all real numbers x and y. (As the name suggests, a contraction
“shrinks distances.”)

(a) Show that if f is a contraction, then f is uniformly continuous on D.


(b) Suppose that f : R → R is differentiable, and that |f  (x)| ≤ 1 for all
x. Show that f is a contraction. (Hint: MVT.)
(c) Is f (x) = sin x a contraction? Is g(x) = ex a contraction? Why?

22. Prove Darboux’s theorem (Theorem 4.13) as follows:


(a) Suppose first that a < s < t < b, and f  (s) < 0 < f  (t). Show that
f must attain a minimum at some point c strictly between s and t. At
this c, f  (c) = 0.
(b) Now suppose that a < s < t < b, and v is any number such that
f  (s) < v < f  (t). Consider the new function g(x) = f (x) − vx.
Then g satisfies the conditions of the previous part. Apply the result
of (a) to complete the proof.
23. In the situation of Example 1, find a (two-part) formula for f  , and show
that f  is not continuous at x = 0.
24. Prove Taylor’s theorem (Theorem 4.14) in the special case a = 0 and b = 1,
as follows:
(a) Consider the function
f  (0) 2
p2 (t) = f (0) + f  (0)t + t .
2
Show that f (0) = p2 (0), f  (0) = p2 (0), and f  (0) = p2 (0).
(b) Consider the new function
g(t) = f (t) − p2 (t) + (p2 (1) − f (1))t3 .
Show that g(0) = 0 = g(1), so there exists t1 in (0, 1) with g  (t1 )=0.

i i

i i
i i

i i

204 4. Derivatives

(c) Show that g  (0) = 0 = g  (t1 ), so there exists t2 in (0, t1 ) with


g  (t2 ) = 0.
(d) Show that g  (0) = 0 = g  (t2 ), so there exists c in (0, t2 ) with
g  (c) = 0. Conclude that Taylor’s theorem holds in the case at hand.

25. Prove Taylor’s theorem (Theorem 4.14) in the general case (i.e., without
assuming a = 0 and b = 1). (Hint: In the general case, use the given
function f to define a new function h(x) = f (b(x − a)).)

4.4 Sequences of Functions


In Chapter 2, we studied convergence for a sequence {an } of numbers—under
appropriate conditions, we say that the numbers an converge to another number a.
A sequence {fn } of functions may also converge or diverge to a limit function.
We explore some basic examples before giving formal definitions.

E XAMPLE 1. Consider the functions f1 (x) = x, f2 (x) = x2 , f3 (x) = x3 ,


. . . , fn (x) = x . Figure 4.7(a) shows graphs of several fn on the interval [0, 1];
n

Figure 4.7(b) shows one typical function, f20 . Does the sequence {fn } converge
to some limit function?

S OLUTION . As Figure 4.7(a) hints, the behavior of a sequence {fn } depends


strongly on the domain we specify. Viewed on the interval (0, 0.8), for instance,
the graphs of fn appear to become flatter and flatter, approaching the function
f (x) = 0. At x = 1, on the other hand, we have fn (1) = 1 for all n; graphs of

1.5 1.5

1.0 1.0

0.5 0.5

0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0

(a) fn (x) = xn for many n (b) f20 (x) = x20

Figure 4.7. Exploring the function sequence {fn (x) = xn }.

i i

i i
i i

i i

4.4. Sequences of Functions 205

4 4

2 2

–4 –2 2 4 –4 –2 2 4

–2 –2

–4 –4

(a) gn (x) for many n (b) g20 (x) = x + sin(20x)/20

Figure 4.8. Exploring the sequence {gn (x) = x + sin(nx)/n}.

all the fn pass through the point (1, 1). On the domain interval [0, 1], therefore,
the fn appear to converge—in some sense yet to be defined—to the function

0 if 0 ≤ x < 1,
f (x) =
1 if x = 1.

We also observe that, although each fn is continuous on [0, 1], the limit function
f is discontinuous at x = 1. ♦

E XAMPLE 2. Consider the functions


sin(nx)
gn (x) = x + , n = 1, 2, 3, . . . .
n
Figure 4.8(a) shows several gn on the domain [−5, 5]; Figure 4.8(b) shows only g20 .
Does the sequence {gn } converge to a limit function?

S OLUTION . The graphs suggest—correctly—that the gn , although wavy for


large n, approach the linear function g(x) = x. The formulas agree—for each
n, the inequality
sin(nx) 1
|gn (x) − g(x)| = ≤
n n
holds for all inputs x in [−5, 5], the domain interval shown. By contrast with
the situation in Example 1, moreover, the pictures suggest that the same sort of
convergence occurs on every domain interval. ♦

What the examples show. The examples illustrate that a sequence of functions
may behave quite differently on one domain than on another. On the domain
[0, 1/2], for example, the functions {fn } in Example 1 converge to the zero func-
tion. On the domain [0, 1], too, these functions appear to converge, but to a limit

i i

i i
i i

i i

206 4. Derivatives

Not shown in Figure 4.7, but function that is discontinous at x = 1. On the domain [2, 3], by contrast, the same
easily visualized. functions become larger and larger with n, and so have no sensible limit func-
tion. The functions {gn } in Example 1, on the other hand, appear to converge to
g(x) = x on every domain interval.

Two Definitions
Let f1 , f2 , f3 , . . . be a sequence of real-valued functions, all defined on a fixed
interval I. To sort out similarities and differences in the behaviors illustrated in
Examples 1 and 2, we’ll define two senses in which {fn } might converge to a
limit function f , also defined on I.

Definition 4.15 (Pointwise convergence). The sequence {fn } converges point-


wise to f on I if, for every fixed x ∈ I, we have fn (x) → f (x) as n → ∞.

Definition 4.16 (Uniform convergence). The sequence {fn } converges uniformly


to f on I if for each  > 0 there exists N such that for every n > N the inequality
|fn (x) − f (x)| <  holds for all x ∈ I.

How do the sequences in Examples 1 and 2 stack up against these definitions?

• Both sequences converge pointwise: Both {fn } and {gn } converge point-
wise to their limits, at least on the domain intervals shown. For {fn } we
have
lim fn (x) = lim xn = 0 = f (x)
n→∞ n→∞

for all x ∈ [0, 1). If x = 1, by contrast, then

lim fn (1) = lim 1n = 1 = f (1).


n→∞ n→∞

Thus {fn } converges pointwise to f on [0, 1], as claimed.


For {gn }, the squeezing inequality

1 sin(nx) 1
x− ≤x+ ≤x+ ,
n n n
which holds for all n and every fixed x, implies that

sin(nx)
lim gn (x) = lim x+ = x = g(x)
n→∞ n→∞ n

We could have used any for all x ∈ [−5, 5]. Thus {gn }, too, converges pointwise to a limit function
domain interval. g, this time on the domain [−5, 5].

i i

i i
i i

i i

4.4. Sequences of Functions 207

• Only one sequence converges uniformly: Both {fn } and {gn } converge
pointwise to their limit functions; {gn } also converges uniformly. Show-
ing this is straightforward. For given  > 0, the number N = 1/ works: if
n > N , then we have
 
 sin(nx)  1
|gn (x) − g(x)| =   ≤ < 1 = ,
n  n N
and the inequality holds for all x in [−5, 5], as the definition requires.
The sequence {fn } does not converge uniformly to f on [0, 1]. The prob-
lem, roughly speaking, is that the limit function f “jumps” abruptly at
x = 1, while all the fn increase smoothly. We explore this idea more
carefully in the next example.

E XAMPLE 3. The functions fn (x) = xn converge pointwise on [0, 1] to the limit


function f , with f (x) = 0 for x = 1 and f (1) = 1. Show that {fn } does not
converge uniformly to f on [0, 1].

S OLUTION . Suppose toward contradiction that {fn } does converge uniformly.


Set  = 0.1, choose N as in Definition 4.16, and consider the function fN +1 .
Then, by design,
|fN +1 (x) − f (x)| < 0.1
holds for all x ∈ [0, 1]. Because f (1) = 1 and f (x) = 0 for x = 1, the preceding
inequality boils down to two conditions:

(i) |fN +1 (x)| < 0.1 if x = 1; (ii) |fN +1 (1) − 1| < 0.1.

In particular, we must have either fN +1 (x) < 0.1 or fN +1 (x) > 0.9 for all
x ∈ [0, 1]. This is clearly absurd—the continuous function fN +1 (x) = xN +1
must assume every value between zero and one. We’ve shown that uniform con-
vergence fails. ♦

On the other hand . . .

E XAMPLE 4. Show that the same sequence {fn } does converge uniformly on
[0, 0.99], with limit f (x) = 0. This is the same limit function
as before, but chopped off at
x = 0.99.
S OLUTION . Let  > 0 be given. Choose a number N such that 0.99N < . Any
Why can this be done? How big
such N works, because for all n > N and all x ∈ [0, 0.99], we have
is N if  = 0.001?
|fn (x) − f (x)| = |xn − 0| = xn ≤ 0.99n < 0.99N < ,

as desired. ♦

i i

i i
i i

i i

208 4. Derivatives

Basic properties. Proposition 4.17 collects, as samples, some basic properties of


pointwise and uniform convergence. Proofs and additional properties are left as
exercises.
Proposition 4.17. Let I be an interval, and let {fn } and {gn } be sequences of
real-valued functions, all defined on I.
• Uniform convergence is stronger: If fn → f uniformly, then fn → f point-
wise, too. The converse is false.
• Algebraic combinations: Suppose fn → f and gn → g pointwise on I,
where f and g are functions. Then
fn ± g n → f ± g and fn gn → f g,
pointwise on I in each case.
• Patching it together: Let I1 and I2 be intervals with I = I1 ∪I2 . If fn → f
uniformly (or pointwise) both on I1 and on I2 , then fn → f uniformly (or
pointwise) on I.

Properties of Limit Functions


Must the limit of a sequence “inherit” properties from members of the sequence?
For a sequence {xn } of numbers, for instance, we know that if xn ≥ 0 for all n
and xn → L, then L ≥ 0, too. On the other hand, the limit of a strictly positive
Consider {1/n}, for instance. sequence need not be positive. Similar questions arise for sequences of functions.

E XAMPLE 5. Let {fn } be a sequence of functions defined on an interval I, and


suppose fn → f pointwise on I. If fn (x) ≥ 0 for all x ∈ I and for all n > 0,
must f (x) ≥ 0 for all x ∈ I? If all the fn are continuous on I, must f be
continuous on I, too?

S OLUTION . The answers are respectively yes and no. If we fix any x in I,
then {fn (x)} is a sequence of nonnegative numbers, and so its limit, f (x), is
also nonnegative, as claimed. As for continuity, we saw in Example 1 that the
And differentiable, for that continuous functions fn (x) = xn converge pointwise on [0, 1] to a discontinuous
matter. limit—the function f defined f (x) = 0 if x = 0 and f (1) = 1. ♦

So the pointwise limit of continuous functions need not be continuous. The


situation is different for uniform limits:
Proposition 4.18. Let {fn } be a sequence of functions, converging uniformly on
an interval I to a function f . If all the fn are continuous on I, then f is continuous
on I, too.

i i

i i
i i

i i

4.4. Sequences of Functions 209

The proof idea. The formal proof is clever and slightly technical, but the basic
idea is straightforward. Continuity of f at x = a means, roughly, that if x ≈ a,
then f (x) ≈ f (a). This holds in the present case because we know (i) fn (x) ≈
f (x) for large n and for all x in I; (ii) fn (x) ≈ fn (a) when x ≈ a because fn is
continuous at x = a. Putting these conditions together gives, for x ≈ a,

f (x) ≈ fn (x) ≈ fn (a) ≈ f (a).

We make this three-step approximation precise in the formal proof. Watch for three / 3’s.

Proof: Let a be any point of I. To show that f is continuous at a, let  > 0 be


given. To find a δ > 0 that “works” for  in the definition of continuity, we argue
in three steps.
First, we choose any particular integer N such that

|f (x) − fN (x)| < for all x in I;
3
this is possible because {fn } converges uniformly to f . Second, because fN is
continuous at x = a, we can choose δ > 0 such that

|fN (x) − fN (a)| < whenever |x − a| < δ.
3
Third, we note that, since a ∈ I, our choice of N guarantees

|fN (a) − f (a)| < .
3
Putting these inequalities together shows that our chosen δ does what we need it
to do: if |x − a| < δ, then By a three-part triangle
inequality.
|f (x) − f (a)| ≤ |f (x) − fN (x)| + |fN (x) − fN (a)| + |fN (a) − f (a)|
  
< + + = ,
3 3 3
as desired. 

Derivatives and limits. The uniform limit of a sequence of continuous functions


is continuous, as just shown. Can anything be similar be said about differentiable
functions?
As Example 1 illustrates, the pointwise limit of differentiable functions need
not even be continuous, let alone differentiable. The following example shows
that the uniform limit of differentiable functions need not be differentiable, either.

E XAMPLE 6. For each positive integer n, define fn (x) = |x|1+1/n . Figure 4.9
shows several of the fn ; the sequence appears to approach the absolute value
function. What is happening with derivatives?

i i

i i
i i

i i

210 4. Derivatives

0.5

–1 –0.5 0 0.5 1

Figure 4.9. Smooth functions approaching the absolute value function.

S OLUTION . The functions fn behave as Figure 4.9 suggests. Writing f (x) =


|x|, we can readily show:

• Each fn is differentiable at all real x. This is clear for x = 0, and not hard
See the exercises. to prove if x = 0.

• fn → f uniformly on [−1, 1]. This follows from the fact, readily shown,
that
1
|f (x) − fn (x)| <
n
Again, see the exercises. for all x ∈ [−1, 1].

The point is that, although all the fn are differentiable everywhere, their limit f is
not differentiable at the origin. Thus, differentiability—unlike continuity—is not
preserved by uniform limits. ♦

A Function of Weierstrass: Everywhere Continuous


but Nowhere Differentiable
One use of function limits is in exploring how “good” and “bad” behaviors can
coexist in the same function. In Example 6, for instance, we obtained the absolute
value function—continuous everywhere but not differentiable at one point—as the
uniform limit of a sequence of differentiable functions.
Using similar but more sophisticated methods, the mathematician Weierstrass
constructed around 1872 a much stranger limit function: one that is continuous
everywhere but differentiable nowhere on R. Weierstrass’s construction starts
with a function sequence of the following form:

i i

i i
i i

i i

4.4. Sequences of Functions 211

1
1

–3 –2 –1 1 2 3 –3 –2 –1 1 2 3
x x

–1
–1

(a) f0 and f1 : first steps (b) f2 : already ragged

Figure 4.10. Steps toward Weierstrass’s function.

f0 (x) = cos(πx)
f1 (x) = cos(x) + a cos (bπx)
 
f2 (x) = cos(x) + a cos (bπx) + a2 cos b2 πx
...
n
 
fn (x) = ak cos bk πx .
k=0

Here a is a constant with 0 < a < 1, small enough to assure that the fn converge
uniformly; b is a positive integer, large enough to create rapid oscillation in the
cosines. We omit computational details, but here are the main points:
• The fn converge uniformly on R to some function f .

• All the fn are differentiable (and therefore continuous).

• The limit function f is continuous everywhere, as Proposition 4.18 guaran-


tees.
• Thanks to rapid oscillation in the summands, the limit function is differen-
tiable nowhere.

Figure 4.10 shows the first few fn , with a = 0.5 and b = 13.

Exercises
1. In each part show, that the given sequence {fn } converges pointwise to the
given limit f on the given interval I. Is the convergence also uniform? Why
or why not?

i i

i i
i i

i i

212 4. Derivatives

1
(a) fn (x) = n for all n; f (x) = 0; I = R.
(b) fn (x) = n for all n; f (x) =
x
0; I = R.
sin x
(c) fn (x) = n for all n; f (x) = 0; I = R.

2. Consider the sequence {fn } defined by



n if x ≥ n,
fn (x) =
0 if x < n.

(a) Show that {fn } converges pointwise on R to the zero function f (x) =
0. Is the convergence also uniform?
(b) Show that {fn } converges uniformly on I = [−1000, 1000] to the
zero function f (x) = 0.

3. In the situation and notation of Proposition 4.17, page 208, show that if
fn → f and gn → g, both pointwise on I, then fn + gn → f + g pointwise
on I. Show also that the same result holds if “pointwise” is replaced with
“uniformly.”

4. Consider the situation and notation of Proposition 4.17, page 208.

(a) Show that if fn → f and gn → g, both pointwise on I, then fn gn →


f g pointwise on I.
(b) Show that if fn → f and gn → g, both uniformly on I, then {fn gn }
need not converge uniformly I to f g. (Hint: Try fn (x) = gn (x) =
(x + 1/n) and I = R.)

5. This problem is about Example 6, page 209; consider the functions fn de-
fined there.

(a) Let n be any positive integer. Show that fn (x) = |x|1+1/n is dif-
ferentiable at x = 0, with fn (0) = 0. (Hint: Look at both left- and
right-hand limits of the difference quotient for fn (0).)
(b) Let n be any positive integer. Show that |f (x) − fn (x)| < n1 for all
x ∈ [−1, 1]. (Hint: It is enough to show, using elementary calculus,
that x − x1+1/n < 1/n for x in [0, 1].)
(c) Use the inequality in the preceding part to show that fn → f uni-
formly on [−1, 1].

6. Prove (informally) or disprove (with a counterexample) the following state-


ments about limits of sequences of numbers.

i i

i i
i i

i i

4.4. Sequences of Functions 213

(a) If xn ∈ Z for all n and xn → L, then L ∈ Z, too.


(b) If xn ∈
/ Q for all n and xn → L, then L ∈
/ Q, too.
(c) If xn ∈ [−3, 42] for all n and xn → L, then L ∈ [−3, 42], too.

7. Let f : R → R be continuous on R, and define the sequence {fn } by


fn (x) = f (x + 1/n) for n ∈ N.

(a) Show that fn → f pointwise on R.


(b) Give examples to show that {fn } may or may not converge uniformly
to f on R.

8. Let {fn } be a sequence of functions with fn → f pointwise on an interval


I. Consider the new sequence {gn } defined by gn (x) = sin ( fn (x) ) and
the function g(x) = sin ( f (x) ). Show that gn → g pointwise on I.

9. Let {fn } be a sequence of functions with fn → f uniformly on an interval


I, and let h : R → R be uniformly continuous on R. Consider the new
sequence {gn } defined by gn (x) = h ( fn (x) ) and the function g(x) =
h ( f (x) ). Show that gn → g uniformly on I.

10. In the situation of Proposition 4.17, page 208, suppose that fn → f and
gn → g, both pointwise on I. Suppose that for all x ∈ I we have g(x) = 0
and gn (x) = 0 for all n. Show that fn /gn → f /g pointwise on I.

11. Let {fn } a sequence of real-valued functions defined on an interval I. Show


that {fn } converges pointwise to a function f defined on I if and only if,
for each x ∈ I, the sequence {fn (x)} is Cauchy. (Such a sequence is said
to satisfy a Cauchy criterion.)

i i

i i
i i

i i

i i

i i
i i

i i

CHAPTER 5
Integrals

5.1 The Riemann Integral: Definition


and Examples
Familiar Ideas Revisited
Expressions and calculations like
 1   5 5
π
2 x3 124
f (x) dx, sin x dx, and x dx = =
0 0 1 3 1 3

are familiar from elementary calculus. In this chapter we interpret the integral, de-
fine it rigorously, and explore some of its properties—including the fundamental
theorem of calculus, which justifies calculations like the one above.

Notes on notation. If f (x) = x2 , then the expressions


 1  1  1  1
f (x) dx, f (p) dp, x2 dx, and f
0 0 0 0

look a little different, but all four mean the same thing. The first two forms use dif-
ferent variable names, but these choices are arbitrary—all four expressions have
the same numerical value. For simplicity and economy, we’ll often drop the vari-
able name entirely, and use the last form. We’ll use the other forms when we want
to emphasize a variable name or, as in the third form, when no specific function
name is given.

Riemann’s and other integrals. In this book (and in elementary calculus) “inte-
gral” means “Riemann integral,” after the German mathematician G. F. B. Rie-
mann (1826–1866), who first defined integrability rigorously. Riemann’s mathe-
matical accomplishments, despite his short life, ranged across the discipline. One
of his conjectures in number theory, now known as the Riemann hypothesis, re-
mains after 150 years among mathematics’ most important unsolved problems.
And not for lack of trying: A $1 million prize for its solution, offered by the Clay
Mathematics Institute, lies unclaimed.

215

i i

i i
i i

i i

216 5. Integrals

The phrase “Riemann integral” honors a person, but it also distinguishes one
particular approach to integration from several others, each with its own features
and (depending on one’s viewpoint) bugs. Among important alternatives to Rie-
mann’s integral are the Lebesgue and the Henstock integrals, developed around
1900 and 1950, respectively. These integrals “agree with” the Riemann integral
for all the standard functions of calculus, but they are more general in the sense
that they handle larger classes of functions. More advanced courses in analysis
treat such integrals carefully, but we will stick with Riemann’s version.

Areas and integrals. The most familiar view of integrals from elementary calcu-
b
lus involves area: If f (x) ≥ 0 for x ∈ [a, b], then a f (x) dx measures the area
above the x-axis, below the curve y = f (x), and between the vertical lines x = a
and x = b. If f (x) < 0 for some inputs, then area below the x-axis is involved,
Draw your own pictures to and counts as negative.
illustrate the possibilities. Thinking of integrals as areas will often be helpful for us, too. This view
suggests—correctly—that
 7  3  3.14
15
3 dx = 18, (1 + x) dx = , and cos(x) dx ≈ 0,
1 0 2 0

Is the last integral slightly assuming, as we do for now, that all three integrals exist. But extra care will be
positive or slightly negative? needed for other functions, whose graphs may be ragged or broken, not smooth.
Why?

Defining the Integral


What do statements like
 3  π  b
2x dx = 9, sin x dx = 2, and f = −7
0 0 a

Draw your own pictures for the really mean? For the first integral, the integral-as-area view is enough—9 is the
first two integrals. only reasonable answer. For the second integral, the area view suggests 2 is possi-
ble, but is it exact? Why not 2.034? Or 1.957? For the third integral, the negative
result and elementary calculus intuition suggest that f (x) is in some sense more
negative than positive for x in the interval [a, b]. But in what sense is the answer
exactly −7?
Resolving all these questions asks a lot of the integral, and so it is no surprise
that the recipe is complicated. Here, first, we assemble the ingredients:
• Integrand and interval: The definition requires an integrand—a real-valued
function f : [a, b] → R defined for all inputs x in a closed and bounded
interval [a, b]. Note, in particular, that although integral equations like
 ∞  1
1 1
2
dx = 1 and √ dx = 2
1 x 0 x

i i

i i
i i

i i

5.1. The Riemann Integral: Definition and Examples 217

are sometimes seen in elementary calculus, the integrals in question are not That’s why we call them
of the type considered here. “improper.”

• Partitions, subintervals, and norms: A partition P of an interval [a, b] is


any choice of n + 1 points {x0 , x1 , . . . , xn }, arranged in increasing order
from a to b:
a = x0 < x1 < x2 < · · · < xn−1 < xn = b.
We’ll often just write P = {x0 , x1 , x2 , . . . , xn } to emphasize that P is a
set; the smallest-to-biggest ordering is understood.
The object of choosing P is to chop [a, b] into n smaller closed intervals, “Partition” is the polite term.
meeting only at their endpoints:
[a, b] = [x0 , x1 ] ∪ [x1 , x2 ] ∪ · · · ∪ [xi−1 , xi ] ∪ · · · ∪ [xn−1 , xn ].
We’ll call [xi−1 , xi ] the i-th subinterval; its length is the positive number
Δxi = xi − xi−1 . If the points of P happen to be regularly spaced, then
the partition is called regular, and Δxi = (b − a)/n for all i. For any
partition, regular or not, we have
Δx1 + Δx2 + · · · + Δxn = xn − x0 = b − a.
The norm of a partition P, denoted P, is the largest of the Δxi . Requir- Also known as the mesh.
ing that P < δ, as we will in the definition, ensures that every subinterval
is narrow.
• Sampling points: Given any partition P = {x0 , x1 , x2 , . . . , xn } of an in-
terval [a, b], we can choose sampling points
s1 ∈ [x0 , x1 ], s2 ∈ [x1 , x2 ], ..., sn ∈ [xn−1 , xn ],
one from each subinterval of P, to form a full set S = {s1 , s2 , . . . , sn } of
sampling points from P.
There are many, many ways to choose a sample S from any given parti-
tion P. We could choose each subinterval’s left endpoint, its right endpoint,
or its midpoint, or any combination. Or we could throw an imaginary dart
into each subinterval to choose a sampling point at random. A partition
endpoint, say x42 , might even serve twice as a sample point, representing
both [x41 , x42 ] and [x42 , x43 ].
• Riemann sums: Given all the data (a function f , an interval [a, b], a parti-
tion P, and samples S) just described, a Riemann sum is an expression of
the form

n
f (si )Δxi = f (s1 )Δx1 + f (s2 )Δx2 + · · · + f (sn )Δxn .
i=1

i i

i i
i i

i i

218 5. Integrals

a s1 x1 s2 x2 s3 x3 s4 x4 s5 b

Figure 5.1. A generic Riemann sum.

As a shorthand we’ll sometimes use the notation RS(f, P, S) to denote a


Even the shorthand is slightly Riemann sum with all these data. When all the data are given explicitly,
cumbersome. RS(f, P, S) reduces to a number. Under good conditions—as specified
in the coming definition—we expect this number to approximate an inte-
gral.
A Riemann sum is a sort of “representative sample” of the function f on
[a, b]: We chop [a, b] into smaller pieces, evaluate f at one point of each
piece, and add up the results, “weighting” each value f (si ) with the “size”
of the subinterval it represents. Figure 5.1 illustrates the familiar idea.

2
We don’t know “officially” yet E XAMPLE 1. Explore some Riemann sums for 0 sin(x) dx.
that the integral exists. But it
does.
S OLUTION . The integral involves the integrand f (x) = sin x and the interval
[0, 2]. The simplest and least interesting partition of [0, 2] involves no chopping:
P = {x0 , x1 } = {0, 2} has just one subinterval, and P = 2. Here we need
Chosen at random by just one sampling point, say, s1 = 1.3657, and the corresponding Riemann sum
Mathematica. is simply
f (s1 )Δx1 = sin(1.3657) · 2 ≈ 1.9581.
With so little work or thought invested, we can’t expect much return from the
answer.
Let’s work (just) a little harder. With

P = {0, 0.8, 1.0, 1.7, 2} and S = {0, 0.81, 1.69, 1.73},

we have P = 0.8 and the Riemann sum RS(f, P, S) becomes

i i

i i
i i

i i

5.1. The Riemann Integral: Definition and Examples 219

4

f (si )Δxi = sin(0) · 0.8 + sin(0.81) · 0.2 + sin(1.69) · 0.7 + sin(1.73) · 0.3
i=1
≈ 1.57.

With the same partition, but new samples S = {0.8, 0.8, 1.7, 1.7}, the Riemann
sum becomes

sin(0.8) · 0.8 + sin(0.8) · 0.2 + sin(1.7) · 0.7 + sin(1.7) · 0.3 ≈ 2.14,

which isn’t all that close to earlier estimates.


Now let’s get serious. With a regular, 20-piece partition (so P = 0.1) and
midpoint samples, we have

P = {0, 0.1, 0.2, . . . , 1.9, 2} and S = {0.05, 0.15, . . . , 1.95},

and the Riemann sum works out to Thanks, Mathematica.

sin(0.05) · 0.1 + sin(0.15) · 0.1 + · · · + sin(1.95) · 0.1 ≈ 1.42.

With right endpoint samples S = {0.01, 0.02, . . . , 2.0} from the same partition
the result is not much different; Mathematica gives about 1.421. These numbers,
and all the extra work, deserve more credibility. ♦ Rightly so. The exact value, as
we will be able to prove soon, is
1 – cos 2 ≈ 1.41615.
We are ready at last for the formal definition.

Definition 5.1. Let [a, b] be a closed interval, f : [a, b] → R a function, and I a


!b
real number. Then f is integrable on [a, b], and we write a f = I, if for every
given  > 0 there exists δ > 0 such that

|RS (f, P, S) − I| < 

whenever P = {x0 , x1 , . . . , xn } is a partition of [a, b] with P < δ and S =


{s1 , . . . , sn } is any set of samples from P.

Illustrating the Definition


The definition is undeniably complicated, but simple examples will help us un-
pack it, and reveal some pleasant surprises.

E XAMPLE 2. Let f (x) = 3 for all x and [a, b] = [1, 7]. Thinking of area
!7
suggests that 1 f = 18. Does the definition agree? Can the idea be generalized?

i i

i i
i i

i i

220 5. Integrals

S OLUTION . Yes, and yes.


If P is any partition of [1, 7] and S is any set of sampling points, then


n 
n 
n
f (si )Δxi = 3Δxi = 3 Δxi = 3 · (7 − 1) = 18,
i=1 i=1 i=1

which is exactly the desired answer. Thus, for a given  > 0 we can choose any
positive δ, say δ = 42, and the definition is satisfied. ♦

There’s nothing special, of course, about the data in the preceding example.

Proposition 5.2. If f (x) = k is any constant function and [a, b] any interval, then
f is integrable on [a, b], and
 b
k dx = k · (b − a).
a

Nonnegative integrands, nonnegative integrals. Following is another basic prop-


erty of integrals that follows directly from the definition.
!b !b
Proposition 5.3. Suppose f (x) ≥ 0 for all x ∈ [a, b]. If a
f exists, a
f ≥ 0.

!b
Proof: The idea is simple: since all Riemann sums for I = a f are nonnegative,
I itself must be nonnegative, too. The formal proof takes some care.
Let  > 0 be given. Choose δ > 0 that works for this  in the sense of
Definition 5.1. If we choose any Riemann sum RS (f, P, S) with P < δ, then
we must have |RS (f, P, S) − I| < . Because f (x) ≥ 0 for all x ∈ [a, b], it
is clear that RS (f, P, S) ≥ 0, too, and so we must have I ≥ −. Since this
inequality holds for all positive , we must have I ≥ 0. 

Stranger integrands. In Proposition 5.3 we assumed that the integral exists. De-
ciding which integrals exist takes some work, and we start slowly. The following
integrand is discontinuous, but only at one point. Does it matter?

E XAMPLE 3. Let 
1 if x = 1,
f (x) =
0 if x = 1.
 2
Does f exist?
0

i i

i i
i i

i i

5.1. The Riemann Integral: Definition and Examples 221

!2
S OLUTION . Thinking about area suggests 0 f = 0; the graph of f seems too Draw your own.
skinny to bound appreciable area above the x-axis.
Proving this is not difficult. Let  > 0 be given, set δ = /2, and let P =
{x0 , x1 , . . . , xn } be any partition with P < δ. We need to show that if S =
{s1 , s2 , . . . , sn } is any set of sampling points for P, then the associated Riemann
sum satisfies
− < f (s1 )Δx1 + · · · + f (sn )Δxn < .
Since all of the f (si )Δxi are nonnegative, it is enough to prove the right-hand
inequality. The left-hand inequality is
Now f (si ) = 0 unless si = 1, in which case f (si ) = 1. Thus, each summand obvious.
f (si )Δxi is either 0 or Δxi . Because the “offender point” x = 1 can lie in at
most two subintervals, say [xi−1 , xi ] and [xi , xi+1 ], our Riemann sum can have at
most two nonzero summands. Adding everything up gives Very likely, all summands are
zero.

n
f (si )Δxi = f (si )Δxi + f (si+1 )Δxi+1
i=1
 
≤ Δxi + Δxi+1 < + = ,
2 2
as desired. ♦

Example 3 shows that one discontinuity is forgivable in an integral. What


about many?

E XAMPLE 4. Recall our old friend



1 if x ∈ Q,
g(x) =
0 if x ∈
/ Q.
 1
Does g exist? Can you guess anything from
0 the graph of g ?

S OLUTION . No. The problem, roughly speaking, is that for every partition P =
{x0 , x1 , x2 , . . . , xn } of [0, 1], no matter how “fine,” there are both rational and
irrational numbers inside every subinterval [xi−1 , xi ]. If all of the sample points
si are chosen to be rational, then g(si ) = 1 for all i, and the corresponding
Riemann sum works out to
n  n
RS (f, P, S) = g(si )Δxi = 1 · Δxi = 1.
i=1 i=1

If, instead, all the si are irrational, then we get



n 
n
RS (f, P, S) = g(si )Δxi = 0 · Δxi = 0.
i=1 i=1

i i

i i
i i

i i

222 5. Integrals

1 2 3 4

Figure 5.2. A discontinuous integrand.

This situation—widely varying Riemann sums even for “fine” partitions—is in-
compatible with Definition 5.1. ♦

The last example involves another type of discontinuity.

E XAMPLE 5. Figure 5.2 shows the function



5 if x ∈ [1, 3],
f (x) =
0 if x ∈/ [1, 3];
!4
a region of interest is shaded. Show that f is integrable on [0, 4], with 0
f = 10.

S OLUTION . We know already from the discussion in Example 2 that f is inte-


!3
grable on [1, 3], and that 1 f = 10. We need now to show that f has the same
integral over a larger interval. This should seem reasonable if we think in terms
of area; the (slightly laborious) proof makes this intuition precise.
Why the denominator of ten? Suppose, then, that  > 0 is given. We’ll show that δ = /10 works in the
Read on. sense of Definition 5.1. To see this, let P = {x0 , . . . , xn } be any partition of
[0, 4] with P < δ, let S = {s1 , . . . , sn } be any choice of sampling points
within P, and let RS (f, P, S) be the corresponding Riemann sum. To prove our
claim, we need to show that

10 −  < RS (f, P, S) < 10 + .

We’ll tackle the left-hand inequality and leave the right-hand one as an exercise.
Because P is a partition of [0, 4], we can choose among the partition points
the first xi with xi ≥ 1 and the last xi with xi ≤ 3. If, say, these points are x42

i i

i i
i i

i i

5.1. The Riemann Integral: Definition and Examples 223

and x237 , then we have

· · · < x41 < 1 ≤ x42 < x43 < · · · < x236 < x237 ≤ 3 < x238 < . . . .

This implies that 1 ≤ si ≤ 3 for i = 43, 44, . . . , 237, and so f (si ) = 5 for all
these i. Moreover, because P < δ, we know that

x42 < 1 + δ and 3 − δ < x237 ,

and so x237 − x42 > 2 − 2δ. Now we can calculate:

RS (f, P, S) = f (s1 )Δx1 + · · · + f (sn )Δxn


≥ f (s43 )Δx43 + · · · + f (s237 )Δx237 all terms are nonnegative

= 5 Δx43 + · · · + 5 Δx237
= 5 (x237 − x42 ) the Δ xi “collapse”
> 5 (2 − 2δ) = 10 − 10δ = 10 − ,

as we aimed to show. ♦

Lessons from the examples. The examples illustrate one pleasant and one less
pleasant property of integrals. The good news is that the Riemann integral is rel-
atively forgiving of minor misbehavior, such as occasional discontinuities, in an
integrand. Less convenient is the fact that proofs and calculations using the def-
inition, even for quite simple integrands, can be messy and technical. The moral As we just saw in Example 5.
is that we’d like to have both simpler tests for integrability and more efficient
methods of calculating integrals. We’ll find some in the following sections.

Which Functions are Riemann Integrable?


Deciding precisely which functions have integrals and which don’t turns out to be
a very hard problem; we won’t tackle it in full generality. Partial answers, how-
ever, are interesting and accessible—and sometimes surprising. We will show,
for instance, that every continuous function (and hence every differentiable func-
tion) on an interval [a, b] is indeed integrable. We’ll see, too, that every monotone
function f : [a, b] → R is also integrable—even though such an f might have
infinitely many discontinuities on [a, b]. Try drawing a
We will study the question of integrability more carefully in Section 5.3. monotone-but-nasty function.

Meanwhile, here’s one useful criterion.

Proposition 5.4. If f is integrable on [a, b], then f is bounded on [a, b].

i i

i i
i i

i i

224 5. Integrals

About the proof. We sketch the proof of a special case, leaving generalities
!3
to the exercises. Suppose, say, that 0 f = 42. Now let  = 1. Choose
δ > 0 that works for this  in the sense described in Definition 5.1, and let
P = {x0 , x1 , x2 , . . . , xn } be any partition of [1, 3] with P < δ. If we can
show that f is bounded on each of the n subintervals [xi−1 , xi ], we can conclude
that f is bounded on all of [1, 3].
t is the only variable; all the xi To see why f is bounded on, say, [x6 , x7 ], consider the expression
are constants.
S(t) = f (x1 )Δx1 + · · ·+ f (x6 )Δx6 + f (t)Δx7 + f (x8 )Δx8 + · · ·+ f (xn )Δxn .

Here is the key idea: For each t ∈ [x6 , x7 ], S(t) is a Riemann sum, based on the
!3
partition P, for the integral 0 f , and so Definition 5.1 guarantees that

41 < S(t) < 43,

which means that S(t) is bounded for t ∈ [x6 , x7 ]. This implies, as desired, that
f (t) is bounded for t ∈ [x6 , x7 ].

Exercises
!3
1. Let f (x) = x2 and consider the integral I = 0 f , (We know from elemen-
tary calculus—and we’ll prove soon—that I = 9.)

√ √P = {0, 0.8, 1.0, 1.7, 2, 2.9, 3} and the sample set


(a) Use the partition
S = {0, 1, 2, 3, 2, 3} to evaluate the Riemann sum RS(f, P, S).
What is P?
(b) Using the same partition P = {0, 0.8, 1.0, 1.7, 2, 2.9, 3}, choose an-
other sample set S for which the RS(f, P, S) is as small as possible.
How small can RS(f, P, S) be?
(c) Using the same partition P = {0, 0.8, 1.0, 1.7, 2, 2.9, 3}, choose a
sample set S for which RS(f, P, S) approximates I (the exact value is
nine) as badly as possible. How much error can RS(f, P, S) commit?
(d) Using the (one-piece) partition P = {0, 3}, choose a (one-member)
sample set S for which RS(f, P, S) = 9.
!4
2. Let f (x) = x and consider the integral I = 0 f , (We know from ele-
mentary calculus—and we’ll prove soon—that I = 8. See also Problem 12
below.)

(a) Using the partition P = {0, 1, 2, 3, 4}, find a sample set S for which
RS(f, P, S) = 8.
(b) Using the partition P = {0, 1, 2, 3, 4}, find a sample set S for which
RS(f, P, S) = 9.

i i

i i
i i

i i

5.1. The Riemann Integral: Definition and Examples 225

(c) For P = {0, 4} find a sample set S so that RS(f, P, S) = 0.


(d) For P = {0, 4} find a sample set S so that RS(f, P, S) = 8.
(e) Is there a two-piece partition P = {0, x1 , 4} and a sample set S for
which RS(f, P, S) = 0? Why or why not?
(f) Describe a 100-piece partition P = {0, x1 , . . . , x99 , 4} and a sample
set S for which RS(f, P, S) < 0.01.

3. Suppose that f is integrable on [0, 2] and that f (x) ≥ 3 for all x ∈ [0, 2].
!2
Show that 0 f ≥ 6. (Mimic the proof of Proposition 5.3, page 220.)

4. Use Definition 5.1 to prove Proposition 5.2: If f (x) = k is a constant


!b
function, then f is integrable and a k dx = k · (b − a).

5. Let f (x) = 0 for x = 0 and f (0) = 42. We explore the proof that f is
!1
integrable on [0, 1] and 0 f = 0.

(a) Let P = {0, 0.001, 0.002, . . . , 1} be a 1000-piece partition of [0, 1],


and let S = {s1 , s2 , . . . , s1000 } be any corresponding set of samples.
What are the possible values of RS(f, P, S)?
(b) Let P = {0, x1 , . . . , xn−1 , 1} be any n-piece partition of [0, 1], and
P = {s1 , . . . , sn } any set of samples. Explain why we must have
either RS(f, P, S) = 0 or RS(f, P, S) = 42x1 .
(c) Let  > 0 be given and set δ = /42. Show that if P < δ and S =
{s1 , . . . , sn } is any set of samples from P, then 0 ≤ RS(f, P, S) < .
!1
Conclude that 0 f = 0.

6. Let f (x) = 0 for x = 0 and f (1) = 42. Prove as follows that f is integrable
!2
on [0, 2] and 0 f = 0.

(a) Let P = {0, 0.001, 0.002, . . . , 1.999, 2} be a 2000-piece partition


of [0, 1], and S = {s1 , s2 , . . . , s2000 } any corresponding set of sam-
ples. What are the three possible values of RS(f, P, S)?
(b) Let  > 0 be given and set δ = /84. Show that if P < δ and S =
{s1 , . . . , sn } is any set of samples from P, then 0 ≤ RS(f, P, S) < .
!2
Conclude that 0 f = 0.
!b
7. Suppose g is integrable on [a, b], with g = 0. Suppose 0 ≤ f (x) ≤ g(x)
a !b
for all x. Show that f is also integrable, with a f = 0.

8. What is the converse of Proposition 5.3? Is it true? If so, why? If not, give
a counterexample.

i i

i i
i i

i i

226 5. Integrals

9. Prove that the value of I in Definition 5.1 is unique. (In other words, if both
I1 and I2 satisfy the definition, then I1 = I2 .)
!b
10. Suppose that I = a f exists. Show that the following “Cauchy condi-
tion” holds: for all  > 0 there exists δ > 0 such that if P1 and P2 are
two partitions of [a, b] with P1  < δ and P2  < δ, and S1 and S2 are
corresponding sample sets, then |RS(f, P1 , S1 ) − RS(f, P2 , S2 )| < .
11. Suppose that f is continuous on [a, b]. We will show later that f is also
integrable on [a, b]; here are some steps in that direction.

(a) Explain why the following condition holds: for any given  > 0, there
exists some δ > 0 such that if s and t are in [0, 1] and |s − t| < δ,
then |f (s) − f (t)| < .
(b) Let  and δ be as in the preceding part, let P = {x0 , x1 , x2 , . . . , xn }
be any partition with P < δ, and let S = {s1 , s2 , . . . , sn } and
T = {t1 , t2 , . . . , tn } be two different sample sets for P. Show that

|RS(f, P, S) − RS(f, P, T )| < (b − a).


!1
12. Show as follows that f (x) = x is integrable on [0, 1], and that 0
f = 1/2.

(a) Let P = {x0 , x1 , x2 , . . . , xn } be any partition of [0, 1] (so x0 = 0


and xn = 1). Let M = {m1 , m2 , . . . , mn } be the sample set whose
elements are the midpoints of their respective subdivisions. (For ex-
ample, m7 = (x7 + x6 )/2.) Show that RS(f, P, M) = 1/2.
(b) Let  > 0 be given. Show that δ =  works in Definition 5.1 to
!1
show that I = 0 f = 1/2. (Use the preceding fact and part (b) of
Problem 11.)

13. Generalize ideas in Problem 12 to show that f (x) = x is integrable on


!b
every interval [a, b], and that a x dx = (b2 − a2 )/2.
14. Let f (x) = 1/x if x = 0 and f (0) = 0. Proposition 5.4 says that f is
not integrable on [0, 1]. To illustrate this, show that, for any partition P =
{0, x1 , . . . , xn−1 , 1}, there is some sample set P = {s1 , s2 , . . . , sn }
such that RS(f, P2 , S2 ) > 1000.

5.2 Properties of the Integral


Basic properties of the definite integral are familiar from elementary calculus—
where they may be taken for granted. Using the formal definition, we can readily
give rigorous proofs.

i i

i i
i i

i i

5.2. Properties of the Integral 227

Algebra with Integrals


It is standard operating procedure in calculus to break complicated integrands
apart, integrate the pieces separately, and then reassemble the results. For exam-
ple, we can write Use basic calculus to check the
last identity, if you like.
 1  1  1
7 3 1 1
− 2 dx = 7 dx − 3 2+1
dx
0 x + 1 x + 1 0 x + 1 0 x
π
= 7 ln 2 − 3 ,
4
assuming (for now) that all three integrals in question exist. In elementary calcu-
lus we may skip over some theoretical niceties, but now we can do things right.
The next theorem guarantees that integrable functions (like differentiable func-
tions, continuous functions, and other objects we have studied) “behave well”
with respect to addition and scalar multiplication.
Theorem 5.5. Suppose that functions f and g are integrable on [a, b], and let k
be any number. Then the new functions kf and f + g are also integrable on [a, b],
with     
b b b b b
kf = k f and (f + g) = f + g.
a a a a a

Integration is linear. Before proving the theorem we observe that we can apply
it repeatedly to handle more complicated linear combinations. If, say, f , g, and
h are all integrable on [2, 5], then the following equation makes good sense—and
it’s true:
 5  5  5 
π  π 5
3f − 7g + h = 3 f −7 g+ h.
2 4 2 2 4 2
A fancier way to state these ideas uses the language of linear algebra. The set
V of integrable functions on [a, b] is a vector space, and integration on [a, b] is a
linear transformation from V to R (another vector space!).

Proving Theorem 5.5. We’ll sketch the proof for sums and leave the rest to the
!b !b
exercises. For brevity we write If for a f and Ig for a g.
Let  > 0 be given. Since If and Ig exist, there are positive numbers δf and
δg such that, for any sampling points s1 , . . . , sn ,


n

P < δf =⇒ f (si )Δxi − If < ;
i=1
2

n

P < δg =⇒ g(si )Δxi − Ig < .
i=1
2

i i

i i
i i

i i

228 5. Integrals

Now let δ = min{δf , δg }; we’ll show that this δ “works” in the sense of Def-
inition 5.1 for the sum function f + g. To do so, consider any partition P =
{x0 , x1 , x2 , . . . xn } with P < δ, and let S = {s1 , s2 , . . . sn } be any corre-
Watch for the triangle inequality. sponding choice of sampling points. Now we calculate:


n
(f (si ) + g(si )) Δxi − (If + Ig )
i=1

n 
n
= f (si )Δxi − If + g(si )Δxi − Ig
i=1 i=1
n 
n
≤ f (si )Δxi − If + g(si )Δxi − Ig
i=1 i=1
 
< + = .
2 2
This shows what we claimed: f + g is integrable on [a, b], with integral If + Ig .

Bigger integrands, bigger integrals. Theorem 5.5 has a simple and natural corol-
lary; we leave the proof to the exercises.
Corollary 5.6. Let f and g be integrable functions on [a, b].
 b  b
If f (x) ≤ g(x) for all x ∈ [a, b], then f≤ g.
a a

Combining ideas from Example 3, page 220, and Theorem 5.5 produces some
possible surprises.

E XAMPLE 1. Suppose

f (1) = 1, f (2) = 2, f (3) = 3, ..., f (1000) = 1000


! 1000
and f (x) = 0 for other x. Does 0 f exist?

! 1000
S OLUTION . Yes, and 0 f = 0. Example 3, page 220, slightly modified,
shows that functions like f17 : [0, 1000] → R, given by

17 if x = 17,
f17 (x) =
0 otherwise
! 1000
are all integrable on [0, 1000], and that 0
f17 = 0. Our given f satisfies

f = f1 + f2 + · · · + f1000 ,

i i

i i
i i

i i

5.2. Properties of the Integral 229

and so Theorem 5.5 gives


 1000  1000  1000  1000
f = f1 + f2 + · · · + f1000
0 0 0 0
= 0 + 0 + · · · + 0 = 0,

as desired. ♦

!b
E XAMPLE 2. Suppose f is integrable on [a, b], with
f = 42, and suppose
!b a
g(x) = f (x) for all but finitely many x in [a, b]. What can be said about a g?

!b
S OLUTION . In this case, a g = 42, too. To see why, consider the difference
function g − f . Since g(x) − f (x) = 0 for all but finitely many x, the method of
!b
Example 1 shows that a (g − f ) = 0. By Theorem 5.5,
 b  b  b  b
g= f + (g − f ) = f+ (g − f ) = 42 + 0 = 42.
a a a a

!b
Here is another way to express the result: If a f = I, then altering f (x) at
finitely many points in [a, b] leaves the integral unchanged. ♦

Joinery
Another way to build new integrals from old is to stick “pieces” of various func-
tions together. Interestingly, the pieces need not fit together continuously. In this
sense, the integral is more forgiving than the derivative, which requires smoother
joinery.

E XAMPLE 3. Figure 5.3 shows a function f formed—clumsily—from three sep-


!4
arate pieces. What can be said about 0 f ?

S OLUTION . Despite the breaks at x = 1 and x = 3, the resulting function is


integrable on [0, 4], and can be integrated piece by piece:
 4  1  3  4
f= f+ f+ f = 2 + 2 + 3 = 7.
0 0 1 3

Justifying such calculations rigorously takes a little effort. The main idea is in the
next lemma. ♦

i i

i i
i i

i i

230 5. Integrals

1 2 3 4

Figure 5.3. Clumsy joinery.

!b
Lemma 5.7. Suppose that f : [a, b] → R is integrable, with a
f = I. Assume
c > b, so [a, b] ⊂ [a, c], and consider the “extended” function f¯ : [a, c] → R
defined by 
f (x) if x ∈ [a, b],
f¯(x) =
0 if x > b.
Then f¯ is integrable on [a, c], and
 c  b
f¯ = f = I.
a a

¯ Once we know that, it is no


The live issue, by the way, is integrability of f.
surprise that extending f in the way described doesn’t change the value of the
Draw your own picture of a integral I. The proof—like others that involve the definition of the integral—is a
typical f and f̄. bit messy, but it is worth sticking with as an example of its type. The main idea is
!c !b
that Riemann sums for a f¯ can’t differ by much from Riemann sums for a f .
Proof: Let  > 0 be given. We need to find δ > 0 so that if P is any partition of
[a, c] with P < δ, and S is any choice of sampling points for P, then


n
f¯(si )Δxi − I < .
i=1
!b
Let’s use what we know about the original integral a f to produce such a δ.
!b
The /2 will come in handy later. First, since a f exists, we can choose δf > 0 so that


m

f (si )Δxi − I <
i=1
2

i i

i i
i i

i i

5.2. Properties of the Integral 231

holds whenever P  = {x0 , x1 , . . . xm } is a partition of [a, b] with P   < δn , Here a = x0 and b = xm .


b
and the sampling set S  = {s1 , s2 , . . . sm } is drawn from P  . Second, since a f
exists, we know f must be bounded on [a, b], so we have |f (x)| ≤ M for some So says Proposition 5.4,
positive number M and all x ∈ [a, b]. page 5.4.
Our goal is now visible in the distance. We’ll show that the positive number Strange as it may look at first
   glance.
δ = min δf ,
4M
has the desired properties. To this end, let P = {x1 , x2 , . . . xn } be any partition
of [a, c] with P < δ, let S be any selection of sampling points from P, and
consider the corresponding Riemann sum
n

S= ¯ 1 )Δx1 + f¯(s2 )Δx2 + · · · + f¯(sn )Δxn .
f¯(si )Δxi = f(s
i=1

We need to show that S lies within  of I. To do so, let xi0 be the largest member
of P that does not exceed b; that is, xi0 ≤ b < xi0 +1 . Now for i > i0 + 1 we
know f¯(si ) = 0, while for i ≤ i0 we have f¯(si ) = f (si ). With these facts in
mind, we can rewrite S:
S = f (s1 )Δx1 + f (s2 )Δx2 + · · · + f (si0 )Δxi0 + f¯(si0 +1 )Δxi0 +1 .
b
This form reveals that S is almost a Riemann sum for a f . Indeed, the similar
sum
S  = f (s1 )Δx1 + f (s2 )Δx2 + · · · + f (si0 )Δxi0 + f (b) (b − xi0 )
b
is a Riemann sum for a f , corresponding to the new partition P  = {a, x1 ,
x2 , . . . , xi0 , b}; note that P   < δ. (If xi0 = b then the last summand in S 
vanishes.)
To finish the proof, we observe that, by our hypothesis,

|S  − I| < . (∗∗)
2
Also, S and S  differ by (at most) two terms, each of which is small:
 
|S − S  | = f¯(si0 +1 )Δxi0 +1 − f (b) (b − xi0 )
 
¯ i +1 )Δxi +1  + |f (b) (b − xi )|
≤ f(s 0 0 0
 
< M δ + M δ ≤ 2M = .
4M 2
Combining this with inequality (∗∗) gives
 
|S − I| ≤ |S − S  | + |S  − I| < + = ,
2 2
as desired. 

i i

i i
i i

i i

232 5. Integrals

Lemma 5.7 lets us prove the theorem we really want.

Theorem 5.8. Let f : [a, b] → R be a function, and let c be a number between a


!c !b !b
and b. If both a f and c f exist, then a f exists, too, and
 b  c  b
f= f+ f.
a a c

Proof: Define f1 and f2 on [a, b] by


 
f (x) if a ≤ x ≤ c, 0 if a ≤ x < c,
f1 (x) = f2 (x) =
0 if c < x ≤ b; f (x) if c ≤ x ≤ b.

Note that f (x) = f1 (x) + f2 (x) for all x ∈ [a, b]. Now Lemma 5.7 says that both
f1 and f2 are integrable on [a, b], and that
 b  c  b  b
f1 = f and f2 = f.
a a a c

To finish up, we add up integrals, as Theorem 5.5 permits:


 b  b  b  c  b
f= f1 + f2 = f+ f,
a a a a c

as claimed. 

Theorem 5.8 needs an important caveat: The add-up-the-pieces strategy is


guaranteed to work only if we know in advance that the “smaller” integrals
!c !b
a f and c f exist. (We do know this in Example 3, in which f is constant
on each smaller subinterval.) In particular, we have not proved the tempting (and
true) fact that if f is integrable on [a, b], then it is also integrable on any smaller
interval [a, c]. We will prove this in the next section, where we consider more
carefully the question of which functions are integrable.

Antiderivatives and Integrals: Toward a Fundamental


Theorem
Elementary calculus experience suggests, almost irresistibly, that integrals and
antiderivatives are closely connected. So they are, and the following result, a
junior-grade version of the familiar fundamental theorem of calculus, begins the
connection.
But there’s more to say: a stronger version (Theorem 5.19, page 250) appears
in the next section.

i i

i i
i i

i i

5.2. Properties of the Integral 233

Theorem 5.9 (Fundamental theorem of calculus, version 0). Let f : [a, b] → R


be a function, and suppose

(i) f is integrable on [a, b];

(ii) there is a function F : [a, b] → R, continuous on [a, b] and differentiable on


(a, b), such that F  (x) = f (x) for all x ∈ (a, b).
!b
Then a f = F (b) − F (a).
!b
Proof: By our hypotheses, both of the numbers I = a f and F (b) − F (a) exist;
we need to show they’re equal. We’ll do so by proving that

|F (b) − F (a) − I| < 

for every positive , no matter how small.


Let  > 0 be given. Because I satisfies Definition 5.1, we can choose δ > 0
as described there. Now let

P = {x0 = a, x1 , x2 , . . . xn = b}

be any partition with P < δ. Finding such a P is easy. One


The proof uses a clever idea: If we choose the sampling points s1 , s2 , . . . , sn is to chop [a,b ] into n equal
pieces, where [a,b ] / n < δ.
just right, the associated Riemann sum adds up, after some fancy telescoping, to
none other than F (b) − F (a). Once this is done, Definition 5.1 guarantees that
F (b) − F (a), like every Riemann sum associated with P, lies within  of I. Since
 is arbitrary, we must have F (b) − F (a) = I, as claimed.
To choose these special sampling points, we apply the mean value theorem
(MVT) to our antiderivative function F , once on each of the n partition subin-
tervals. Hypothesis (ii) assures that the MVT applies. For each subinterval
[xi−1 , xi ], the MVT says that for some si in (xi−1 , xi ),

F (xi ) − F (xi−1 ) = F  (si )(xi − xi−1 ) = f (si )Δxi .

Adding all n of these results gives the desired Riemann sum: Watch the summands collapse.


n 
n
f (si )Δxi = F (xi ) − F (xi−1 )
i=1 i=1
= F (x1 ) − F (x0 ) + F (x2 ) − F (x1 ) + · · · + F (xn ) − F (xn−1 )
= F (xn ) − F (x0 ) = F (b) − F (a).

This completes the proof. 

i i

i i
i i

i i

234 5. Integrals

Good news—and some cautions. Theorem 5.9 should look familiar. It allows
many standard integral calculations of elementary calculus, like this one:
 5 5
2 x3 53 13 124
x dx = = − = .
1 3 1 3 3 3
Avoiding all that fuss over partitions, norms, and Riemann sums seems—and is—
a big advantage in calculating a lot of integrals. But some sticky questions remain:
• Can we find an antiderivative? In the preceding calculation, with f (x) =
x2 , it was easy to find (or just to know) that F (x) = x3 /3 is a suitable
antiderivative. For other functions it can be much harder, or even impossi-
ble, to find antiderivative formulas. For instance, neither of the harmless-
looking functions
f (x) = cos(x2 ) and g(x) = cos(x) ln(x)
has an “elementary antiderivative”—a function built from standard function
Ask Mathematica or Maple to “elements”: polynomials, trigonometric functions, logarithms, etc. Without
antidifferentiate these functions; a suitable antiderivative F , Theorem 5.9 is useless for calculation.
notice the strange ingredients in
the answer. • Is f integrable? We assumed in the theorem—and used crucially in the
!b
proof—that a f exists. Elementary calculus courses often skirt the ques-
tion of integrability, perhaps forgivably both because the matter is subtle
and because the basic functions of elementary calculus turn to be integrable
on intervals within their domains.
Theorem 5.9 dodges the tough questions above by simply assuming, as hy-
potheses, that all is well. Doing so simplifies the proof, but it weakens the theo-
rem. In the next section, we’ll grapple more seriously with the question of which
functions are integrable. A key result (which applies to all basic functions of ele-
mentary calculus) is that every function f continuous on a closed interval [a, b] is
also integrable there.

Using the Fundamental Theorem


Definition 5.1, page 219 Among the drawbacks to using the (complicated!) basic definition to prove that
an integral I exists is the need to know (or guess) a specific numerical value for
I. This number may not be obvious, but Theorem 5.9 sometimes helps.

E XAMPLE 4. Does 0
(2x + sin(x)) dx exist? If so, how big is it?

S OLUTION . The function f (x) = 2x + sin(x) has antiderivative F (x) = x2 −


We will see later that f , being cos(x), and so F (π) − F (0) = π 2 + 2 ≈ 11.87. Theorem 5.9 does not guarantee
continuous, is integrable. that the integral exists, but it does say that π 2 + 2 is the only possible value. ♦

i i

i i
i i

i i

5.2. Properties of the Integral 235

!1
E XAMPLE 5. Show that 0
2x dx = 1; use Theorem 5.9 and Definition 5.1.

S OLUTION . The easy part is finding a value for the integral. Since the integrand
f (x) = 2x has antiderivative F (x) = x2 , and F (1) − F (0) = 1, Theorem 5.9
says that one is the only possible value. We could have thought about
The tricky bit is showing that the integral exists. We have, for now, only areas, too.
Definition 5.1 to work with, so we start as usual with a given positive . Let
δ = ; we’ll use some clever algebra and a nice collapsing sum to show that this
δ “works.”
Let P = {x0 , x1 , x2 , . . . xn } be any partition of [0, 1] with P < δ. We
claim that, for any samples S = {s1 , s2 , . . . , sn } drawn from P,

n 
n
1−< f (si )Δxi = 2si Δxi < 1 + .
i=1 i=1

We will prove just the second inequality, leaving the first as an (easy) exercise.
The key observation is that, since si ≤ xi for all i,

n 
n
2si Δxi ≤ 2xi Δxi .
i=1 i=1

It suffices, therefore, to show that the right-hand sum above can’t exceed 1 + .
For this we use an algebraic trick. If we write
2xi = (xi + xi−1 ) + (xi − xi−1 ) = xi + xi−1 + Δxi
for each i, then substitution and a little algebra give

n 
n
2xi Δxi = ( xi + xi−1 + Δxi ) Δxi
i=1 i=1
n
= (xi + xi−1 ) Δxi + Δxi 2
i=1

n
  
n
= x2i − x2i−1 + Δxi 2 = S1 + S2 .
i=1 i=1

We will handle S1 and S2 separately. A telescoping argument helps with S1 :


     
S1 = x21 − x20 + x22 − x21 + · · · + x2n − x2n−1
= x2n − x20 = 1 − 0.
The sum S2 is small. Since Δxi < δ =  for each i, we get

n 
n 
n
S2 = Δxi 2 <  Δxi =  Δxi =  · 1 = .
i=1 i=1 i=1

i i

i i
i i

i i

236 5. Integrals

Putting our results together gives



n 
n
2si Δxi ≤ 2xi Δxi = S1 + S2 < 1 + ,
i=1 i=1

which completes the proof. ♦

Exercises
1. This problem is about Corollary 5.6, page 228.
(a) Consider the function h(x) = g(x) − f (x) on [a, b]. Why must h be
!b
integrable? Why is a h ≥ 0?
(b) Prove Corollary 5.6.
2. Suppose that f is integrable on [a, b] and that m ≤ f (x) ≤ M for all
x ∈ [a, b]. Explain carefully why
 b
m (b − a) ≤ f ≤ M (b − a).
a

3. Suppose f is integrable on [1, 7] and −1 ≤ f (x) ≤ 2 for all x ∈ [1, 7].


!7
Find upper and lower bounds for 1 f .
4. Use the result of Problem 2 to find upper and lower bounds on each of the
following integrals; assume (it’s true!) that they exist.
 200
sin(x2 )
(a) 5+ dx
100 100
 200
sin2 x
(b) 5+ dx
100 100
 200
1
(c) dx
100 100 + sin2 x
5. It is a fact (we will prove it later, but just assume it here) that if f is contin-
uous on [a, b] then f is also integrable on [a, b].

(a) Suppose that f is continuous on [a, b] and that f (x) > 0 for all x ∈
!b
[a, b]. Show that a f > 0, too. (Hint: Use the extreme value theorem
and Corollary 5.6, page 228.)
!b
(b) Suppose f is continuous on [a, b] and that a f = 0. Show that f (c) =
0 for some c ∈ [a, b]. (This fact is sometimes known as the mean value
theorem for integrals.)

i i

i i
i i

i i

5.2. Properties of the Integral 237

(c) Give an example to show that the result in (b) need not hold if f is
discontinuous on [a, b].

6. Suppose that f is integrable on [a, b]. Show (in the spirit of the proof of
!b !b
Theorem 5.5, page 227) that 3f is also integrable and that a 3f = 3 a f .
!b !b
7. Suppose that both a
f and a
|f | exist. Prove the “triangle-like” inequality
 b  b
f ≤ |f | .
a a

8. Consider the function f defined by f (n) = sin n if n ∈ Z and f (x) = 0


! aShow that f is integrable on every interval [−a, a], where a > 0.
otherwise.
What is −a f ?

9. Consider the “floor function” f (x) defined by

f (x) = sup{n ∈ N | n ≤ x}.

(a) Explain (cite an appropriate theorem) why f is integrable on every


interval [a, b].
!1
(b) What is −1 f ? Why?
!n
(c) What is −n f ? Why?

10. We showed in and near Problem 12, page 226, that f (x) = x is integrable
!b
on [a, b], and that a x dx = (b2 − a2 )/2.
!5
(a) Use the formula above and Theorem 5.5 to find 1
(3x + 7) dx.
(b) A function g has the W-shaped graph formed by connecting the dots
at (0, 2), (1, 0), (2, 1), (3, 0), and (4, 2) in the xy-plane. Explain why
!4
the integral 0 g exists and find its value.

11. Assume (it’s true) that the integral in each part following exists. Use Theo-
rem 5.9 to find the value.
!1
(a) 0 x42 dx

(b) 0 sin x dx
!b 
(c) a C + Dx + Ex2 + F (x3 ) dx
!1 2
(d) 0 xex dx

i i

i i
i i

i i

238 5. Integrals

12. Consider the function f defined by f (1/n) = 1 for n ∈ N and f (x) = 0


otherwise. Assuming that f is integrable (as we’ll see in the next section),
!1
complete the following proof sketch to show that I = 0 f = 0.
(i) Clearly I ≥ 0, so it is enough to show I ≤  for all  > 0. (ii) For given
, define f (x) = 1 if 0 ≤ x ≤ , and f (x) = 0 otherwise. Then f is
!1
integrable, and 0 f (x) = . (iii) We have f (x) ≤ f (x) for all but finitely
!1 !1
many x, so 0 f ≤ 0 f (x) = .
!b !b
13. Suppose that both f and g exist, and that f (x) ≤ g(x) for all but
a a !b !b
finitely many x in [a, b]. Show that a f ≤ a g.

5.3 Integrability
How can we decide whether a given function f : [a, b] → R is integrable on
[a, b]? The question is obviously important: a useful integral should apply to
many functions. The question is also difficult: deciding which functions satisfy a
complicated definition naturally takes some work.
So far we’ve seen only piecemeal results:

See Proposition 5.4, page 223. • If f is integrable, then f is bounded.

See Example 3, page 220, and • A discontinuous function f may or may not be integrable.
Example 4, page 221.
• We’ve also said—but not proved—that every continuous function is inte-
See Example 4, page 234. grable.

In this section we approach these matters rigorously, and identify some im-
portant classes of integrable functions. Our main tool, detailed in Theorem 5.14,
is the box sum, a useful and practically usable criterion for integrability.

Criteria for Integrability


Our definition of the Riemann integral is relatively technical, so we expect that
detecting integrability (or its absence) will be challenging, too. An immediate
hurdle is the fact the definition requires a “candidate” I for the value of a given
integral. It turns out that we can skirt this problem with a “Cauchy criterion” for
We did something similar—for Riemann sums.
similar reasons—for sequences.
Lemma 5.10. Let f [a, b] → R be a bounded function. Suppose that for every
 > 0 there exists δ > 0 such that

|RS(f, P1 , S1 ) − RS(f, P2 , S2 )| < 

i i

i i
i i

i i

5.3. Integrability 239

whenever P1 and P2 are partitions of [a, b] such that both P1  < δ and P2  <
!b
δ, and samples S1 and S2 come from P1 and P2 . Then the integral a f exists.
Proof: The idea is to concoct a certain Cauchy sequence {In } of numbers, whose
limit I will turn out to be the desired integral. Every Cauchy sequence has
To get started, for each n ∈ N we use the hypothesis to choose a positive one.
number δn such that
1
|RS(f, P1 , S1 ) − RS(f, P2 , S2 )| <
n
for all Riemann sums based on partitions P1 and P2 with both P1  < δn and
P2  < δn . For technical reasons we choose the δn to be decreasing: δ1 ≥ δ2 ≥ Convince yourself this is
δ3 ≥ . . . . possible.
Next, for each n we choose any particular partition Pn with Pn  < δn A regular partition works fine.
and any particular set Sn of samples from Pn . The associated Riemann sum
RS(f, Pn , Sn ) is then a number; let’s call it In for short. This process produces
a numerical sequence {In }, which is readily shown to be Cauchy—and hence
converges to some limit I. (The proof that {In } is Cauchy uses the fact that the
δn decrease; see the exercises.)
Last, we use Definition 5.1, page 219, to show that I is the sought-after inte-
gral. For given  > 0, we first choose any positive integer N for which both
 1 
|IN − I| < and < ,
2 N 2
and we set δ = δN as chosen above. This δ does what Definition 5.1 asks. If P
is any partition with P < δN , S is any set of samples, and RS(f, P, S) is the
corresponding Riemann sum, then the triangle inequality and our choices give
|RS(f, P, S) − I| ≤ |RS(f, P, S) − IN | + |IN − I|
 
≤ + = ,
2 2
as Definition 5.1 requires. 
Not quite there. Lemma 5.10 will prove useful, but it has a serious practical
drawback: showing that the hypothesized inequality holds for all suitable parti-
tions P and all corresponding sample sets S seems difficult. The box-sum crite- There are infinitely many P for
rion, which turns out to be equivalent to the hypothesis of Lemma 5.10, will prove each δ, and infinitely many S for
each P .
much easier to work with.

Integrability and Box Sums


Figure 5.4 shows (shaded) the lower sum, the upper sum, and the correspond-
ing box sum—the difference between upper and lower sums—for a well-behaved
integrand f and a five-piece partition of [a, b].

i i

i i
i i

i i

240 5. Integrals

a x1 x2 x3 x4 b a x1 x2 x3 x4 b

(a) A lower sum (b) An upper sum

a x1 x2 x3 x4 b

(c) A box sum

Figure 5.4. Lower, upper, and box sums for an integral.

The picture suggests the appropriate definitions, but some extra care is needed
for discontinuous integrands. The fine print follows.

Upper and lower sums. For any given partition P of an interval [a, b], there
are infinitely many ways of choosing samples S compatible with P, and hence
infinitely many possible Riemann sums associated to P. To get upper and lower
bounds on the values of all these Riemann sums, it is helpful to consider upper
sums and lower sums.
If the integrand f is continuous on [a, b], as in Figure 5.4, then upper and lower
sums are ordinary Riemann sums, with sampling points chosen to maximize or
minimize f over each separate subinterval. (A continuous function has maximum
and minimum values on each subinterval, by the extreme value theorem.) In this
case, therefore, upper and lower sums are simply the largest and smallest possible
Riemann sums for a given partition.
A discontinuous integrand f , on the other hand, need not attain maximum and
minimum values on a given subinterval. If f is bounded on [a, b], however, then
both

i i

i i
i i

i i

5.3. Integrability 241

mi = inf{ f (x) | x ∈ [xi−1 , xi ] } and Mi = sup{ f (x) | x ∈ [xi−1 , xi ] }

exist for each i, and so the following definitions make sense. The completeness axiom
guarantees this.
Definition 5.11. Let f : [a, b] → R be a bounded function, and P = {x0 , x1 , . . . ,
xn } a partition of [a, b]. With mi and Mi as above, we define upper and lower
sums as follows:

n
US (f, P) = Mi Δxi = M1 Δx1 + M2 Δx2 + · · · + Mn Δxn ;
i=1
n
LS (f, P) = mi Δxi = m1 Δx1 + m2 Δx2 + · · · + mn Δxn .
i=1

Upper and lower sums may not be Riemann sums, but they have useful con- They are Riemann sums if f
nections to Riemann sums and to the integrals they approximate. We collect two happens to be continuous.
such facts in the following proposition, using RS, US, and LS to denote Riemann,
upper, and lower sums. Upper and lower sums don’t
depend on samples, and so
Proposition 5.12. Let f : [a, b] → R be a bounded function, and P any partition their notations don’t involve
of [a, b]. an S .

(i) If S is set of samples from P, then

LS (f, P) ≤ RS (f, P, S) ≤ US (f, P) .


!b
(ii) If f is integrable, with a f = I, then

LS (f, P) ≤ I ≤ US (f, P) .

About proofs. The inequality in (i) follows immediately from the definitions of
upper and lower sums. Part (ii) is a slightly subtler; see the exercises for both
parts.

Clamping down: box sums. Proposition 5.12 suggests that it is a good thing for
integrability when upper and lower sums are close together. Box sums measure
this closeness.

Definition 5.13 (The box sum). Let f : [a, b] → R be a bounded function and
P = {x0 , x1 , . . . xn } a partition of [a, b]. The associated box sum is the difference

US (f, P) − RS (f, P) = (M1 − m1 )Δx1 + · · · + (Mn − mn )Δxn .

Box sums have a nice geometric interpretation, as seen already in Figure 5.4(c).
Figure 5.5(a) shows another box sum for the same integrand as before, but here

i i

i i
i i

i i

242 5. Integrals

a x1 x2 x n–1 b a x1 x2 x n–1 b

(a) A smooth integrand (b) A discontinuous integrand

Figure 5.5. Two more box sums.

with a finer partition. Figure 5.5(b) shows another ten-element box sum, this time
for a discontinuous integrand.
Here is the key point: For both integrands in Figure 5.5, the total shaded
area—the box sum—can be made as small as we wish by requiring that the par-
tition have small norm. This seems clear enough for the smooth integrand in
Figure 5.5(a): For a partition with tiny norm, the shaded area becomes smaller
and smaller, approaching a skinny “tube” around the graph of f .
Less obvious, but equally important, is the fact that the total shaded are can
also be made small for the discontinuous integrand in Figure 5.5(b). Figure 5.6
suggests why. Any partition P may generate one or two tall box sum elements,
but if P has small norm, then all boxes are narrow and their areas don’t amount
to much. We formalize these ideas in a theorem.

a x1 x2 b

Figure 5.6. Fine partitions, small box sums.

i i

i i
i i

i i

5.3. Integrability 243

Theorem 5.14 (The box-sum criterion). A function f : [a, b] → R is integrable


on [a, b] if and only if for each  > 0 there exists some partition P of [a, b] with
box sum less than .

Many uses. We outline the rather technical proof at the end of this section; it
involves some meticulous bookkeeping. First we illustrate the theorem’s uses and
advantages—including the fact that for a given  we need only one suitable par-
tition to prove integrability. Observe also that the box-sum criterion works both
ways: it detects both integrability and non-integrability. Example 1 illustrates
both of these uses.

E XAMPLE 1. Consider the functions


 
0 if x < 0.5, 0 if x ∈
/ Q,
f (x) = g(x) =
1 if x ≥ 0.5; 1 if x ∈ Q.

We have shown by other methods that f is integrable on [0, 1] but g is not. What
do box sums say?

S OLUTION . For f , consider the three-piece partition

P = {0, 0.499, 0.501, 1},

which “isolates” the jump discontinuity at x = 0.5 in the skinny interval [0.499,
0.501]. The box sum—only 0.002 in this case—can be made even smaller nar-
rowing the middle interval even further. Thus f is indeed integrable. With integral 0.5.
For g the conclusion is negative: for any partition P of [0, 1], every box ele-
ment has height one, and so the box sum is one. ♦ Draw your own picture.

The box-sum criterion is exactly what we need to prove some familiar and
important—but otherwise elusive—results.
Theorem 5.15. If f is continuous on [a, b], then f is integrable, too.

The proof idea. Continuity means that f cannot rise or fall very much over a
small domain interval. Thus, for a partition with small norm, all box sum elements
must be short. Since the total width of boxes is only (b − a), their total area must
also be small.
Proof: Let  > 0 be given. Because f is continuous on [a, b], it is also uni-
formly continuous there, according to Theorem 3.22, page 166. This means we
can choose δ > 0 such that

|f (s) − f (t)| < whenever |s − t| < δ and s, t ∈ [a, b].
b−a

i i

i i
i i

i i

244 5. Integrals

A regular partition will do. Now let P be any partition with P < δ. Since f is continuous on each subin-
terval [xi−1 , xi ], it attains maximum and minimum values there, so there exist si
and ti in [xi−1 , xi ] with

f (si ) = Mi = sup{ f (x) | x ∈ [xi−1 , xi ] };


f (ti ) = mi = inf{ f (x) | x ∈ [xi−1 , xi ] }.

Our uniform continuity condition gives Mi − mi < /(b − a) for all i, and so


n
box sum = (Mi − mi ) Δxi
i=1
n
  
n
< Δxi = Δxi = ,
i=1
b−a b − a i=1

as desired. 

More on integrability. We can use the box-sum criterion to prove other familiar,
reasonable-seeming properties of the integral. Proposition 5.16 gives two sam-
ples.
Proposition 5.16. Suppose that f : [a, b] → R is integrable.
!c !b
(i) If a < c < b, then a f and c f exist, and
 b  c  b
f= f+ f.
a a c

(ii) The function |f | is integrable, and


 b  b
f ≤ |f | .
a a

Proof (sketch): The main proof challenge for both (i) and (ii) turns out to be inte-
grability: We need to show that if f is integrable on [a, b], then it is also integrable
on the smaller intervals [a, c] and on [c, b], and that |f | is also integrable on [a, b].
Once all the integrals in question are known to exist, the rest is easy. The equa-
tion in (i) is essentially Theorem 5.8, page 232. See Problem 7, page 237, for the
inequality in (ii).
Proving our integrability claims directly from the definition of integrability
We don’t even have candidates would be difficult. With the box-sum criterion, the proof is routine.
for the values of the integrals.
!b
Let  > 0 be given. By Theorem 5.14, applied to the integral a f , there exists
a partition P of [a, b] with box sum less than .

i i

i i
i i

i i

5.3. Integrability 245

a x1 x2 x3 x4 b a x1 x2 x3 x4 b

(a) Bigger box sum (b) Smaller box sum

Figure 5.7. Comparing box sums for f and for |f |.

!c !b
Let’s show first that a f and c f exist. We may as well assume that c ∈ P;
if not, we can add c to P without increasing the box sum. Thus, P has the form Sketch the situation to convince
yourself.
P = {a = x0 , x1 , . . . , xm = c, xm+1 , . . . , xn = b},

and therefore

P1 = {a = x0 , x1 , . . . , xm = c} and P2 = {c = xm , xm+1 , . . . , xn = b}

are, respectively, partitions of [a, c] and [b, c]. Because P1 and P2 are subsets of
P, and all box summands are nonnegative, the box sums for P1 and P2 are clearly
smaller than that for P. By Theorem 5.14, f is indeed integrable on each smaller
interval.
To show that |f | is also integrable on [a, b], we compare box sums for f and
|f |. Figure 5.7 illustrates the nice answer: For any partition P of [a, b],

box sum for |f | ≤ box sum for f .

In Figure 5.7(a), box-sum elements that “straddle” the x-axis become smaller for
|f |, as shown in Figure 5.7(b). Thus any partition for f with box sum less than 
works for |f |, too. 

Proposition 5.17. If f : [a, b] → R is monotone, then f is integrable.

The proof idea. Figure 5.8 illustrates the proof idea for an increasing integrand, The pictured integrand has one
with m and M as lower and upper bounds. discontinuity, but a monotone
function can have many.
If P is a regular partition with norm δ, then the box sum elements can be
“stacked” vertically as shown, to give total area less than (M − m)δ. By choosing
δ small, we can keep the box sum as small as we like.

i i

i i
i i

i i

246 5. Integrals

a x1 x2 xn– 1 b

Figure 5.8. Stack the boxes: why every monotone function is integrable.

E XAMPLE 2. What does Proposition 5.17 say about integrability of some fa-
vorite functions?

S OLUTION . Proposition 5.17 guarantees that integrals like


 100  100  100  100
√ 1
x10 dx, x dx, ln(x + 1) dx, dx
0 0 0 0 ln(x + 1)

all exist, because all integrands are monotone on [0, 100]. With help from Theo-
rem 5.8, page 232, we can conclude that all of
 100  100  100
cos x dx, ln(cos x + 2) dx, ecos x dx
0 0 0

also exist. Even though the integrands are not monotone on [0, 100], in each case
we can break [0, 100] up into finitely many smaller subintervals, on which each
of which the given integrand is monotone. ♦

Proving the Box-Sum Criterion


Theorem 5.14 has both an “if” and an “only if” part. We start with the latter—
easier—assertion.

Why the box-sum criterion is necessary. Suppose f is integrable on [a, b]; let
!b
I = a . For any given  > 0, we’ll find a partition P of [a, b] with box sum less
than . Since f is integrable, we can choose δ > 0 such that

i i

i i
i i

i i

5.3. Integrability 247

 
I− < RS (f, P, S) < I +
4 4
for every Riemann sum RS (f, P, S) based on a partition P with P < δ and
samples S drawn from P. Now let P be any such partition; this P will do what A regular partition will do.
we want.
To see why, note first that the upper sum US (f, P), although perhaps not a
Riemann sum itself, is the supremum of all possible Riemann sums based on P.
In particular, we can choose a set of samples S from P so that

RS (f, P, S) > US (f, P) − ,
4
and so we have
   
US (f, P) < RS (f, P, S) + <I+ + =I+ .
4 4 4 2
A similar argument shows that

LS (f, P) > I − ,
2
and so
box sum = US (f, P) − LS (f, P) < ,
as we wanted to show.

Why the box-sum criterion is sufficient. The plan of the proof is to use the box-
sum condition to obtain the “Cauchy criterion” of Lemma 5.10, page 238, which
in turn implies integrability. We show, in fact, that if for given  > 0 we can find
some partition P0 with small box sum, then there exists some (very small!) δ > 0
such that every partition P with P < δ must also have small box sum, and this
does the trick.
One picky technical lemma will prove useful. We leave its straightforward Draw a simple picture to get
proof as an exercise. started.

Lemma 5.18. Let f : [a, b] → R be a bounded function, with m ≤ f (x) ≤ M


for x ∈ [a, b]. Let P be a partition of [a, b] with P < δ, and let US = US (f, P)
and LS = LS (f, P) be the corresponding upper and lower sums.
Adding one more point to P produces new upper and lower sums, USnew and
LSnew , such that

(i) USnew ≤ US and LSnew ≥ LS;


(ii) US − USnew < (M − m)δ and LSnew − LS < (M − m)δ.

In words: Adding one point to P decreases upper sums and increases lower
sums—but by no more than (M − m)δ.

i i

i i
i i

i i

248 5. Integrals

Now we can prove that the box-sum condition implies integrability. For given
 > 0, we first choose any particular partition
P0 = {w0 , w1 , . . . , wN } ,
of [a, b] with N partition points and box sum less than /2; that is,

US (f, P0 ) − LS (f, P0 ) < .
2
Next we set

δ= ,
4(N − 1)(M − m)
where M and m are, respectively, upper and lower bounds for f on [a, b]. This δ
Unlikely as that may seem in will turn out to work in Lemma 5.10.
advance. Now let P be any partition of [a, b] with P < δ. Consider the new partition
P  formed formed from P by adding in the N − 1 partition points w1 , w2 , . . . ,
wN −1 . (Since w0 = a and wN = b, adding them to P has no effect.)
Now Lemma 5.18(i) implies that
US (f, P  ) ≤ US (f, P0 ) ,
because P  “refines” P0 . Because P  has at most N − 1 more points than P,
Lemma 5.18(ii) says that
US (f, P  ) > US (f, P) − (N − 1) · (M − m) · δ

= US (f, P) − .
4
Putting these inequalities together gives
 
US (f, P) < US (f, P  ) + ≤ US (f, P0 ) + .
4 4
A similar argument shows that

LS (f, P) < LS (f, P0 ) + .
4
All these inequalities boil down saying that, for any partition P with P < δ,
both the upper and lower sums LS (f, P) and US (f, P) lie in the interval
  
LS (f, P0 ) − , US (f, P0 ) + ,
4 4
which has length less than . In particular, every Riemann sum RS(f, P, S) is
between LS (f, P) and US (f, P), and therefore lies in the same interval.
Finally, we observe that if both P1 and P2 are partitions of [a, b] with both
P1  < δ and P2  < δ, and if samples S1 and S2 come from P1 and P2 ,
respectively, then both RS(f, P1 , S1 ) and RS(f, P2 , S2 ) lie in the same interval
of length less than , and are thus within  of each other. Thus the hypothesis of
!b
Lemma 5.10 is satisfied, and the integral a f exists.

i i

i i
i i

i i

5.3. Integrability 249

Exercises
1. Suppose f is continuous on R. Explain why the functions defined by f 2 (x),
sin(f (x)), f (sin x), and ln (sin f (x) + 2) are all integrable on every inter-
val [a, b].
! 10
2. Consider the integral 0 sin x dx. Find a partition P of [0, 10] that gives
box sum less than 0.01. (Hint: Use the fact that inequality |sin x − sin y| ≤
|x − y| holds for all x, y ∈ R.)
3. Consider the function f defined by f (n) = 0 if n ∈ Z and f (x) = π
otherwise, and let  > 0. Find a partition P of [0, 10] that gives box sum
less than . (Hint: Isolate the “offender points” in small subintervals.) What
! 10
is 0 f ?
4. Use box sums to show carefully that any function of your choice is not
integrable on [0, 1].
5. Show using box sums and Theorem 5.14 that the function f (x) = x2 is
integrable on [0, 1].
6. Show using box sums and Theorem 5.14 that the function f (x) = x3 is
integrable on [0, 1].
7. Suppose that f is integrable on [0, 2]. Show using box sums and Theo-
rem 5.14 that f is integrable on [0, 1], too.
! 100
8. We said in Example 2, page 246, that 0 cos x dx can be shown to exist
using Proposition 5.17, page 245 and Theorem 5.8, page 232. Give the
details.
9. State and prove the converse of Lemma 5.10.
10. Show that the sequence {In } defined in the proof of Lemma 5.10 is Cauchy.

11. Show that if f : [a, b] → R is a bounded function, P is a partition of [a, b],


and S is any sampling set from P, then
LS (f, P) ≤ RS (f, P, S) ≤ US (f, P) .
Note: This is (i) of Proposition 5.12; it says that for any partition P, the cor-
responding upper and lower sums are upper and lower bounds, respectively,
for the set of all Riemann sums associated with P.
12. Give a “picture proof” of Lemma 5.18, page 247. (Hint: Adding one more
point to a partition changes only one box sum element. Convince yourself
that this change is no more than the claimed amount.)

i i

i i
i i

i i

250 5. Integrals

!b
13. Show that if a
f = I exists, and P is any partition of [a, b], then
LS (f, P) ≤ I ≤ US (f, P) .
Note: This is (ii) of Proposition 5.12; it says that, for any partition P, the
corresponding upper and lower sums “trap” the exact value of I from above
and below.
(Hint: To show that US (f, P) overestimates I, consider the “stair-step”
function fbig defined by


⎪M1 if a ≤ x < x1

⎨M
2 if x1 ≤ x < x2
fbig (x) =

⎪... ...


Mn if xxn−1 ≤ x ≤ b
!b
Why is fbig integrable? What is its integral? How does a fbig compare to
!b
a
f ?)
14. Consider the function f given by f (1/n) = 1 if n ∈ N and f (x) = 0
!1
otherwise. Show, using box sums and Theorem 5.14, that I = 0 f exists.
(We know already—see Problem 12, page 238—that if the integral exists,
then I = 0.)
The point is to find, for any given  > 0, any partition P of [0, 1] with box
sum less than . To do so, start at the left, with x0 = 0 and x1 = /2;
this box element contributes /2. Since only finitely many of the 1/n lie
to the right of /2, one can choose the remaining partition points so that
each remaining “bad point” lies in an interval small enough so that the total
length of these intervals is less than /2. Complete this sketch to give a
careful proof.

5.4 Some Fundamental Theorems


We met a useful but preliminary version of the fundamental theorem of calculus
(Theorem 5.9, page 233) in Section 5.2. Using Theorem 5.15, page 243, we can
now tie up a serious loose end—existence of the integral—in connecting integrals
and derivatives. Here is a new, improved version:
Theorem 5.19 (Fundamental theorem of calculus, version 1). Let f : [a, b] →
R be continuous, and suppose F  (x) = f (x) for all x ∈ [a, b]. Then f is inte-
grable on [a, b], and
 b
f = F (b) − F (a).
a

i i

i i
i i

i i

5.4. Some Fundamental Theorems 251

Proof: We’ve already done all the hard work. By Theorem 5.15, the integral
!b
a f exists, and Theorem 5.9 guarantees that the integral’s value is indeed F (b) −
F (a). 

Elementary calculus revisited. Theorem 5.19 makes precise a sense in which


integration and differentiation are inverse processes. Now that we know it, we
can assert standard calculations of elementary calculus, like this one—
 1 1
x3 1
x2 dx = = − 0,
0 3 0 3

with perfect confidence.



E XAMPLE 1. Find 0 sin x dx exactly.

S OLUTION . Nothing could be easier. If f (x) = sin x, then F (x) = − cos(x) is


an antiderivative, and so
 π
sin x dx = − cos(π) + cos(0) = 2.
0

Having worked very hard to build the machine, we now only need to turn the
crank. ♦

E XAMPLE 2. Find 0
sin(x2 ) dx.

S OLUTION . The problem superficially resembles the one in Example 1, and it


would be nice to proceed in the same way. But there is a problem: f (x) = sin(x2 )
has no nice antiderivative formula F (x) into which we can plug endpoints. We
can always estimate the answer numerically, but that is less satisfying. ♦ It’s about 0.773.

Antiderivatives do exist. The difficulty in Example 2 notwithstanding, the inte-


grand f (x) = sin(x2 ) there does have an antiderivative—it just doesn’t happen
to be expressible in simple symbolic form. Indeed, every continuous function has
antiderivatives, and another version of the fundamental theorem of calculus says
why.
Theorem 5.20 (Fundamental theorem of calculus, version 2). Let f : [a, b] →
R be continuous. Define a new function F by
 x
F (x) = f for all x ∈ [a, b].
a

Then F  (c) = f (c) for all c ∈ (a, b).

i i

i i
i i

i i

252 5. Integrals

Proof: Note first that F (x) is defined for all x ∈ [a, b]. Part (i) of Proposi-
tion 5.16, page 244. says so, as does the fact that f is continuous on all subinter-
vals [a, x].
Fix c ∈ (a, b); we’ll show F  (c) = f (c). By definition,

F (c + h) − F (c)
F  (c) = lim .
h→0 h

if the limit exists. We’ll show that

F (c + h) − F (c)
lim = f (c);
h→0+ h

the proof for the left-hand limit (where h → 0− ) is similar.


For any h > 0, we have, from basic properties of the integral,
! c+h !c ! c+h
F (c + h) − F (c) f− f f
= a a
= c
.
h h h

Since f is continuous on [c, c + h], it assumes maximum and minimum values,


say Mh and mh , on this interval. Because mh ≤ f (x) ≤ Mh for x ∈ [c, c + h],
it follows that
 c+h  c+h  c+h
mh · h = mh dx ≤ f (x) dx ≤ Mh dx = Mh · h,
c c c

and therefore
! c+h
f
mh ≤ c
≤ Mh .
h
This means, in turn, that the middle quantity is “intermediate” between mh and
Mh for the continuous function f . Thus, by the intermediate value theorem, there
exists some input xh with c < xh < c + h and
! c+h
f
c
= f (xh ).
h

As h → 0+ , we have xh → c, and since f is continuous at c, we have


! c+h
f
lim c
= lim f (xh ) = f (c),
h→0+ h h→0+

as desired. 

i i

i i
i i

i i

5.4. Some Fundamental Theorems 253

Nice to know, but . . . . Theorem 5.20 assures us that every continuous function
f , no matter how ill-behaved, has an antiderivative F . (Being an antiderivative, F Some are very ill-behaved.
is automatically differentiable and hence also continuous.) This is nice to know in
the abstract—but not helpful for calculating integrals like the one in Example 2.
Indeed, many useful and harmless-looking calculus functions, including

sin x
cos(x2 ), exp(x2 ), and ,
x
turn out not to have elementary antiderivatives, and are said not to be “integrable Elementary functions are nice
in closed form.” combinations of the familiar
calculus-style functions.

Average values, and another mean value theorem. Integration has a natural
connection to averaging:

Definition 5.21. If f is integrable on [a, b], then the average value of f on [a, b] is
given by
!b
f
average value = a .
b−a

Embedded in the proof of Theorem 5.20 is another theorem (and its proof) of
independent interest:

Theorem 5.22 (Mean value theorem for integrals). If f is continuous on [a, b],
then there exists c in (a, b) for which
 b
f = f (c) · (b − a).
a

In words: a continuous function on [a, b] assumes its average value.

We explore some implications in the exercises.

Exercises
!b
1. Show that if a f = 0 and f is continuous on [a, b], then f (c) = 0 for some
c ∈ (a, b). Give an example to show that the conclusion need not hold if f
is not continuous.
!b !b
2. Let f and g be continuous on [a, b] and suppose a f = a g. Show that
f (c) = g(c) for some c in [a, b].

3. Suppose f has average value 3 on [a, b]. What is the average value of 5f +7
on [a, b]? Why?

i i

i i
i i

i i

254 5. Integrals

!2
4. In each part, find I = 0 f , the average value of f on [0, 2], and a value
of c at which the average value is achieved (in the sense of Theorem 5.22).

(a) f (x) = x.
(b) f (x) = x.
(c) f (x) = x2 .
(d) f (x) = x42 .

5. In each part, find an interval [0, b] on which f has average value 1.



(a) f (x) = x.
(b) f (x) = x.
(c) f (x) = x2 .
(d) f (x) = x42 .

6. Let h : [a, b] → R be continuous on [a, b]. Suppose that h(x) ≥ 0 for all
!b
x ∈ [a, b] and that a h = 0. Use Theorem 5.20 to show that h(x) = 0 for
!x
all x ∈ [a, b]. (Hint: Use properties of the function H(x) = a h to derive
the result.)

7. Let f be continuous on [a, b]. Suppose that the average value and the maxi-
mum value of f on [a, b] are equal. Show that f is constant. Must the same
result hold if f is not continuous? Why?

8. Let f : [0, ∞) → R be continuous everywhere, and suppose that f has


average value 3 on every interval [0, b]. Find a formula for f .

9. Let f : [0, ∞) → R be continuous everywhere, and suppose that f has


average value b/2 on every interval [0, b]. Find a formula for f .

10. Let f : R → R be a linear function. Show that the average value of f on


any interval [a, b] is f (m), where m is the midpoint of [a, b].

11. Find an interval [a, b] such that the average value of f (x) = x2 occurs at
the midpoint.

12. We used the mean value theorem for integrals to prove Theorem 5.20. Use
Theorem 5.20 and the mean value theorem for derivatives to prove the mean
value theorem for integrals. (Assume that f is continuous, of course.)

13. (This problem refers to material in Section 4.4.) Consider the functions
fn (x) = xn for n = 1, 2, 3, . . . and the limit function f given by f (x) = 0
if x ∈ [0, 1) and f (1) = 1.

i i

i i
i i

i i

5.4. Some Fundamental Theorems 255

(a) We showed in Section 4.4 that the sequence {fn } converges pointwise
!1 !1
to f on [0, 1]. Does 0 fn converge to 0 f ? Explain.
! 0.9
(b) The sequence {fn } converges uniformly to f on [0, 0.9]. Does 0 fn
! 0.9
converge to 0 f ? Explain.

14. (This problem refers to material in Section 4.4.) Consider the functions hn
defined by hn (x) = n if x ∈ (0, 1/n) and hn (x) = 0 otherwise. Let h be
the constant function h(x) = 0.

(a) Show that the sequence {hn } converges pointwise to h on [0, 1]. Does
!1 !1
h converge to 0 h? Explain.
0 n
(b) Show that the sequence {hn } converges uniformly to h on [0.1, 1].
!1 !1
Does 0.1 hn converge to 0.1 h? Explain.

15. (This problem refers to material in Section 4.4.) Let {fn } be a sequence of
continuous functions on [0, 1], and suppose {fn } converges uniformly on
[0, 1] to a function f .

(a) Explain why f must be integrable on [0, 1].


!1 !1
(b) Prove that 0 fn converges to 0 f .

i i

i i
i i

i i

i i

i i
i i

i i

Solutions

1.1 Numbers 101: The Very Basics


1. (a) The claim makes sense and is true.

(b) The claim makes no sense; 8 isn’t a subset.
(c) The claim makes sense and is true.

(d) The claim makes sense but is false; consider a = 0 and b = 2.
(e) The claim makes sense and is true.
(f) The claim makes sense but is false: consider a = 0.
3. The number 1/a is an integer only if a = ±1. The number 1/a is rational for all
nonzero integers a. The equation 1/a = a holds only if a = ±1.
5. Theorem 1.1 is useful. Because Q is closed under addition, multiplication, and divi-
sion (if denominators aren’t zero), expressions like those in (a) and (b) are rational—
unless, for (b), p = q = 0. Expressions
 involving
√ square roots are different. If
p = q = 1, for instance, then p2 + q 2 =  2 is irrational; the same expression
 if p = 3 and q 
is rational = 4. The quantity p2 + 2pq + q 2is always rational,
since p2 + 2pq + q 2 = (p + q)2 = ±(p + q). (Note that (p + q)2 = p + q
may be false.)
6. (a) The answer is no. For instance, the set {1, 1/2, 1/3, . . . } is a subset of Q,
but has no least element.
(b) The set R = { 1, 10, 100, 1000, . . . } does have the well-ordering property;
every nonempty subset includes a smallest power of 10.
(c) The set T = { −3, −2, −1, . . . , 41, 42} (like all finite sets of real numbers)
does have the well-ordering property, since every nonempty subset of T is
also finite, and hence has a least element.
(d) If we trade “least” for “greatest” in the well-ordering property, the result no
longer holds for N, since N itself has no greatest element. The property does
hold for the finite set T , and also for Z \ N = {. . . , −3, −2, −1, 0}.
7. Since ln ln ln n tends to infinity, it must exceed two for large n. The well-ordering
property guarantees that a smallest such n0 exists. (Using a calculator we can see
that n0 has about 703 decimal digits.)

9. Assume toward contradiction that 3 = a/b for integers a and b, and the fraction
is written in reduced form. Then squaring both sides gives 3b2 = a2 . This implies
(essentially as in the proof of Theorem 1.2) that 3 divides both a and b, which
contradicts the assumption that a/b is in reduced form.

257

i i

i i
i i

i i

258 Solutions

10. (a) We argue by contradiction: If x is rational, then (by Theorem 1.4) x2 is ratio-
nal, too, which contradicts our assumption.
√ √ 2
(b) Another√ proof by contradiction. If x = 2 + 3√is rational, then x =
5 + 2 6 is rational, too. This implies, in turn, that 6 is rational, which is
absurd.
√ √ √
(c) Yet another√proof√by contradiction.
√ Let’s write x = 2 + 3 + 5, then we
have x − 5 = 2 + 3, and suppose x is rational. Squaring both sides of
the last equation and simplifying gives
√ √
x2 + 10x 5 = 2 6,

which is progress, since only two square roots remain. Squaring again gives

x4 + 20x3 5 + 500x2 = 24,

which is even better, as only one square root is left. The last equation implies
that
√ 24 − 500x2 − x4
5 = 500x2 = .
20x3
Because x is rational, so is the right-hand side above. This absurdity com-
pletes the proof.
11. Parts (i) and (ii) follow from the fact that 1 < a/b < 2. For part (iii), note that

a2 (2b − a)2 4b2 − 4ab + a2


= = 2 ,
b 2 (a − b) 2 a − 2ab + b2

and substituting a2 = 2b2 shows that the last fraction is 2.



This all shows that if 2 = a/b √holds for any positive integers a and b, then we can
find a new fraction a /b with 2 = a /b and b < b, which is absurd.
13. If a and b are rational, then

1 a−b 2
√ = 2 .
a+b 2 a + 2b2

This shows that elements of F have multiplicative inverses in F . The rest is easier.

1.2 Sets 101: Getting Started


1. (a) D ⊂ I; D ∈ C.
(b) B = {m ∈ A | m has 31 days}.
(c) A×D is the set of ordered pairs (January, 2), (February, 2), . . . , (December, 2),
(January, 3), (February, 3), . . . , (December, 3). There are 24 such pairs.
(d) A\B = {February, April, June, September, November}; B\A = ∅; A∩C =
{November}; B ∩ A = B; D ∩ I = D; D ∪ I = I.

i i

i i
i i

i i

Solutions 259

3. (a) Claim (i) is false. As one example, take A = R and B = ∅. Then


R \ (A ∪ B) = ∅ but (R \ A) ∪ (R \ B) = R.
(b) If A = B, then both claims are true.
7. (a) If S = {1, 2, 3} then P (S) = { ∅, {1}, {2}, {1, 2}, {3}, {1, 3}, 4{2, 3},
{1, 2, 3} }, a set with eight members.
(b) Every subset of S is clearly a subset of T .
(c) Each subset A of N10 corresponds to two subsets of N11 : A and A ∪ {11}.
9. S has n elements. Each element of S  is formed by omitting one element of S.


11. (a) Three vertical lines.


(b) Three horizontal lines.
(c) The set of integer “lattice points” above the x-axis Z × N.
(d) The parabola y = x2 .
(e) A vertical sine curve.
(f) The empty set.
12. (a) The picture is a diagonal stripe from upper left to lower right.
(b) The black squares can be described by the set {(x, y) | x + y is even}.
(c) The element (2, 3, black) corresponds to a black square at position (2, 3). The
set G × {black, white} represents all possible ways to choose a square and
color it.
(d) A picture is, in effect, a subset of squares to be colored black. Thus P (G)
corresponds to the full set of possible pictures.

1.3 Sets 102: The Idea of a Function


1. There are many possibilities; following are some.

(a) Let A be the set of all humans who have ever lived, and B the set of all women
who have ever lived. The function is not injective, because siblings have the
same mother. The function is not surjective, either, since some women are
not mothers.
(b) Let A be the set of all mothers of sons, and B the set of all male humans.
Then F IRST B ORN S ON : A → B is one-to-one but not onto.
(c) Let A be the set of all humans and B the set of all colors. Then E YE C OLOR :
A → B is neither one-to-one nor onto, since several people have blue eyes,
and nobody has silver eyes.
(d) Let A be the set of all US citizens and B = {January 1, January 2, . . . ,
December 31}. Then B IRTHDAY : A → B is onto (every day is someone’s
birthday) but not one-to-one (several people have the same birthday).

i i

i i
i i

i i

260 Solutions

6. (a) The domain is the set of states that begin with M. The range is the finite set
{3, 4, 6, 10, 11, 12, 17}. The codomain can be any set that contains the range,
such as N or even R.
(b) f is not injective; f (Maryland) = f (Minnesota).
(c) f is surjective only if the range and codomain are the same set.
(d) A better name than f for this function might be E LECTORALVOTES.
8. (a) L is one-to-one since, if L(x1 ) = ax1 + b = ax2 + b = L(x2 ), then basic
algebra gives

ax1 + b = ax2 + b =⇒ ax1 = ax2 =⇒ x1 = x2 ,

(note that a = 0 is essential!) as the definition of injectivity requires.


L is onto because if y0 is any real number, then we can set x0 = (y0 − b)/a,
and we find
y0 − b
f (x0 ) = ax0 + b = a + b = y0 .
a
(again, a = 0 matters) as the definition of surjectivity requires.
(b) If we define M (x) = (x − b)/a, then we have, for any x ∈ R,

x−b
L( M (x) ) = aM (x) + b = a + b = x,
a
as desired. A similar calculation shows that M (L(x)) = x for all x ∈ R.
Thus, M = L−1 , as hoped for.
10. (a) Claim: If both f and g are one-to-one, then so is g ◦ f .
Proof: Suppose a1 ∈ A and a2 ∈ A, and that g(f (a1 )) = g(f (a2 )). We’re
done if we show that a1 = a2 .
Because g is one-to-one, we know

g(f (a1 )) = g(f (a2 )) =⇒ f (a1 ) = f (a2 );

and since f is one-to-one, we have

f (a1 ) = f (a2 ) =⇒ a1 = a2 ,

as desired.

1.4 Proofs 101: Proofs and Proof-Writing


1. (a) Given: Raining implies not sunny (true). Converse: Not sunny implies raining
(false). Contrapositive: Sunny implies not raining (true).
(b) Given: Raining implies clouds (true). Converse: Cloudy implies raining
(false). Contrapositive: Not cloudy implies not raining (true).

i i

i i
i i

i i

Solutions 261

(c) Given: Raining implies not sunny and cloudy (true). Converse: Not sunny and
cloudy implies raining (false). Contrapositive: Sunny or not cloudy implies
not raining (true).
(d) Given: Cloudy implies not sunny (true). Converse: Not sunny implies cloudy
(false . . . it could be night). Contrapositive: Sunny implies not cloudy (true).
3. (a) Converse: If a + b is rational, then a and b are both rational. (False.) Con-
trapositive: If a + b is irrational, then at least one of a and b is irrational, too.
(True.)
(b) Converse: If 1/a is irrational, then a is irrational, too. (True.) Contrapositive:
If 1/a is rational, then a is rational. (True.)
(c) Converse: If ab is irrational, then both factors a and b are rational. (False.)
Contrapositive: If ab is rational, then at least one of a and b is rational. (False.)
(d) Converse: If limn→∞ an = 0, then an converges. (False; look at the
series 1 + 1/2 + 1/3 + . . . .) Contrapositive: If limn→∞ an = 0, then an
diverges. (True; this is known as the nth term test.)
4. (a) Negation: All of a, b, and c are negative.
(b) Negation: f (x) > 3 for some x ∈ [2, 7].
(c) Negation: sin n is rational for some positive integer n.
(d) Negation: ∀x ∈ R we have x2 = −1.
(e) Negation: ∃x ∈ R such that ∀y ∈ R we have xy = 1.
5. P : All dogs have fleas. Negation: Some dog has no fleas. Statement P is (prob-
ably) false.
Q: Several dogs have fleas. Negation: No dog has fleas. Statement Q is true.
R: My dog, Spike, is flea-free. Negation: Spike has fleas. The truth of statement
R depends on Spike.
S: 3 < 5. Negation: 3 ≥ 5. Statement S is true.
√ √
T : √n − 1 + √ n + 1 is irrational for every positive integer n. Negation:
n − 1 + n + 1 is rational for some positive integer n. Statement T is
true.
√ √
U : √n − 1 + √ n + 1 is rational for every positive integer n. Negation:
n − 1 + n + 1 is irrational for some positive integer n. Statement U
is false.
V : cos(x) < 1.001 for all x > 0. Negation: cos(x) ≥ 1.001 for some x > 0.
Statement V is false.
W : cos(x) < 0 for all x ∈ [2, 3]. Negation: cos(x) ≥ 0 for some x ∈ [2, 3].
Statement W is true.
X: Every even integer n > 2 is the sum of two (not necessarily distinct) primes.
Negation: Some even integer n > 2 is not the sum of two primes. Statement
X is Goldbach’s conjecture—an important unsolved mathematical problem.

i i

i i
i i

i i

262 Solutions

Y : Every set of ten distinct numbers has a largest and a smallest element. Nega-
tion: Some set of ten distinct numbers has either no largest or no smallest
element. Statement Y is true.
Z: Every subset of the interval [0, 1] contains a largest element. Negation: Some
subset of [0, 1] contains no largest element. Statement Z is false: (0, 1), for
example, has no largest element.
9. (a) If a function f is increasing for all x, then f  (x) ≥ 0 for all x.
(b) If a function f has a maximum at x = a, then either f  (a) = 0 or f  (a) does
not exist.
(c) If f  (x) > 0 for all x, then the graph of f is concave up.
(d) If a series an converges, then lim an = 0. (This is known as the nth term
test.)

1.5 Types of Proof


1. (a) True; the simplest proof is indirect.

(b) False; x = − 2 is a counterexample.
(c) True; the simplest proof is indirect.
(d) False; p = 11 is a counterexample.
(e) False; x = 0 and y = 1/2 is a counterexample.
3. (a) If n = 1, then both sides have value 1; if n = 10, then both sides are 100.
(b) The base case, P (1), holds as indicated in (a).
For the inductive step we assume P (n) and try to prove P (n + 1), which is
the claim that 1 + 2 + · · · + (n + 1) = (n + 1)(n + 2)/2. We start by adding
(n + 1) to both sides of P (n), and then do algebra:
n(n + 1)
1 + 2 + 3 + · · · + n + (n + 1) = + (n + 1)
2
n  (n + 1)(n + 2)
= (n + 1) +1 = .
2 2
This shows P (n + 1), and completes the proof.
(c) Calculate with sums:

n 
n 
n
n(n + 1)
(2n − 1) = 2 n− 1=2 − n = n2 .
k=1 k=1 k=1
2

5. Note first that P (n) is obviously true for n = 4; just check both sides.
To complete the inductive proof, we assume P (n) (for n ≥ 4) and show P (n + 1).
By P (n), we have 2n < n!. We know also that 2 < (n + 1). Multiplying these
inequalities gives
2n < n! =⇒ 2n+1 < n!(n + 1) = (n + 1)!.
This shows that P (n + 1) holds, and we’re done.

i i

i i
i i

i i

Solutions 263

7. The base case P (1) is easy, so we assume P (k) and show P (k + 1).
In P (k + 1), the left side is (1 + 2 + 3 + · · · + k + (k + 1))2 ; we’ll show that
it equals 13 + 23 + 33 + · · · + (n + 1)3 . Along the way we’ll use the result of
Example 8.
Here goes (some details left to you):

(1 + 2+ · · · + k + (k + 1))2 = ( (1 + 2 + 3 + · · · + k) + (k + 1) )2
= (1 + 2 + 3 + · · · + k)2 + 2(1 + 2 + 3 + · · · + k)(k + 1) + (k + 1)2
k(k + 1)
= 13 + 23 + · · · + k3 + 2 (k + 1) + (k + 1)2
2
= 13 + 23 + · · · + k3 + (k + 1)3 ,

as desired.
9. (a) We can simply check by direct calculation (technology helps) that 5n > n!
for n = 1, 2, 3, . . . , 11.
(b) The proof is by induction.
The base case n = 12 holds by a direct calculation. For the inductive step,
suppose 5k < k! for a positive integer k ≥ 12. Then clearly 5 < k + 1, and
so 5 · 5k < (k + 1) · k!; equivalently, 5k+1 < (k + 1)!, which completes the
inductive step. Done.
11. The base case is our assumption (i). The inductive step follows easily from the
product rule.
13. This is a standard old brain-teaser. The inductive step argument works fine for
n = 42, but it fails when n = 1.

1.6 Sets 103: Finite and Infinite Sets; Cardinality


1. (a) To show f (x) = 7x − 2 is one-to-one, we need only show that if f (x1 ) =
7x1 − 2 = 7x2 − 2 = f (x2 ), then x1 = x2 . This is easily done by manipu-
lating the equation 7x1 − 2 = 7x2 − 2.
Showing that g(x) = x/(1 + x) is one-to-one is similar:
x1 x2
= =⇒ x1 + x1 x2 = x2 + x2 x1 =⇒ x1 = x2 .
1 + x1 1 + x2

(b) To see f is onto, let b ∈ (−2, 5). If we set a = (y + 2)/7, then a ∈ (0, 1)
and f (a) = b.
(c) f ◦ g : (0, ∞) → (−2, 5) is one-to-one and onto because this is true of both
f and g. This means that (0, ∞) and (−2, 5) have the same cardinality.
3. f can be one-to-one but g cannot. The latter holds by the pigeonhole principle,
since g tries, in effect, to put 43 pigeons into 42 holes.

i i

i i
i i

i i

264 Solutions

5. (a) The function f : N → N given by f (n) = n + 1 works.


(b) The function g : R → R given by g(x) = arctan x works.
(c) Define h : R → R by h(x) = x if x ∈
/ N and h(x) = x + 1 if x ∈ N.
7. Proof by contradiction. If the hypotheses hold and A \ B is finite, then A =
(A \ B) ∪ B is the union of two finite sets, and hence finite itself. This is absurd.
9. (a) Members of Q3 correspond to (some of the) points (p, q) with integer coordi-
nates inside the circle p2 + q 2 = 3—there are nine such points (p, q). Since
we’re interested in fractions p/q, we may as well require q > 0. This reduces
the eligible points to just three: (−1, 1), (0, 1), and (1, 1), all of which give
different reduced fractions p/q.
Note that Q4 is the same set as Q3 .
For Q10 , similar reasoning finds 11 points (p, q) with q > 0 and p2 +q 2 < 10.
These 11 points correspond to 7 different rational numbers: ±2, ±1, ±0.5,
and 0.
(b) If p/q ∈ Qi , then clearly both |p| < i and |q| < i. There are at most 2i − 1
choices for each of p and q, and so no more that (2i − 1)2 choices for both
p and q. (In fact, the number of choices is less, but that’s OK for present
purposes.) An even rougher (but simpler-looking) upper bound is that Qi has
fewer than 4i2 elements.
(c) All parts are straightforward implications of the definitions.
11. Here is one possible bijection f : [0, ∞) → (0, ∞): Define f (x) = x + 1 if x ∈ Z
and f (x) = x otherwise.
13. The set B is countably infinite. The set Bn of n-character books is clearly finite for
each n, and B is the union of the (countably many) Bn .
14. (a) A polynomial of degree n in Z[x] is essentially an (n + 1)-tuple of integers
(don’t forget the constant term), i.e., an element of the (n + 1)-fold product
Z × Z × . . . Z. This product is countable, by Proposition 1.18, page 50. The
set Z[x] consists of polynomials of all possible degrees, and is therefore a
countable union of countable sets.

1.7 Numbers 102: Absolute Values


1. (a) x ∈ (−9, 2).
(b) x ∈ (−∞, −9) ∪ (2, ∞).
 √ √ 
(c) x ∈ − 2, 2 .

(d) x ∈ (1, ∞).


 √ √  √ √ 
(e) x ∈ − 4.07, − 3.93 ∪ 3.93, 4.07 .

i i

i i
i i

i i

Solutions 265

3. (a) It is enough to prove the RTI under the assumption that |x| ≥ |y|. (If |x| < |y|
we can just reverse the roles of x and y.) In other words, we need to show
that |x − y| ≥ |x| − |y|. But this is equivalent to |x − y| + |y| ≥ |x|, which
is just a form of the ordinary triangle inequality.
(b) The distance from x to y is at least as great as the distance from |x| to |y|.
In other words, taking absolute values of numbers either shrinks distances or
leaves them alone.
(c) The RTI is an equation except when x and y have opposite signs.
5. This view of things helps explain the triangle inequality name: the length of one
side of a triangle is not greater than the sum of the other two sides.
7. Use the triangle inequality: |x − y| = |x − 7 + 7 − y| ≤ |x − 7| + |7 − y| =
|x − 7| + |y − 7| <  +  = 2.
8. (a) |x − 1| < 0.5 implies 1 − x < 0.5, or x > 0.5.
(b) Use the triangle inequality: |c| = |c − x + x| ≤ |c − x| + |x| < |c| 2
+ |x|.
This implies |c| < |c|
2
+ |x|, or |x| > |c|
2
.
!1
9. An integral 0 f (x) dx is a limit of approximating sums, like f (x1 )Δx1 +
!1
f (x2 )Δx1 +· · ·+f (xn )Δxn . Thus 0 f (x) dx is approximated by |f (x1 )Δx1 +
!1
f (x2 )Δx1 + . . . +f (xn )Δxn |, and the integral 0 |f (x)| dx by |f (x1 )Δx1 | +
|f (x2 )Δx1 | + · · · + |f (xn )Δxn |. The usual triangle inequality applies to these
sums.

1.8 Bounds
1. (a) The shortest English words have one letter, so 1 is a lower bound for f on EW.
It’s hard to identify the longest English word, but 1000 letters is probably a
safe upper bound.
(b) Words in this problem vary in length from 1 to 10 letters.
2. English sentences vary in length from one word (Stop!) to many, many words, but
1000 words is probably a safe upper bound. On the set SITP, values of g vary from
5 words to about 30 words, depending on how you count words in equations.
3. Suppose S is bounded above by M and below by m. Then S ⊂ [m, M ]. If we take
K to be the larger of |m| and |M |, then S ⊂ [m, M ] ⊂ [−K, K].
5. (a) The maximum value is f (0) = 1; the minimum is f (±K) = 1/(K + 1).
(b) The graph is a parabola with vertex at x = −1/3, so the maximum occurs
at the right endpoint; g(K) = 3K 2 + 2K − 7. If K ≥ 1/3, then −2/3 ∈
[−K, K], and so the minimum value is g(−1/3) = −22/3. If K < 1/3 then
the minimum occurs at x = −K, and the value is g(−K) = 3K 2 − 2K − 7.
(c) Note that h(x) = 1 + x, so the function is largest at the right endpoint
(h(K) = 1 + K) and smallest at the left (h(−K) = 1 − K).

i i

i i
i i

i i

266 Solutions

11. (a) S = (1, ∞) is one possibility; there are many.


(b) Let S be bounded away from zero. Then there exists δ > 0 so |s| > δ for all
s ∈ S. Thus, if t ∈ T we have |t| = |1/s| = 1/|s| < 1/δ, so T is bounded.
The proof of the converse is similar.
(c) If S is bounded away from 0 then—by definition—S has no points in common
with the interval (−δ, δ), which is of the desired form. If, conversely, S has
nothing in common with (a, b), where a < 0 < b, then we can take δ to be
the smaller of −a and b.
13. (a) If a ∈
/ I, then either a < 0 or a > 1. In the former case, we can take
δ = −a/2; in the latter, δ = (a − 1)/2 works.
(b) The points 2 and 3 are not in J, but J is not bounded away from either 2 or 3.
(c) N does indeed have the property in question: if a ∈
/ N. then we can take δ to
be the distance to the nearest integer.
15. Suppose S were bounded away from β. Then there is δ > 0 such that β − s > δ
for all s ∈ S. But this means β − δ > s for all s ∈ S, and so β − δ is an upper
bound for S. This means β is not the least upper bound, a contradiction.

1.9 Numbers 103: Completeness


1. (a) The set S is bounded above by 2.
(b) Calculation shows that (β + h)2 < 2; this contradicts the fact that β is an
upper bound for S.
(c) Calculation shows that (β − k)2 > 2; this contradicts the fact that β is the
least upper bound for S.
1 1 1 1
3. (a) One possibility (among many) is the list , , , ..., , ....
508 509 510 507 + n
1 1 1 1 1 1 1 1
(b) One possibility is the list + , + , + , . . . , + , ....
3 7 3 8 3 9 3 7+n
(c) One possibility is to let h = b − a, and use the list a + h/2, a + h/3, a +
h/4, . . . , a + h/n, . . . .
4. For given  > 0, consider the positive number 1/. Since N is unbounded, there
exists an integer n with n > 1/. It follows that 0 < 1/n < , as desired.
5. (a) The claim is true if 0 < b ≤ a; we can just let n = 2 (or even n = 1 if
b < a).
(b) The Archimedean claim is clearly false if a = 0 and a < b. It is also false if,
say, a = −1 and b = 1.
7. (a) The italicized statement is still true with Z in place of R. A set of integers
that is bounded above has a largest member, which is an integer.
(b) The italicized statement becomes false if R is replaced by Q. A bounded set
of rationals has a supremum β, but β may be irrational.

i i

i i
i i

i i

Solutions 267

9. (a) If not, then am > bn for some m and n. If n ≥ m, then we have an ≥ am >
bn , which contradicts the definition of the interval In = [an , bn ]. If m > n,
then we have am > bn ≥ bm , another contradiction.
(b) By the preceding part, bn is an upper bound for A, and so can’t be smaller
than α, the least upper bound.
(c) As in the preceding part, we have an ≤ β for all n. The outermost inequalities
restate the definitions.

2.1 Sequences and Convergence


1. For the three sequences given:

 1.000 0.100 0.010 0.001


√ √ √
(a) N 1 10 ≈ 3.16 100 = 10 1000 ≈ 31.6
(b) N 1 100 10, 000 1, 000, 000
9 99
(c) N 1 e ≈ 8103 e e999

2. (a) If a given N works for  = 0.001, then the same N works for larger . We
could use this N in all positions in the row.
(b) Any N works in this case; we could use N = 0 in all positions, for example.
(c) The number of digits in a number changes after 9, 99, 999, etc. So the second-
row entries would be 9, 109 − 1, 1099 − 1, and 10999 − 1.
3. (a) Set  = 0.1 and choose a corresponding N as in the definition. All xn with
n > N lie in the desired interval.
(b) Set  = 0.001 and choose a corresponding N as in the definition. Then all
xn with n > N lie in (4.999, 5.001), and therefore exceed 4.999.
(c) If we set  = 1 and choose a corresponding N , then all xn with n > N lie
in (4, 6). Thus it is possible that xn > 6 only for members of the finite set
{x1 , x2 , . . . xN }.
7. (a) Algebraic manipulation gives

2n 2 10
|an − L| = − =
3n + 5 3 9n + 15

and
10 10/ − 15
< ⇐⇒ < n.
9n + 15 9
Thus, for given  > 0, the value N = (10/ − 15)/9 works in the definition.
A formal proof resembles that in Example 2.

i i

i i
i i

i i

268 Solutions

(b) The proof is like that for (a), except that now we have

899900 899900/ − 15
|bn − L| = < ⇐⇒ < n.
9n + 15 9
Thus N = (899900/ − 15)/9 works for any given  > 0.
(c) We’ll show cn → 0. Observe first that
2n 2n 2
|cn − L| = < = ,
3n2 + 5 3n2 3n
and
2 2
< ⇐⇒ < n.
3n 3
2
Here’s the formal proof: Let  > 0 be given; set N = 3
. This N works,
since if n > N then
2n 2 2
|cn − L| = < < = .
3n2 + 5 3n 3N

11. (a) We can check explicitly that 1.511 ≈ 86.5 < 89 = f11 , and 1.512 ≈
129.7 < 144 = f12 . For the inductive step, note that

fk+1 > 1.5k−1 + 1.5k = 1.5k−1 · 2.5 > 1.5k−1 · 1.52 = 1.5k+1 ,

as desired. (Note that the proof worked because 1 + 1.5 > 1.52 . A similar
result can be shown to hold if 1.5 is replaced by any number b with 1 + b >
b2 .)
(b) Using technology one can check that n ≥ 72 works.
13. (a) For any given  > 0, we see
1 1
|xn − 0| = < ⇐⇒ n> .
n 
Thus the desired inequality holds for all n except those (finitely many) for
which n ≤ 1/.
(b) Show that if xn → 0 in the sense above, then xn → 0 in the “official” sense
defined in this section. Let  > 0 be given. By hypothesis, |xn − 0| ≥  holds
for only finitely many n, and we can choose N to the largest such value of n.
This N works in the ordinary definition.
(c) A sequence {xn } does not converge to 0 if, for some  > 0, there are infinitely
many xn with |xn | > .
(d) A sequence {xn } does not converge to 0 if, for some  > 0 and any number
N , there is some xn with n > N and |xn | > .
15. Every constant sequence has such a table.
17. If β has decimal expansion 0.d1 d2 d3 d4 d5 . . . , then the increasing sequence 0.d1 ,
0.d1 d2 , 0.d1 d2 d3 , 0.d1 d2 d3 d4 , . . . converges to β.

i i

i i
i i

i i

Solutions 269

2.2 Working with Sequences


1. Here is a sketch. For any constant c = 0, we have

|can − ca| = |c| |an − a| <  ⇐⇒ |an − a| < .
|c|

Now for any given  > 0, we can choose N so that |an − a| < /|c| for n > N .
(Why can we do this?) This N “works” for the given  and the original sequence
{can }. (Assemble the pieces into an efficient proof.)
3. Suppose xn → 0. To show |xn | → 0, let  > 0 be given. Because xn → 0, we can
choose N so that |xn − 0| = |xn | <  whenever n > N . The same N works for
the sequence {|xn |}, because if n > N , then

||xn | − 0| = ||xn || = |xn | < ,

as desired.
4. (a) The lemma
√ says that there exist both rational and irrational sequences that
tend to 2, and that these can be chosen to be monotone.

(b) One possibility is pn = 2 + 1/n for all n.
(c) One
√ possible sequence comes from the infinite decimal approximation
2 = 1.414213562 . . . ; we can use r1 = 1, r2 = 1.4, r3 = 1.414, etc.
(We need a little fix when a zero-digit comes along.) Another possibility, a
bit less concrete, is to use the fact that every interval contains rational num-
bers.
5. The n = 1 (base) case is easy: s2 = 1.5 < 2 = s1 . The inductive step is to show
that if sn − sn−1 < 0, then sn+1 − sn < 0, too. Doing so involves careful but
straightforward algebra.
7. It is clear that {hn } is increasing, and the inequality h2n ≥ hn + 12 implies that
{hn } is unbounded. Since h1 = 1, the inequality means that h2 ≥ 1.5, h4 ≥ 2.0,
h8 ≥ 2.5, h21 000 > 501, etc.
8. (a) Clearly, Tn < Sn for all n, and both sequences appear to converge.
n
(b) It is natural (and correct) to guess Tn = . The inductive proof is
n+1
straightforward.
n 1 1
(c) We can use algebraic facts: Tn = = → .
n+1 1 + 1/n 1+0
(d) Observe that
1 1 1
≥ 2 =
n2 + n n + n2 2n2
for all n, and so Sn ≤ 2Tn < 2 for all n ≥ 1. Thus {Tn } is bounded above,
and clearly increasing, so {Tn } converges.
9. (a) Let M > 0 be given. Since xn → ∞, we can choose N so xn > M
whenever n > N . But then also −xn < −M when n > N . Thus −xn →
−∞.

i i

i i
i i

i i

270 Solutions

(b) Suppose xn → ∞. Let  > 0 be given; we need to find N so n > N implies


|1/xn | = 1/xn < . Well, if we set M = 1/ then (since xn → ∞) we can
choose N so n > N implies xn > M = 1/. But this implies 1/xn < , as
desired.
(c) Suppose xn < 0 for all n. Then xn → −∞ if and only if 1/xn → 0.
This follows from parts (a) and (b): xn → −∞ ⇐⇒ −xn → ∞ ⇐⇒
−1/xn → 0 ⇐⇒ 1/xn → 0.
11. (a) The limit is 2/5.
(b) The sequence diverges to ∞.
(c) The sequence converges to 1/2.
(d) The sequence diverges to ∞. One strategy is to observe that

n2 + arctan n n2 − 4
> = n − 2.
n+2 n+2

2.3 Subsequences
1. (a) The converse says (falsely) that if {xn } has a convergent subsequence, then
{xn } is bounded. Counterexamples are easy to find. The contrapositive says
that if {xn } has no convergent subsequence, then {xn } is unbounded.
(b) The BWT says that {yn } has a convergent subsequence. The BWT also ap-
plies to {zn }, but isn’t really needed, since it is easy to see that zn → 0.
Thus, every subsequence of {zn } converges to zero.
(c) If {xn } is bounded, then the BWT guarantees that a convergent subsequence
exists. If {xn } is unbounded, then Lemma 2.13 applies. Both can occur, as
they do in the sequence 1, 0, 2, 0, 3, 0, dots.
3. (a) Given a sequence that lists the rationals, we can just form the subsequence of
nonnegative rationals.
(b) Look at any two successive terms, say p1 and p2 . Between these two rational
numbers like other rationals. If the sequence were monotone, these other
rationals would lie between p1 and p2 in the sequence.
(c) We can choose n1 so that pn1 = 1. Then we choose n2 with n2 > n1 and
pn2 ≥ 2. Continuing this process completes the proof; details are left to the
reader.
5. (a) Substituting n = 2k gives x2k = 2k/(2n + 1), which converges to one as
k → ∞. Substituting n = 2k − 1 gives x2k−1 = −(2k − 1)/2k, which
converges to −1. With two different subsequence limits, {xn } must diverge.
(b) Consider any convergent subsequence xn1 , xn2 , xn3 , xn4 , . . . , with limit
L. Since this sequence has infinitely many terms, it must include either in-
finitely many even-indexed or infinitely many odd-indexed terms from the
original sequence {xn }. If there are, say, infinitely many even-indexed terms,

i i

i i
i i

i i

Solutions 271

then they form a new subsequence, which obviously tends to one. But every
subsequence of a convergent sequence tends to the same limit, so we must
have L = 1.
7. Since {xn } diverges, x0 is not the limit. Negating the definition of convergence to
x0 means that, for some  > 0, no N works in the definition of convergence. We’ll
use this to construct a sequence.
Because N = 1 doesn’t work in the definition, there is some term—call it xn1 —for
which |xn1 − x0 | > . Now consider N = n1 . But this N doesn’t work either,
so there must be some term—call it xn2 —for which n2 ≥ n1 and |xn2 − x0 | > .
Continuing this process indefinitely gives the desired subsequence: n1 < n2 <
n3 < . . . and |xnk − x0 | >  for all k.
9. If xn → x0 , then we know that every subsequence, and hence every monotone
subsequence, must also converge to x0 .
The other implication is that if every monotone subsequence converges to x0 , then
xn → x0 , too. We prove this by contradiction.
If xn does not converge to x0 , then for some  > 0 there is a subsequence {xnk }
with |xnk − x0 | >  for all k. By Proposition 2.12, there is a monotone subse-
quence {ynk } of {xnk }. Now |xnk − x0 | >  holds for all the xnk , and so it
certainly holds for all the ynk , too. In particular, ynk → x0 is impossible, which
contradicts our assumption about monotone sequences.
11. Both parts follow from unraveling the –N definitions.

2.4 Cauchy Sequences


1. (a) For given  > 0 we can choose N = 2/. This N works because if m, n > N
then |xn − xm | ≤ |xn | + |xm | = n1 + m
1
< 2 + 2 = .
(b) The sequence is not Cauchy. If we choose, say  = 0.001, then no N works:
if N is any positive number, no matter how big, then with m = N + 1 and
n = N + 2 we have |yn − ym | = 2/1234 > 0.001.
(c) The sequence is Cauchy. Note that if n > m, we have
n m n−m
|zn − zm | = − =
n+1 m+1 (n + 1)(m + 1)
n−m n 1
< < = .
nm nm m
It follows that, for  > 0, we can choose N = 1/.
(d) The sequence is Cauchy. If n > m, we have
sin n sin m sin n sin m
|wn − wm | = − 2 ≤ 2 +
n2 + 1 m +1 n +1 m2 + 1
2 2
≤ 2 < 2,
m +1 m
 
and 2/m2 <  if m > 2/. Thus, N = 2/ works in the definition.

i i

i i
i i

i i

272 Solutions

3. For  > 0 choose N that works for  in the sense of Definition 2.16. This same N
works in the definition of convergence to zero. To see why, let m > N be given.
Then choose any n of the form n = 10k , with n > m. (This can certainly be done;
n = 10m is one possibility.) Then we have n > m > N , and so |xm − xn | =
|xm − 0| < , as desired.
5. (a) Any sequence of rationals tending to an irrational will do.
(b) Yes. The only Cauchy sequences of integers are eventually constant.
(c) [0, 1] is complete because if {xn } is any Cauchy sequence in [0, 1], then {xn }
tends to some limit L. Because 0 ≤ xn ≤ 1 for all n, L lies in [0, 1], too.
(0, 1] is not complete; {1/n} is a Cauchy sequence in (0, 1], but its limit,
zero, lies outside (0, 1].
7. Let  > 0 be given and set  = /42. Because {an } is Cauchy sequence there
is some N such that |an − am | <  whenever n > N . This N works for the
sequence {xn }; details left to you.
9. Two numbers with the same first n decimal places can differ by no more than 10−n .
1 1 1 1
11. The key point is that, regardless of n, 2m+1
+ 2m+2
+ ··· + 2n
< 2m
. This fact
can be parlayed into a proof.

2.5 Series 101: Basic Ideas


1. (a) Sn = 0 for all n, and so the series converges to 0.
(b) Sn = 42n for all n; this diverges (to ∞).
(c) The partial sum sequence {Sn } has the form −1, 0, −1, 0, . . . ; this di-
verges.
(d) Sn = (n(n + 1))/2 for all n; this diverges (to ∞).
(e) The series is geometric, with r = 0.99, so Sn = (1 − r n )/(1 − r) =
100(1 − 0.99n ), and we see that Sn → 100.
(f) It is easy to show by induction that Sn = n/(n + 1). Thus Sn → 1.


1 ∞
1
3. (a) converges by comparison to the geometric series .
k=1
k + 2k k=1
2k



k ∞
1
(b) diverges by comparison to the divergent series . (Con-
2k2 − 1 2k
k=1 k=1
vince yourself that the comparison works.)
∞
k ∞
2k
(c) converges by comparison to the convergent geometric series .
k=1
3k
k=1
3k


k2 + 2 k2 + 2 1
(d) diverges by the nth term test: lim = = 0.
3k2 + 4 k→∞ 3k 2 + 4 3
k=1

i i

i i
i i

i i

Solutions 273

5. Let ak and bk be series, and let ck be the “sum series,” defined by ck =


ak + bk for all k. Let An , Bn , and Cn denote the partial sums for these series.
The key point is that—thanks to the commutative law for addition of finitely many
numbers—Cn = An + Bn for all n. It follows that if An → A and Bn → B, then
we must also have Cn → A + B, which is what we wanted to prove.
7. (a) It is enough to show (i) if n > 1000 then Sn ≥ S1000 ; (ii) if n > 1000 then
Sn ≤ S1001 . Claim (i) amounts to observing that every string of the form
1 1 1 1
− + − ··· ±
1001 1002 1003 1000 + n
adds up to a positive result; group summands in pairs to see why. Claim (ii)
holds because every string of the form
1 1 1 1
− + − + ··· ±
1002 1003 1004 1000 + n
has negative sum; again, group summands in pairs to see why.
(b) For given  > 0 we can take any integer N ≥ 1/. Then |SN − SN+1 | =
1
N+1
< .
(c) For given  > 0 choose N as in the preceding part. Then for n > m > N ,
we have both Sn and Sm between SN and SN+1 , and thus within  of each
other.
9. (a) Let An and Bn be the partial sums for ak and bk . The hypothesis boils
down to the fact that for n > 42 we have Bn = An − A42 + B42 . Thus, the
sequences {An } and {Bn } differ (for large n) by an additive constant, and
so both converge or both diverge.
(b) We know (see the preceding part) that Bn = An − A42 + B42 . Because
4
bk − ak = k2 , we must have B42 − A42 = 2
k=1 2k = 25585. Thus,
Bn = An + 25585, and since An → 100 we must have Bn → 25685.

2.6 Series 102: Testing for Convergence


and Estimating Limits
∞ ∞
1. (a) k=1 1/(k + 2k ) converges by comparison to 1
k=1 2k .
∞ 2 ∞ 1
(b) k=1 k/(2k − 1) diverges; one approach is limit comparison to k=1 k .
∞ k
(c) k=1 3k converges by comparison or limit comparison with the geometric
2k
series ∞ k=1 3k .
∞ 2 2
(d) k=1 (k + 2)/(3k + 4) diverges; use the nth term test.
∞ k
2. (a) k=1 100 /k! converges by the ratio test.
∞ k
(b) k=1 sin k/1.0001 converges absolutely. The absolute value series con-
verges by comparison to the geometric series ∞ k
k=1 1/1.0001 .

i i

i i
i i

i i

274 Solutions

∞ 2
(c) k=1 (k + k + 1)/(k3 + k2 + k + 1) diverges; one approach is limit com-
parison to ∞ 1
k=1 k .

(d) k=1 (−1)k /(ln ln(k + 2)) converges by the alternating series test.
3. (a) The ratio a2k /ak = ak tends to zero (by the kth term test), and so a2k
converges.
(b) If ak = √1 ,
k
then a2k diverges. If ak = 1
k
, then a2k con-
verges.
5. If bk converges to B, then ak converges to B − K k=1 bk +
K
k=1 ak . This
is similar to a problem in the preceding section, where K = 42.
7. Note that the sum
1 1 1 1 1 n √
Sn = √ + √ + · · · + √ > √ + · · · + √ = √ = n.
1 2 n n n n

Since n → ∞, we must have Sn → ∞, too.
∞ k−1
9. (a) The series converges by comparison to k=1 1/2 , which converges to 2.
∞ k−1 ∞
(b) We have R10 = k=11 1/(2 + 1) < k=11 1/2k−1 = 1/29 .
(c) We have S = S10 + R10 < 1.26255 + 219 ≈ 1.26450. This means that S
lies somewhere in the interval [1.26255, 1, 26450].
11. (a) See your favorite calculus text.
(b) We need to choose n so R ! n∞< 0.001. By the given inequality, this holds if
n is !large enough so that n dx/x3 < 0.001. A calculus calculation shows

that n dx/x3 = 1/2n2 , and the last quantity is less than 0.001 if n ≥ 23.
This means that S23 ≈ 1.2012 is within 0.001 of the true answer.

3.1 Limits of Functions


1. Both parts are easy exercises with the definition. In (a) we can choose any δ for
given . In (b) we can choose δ = .
3. (a) For f (x) = x2 , we have limx→42 f (x) = limx→42 x2 = 422 = f (42), so
the condition does hold at a = 42.
(b) For f (x) = x2 and any input a, we have limx→a f (x) = limx→a x2 =
a2 = f (a), so the condition holds at every a.
(c) Since the function f (x) = (x2 − 4)/(x − 2) is not defined at a = 2, the
condition can’t possibly hold.
(d) We have limx→3 f (x) = limx→3 (x2 − 4)/(x − 2) = (32 − 4)/(3 − 1) =
f (3), as desired.
(e) Note that a = 0 is an endpoint of the domain. Also, we know limx→0+ f (x) =

limx→0+ x = 0 = f (0), so the condition holds in the one-sided sense.

i i

i i
i i

i i

Solutions 275

(f) We have limx→a f (x) = limx→a |x| = |a| = f (a) for all a.
(g) Theorem 3.3, Page 138, assures that limx→a f (x) = limx→a (1+πx+ex2 +
πex3 ) = 1 + πa + ea2 + πea3 = f (a), so the condition holds for all a.
5. Suppose that limx→a f (x) = L, that xn → a, and that xn = a for all n. To see
that f (xn ) → L, let  > 0 be given. Because limx→a f (x) = L, we can choose
δ > 0 so that |f (x) − L| <  whenever 0 < |x − L| < δ. Because xn → a and
δ > 0, we can choose N so that |xn − a| < δ whenever n > N .
This N works to show f (xn ) → L, since if n > N , then we have |xn − a| < δ,
and so so |f (xn ) − L| < , as desired.
7. (a) We say limx→−∞ f (x) = L if for all  > 0 there exists M < 0 such that
|f (x) − L| <  whenever x < M .
(b) We say limx→0− g(x) = L if for all  > 0 there exists δ > 0 such that
|g(x) − L| <  whenever −δ < x < 0.
(c) Following is the idea of a proof that limx→−∞ f (x) = L implies that
limx→0− f (1/x) = L. The converse is proved similarly.
Let  > 0 be given. We want to show that |f (1/x) − L| <  for x in some
interval (δ, 0). By hypothesis, there is some M < 0 so that |f (t) − L| < 
when t < M . Writing t = 1/x, this means that |f (1/x) − L| <  when
1/x < M < 0, or, equivalently, when 0 > x > 1/M . (The inequality
algebra is a bit tricky because both M and x are negative.) This implies that
we can take −δ = 1/M , or, equivalently, δ = −1/M .
8. (c) To show that the squeezing inequality holds for all x > 0, use the “conjugate
trick”:
 
 ( 1 + 2/x − 1)( 1 + 2/x + 1)
1 + 2/x − 1 = 
1 + 2/x + 1
2/x 2
=  < .
1 + 2/x + 1 x

9. (a) We can use δ ≈ 0.0024 (or less). Note δ ≈ /4.


(b) We can use δ ≈ 0.00005 (or less). Note δ ≈ /200.
(c) With  = 0.01, the value δ = 0.001 does not quite work at a = 10. (The
value δ = 0.0005 does work.)
11. The proof for a ∈ Z is the same as in the preceding problem. If a ∈ / Z, then we can
take δ to be the (positive!) distance from a to the nearest integer.
13. What matters is that for the finite set S there is a smallest distance, say d, between
any two points in S. To show limx→a j(x) = 0 when a ∈ S, we see that δ = d
works for any  > 0.
To show limx→a j(x) = 0 when a ∈ / S, we can choose any  > 0 and let δ be the
smallest distance from a to any point of S.

i i

i i
i i

i i

276 Solutions

3.2 Continuous Functions


1. Suppose first that A = 0. Let  any positive number. Let δ = /|A|; note that δ > 0.
If |x−c| < δ, then |f (x)−f (c)| = |Ax+B −(Ac+B)| = |A||x−c| < |A|δ = .
If A = 0 then f is a constant function. In this case any number δ > 0 works.
3. (a) For any  > 0 we can choose δ =  in the definition, since if |x − a| < δ = ,
then |f (x) − f (a)| = ||x| − |a|| ≤ |x − a| < . (We used the reverse
triangle inequality.)
(b) Use (a) and Proposition 3.12.
5. (a) One approach is to note that limx→0+ sign(x) = 1 but limx→0− sign(x) =
−11. This implies that the ordinary limit cannot exist.
(b) If a = 0, we have sign(x) = sign(a) for x in some interval about a, and so it
follows that limx→a sign(x) = sign(a).
7. Note that limx→3 f (x) = f (3). Let  = f (3) − 5. If we choose any δ > 0 that
works for this , we’re done.
9. (a) The discontinuity of f (x) = 1/x at a = 0 is not removable; limx→0 f (x)
does not exist.
(b) The discontinuity is removed if we set f (−2) = −4 = limx→−2 f (x).
(c) The discontinuity is removed if we set f (0) = 0 = limx→0 f (x).

3.3 Why Continuity Matters: Value Theorems


1. (a) With δ = 1, we can use M = 432 , since |f (x)| = x2 ≤ 432 when
x ∈ (41, 43). (Other values of δ and M are possible, too.)
(b) Let  = 1. Since f is continuous at c there exists δ > 0 such that x ∈
(c − δ, c + δ) implies f (x) ∈ (f (c) − 1, f (c) + 1). In particular, for these
x we have |f (x)| ≤ |f (c)| + 1, so we can take M = |f (c)| + 1.
(c) One possibility is 
1 if x ∈ Q;
f (x) =
0 if x ∈
/ Q.
This example works because f is not continuous anywhere.
(d) One possibility is the function defined by f (x) = 1/x if x = 0 and f (0) =
42.
2. (a) First write

p(x) = xn + an−1 xn−1 + · · · + a1 x + a0


 an−1 an−2 a1 a0 
= xn 1 + + 2
+ · · · + n−1 + n .
x x x x
Now, as x tends to infinity, the quantity in parentheses tends to one and so the
product tends to ∞.

i i

i i
i i

i i

Solutions 277

3. (a) p(x) = x(x2 + 1)2 is one possibility.


(b) p(x) = x2 (x − 1)(x − 2) is one possibility.
(c) p(x) = (x2 + 1)21 is one possibility.
(d) p(x) = x2 (x − 1)(x − 2) · · · (x − 40) is one possibility.
5. (a) The minimum value of p on [0, 3] is p(0) = 0. The EVT guarantees that p
must assume such a minimum value.
(b) The minimum value of q on (0, 3] is q(3) = 0. The EVT doesn’t apply here,
since (0, 3] is not a closed interval.
(c) Factoring gives p(a) − 4 = a(3 − a)2 − 4 = (a − 4)(a − 1)2 . This shows
that p(1) = 4 and p(a) − 4 ≤ 0 when 0 ≤ a ≤ 3. In other words, p(1) is the
maximum value.
7. The graph of f is an upward-opening parabola with vertex at x = 1. Thus f (x)
takes the minimum value f (1) = −1 at x = 1. No maximum value is achieved on
(0, 3). But note that f (−1) = 3 is the supremum of the set {f (x) | x ∈ (0, 3)}.
9. (a) f (x) = |2x − 1| is one possibility.
(b) f (x) = (sin(2πx) + 1)/2 is one possibility.
(c) No such function exists. A continuous function on [0, 1] must achieve a min-
imum value.
11. (a) One approach is to modify the proof given for the PoPI. Another approach is
to define g(x) = −f (x), which is also continuous at x = c. Now f (x) > K
is equivalent to g(x) < −K. Applying the (already known) PoPILTV to g
gives the desired result.
(b) We have g(0) = 0 < 1, but there is no two-sided input interval (−δ, δ) on
which g(x) < 1. Thus g fails the PoPIGTV. On the other hand, if we have
g(0) = 0 > K, then g(x) > K for all x, so g satisfies the PoPILTV.
(c) The function h satisfies the PoPILTV but fails the PoPIGTV (consider K =
0.5, for instance).
(d) The “only if” part has already been shown. For the “if” part, let  > 0 be
given. Then f (c) < f (c) + , and so the PoPIGTV gives δ1 > 0 such that
f (x) < f (c) +  for x ∈ (c − δ1 , c + δ1 ). By the PoPILTV there is δ2 > 0
such that f (x) > f (c) −  for x ∈ (c − δ2 , c + δ2 ). Setting δ to be the smaller
of δ1 and δ2 completes the proof.
13. Suppose toward contradiction that f is not strictly monotone. Then there exist
points a, b, and c in I with a < b < c, but either (i) f (a) < f (b) and f (b) > f (c);
or (ii) f (a) > f (b) and f (b) < f (c). Both (i) and (ii) lead to contradictions. In
case (i), let v be any number such that both f (a) < v < f (b) and f (b) > v > f (c).
By the IVT we have f (d) = v for some d between a and b, and also f (e) = v for
some e between b and c. This contradicts the assumption that f is one-to-one.

i i

i i
i i

i i

278 Solutions

3.4 Uniform Continuity



1. (a) Let δ = 2 − 1. This works for  = 1 at c = 1 because if |x − 1| < δ, then
√  √ 
x2 − 1 = |x − 1| |x + 1| < 2−1 2 + 1 = 1.

(b) Let δ = 101 − 10. This works for  = 1 at c = 10 because if |x − 1| < δ,
then
√  √ 
x2 − 102 = |x − 10| |x + 10| < 101 − 10 101 + 10 = 1.

(c) Values of δ that work for at c = 1, c = 10, c = 100, and c = 1000 are
δ ≈ 0.414, δ ≈ 0.05, δ ≈ 0.005, and δ ≈ 0.0005, respectively. The fact that
these δ’s decrease to zero means they can’t be chosen “uniformly” in R.
(d) The value δ = 0.1 works for g(x) = 10x + 3 and  = 1 at all values of c.
(e) The value δ = 0.0005 works for  = 1 on the entire interval [1, 1000].
(It doesn’t work on a larger interval.)
3. (a) Note that if a and b are in [−3, 42), then a2 + ab + b2 ≤ 3 · 422 = 5292.
The hint implies, therefore, that |f (s) − f (t)| = s3 − t3 = 5292 |s − t|.
This implies that, for any  > 0, the value δ = /5292 works in the definition
of uniform convergence on [−3, 42).
(b) The function f (x) = x3 is continuous on the closed and bounded interval
[−3, 42], and is therefore also uniformly continuous on the same interval, by
Theorem 3.22. Since [−3, 42) ⊂ [−3, 42], f is also uniformly continuous on
the smaller interval.
5. (a) Mimic Example 1.
(b) For x, y ∈ [1, ∞), we have
√ √ x−y
|f (x) − f (y)| = x− y = √ √ ≤ |x − y| .
x+ y
This implies that, for any given  > 0, the value δ =  works.
(c) The sequence π1 , 2π
1 1
, 3π 1
, 4π , . . . is Cauchy, but applying the function h gives
the sequence 1, −1, 1, −1, . . . , which is not Cauchy.
(d) If we set k(0) = 0, then k becomes continuous on the closed interval [0, 1],
and so Theorem 3.22 applies.
7. (a) For given  > 0, choose δ1 and δ2 such that, for x, y ∈ I,

|x − y| < δ1 =⇒ |f (x) − f (y)| < ;
2

|x − y| < δ2 =⇒ |g(x) − g(y)| < .
2
Then δ = min(δ1 , δ2 ) works for f + g, because if x, y ∈ I and |x − y| < δ,
then
|[f (x) + g(x)] − [f (y) + g(y)]| ≤ |f (x) − f (y)| + |g(x) − g(y)|
 
< + = .
2 2

i i

i i
i i

i i

Solutions 279

(b) One of many possibilities is f (x) = x = g(x) on I = R.


(c) We know from earlier work that the product f g is continuous on I; because I
is closed and bounded, f g must also be uniformly continuous.
(d) Suppose |f (x)| ≤ Mf and |g(x)| ≤ Mg for x ∈ I. The first step is a flashy
calculation:

|f (x)g(x) − f (y)g(y)| = |f (x)g(x) − f (y)g(x) + f (y)g(x) − f (y)g(y)| adding and subtracting


≤ |f (x)g(x) − f (y)g(x)| + |f (y)g(x) − f (y)g(y)| triangle inequality
= |g(x)| |f (x) − f (y)| + |f (y)| |g(x) − g(y)|
≤ Mg |f (x) − f (y)| + Mf |g(x) − g(y)| using the bounds

From here on we can mimic the proof in (a).


9. (a) The function f must be constant (and hence uniformly continuous) on R.
(b) The function f need only be bounded (and not necessarily uniformly contin-
uous) on R.
(c) The function f must be constant (and hence uniformly continuous) on R.
(d) For some δ, values of f can’t rise or fall by more than 1 on intervals of
length δ. Such a function could have jumps, and so need not even be con-
tinuous.
11. For given  > 0, set δ = 2 . This δ works, since if 0 < x − y < δ, then
√ √ √ √
|f (x) − f (y)| = x − y ≤ x − y < 2 = ,

as desired.

4.1 Defining the Derivative


1. The difference quotients for g  (a) and for f  (a) turn out to be identical, so their
limits must be equal.
5. (a) The difference quotient (f (x) − f (0))/(x − 0) is nonnegative for x > 0, so
the right-hand limit is nonnegative. Since the ordinary limit exists, it must be
nonnegative.
(b) We have f  (0) = limx→0− (f (x) − f (0))/(x − 0). Since the difference
quotient is nonpositive, so is the limit.
(c) If f has a minimum value at x = 0, then f  (0) = 0.
7. Definition 4.1 gives
f (x)g(x) f (x)
(f g) (0) = lim = lim g(x) = g(0)f  (0) = 6.
x→0 x x→0 x

9. The limit-of-difference-quotient calculation for g  (2) is like that for f , but for a
factor of 4.

i i

i i
i i

i i

280 Solutions

10. The difference quotient calculation for g  (−2) boils down to the same thing as the
difference quotient calculation for f  (2), so both derivatives have the same value.
This makes sense geometrically, as the graph of g is obtained from the graph of f
by translating four units left and raising five units up.
11. (a) The easy one-sided limits limx→1− f (x) = 1 = limx→1+ f (x) imply
limx→1 f (x) = 1 = f (1), and so f is continuous at x = 1. The limit
that defines f  (1) does not exist because the corresponding one-sided limits
are unequal:

f (x) − f (1) f (x) − f (1)


lim = 2, but lim = 3.
x→1− x−1 x→1+ x−1

(b) One possibility is to set f (x) = 2x − 1; then f  (1) = 2.


13. (a) Note that g(0) = 0; we need to show that limx→0 g(x) = g(0) = 0. To do
this, first choose M > 0 so that | f (x) | ≤ M for all x ∈ (−1, 1). Then we
have
0 ≤ |g(x)| = |x| |f (x)| ≤ M |x| .
Since the right-most quantity tends to zero as x tends to zero, so must g(x).
(b) Note that h(0) = 0 and that h(x) = xg(x). By definition,

h(x)
h (0) = lim = lim g(x) = 0,
x→0 x x→0

as shown just above.

4.2 Calculating Derivatives


 
1. One can show that xn − an = (x − a) xn−1 + axn−2 + · · · + an−1 ; there are
n
n summands. Taking the limit as x → a gives na − 1 as desired.
2. (a) By the ordinary product rule, (f gh) = (f (gh)) = f  (gh) + f (gh) =
f  gh + f ( g  h + gh ) = f  gh + f g  h + f gh —a nice pattern.
(b) Iterating the usual chain rule gives ( f ◦ g ◦ h ) (a) = f  ( (g ◦ h)(a) ) ·
(g ◦ h) (a) = f  ( g(h(a) ) · g  (h(a)) · h (a). Here is an even more compact
version, omitting the “argument” a: ( f ◦g◦h ) = (f  ◦ (g ◦ h))·(g  ◦ h)·h .
(c) Finding the second derivative involves both the chain (twice) and the product

rules: ( f ◦ g ) (a) = ( f  (g(a)) · g  (a)) = ( f  (g(a)) ) ·g  (a)+f  (g(a))·
g (a) = f (g(a)) · g (a) · g (a) + f (g(a)) · g  (a).
    

(d) Using first the chain rule and then the product rule gives ( f ◦ (gh) ) (a) =
f  (gh(a)) · (gh) (a) = f  (gh(a)) · ( gh (a) + g  h(a) ), or, alternatively,
f  (g(a)h(a)) · g(a)h (a) + f  (g(a)h(a)) · g  (a)h(a). Leaving out the ar-
guments give a more cryptic form: ( f ◦ (gh) ) = f  ◦ (gh) · gh + ( f  ◦
(gh) ) · g  h.

i i

i i
i i

i i

Solutions 281

(e) If f (x) = Ax + B and g is any function, then (f ◦ g) (a) = Ag(x) + B. To


find the derivative (it’s Ag  (x)), we can use either the chain rule or the linear
combination rule.
3. The derivative h (a) is defined as a limit, which we can evaluate using the definition
of h and algebraic properties of limits:
h(x) − h(a) 3f (x) − 42g(x) − 3f (a) + 42g(a)
lim = lim
x→a x−a x→a x−a
f (x) − f (a) g(x) − g(a)
= 3 lim − 42 lim
x→a x−a x→a x−a
= 3f  (a) − 42g  (a).

7. All parts are straightforward but perhaps messy calculations.


9. Clearly, g(a) = f (a)2 = 0. The chain rule also gives g  (a) = 2f (a)f  (a) = 0.
11. (a) That (f ◦ g) (n) = 0 for all integers n follows immediately from the chain
rule.
(b) The product rule gives h (x) = − sin (πx) · π · g(x) + cos (πx) · g  (x);
this is clearly zero for each integer n.

4.3 The Mean Value Theorem


1. If a and b are any two roots of f , then Rolle’s theorem implies that f  (c) = 0 for
some c between a and b. Our claim follows.
If f (x) = 2 + sin x, then f has no real roots, but f  (x) = cos x has infinitely many
roots.
2. (a) Note that p(x) = x3 + x = x(x2 + 1). The first factor is zero at x = 0 and
the second is always positive.
(b) If p had two roots a and b, then, by Rolle’s theorem, there would be some c
with p (c) = 0. But p (x) = 3x2 + 1, which is always positive.
3. (a) Every odd-degree polynomial has at least one root; we’ve shown this using
the intermediate value theorem.
(b) There are many possibilities. The functions f1 (x) = x3 (with a = b = 0),
f2 (x) = x3 − 3x + 2 (with a = −3 and b = 2), and f3 (x) = x3 − 3x + 1
(with a = −3 and b = 1) have one, two, and three roots, respectively.
(c) Rolle’s theorem implies that between any two distinct roots of f lies a root
of f  . If f had at least four roots, f  (a quadratic polynomial) would have at
least three roots, which is impossible.
(d) We know f has at least one root. If a > 0, then f  (x) = 3x2 + a, so
f  (x) > 0 for all x. Thus f  has no roots, and so f can have at most one root.
5. (a) Rolle’s theorem gives x1 between a and c and x2 between c and b.
(b) Rolle’s theorem applied to f  on the interval [x1 , x2 ] gives the desired x0 .

i i

i i
i i

i i

282 Solutions

(c) If f : [a, c] → R has continuous derivatives f  , f  , . . . , f (42) on [a, c], and


there are inputs x1 , x2 , . . . , x43 with f (x1 ) = f (x2 ) = · · · = f (x43 ), then
the desired x0 exists.
7. Rolle’s theorem implies that f  has a root in each interval (0, a), (a, 2a), (2a, 3a),
. . . . Since f  is also periodic with period a, (f  ) = f  also has roots in each of
these intervals, and similarly for higher-order derivatives.
8. (a) By the MVT we have
f (b) − f (a)
= f  (c) > M
b−a
for all a and b. If b > a we can multiply both sides by (b − a) to get the
desired inequality.
9. (a) Every number c in (1, 7) works.
(b) The only solution is c = 4.
(c) In this case, the MVT equation f  (c) = (f (b) − f (a))/(b − a) reduces to
100c99 = 1, which gives c = 1/1001/99 ≈ 0.955.
(d) In this case, the equation f  (c) = (f (b) − f (a))/(b − a) reduces to 6c + 5 =
3a + 3b + 5, which gives c = (a + b)/2, the midpoint of (a, b).
(e) If q(x) = Ax2 + Bx + C and [a, b] is any interval, then the mean value
equation holds if and only if c = (a + b)/2. To see why, note that in this
case the equation f  (c) = (f (b) − f (a))(b − a) reduces to B + 2Ac =
B + A(a + b).
11. If a car has the same velocity at times a and b, then there must be some intermediate
time c at which the acceleration is zero.
13. (a) Consider h(x) = f (x) − g(x). By hypothesis, h (x) = 0 for all x ∈ (a, b).
By Proposition 4.11, h is constant, as desired.
(b) Let h(x) = f (x) − g(x) − 5x. Then h (x) = 0 for all x ∈ (a, b), and so
h(x) = C for some constant C. It follows that f (x) = g(x) + 5x + C.
15. If we write m = (f (b) − f (a))/(b − a), then L(x) = m(x − a) + f (a), and the
rest follows.
17. (a) For each x > 0, we have, by the MVT,
f (x) − f (0) f (x)
= = f  (c)
x−0 x
for some c ∈ (0, x). Since f  (c) < 1, we get f (x)/x < 1, which implies
f (x) < x.
(b) For x < 0 we still have, by the MVT,

f (x) − f (0) f (x)


= < 1.
x−0 x
Again we multiply both sides by x. Since now x < 0, this implies f (x) > x.

i i

i i
i i

i i

Solutions 283

19. Suppose f (b) ≥ b for some b > 0. Then the MVT implies that
f (b) − f (0) f (b)
f  (c) = = ≥1
b−0 b
for some c between 0 and b; this contradicts our assumption.
21. (a) Let  > 0 be given; set δ = . If s and t are in D and |s − t| < δ, then
|f (s) − f (t)| ≤ |s − t| < δ = . Thus f is uniformly continuous on D.
(b) Let x and y be any numbers. By the MVT, we have (it’s OK to take absolute
values) |f (x) − f (y)| = |f  (c)| |x − y| ≤ |x − y|.
(c) The function f (x) = sin x is a contraction, since |f  (x)| = |cos x| ≤ 1. The
function g(x) is not a contraction. One reason is that g(1) − g(0) = e − 1 ≈
1.72 > 1 − 0.

4.4 Sequences of Functions


1. (a) For any real number x and  > 0, let N = 1/. If n > N , then
1
|fn (x) − f (x)| = fn (x) = < .
n
Thus, fn → f pointwise on R. Because the same inequality holds for all x,
the convergence is also uniform.
(b) For any fixed real number x we have fn (x) = x/n → 0 as n → ∞, so
fn → f pointwise on R. The convergence is not uniform on R, however.
For  = 1, for instance, no N works because, for every n, we have |fn (x) −
f (x)| = |x/n| > 1 for some x ∈ R.
(c) For any fixed real number x, we have fn (x) = sin(x)/n → 0 as n → ∞.
Thus, fn → f pointwise on R. The convergence is also uniform; the proof is
similar to that in (a).
5. (a) We need to show that
fn (x) fn (x)
lim = lim = 0.
x→0+ x x→0− x
For the right-hand limit we have
x1+1/n
lim = lim x1/n = 0,
x→0+ x x→0+

as desired, and the left-hand limit is similar.


(b) For 0 ≤ x ≤ 1, we have |f (x) − fn (x)| = x − x1+1/n . With g(x) =
x − x1+1/n , elementary calculus methods show g(x) < n1 for 0 ≤ x ≤ 1. In
other words,
1
|f (x) − fn (x)| <
n
holds if 0 ≤ x ≤ 1; the same inequality holds for −1 ≤ x ≤ 0 by symmetry
(both f and fn are even functions).

i i

i i
i i

i i

284 Solutions

7. (a) For any fixed x, x + 1/n → x as n → ∞. Since f is continuous at x we


must have f (x + 1/n) → f (x), as desired.
(b) If f (x) = x2 , then

2x 1
fn (x) = (x + 1/n)2 = x2 + + 2.
n n
In this case fn → f pointwise, but not uniformly.
9. Let  > 0 be given. Since h is uniformly continuous on R, we can choose δ > 0
such that |h(s) − h(t)| <  whenever |s − t| < δ. Because fn → f uniformly on
I, we can choose N such that |fn (x) − f (x)| < δ holds for all x ∈ I whenever
n > N . By our choice of δ, this guarantees that |h (fn (x)) − h (f (x))| <  for all
x ∈ I, as desired.
11. The result is just a restatement of the analogous fact for Cauchy sequences of num-
bers.

5.1 The Riemann Integral: Definition


and Examples
1. (a) Calculation gives RS(f, P, S) = 0 · 0.8 + 1 · 0.2 + 2 · 0.7 + 3 · 0.3 + 4 ·
0.9 + 9 · 0.1 = 7.0; P is 0.9, the largest width.
(b) To make RS(f, P, S) as small as possible, choose left endpoint samples:
S = {0, 0.8, 1.0, 1.7, 2, 2.9}. This gives RS(f, P, S) = 0 · 0.8 + 0.82 ·
0.2 + 1 · 0.7 + 1.72 · 0.3 + 4 · 0.9 + 2.92 · 0.1 = 6.136.
(c) To make RS(f, P, S) as bad as possible, choose right endpoint samples: S =
{0.8, 1.0, 1.7, 2, 2.9, 3}. This gives RS(f, P, S) = 0.82 · 0.8 + 12 · 0.2 +
1.72 · 0.7 + 22 · 0.3 + 2.92 · 0.9 + 32 · 0.1 = 12.404, an error of 3.04.

(d) The sample set S = { 3} gives RS(f, P, S) = 3 · 3 = 9.
2. (a) Sampling at midpoints gives RS(f, P, S) = 8.
(b) Samples S = {0, 2, 3, 4} give RS(f, P, S) = 9.
(c) If P = {0, 4} and S = {0} then RS(f, P, S) = 0.
(d) For P = {0, 4} find a sample set S so that RS(f, P, S) = 8.
(e) No two-piece partition P gives RS(f, P, S) = 0; the second summand has
to be positive.
(f) Choose all partition points except the last one very near zero.
3. The fact that f (x) ≥ 3 for all x ∈ [0, 2] implies that RS(f, P, S) ≥ 6 for every
partition P and sample points S. This implies, as in the proof of Proposition 5.3,
that the integral itself cannot be less than 6.

i i

i i
i i

i i

Solutions 285

7. Notice first that the inequality 0 ≤ f (x) ≤ g(x) implies that 0 ≤ RS(f, P, S) ≤
RS(g, P, S) holds for all suitable partitions P and sample sets S. To show f is
integrable on [a, b], let  > 0 be given. Since g is integrable, there is some δ > 0
that works for g (and the value I = 0) in Definition 5.1. The preceding inequality
shows that the same δ > 0 works for f .
9. Let  > 0 be given. Since I1 satisfies the definition, we can choose δ1 > 0 that
works for I1 and . Similarly, since I2 satisfies the definition, we can choose δ2 > 0
that works for I2 and . Let δ be the smaller of δ1 and δ2 , and calculate any Riemann
sum RS(f, P, S) for P < δ. Then both I1 and I2 are within  of RS(f, P, S),
and so within 2 of each other. Since this holds for all positive , we must have
I1 = I2 .
11. (a) The condition holds by uniform continuity of f on [a, b].
(b) Note that  
 n 
 
|RS(f, P, S) − RS(f, P, T )| =  (f (si ) − f (ti )) Δxi 
 
i=1

n
≤ |f (si ) − f (ti )| Δxi
i=1
n
<  Δxi = (b − a).
i=1

12. (a) Look at individual summands of RS(f, P, M). For each i, we have
xi − xi−1 x2 − x2i−1
f (mi )Δxi = (xi − xi−1 ) = i .
2 2
Adding these up gives a telescoping sum, with value (x2n − x20 )/2 = 1/2.
13. All the calculations work the same as in Problem 12, except that we need δ =
/(b − a).

5.2 Properties of the Integral


1. (a) The function h is integrable because it is the difference of two integrable
functions.
(b) In the situation of Corollary 5.6, we can set h(x) = g(x)−f (x). Theorem 5.5
b b b
says that h is integrable and that a g − a f = a h. By (a) the last quantity
is nonnegative, which is what we wanted to show.
3. The result of Problem 2 implies that the integral lies between −6 and 12.
5. (a) By the extreme value theorem, f assumes a minimum value, say f (c) = m,
for some c ∈ [a, b]. By hypothesis, m > 0. Now f (x) ≥ m for all x ∈ [a, b],
and so Corollary 5.6 gives
 b  b
f≥ m = m (b − a) > 0,
a a
as claimed.

i i

i i
i i

i i

286 Solutions

(b) Part (a) implies that f (c) ≤ 0 must hold for some c ∈ [a, b]. For similar
reasons, f (d) ≥ 0 must hold for some d ∈ [a, b]. If either f (c) = 0 or
f (d) = 0, we’re done; otherwise, the intermediate value theorem says that
f (e) = 0 for some e between c and d.
!1
(c) Let f (x) = 1 for x ≥ 0 and f (x) = 1 for x < 0. Then −1 f = 0, but
f (c) = 0 for all c.
!b !b !b
7. The claim amounts to saying that − a |f | ≤ a f ≤ a |f |. This follows from
Corollary 5.6, and from the fact that − |f (x)| ≤ f (x) ≤ |f (x)| for all x ∈ [a, b].
9. (a) The function f is integrable on every interval [a, b] because it is built up from
integrable functions as allowed by Theorem 5.8, page 232.
!1
(b) A look at the graph shows −1 f = −1.
!n
(c) A look at the graph shows −n f = −n.
11. All parts are basic elementary calculus calculations.
13. Suppose f (x) ≤ g(x) holds except at some finite list x1 , x2 , . . . xn of points in
[a, b]. If we redefine f at these points (we could set f (xi ) = g(xi ), for instance,
without changing the integral) then f (x) ≤ g(x) holds throughout [a, b], and so
Corollary 5.6 gives the desired result.

5.3 Integrability
1. All of the concocted functions are continuous.
3. Here is one possibility: Set h = /100 and use P = {0, h, 1 − h, 1 + h, . . . ,
10 − h, 10}.
!2
7. Given any box sum for 0 f with value less than , add (if necessary) one more
point at x != 1 to get another box sum with value less than . This same box sum
1
works for 0 f ; just ignore boxes to the right of x = 1.
10. Given  > 0, choose an integer N > 0 so that 1/N < . Suppose n > m > N .
Then In and Im are Riemann sums for partitions Pn and Pm such that Pn  <
δn and Pm  < δm . Because we chose the δk to be decreasing, we have both
δn ≤ δN and δm ≤ δN . Thus both Pn and Pm have norm less than δN , and so
|In − Im | < 1/N < , as desired.
11. Let mi and Mi be the inf and sup of f on [xi−1 , xi ]. For each i, it is clear that
mi ≤ f (si ) ≤ Mi , and hence that mi Δxi ≤ f (si )Δxi ≤ Mi Δxi . Summing
over i gives the desired result.
13. The function fbig is constant on each partition subinterval, and is therefore integrable
!b
on [a, b] by Theorem 5.8, page 232. By construction, moreover, the integral a fbig
has the same value as the upper sum US (f, P).
It is also clear that fbig (x) ≥ f (x) for all x ∈ [a, b], and so (by Corollary 5.6,
page 228) we have  
b b
US (f, P) = fbig ≥ f = I,
a a

The proof that LS (f, P) underestimates I is almost identical.

i i

i i
i i

i i

Solutions 287

5.4 Some Fundamental Theorems


1. The first claim follows immediately from the mean value theorem for integrals.
Finding examples for the second part is easy.
3. The new average value is 5 · 3 + 7 = 22; the average value behaves “linearly.”
5. (a) b = 9/4.
(b) b = 2.

(c) b = 3 ≈ 1.732.
(d) b ≈ 1.094.
7. Let M be the maximum value of f . Then h(x) = M − f (x) ≥ 0 for all x ∈ [a, b].
!b
The hypotheses imply that a h = 0; hence h(x) = 0 for all x ∈ [a, b].
The result need not hold if f is not continuous. Consider the function f given by
f (0) = 1 and f (x) = 0 on [0, 1].
!b
9. The hypothesis means that F (b) = 0 f = b2 /2 for all x. Thus f (b) = F  (b) = b
for all b.
11. The interval [0, 8/3] is one possibility.
15. (a) The uniform limit function f is continuous on [0, 1] and hence is also inte-
grable there.
(b) For given  > 0, choose N such that |fn (x) − f (x)| <  for all n > N . Now
 1  1  1  1  1
fn − f = (fn − f ) ≤ |fn − f | <  = ,
0 0 0 0 0

which completes the proof.

i i

i i

You might also like