100% found this document useful (2 votes)
2K views355 pages

Understanding Real Analysis-9781315315072

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
100% found this document useful (2 votes)
2K views355 pages

Understanding Real Analysis-9781315315072

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
You are on page 1/ 355

Understanding Real Analysis

Second Edition

Paul Zorn
St. Olaf College
Northfield, Minnesota
TEXTBOOKS in MATHEMATICS
Series Editors: Al Boggess and Ken Rosen

PUBLISHED TITLES
ABSTRACT ALGEBRA: A GENTLE INTRODUCTION
Gary L. Mullen and James A. Sellers
ABSTRACT ALGEBRA: AN INTERACTIVE APPROACH, SECOND EDITION
William Paulsen
ABSTRACT ALGEBRA: AN INQUIRY-BASED APPROACH
Jonathan K. Hodge, Steven Schlicker, and Ted Sundstrom
ADVANCED LINEAR ALGEBRA
Hugo Woerdeman
ADVANCED LINEAR ALGEBRA
Nicholas Loehr
ADVANCED LINEAR ALGEBRA, SECOND EDITION
Bruce Cooperstein
APPLIED ABSTRACT ALGEBRA WITH MAPLE™ AND MATLAB®, THIRD EDITION
Richard Klima, Neil Sigmon, and Ernest Stitzinger
APPLIED DIFFERENTIAL EQUATIONS: THE PRIMARY COURSE
Vladimir Dobrushkin
APPLIED DIFFERENTIAL EQUATIONS WITH BOUNDARY VALUE PROBLEMS
Vladimir Dobrushkin
APPLIED FUNCTIONAL ANALYSIS, THIRD EDITION
J. Tinsley Oden and Leszek Demkowicz
A BRIDGE TO HIGHER MATHEMATICS
Valentin Deaconu and Donald C. Pfaff
COMPUTATIONAL MATHEMATICS: MODELS, METHODS, AND ANALYSIS WITH MATLAB® AND MPI,
SECOND EDITION
Robert E. White
A CONCRETE INTRODUCTION TO REAL ANALYSIS, SECOND EDITION
Robert Carlson
A COURSE IN DIFFERENTIAL EQUATIONS WITH BOUNDARY VALUE PROBLEMS, SECOND EDITION
Stephen A. Wirkus, Randall J. Swift, and Ryan Szypowski
A COURSE IN ORDINARY DIFFERENTIAL EQUATIONS, SECOND EDITION
Stephen A. Wirkus and Randall J. Swift
PUBLISHED TITLES CONTINUED

DIFFERENTIAL EQUATIONS: THEORY, TECHNIQUE, AND PRACTICE, SECOND EDITION


Steven G. Krantz
DIFFERENTIAL EQUATIONS: THEORY, TECHNIQUE, AND PRACTICE WITH BOUNDARY VALUE PROBLEMS
Steven G. Krantz
DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES, THIRD EDITION
George F. Simmons
DIFFERENTIAL EQUATIONS WITH MATLAB®: EXPLORATION, APPLICATIONS, AND THEORY
Mark A. McKibben and Micah D. Webster
DISCOVERING GROUP THEORY: A TRANSITION TO ADVANCED MATHEMATICS
Tony Barnard and Hugh Neill
DISCRETE MATHEMATICS, SECOND EDITION
Kevin Ferland
ELEMENTARY DIFFERENTIAL EQUATIONS
Kenneth Kuttler
ELEMENTARY NUMBER THEORY
James S. Kraft and Lawrence C. Washington
THE ELEMENTS OF ADVANCED MATHEMATICS: FOURTH EDITION
Steven G. Krantz
ESSENTIALS OF MATHEMATICAL THINKING
Steven G. Krantz
EXPLORING CALCULUS: LABS AND PROJECTS WITH MATHEMATICA®
Crista Arangala and Karen A. Yokley
EXPLORING GEOMETRY, SECOND EDITION
Michael Hvidsten
EXPLORING LINEAR ALGEBRA: LABS AND PROJECTS WITH MATHEMATICA®
Crista Arangala
EXPLORING THE INFINITE: AN INTRODUCTION TO PROOF AND ANALYSIS
Jennifer Brooks
GRAPHS & DIGRAPHS, SIXTH EDITION
Gary Chartrand, Linda Lesniak, and Ping Zhang
INTRODUCTION TO ABSTRACT ALGEBRA, SECOND EDITION
Jonathan D. H. Smith
INTRODUCTION TO ANALYSIS
Corey M. Dunn
PUBLISHED TITLES CONTINUED

INTRODUCTION TO MATHEMATICAL PROOFS: A TRANSITION TO ADVANCED MATHEMATICS, SECOND EDITION


Charles E. Roberts, Jr.
INTRODUCTION TO NUMBER THEORY, SECOND EDITION
Marty Erickson, Anthony Vazzana, and David Garth
INVITATION TO LINEAR ALGEBRA
David C. Mello
LINEAR ALGEBRA, GEOMETRY AND TRANSFORMATION
Bruce Solomon
MATHEMATICAL MODELING FOR BUSINESS ANALYTICS
William P. Fox
MATHEMATICAL MODELLING WITH CASE STUDIES: USING MAPLE™ AND MATLAB®, THIRD EDITION
B. Barnes and G. R. Fulford
MATHEMATICS IN GAMES, SPORTS, AND GAMBLING–THE GAMES PEOPLE PLAY, SECOND EDITION
Ronald J. Gould
THE MATHEMATICS OF GAMES: AN INTRODUCTION TO PROBABILITY
David G. Taylor
A MATLAB® COMPANION TO COMPLEX VARIABLES
A. David Wunsch
MEASURE AND INTEGRAL: AN INTRODUCTION TO REAL ANALYSIS, SECOND EDITION
Richard L. Wheeden
MEASURE THEORY AND FINE PROPERTIES OF FUNCTIONS, REVISED EDITION
Lawrence C. Evans and Ronald F. Gariepy
NUMERICAL ANALYSIS FOR ENGINEERS: METHODS AND APPLICATIONS, SECOND EDITION
Bilal Ayyub and Richard H. McCuen
ORDINARY DIFFERENTIAL EQUATIONS: AN INTRODUCTION TO THE FUNDAMENTALS
Kenneth B. Howell
PRINCIPLES OF FOURIER ANALYSIS, SECOND EDITION
Kenneth B. Howell
REAL ANALYSIS AND FOUNDATIONS, FOURTH EDITION
Steven G. Krantz
RISK ANALYSIS IN ENGINEERING AND ECONOMICS, SECOND EDITION
Bilal M. Ayyub
SPORTS MATH: AN INTRODUCTORY COURSE IN THE MATHEMATICS OF SPORTS SCIENCE AND
PUBLISHED TITLES CONTINUED

SPORTS ANALYTICS
Roland B. Minton
A TOUR THROUGH GRAPH THEORY
Karin R. Saoub
TRANSITION TO ANALYSIS WITH PROOF
Steven G. Krantz
TRANSFORMATIONAL PLANE GEOMETRY
Ronald N. Umble and Zhigang Han
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2018 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

Printed on acid-free paper


Version Date: 20171025

International Standard Book Number-13: 978-1-1380-3301-6 (Hardback)

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 utilized in any
form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, 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 www.copyright.com (http://www.
copyright.com/) 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 organizations 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 identification
and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Contents

Preface ix

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 . . . . . . . . . . . . . . . . 19
1.4 Proofs 101: Proofs and Proof-Writing . . . . . . . . . . . . . 32
1.5 Types of Proof . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.6 Sets 103: Finite and Infinite Sets; Cardinality . . . . . . . . . 52
1.7 Numbers 102: Absolute Values . . . . . . . . . . . . . . . . . 62
1.8 Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
1.9 Numbers 103: Completeness . . . . . . . . . . . . . . . . . . 74

2 Sequences and Series 83


2.1 Sequences and Convergence . . . . . . . . . . . . . . . . . . 83
2.2 Working with Sequences . . . . . . . . . . . . . . . . . . . . 96
2.3 Subsequences . . . . . . . . . . . . . . . . . . . . . . . . . . 106
2.4 Cauchy Sequences . . . . . . . . . . . . . . . . . . . . . . . 114
2.5 Series 101: Basic Ideas . . . . . . . . . . . . . . . . . . . . . 120
2.6 Series 102: Testing for Convergence and Estimating Limits . . 134
2.7 Lim sup and lim inf: A Guided Discovery . . . . . . . . . . . 146

3 Limits and Continuity 149


3.1 Limits of Functions . . . . . . . . . . . . . . . . . . . . . . . 149
3.2 Continuous Functions . . . . . . . . . . . . . . . . . . . . . . 162
3.3 Why Continuity Matters: Value Theorems . . . . . . . . . . . 172
3.4 Uniform Continuity . . . . . . . . . . . . . . . . . . . . . . . 182
3.5 Topology of the Real Numbers . . . . . . . . . . . . . . . . . 190
3.6 Compactness . . . . . . . . . . . . . . . . . . . . . . . . . . 199

4 Derivatives 207
4.1 Defining the Derivative . . . . . . . . . . . . . . . . . . . . . 207
4.2 Calculating Derivatives . . . . . . . . . . . . . . . . . . . . . 219
4.3 The Mean Value Theorem . . . . . . . . . . . . . . . . . . . 230
4.4 Sequences and Series of Functions . . . . . . . . . . . . . . . 239

vii
viii CONTENTS

4.5 Taylor Series and Taylor’s Theorem: A Guided Discovery . . . 252

5 Integrals 257
5.1 The Riemann Integral: Definition and Examples . . . . . . . . 257
5.2 Properties of the Integral . . . . . . . . . . . . . . . . . . . . 268
5.3 Integrability . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
5.4 Some Fundamental Theorems . . . . . . . . . . . . . . . . . 292

Selected Solutions 299

Index 335
Preface

About This Edition: What’s Old and What’s New?


This second edition retains all the main mathematical and pedagogical attributes
and strategies of the first edition, as outlined below. For example, this edition
retains—and perhaps increases—the first edition’s strong focus on helping stu-
dents acquire and use mathematical language. Many students at the level envi-
sioned for this text find the linguistic challenge of parsing complicated definitions
and theorems just as difficult as the mathematics itself. This edition, therefore,
contains additional problems and exercises that ask students to unpack, instan-
tiate, or even “perturb” the statements of definitions and theorems. (See, e.g.,
Problem 7, page 112.)
This book, like any second edition, incorporates repair of first edition typos
(and possibly the introduction of some brand-new ones). The narrative has also
been “smoothed” or (in the author’s view) otherwise improved in places identified
either by the author or (thanks!) by other users.
Following are some more significant new features and content.

New sections on topology and compactness. Two entirely new sections, Sec-
tions 3.5 and 3.6, introduce basic ideas of topology and compactness. Some gen-
eral definitions and principles are discussed, but the setting is almost always the
real line, treated (when helpful) as a metric space. Compactness is defined in
terms of open covers (which pose their own linguistic challenges!) but there is
strong emphasis on closed and bounded sets in R, via the Heine–Borel theorem.
This material is very occasionally alluded to, but not really depended on, in later
sections. In this sense these sections are essentially self-contained, and could be
used for independent study or enrichment projects.

New material on series of functions and “Taylor stuff.” Treatment of function


series in general and of Taylor series in particular has been beefed up, both in Sec-
tion 4.4 and in the new Section 4.5, on Taylor series. Section 4.5 joins Section 2.7
(on upper and lower limits) in the mode of “guided discovery”. Both sections are
designed for students to encounter as projects or other forms of enrichment. Their
content, though mathematically important, is not explicitly required in the sequel.

ix
x Preface

New problems and exercises. This edition includes new problems and exercises
in most of the sections. Many new problems focus on helping students understand
and “unpack” (in the sense discussed above) definitions and theorems. Students
are often asked to prove special cases, explore concrete instances of general re-
sults, and the like. Many problem sets have also been more carefully ordered to
distinguish between odd- and even-numbered exercises; most of the former have
hints or solutions in the back.

Thanks
This book, in both of its editions, 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,” fam-
ily, 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,
the late Arnold Ostebee, Matt Richey, the late Lynn Steen, Ted Vessey, and many
others with whom I have discussed matters mathematical and pedagogical for
many years. On matters 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 ar-
gument and example, that serious 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 discipline informs and underpins St. Olaf’s very suc-
cessful 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.
The late Klaus Peters and Charlotte Henderson worked with remarkable care,
diligence, and intelligence to make the first edition of 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.
For encouragement and equally diligent and meticulous work on the second
edition, I thank Karen Simon, Robert Ross, Sunil Nair, and Shashi Kumar, all of
Taylor & Francis.
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 ob-
Preface xi

serve and be around the process. Thanks.

The remainder of this preface is from the first edition.

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
humanities sometime.) Most mathematics students need guidance and explicit
attention to linguistic conventions in the discipline. This book aims to offer such
xii Preface

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 many. 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.

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
Preface xiii

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
R1
rigorously that 0 f > 0 is harder than it might seem, and it raises good
questions about monotonicity, points of continuity, and integrability.
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.

1
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 Z 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−π
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 integers,
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
Rational numbers. Basic algebraic properties of Q are equally familiar. All four follow from even simpler
equations above, for example, hold just as well for rational numbers a, b, and axioms.
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:
p+q p q pq q p+q 1 1
= + ; =p ; = + .
r r r r r pq q p
4 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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 6= 0.
b
Of course, any given rational number has many possible forms:

2 14 −222 88
= = = = ...;
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 6= 0 6= 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 6= 0, then there is a rational number q


with pq = 1. (In other words, q deserves the name 1/p.)
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 = p(qr).
• 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. ♦
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
trivial. 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 for details. The following more general theorem can be proved by similar means. It shows,
too, that the set of irrational numbers, or R \ Q, has infinitely many members.

Theorem 1.3. If the √ positive integer n is not a perfect square, then n is irra-
tional. In symbols, n ∈ R \ Q.

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.
1.1. Numbers 101: The Very Basics 7

Theorem 1.4. If x is irrational and r 6= 0 is rational, then


x r
xr, x + r, x − r, 1/x, , and
r x
are all irrational.

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. Decide whether each of the following claims makes sense. If not, why not?
If so, is the claim true or false? (No proofs needed.)

(a) If a ∈ R \ Q, then a2 ∈ R \ Q.
(b) Q2 > 0.
(c) If a ∈ R \ Q, then there exists n ∈ N such that na2 > 100.

(d) If a ∈ Q then a + 2 ∈ / Q.
8 1. Preliminaries: Numbers, Sets, Proofs, and Bounds


(e) If a ∈ Q and a =
6 0, then 2·a∈
/ Q.

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. 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.

5. 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.

(a) The set S1 of nonnegative rationals.


(b) The set S2 consisting of 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.
(d) The set S4 of real numbers of the form πr, where r is rational.

6. Let p and q be any two rational numbers. In each part following, decide
whether the given expression must be a rational number, regardless of the
values of p and q. If so, explain why, referring to 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
p
(c) p2 + q 2
p
(d) p2 + 2pq + q 2

7. Let both x and y denote irrational numbers, and consider the quantities (a)
xy; (b) x + y; (c) x − y; (d) x/y. Give examples (i.e., specific values of x
and y) to show that each quantity can be either rational or irrational.

8. Suppose x ∈ R \ Q, r ∈ Q, and r 6= 0. What (if anything) can √ be said


about
√ rationality
√ or irrationality of (a) xr; (b) x + r; (c) x/r; (d) x; (e)
r; (f) xr

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.)
1.1. Numbers 101: The Very Basics 9

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)
(a′ /b′ )2 = 2, and so deduce that 2 = a/b is impossible.

12. 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.

13. 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?

14. 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.)
10 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

15. 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.)

16. The well-ordering property (see page 3) says something special about the
set N:

If S ⊂ N and S 6= ∅, 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?

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:
1.2. Sets 101: Getting Started 11

• 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
describe various containment relations. above?

• 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 }.
12 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Here are some (true) examples from the sets above; note that all quantities
in question 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} .

• Handling complements: The sets Q of rationals and P of irrationals are


complementary in R in an obvious way:
P ∩ Q = ∅ and P ∪ Q = R.
Notice, too, that P = R \ Q and Q = R \ P .
For any set A ⊆ R, we call R \ A the complement of A in R. In the
same spirit, A is the complement of R \ A, and it’s easy to check that
R \ (R \ A) = A.
Named for an influential De Morgan’s laws connect complements with unions and intersections.
Victorian-era English For any two subsets A1 and A2 of R, De Morgan’s laws assert the following
mathematician—and textbook
writer.
identities:
R \ (A1 ∪ A2 ) = (R \ A1 ) ∩ R \ A2 )
R \ (A1 ∩ A2 ) = (R \ A1 ) ∪ R \ A2 )
Similar rules hold for unions and intersections of more than two subsets of
Analogous rules hold for R. We’ll use these rules in coming chapters; a proof is in the exercises.
infinitely many Ai , too.

E XAMPLE 1. What do De Morgan’s laws say if A1 = Q and A2 is the set of


negative numbers?

S OLUTION . Here A1 ∩ A2 is the set of negative rationals, so R \ (A1 ∩ A2 ) is


the set of numbers that are not negative rationals. Similarly, R \ A1 is the set of
irrationals, and R\A2 is the set of nonnegative numbers. The relevant De Morgan
law asserts that
R \ (A1 ∩ A2 ) = (R \ A1 ) ∪ R \ A2 ).
In our situation, this means, plausibly enough, that a number is not a negative
The notation seems formal, but rational if and only if it is either irrational or nonnegative or both.
the claim makes common The set A1 ∪ A2 is the set of numbers that are either rational or negative or
sense.
both. De Morgan’s other law,
R \ (A1 ∪ A2 ) = (R \ A1 ) ∩ R \ A2 ),
also makes good sense: numbers not in A1 ∪ A2 are neither rational nor negative.

1.2. Sets 101: Getting Started 13

Decoding set language. Statements about sets may involve complicated or tricky
symbolic combinations. Making sense of them takes careful reading.

E XAMPLE 2. 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
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

The quadratic formula also shows that x2 − x − 1 = 5 has the two roots x = −2 Check for yourself.
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} .
14 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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 3. 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.
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. ♦

Open sets: a look ahead. Open intervals are sets like (1, 3) and (−∞, 42) that
don’t contain any endpoints. More generally, any set U ⊂ R is called (topologi-
cally) open if U is the union of any collection (empty, finite, or infinite) of open
We get serious about basics of intervals. A set A ⊆ R is called closed if A = R \ U , where U is open. In other
topology later. This is just a words, closed sets are complements of open sets.
taste.
Example 4 shows that this new terminology plays well with what’s already
familiar.

E XAMPLE 4. Among the sets

(1, 3), R, [1, 3], {42}, {42} ∪ [1, 3],

which are open or closed? What about ∅?

S OLUTION . The sets (1, 3) and R = (−∞, ∞) are open intervals, and therefore
also open in the topological sense. For the other sets, we study complements:

[1, 3] = R \ ((−∞, 1) ∪ (3, ∞)) and {42} = R \ ((−∞, 42) ∪ (42, ∞))

Both of these complements are unions of open intervals and are therefore open
It would be troubling if [1, 3] sets; hence both [1, 3] and {42} are closed sets. The complement of {42} ∪ [1, 3]
were not closed. is the union of three open intervals, so {42} ∪ [1, 3] is also closed.
1.2. Sets 101: Getting Started 15

Here comes a twist: As the union of an empty collection of open intervals, the
empty set ∅ is open. As the complement of the open set R, ∅ is also closed. As
the complement of ∅, R is also closed. Thus, R and ∅ turn out to be both open and
closed. ♦

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 2, page 13.)

(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 =6 ∅; −2.8 ∈ Q \ T .
(c) Give the simplest possible description of the set U = {x ∈ R | x2 +
x < 0}.

3. For any A ⊆ R, the sets A and R \ A are complements of each other. If


A = (1, 3), for instance, R \ A = (−∞, 1] ∪ [3, ∞). In each part, find the
complement R \ A; use interval notation if possible.

(a) A = [1, 3]
(b) A = [1, ∞)
(c) A = (1, 2) ∪ (3, 4)
16 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(d) A = (1, 2) ∩ (3, 4)


(e) A = (−∞, 0) ∪ (0, ∞)

4. (a) Show that the complement of a closed and bounded interval [a, b] is
the union of two unbounded open intervals.
(b) Give examples to show that the complement of an open interval I can
be empty, one closed interval, or the union of two closed intervals.
(c) Write the complement of Z as a union of intervals.

5. We said in this section that for any set A ⊆ R, R \ (R \ A) = A. Explain


this in your own words.

6. This problem is about De Morgan’s laws; see page 12. Let A and B be any
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?
(c) Prove the true statement above. (Hint: Show that every element of the
left side is an element of the right side, and vice versa.)

7. This problem is about De Morgan’s laws (page 12) when A1 and A2 are
intervals. Let A1 = (1, 3) and A2 = (2, 5). Note that R \ A1 = (−∞, 1] ∪
[3, ∞) and R\A2 = (−∞, 2]∪[5, ∞). Write R\(A1 ∪A2 ) and R\(A1 ∩A2 )
in interval notation, and check that De Morgan’s laws hold as claimed.

8. This problem explores De Morgan’s laws (page 12) when A1 = (0, 1) and
A2 = (2, ∞). As in Problem 7, write all of the sets R \ A1 , R \ A2 ,
R \ (A1 ∩ A2 ), and R \ (A1 ∪ A2 ) using interval notation, and check that
De Morgan’s laws hold.

9. Suppose S ⊂ T ⊆ R, and let S ′ and T ′ be the complements of S and T .


Show that T ′ ⊂ S ′ .

10. 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?

11. Example 3, page 14, is about intersections of intervals. This problem is


about unions of intervals.
1.2. Sets 101: Getting Started 17

(a) Find any two intervals I and J such that I ∪ J is not an interval.
(b) Find disjoint intervals I and J such that I ∪ J is an interval.
(c) Consider open intervals I = (a, b) and J = (c, d) with a < c, b < d,
and 0 ∈ I ∩ J. Show that I ∪ J is an open interval.

12. Suppose I and J are any intervals, and c any number such that c ∈ I ∩ J.
Use Definition 1.5 to show that I ∪ J is an interval.

13. 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.

14. Can any interval have exactly 123456789 points? Why or why not?

15. Can an interval I contain only rational numbers?

16. This problem links to Example 4, page 14; note the meanings there of
“open” and “closed.”

(a) Show that (1, 2) ∪ (3, ∞) is open. What related set is closed?
(b) Let a ∈ R. Show that {a} is closed.
(c) Let a ∈ R. Show that (−∞, a) is open and (−∞, a] is closed.
(d) The interval (0, 1) is obviously open. Show that it’s not closed.

17. This problem links to Example 4, page 14; note the meanings there of
“open” and “closed.”

(a) Show that {1, 2, 3} is a closed set.


(b) Show that R \ Z is open (and so Z is closed).
(c) The set Q is neither closed nor open. Explain the “not open” part.
(Hint: Can an interval contain only rational numbers?)
(d) Assuming (it’s true!) that Q is neither closed nor open, explain why
the set of irrationals is neither closed nor open.
(e) Show that the interval (0, 1] (we’ve called it “half-open”) is neither
open nor closed.

18. From any set S we can create the new set P (S), called the power set of S,
consisting 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 ).
18 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(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.)

19. 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?

20. 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?

21. 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.

22. 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 }
(e) {(x, y) | x = sin y}
(f) {(x, y) | x2 + y 2 = −1}

23. A simple picture can be drawn in a n × m grid of squares (i.e., “checker-


board”) 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).
1.3. Sets 102: The Idea of a Function 19

(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),
the power set of 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 7→
b, or just a 7→ 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
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
20 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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.
• 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
We could “fix” this problem by information. Still, the rules make sense because everyone has a unique birth
choosing a larger codomain, month. By contrast, S QUARE has a problem: Squaring members of N12 produces
such as N.
results outside N12 . ♦
1.3. Sets 102: The Idea of a Function 21

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 geometric
properties of curves to analytic properties of functions. But some functions
have graphs that are nothing like curves. The graph of j in Example 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
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-
fined, rather than just visualized, as sets of ordered pairs. We’ll use both From this perspective, functions
of these viewpoints freely. are sets in their own right.

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:
22 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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 7→ 1, February 7→ 2, March 7→ 3, ..., December 7→ 12

to convey the idea. (The 7→ 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
6 f (a2 ) whenever a1 and a2 are in A and a1 =
injective) if f (a1 ) = 6 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 = a2 .

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

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
Finding even one pair of inputs Bob 6= Carol. By contrast, M ONTH N UMBER, which maps each month to its
that give the same output is number in the year, is one-to-one. The “inclusion” function i : Q → R with rule
enough.
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. ♦
1.3. Sets 102: The Idea of a Function 23

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 7→ a, 2 7→ b, 3 7→ c, ..., 25 7→ y, 26 7→ 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
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.
24 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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?

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


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

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


†Aminor 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.
1.3. Sets 102: The Idea of a Function 25

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.

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 6= 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 left to exercises.)
26 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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),

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
A function and its graph are as its graph Gf = {(a, f (a)) | a ∈ A}. Note that Gf is a subset of A × A—but a
essentially the same thing. subset with special properties that reflect the fact that f is a function. For instance,
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 we say that x is related to y.
1.3. Sets 102: The Idea of a Function 27

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 ≥.)
• 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.


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

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 each function one-to-one? Onto?

(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. As in the preceding problem, find reasonable domains A and codomains B


for the given rules. Is each resulting function one-to-one? Onto?

(a) B LOOD T YPE : A → B


(b) N UMBERO F PAGES : A → B
(c) C UBE ROOT : A → B
(d) FACTORIAL : A → B

3. Find the natural domain for each of the following calculus-style functions.
(a) f (x) = sin(x + ex )
(b) g(x) = tan(x)
p
(c) h(x) = x2 − 1
4. Find the natural domain for each of the following calculus-style functions.

(a) f (x) = 1 − ex
p
(b) g(x) = x2 + πx + 1 (give a decimal approximation)
(c) h(x) = ln (ex ) (give a decimal approximation)
5. In each part, find an appropriate quadratic formula q(x) = ax2 + bx + c for
the given function. (More than one answer may be correct.)
1.3. Sets 102: The Idea of a Function 29

(a) f (x) > 0 for all x ∈ R


(b) f : R → [4, ∞) is onto.
(c) f : (−5, ∞) → R is one-to-one. (Note the domain!)

6. In each part, find an appropriate quadratic formula q(x) = ax2 + bx + c for


the given function. (It’s allowed for one or more of a, b, c to be zero.)

(a) f : R → R has range [42, ∞)


(b) f (0) = −1, f (1) = 1, and f (2) = 3.
(c) f (0) = −1, f (1) = 1, and f (2) = 5.
(d) f (x) = 3 has one solution, f (x) = 2 has two solutions, and f (x) = 4
has no solutions.

7. Imagine a calculus-style 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?

8. In each case following, is the given function one-to-one? Is it onto? Sketch


or describe its graph.

(a) f : R → R, where f (x) = x2 + x


(b) g : [0, ∞) → [0, ∞), where g(x) = x2 + x
(c) h : R → R, where h(x) = x + ex
(d) k : U.S. citizens → N, where k(x) = last 4 digits of x’s Social Security Number.

9. Consider the functions f and g with f (x) = ln x and g(x) = ex . Find


reasonable domains and codomains for f and g. Sketch their graphs. In
what sense are f and g inverses?
10. Consider the function W ORD L ENGTH : A → N12 , discussed in Exam-
ple 2, page 20, and let G be its graph.

(a) Describe the set G. (Hint: G 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?
30 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(c) The W ORD L ENGTH function is also not onto. How does the graph G
reveal this?

11. 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 more descriptive names than f and f −1 for these
functions?

12. 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?
(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?

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

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


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

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


and b are any real numbers, with a 6= 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.

15. (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?
16. Let f : A → B and g : B → C be functions.
1.3. Sets 102: The Idea of a Function 31

(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 25.)
(b) Show that if g ◦ f is onto, then so is g. (This is (v) of Theorem 1.10,
page 25.)
(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.
(
n
2 if n is even
17. Consider ℓ : N → Z given by ℓ(n) = 1−n . Is ℓ one-to-one?
2 if n is odd
Onto? Does this seem strange given the “sizes” of N and Z?

18. 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.

19. 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.
20. Explain why the S AME B LOOD T YPE relation, discussed at the end of this
section, is reflexive, symmetric, and transitive.
21. 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 sets are
called the equivalence classes for M OD 5.)

22. 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.
32 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(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.
See also the coda at the end of This is not to say that mathematics is nothing but proof. Calculations, hunches,
this section. experiments, and searches for patterns are all indispensable in mathematics, as
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
Pythagoras recognized his contrast, has been known to be true for at least 2500 years.
proof as a big deal. He A first course in real analysis is a natural setting for learning about, and for
celebrated, legend has it, by
sacrificing 100 oxen.
practicing, mathematical proof. Many concepts and objects of real analysis—
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.

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.
1.4. Proofs 101: Proofs and Proof-Writing 33

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}
are clear and unambiguous. Or will be, once we have
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
meanings. A typical theorem claims that some mathematical object has some There are some exceptions, but
mathematical property. Without clear definitions of the objects and properties not many.
under discussion, proof can’t get started.

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 6= 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.
34 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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
See the common denominator? arithmetic:
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.

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.
1.4. Proofs 101: Proofs and Proof-Writing 35

Write sentences that “scan.” Proofs and solutions must of course be correct,
but they must also be intelligible to the intended reader. An excellent way to
ensure the latter is to read each sentence back to yourself. (Doing this silently
may reduce ridicule from neighbors.) A sentence with proper English grammar
and syntax may be mathematically 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 ǫ.
The first statement is true; it is a version of so-called Archimedean principle for We will study the Archimedean
real numbers. The second statement is meaningful, but false. principle in Section 1.6.

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.
36 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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.

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
We could, but won’t, argue over warning: Some technical words, such as “statement,” have everyday meanings
whether this is for better or for somewhat different from their mathematical uses.
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
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.
1.4. Proofs 101: Proofs and Proof-Writing 37

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 .
If it happens that both P =⇒ Q and Q =⇒ P , then P and Q always Solving equations, as in linear
have the same truth values, and are therefore called equivalent. The statements algebra, is all about searching
for equivalent, but simpler,
P (x) : 2x + 5 = 11 and Q(x) : x = 3 are equivalent, for instance. equations.

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.

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
Leonhard Euler.
How would we negate G? We could, admittedly, write something like

It is not the case that G,


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

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
integer does not have this property:

not G: Some even integer greater than 2 is not the sum of two primes.

And achieve fame. In other words, to disprove G it is enough to find even one big even number that
It’s been tried . . . . is not the sum of two primes.
In a similar spirit, De Morgan’s laws tell how to negate statements that involve
We alluded to them in slightly
different form in an earlier and and or:
section.

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


They happen to be true. real numbers:
(i) For all x > 3, x2 + 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) ∀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
1.4. Proofs 101: Proofs and Proof-Writing 39

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

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

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


common among crucial components of concise corroborations. Can this be just
curious coincidence?
An implication P =⇒ Q has both a converse and a contrapositive. The Which we dare not confuse . . . .
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,
on the other hand, always have the same truth value. This matters in mathematical Common sense bears this out;
practice, as we will see, because the contrapositive of a statement is sometimes we explore it further in the
exercises.
easier to prove than the original.

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.
40 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

Exercises
1. Here are some statements or attempted statements about real numbers. Which
are true? Which are false? Are any nonsensical? Are any negations of each
other?

P: ∃n ∈ N such that 2n2 − n < 0


Q: ∀n ∈ N such that 2n2 − n ≥ 0
R: ∀n ∈ N, 2n2 − n ≥ 0

2. Here are some statements or attempted statements about real numbers. Which
are true? Which are false? Are any nonsensical? Are any negations of each
other?

/ N such that 2n2 − n < 0


S: ∃n ∈
T: ∀n ∈
/ N, 2n2 − n ≤ 0
U: n ∈ N =⇒ 2n2 − n ≥ 0

3. 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 35.)

(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.

4. 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 6= Q, then x 6= Q either.


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

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

5. Decide whether each of the following is true or false. Explain answers as


concisely as possible.

(a) ∃n ∈ N such that ∀x ∈ R, x < n


(b) ∃x ∈ R such that ∀n ∈ N, x < n
1.4. Proofs 101: Proofs and Proof-Writing 41

6. Decide whether each of the following is true or false. Explain answers as


concisely as possible.

(a) ∀x > 0 ∃y > 0 such that xy = 1


2
(b) ∃x > 0 such that ∀y > 0, 2 > x
y

7. 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

8. 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.

(a) P =⇒ R
(b) Q =⇒ R
(c) (P and Q) =⇒ R

9. Negations and counterexamples. Following are some statements. For each


one, first write the negation. Then try to decide (no proofs needed) whether
each is true or false. If possible and appropriate, give a counterexample.

R: ∀n ∈ N, n2 + 6 ∈ N

S: ∃n ∈ N such that n2 + 6 ∈ N
T: ∀x ∈ [0, 1], cos(x) > 0.6
U: Every even integer n with 5 < n < 31 is the sum of two primes.
42 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

10. Converses and contrapositives. In each part, write (as simply as possible)
both the converse and the contrapositive 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 numbers.
(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.
P
(d) If a series an converges, then limn→∞ an = 0.

11. Negations. In each part, write (as simply as possible) the negation of the
given statement.

(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.

12. 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.

13. Counterexamples. At least three of the statements P–Z in Problem 12 are


false. Choose any three false statements. For each one, carefully state a
counterexample that shows the statement to be false.
1.5. Types of Proof 43

14. 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|.

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

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.
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 we prefer to state hypotheses more
explicitly, we could rewrite Claim IV, for instance, as
44 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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.

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


x z
a= and b = ,
y w
6 0 6= w. Now we multiply:
where x, y, z, w are all integers, and y =
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.


1.5. Types of Proof 45

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. ♦

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.


P ROOF. Assume, toward contradiction, that 5 is rational. Then we can write
√ It is traditional, and helpful, to
5 = a/b for some positive integers a and b, and so label contradiction proofs up
front.
√ a a2
5= =⇒ 5 = 2 =⇒ 5b2 = a2 .
b b
46 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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 in 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 ei-
each pi . ther 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 complete. This con-
tradiction completes the proof. ♦

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”
Sometimes there is an or “exhaustive” methods can be ugly, but sometimes there is no alternative. And
alternative, but it’s hard to find. working through special cases, especially with a computer’s help, can reveal im-
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
Try some more! with Claim VI. Handling its 49 special cases is easy, although perhaps tedious:

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



1.5. Types of Proof 47

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.
...

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

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

With n = 3 we get eight subsets, as expected: four from the n = 2 case plus four See the pattern?
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.
48 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

• 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.

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)
P (k) 2  
k (k + 1)(k + 2)
by algebra = (k + 1) +1 =
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.
1.5. Types of Proof 49

• 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.)
• 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.

(b) If x ∈
/ Q, then 2 + 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.
50 1. Preliminaries: Numbers, Sets, Proofs, and Bounds


(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. Any nonempty finite set F = {x1 , x2 , . . . , xn } of n real numbers can be


arranged from smallest to largest. Doing so depends on an even simpler
fact: A finite set F of n real numbers has a largest element. Prove this by
mathematical induction.

4. Let S be a nonempty finite set, with n elements.

(a) Explain why S has an even number of subsets (including S and ∅).
Hint: Look at results in this section. Or think about complements.
(b) Suppose n is odd. Show that the number of subsets with an even
number of elements is the same as the number of subsets with an odd
number of elements. Hint: This can be done by induction, but it’s
quicker to use complements.
(c) The result in the preceding part actually holds for both odd and even
n. Prove this, perhaps by induction.

5. 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.

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. Suppose that x ≥ −1. Prove that (1 + x)n ≥ 1 + nx for all n ∈ N.


1.5. Types of Proof 51

8. 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.)
9. Recall the product rule from elementary calculus: If f1 and f2 have deriva-
tives f1′ and f2′ then (f1 f2 )′ = f1′ f2 + f1 f2′ .
(a) Use the ordinary product rule to show the analogous formula (f1 f2 f3 )′ =
f1′ f2 f3 + f1 f2′ f3 + f1 f2 f3′ .
(b) Let n be any positive integer. Guess a formula for (f1 f2 f3 . . . fn )′
and prove it by induction.
10. (a) Show that 5n > n! for positive integers n < 12.
(b) Show that 5n < n! for positive integers n ≥ 12.
11. (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
X n(n + 1)(2n + 1) X n(n + 1)
j2 = and j= .
j=1
6 j=1
2

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


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

13. Show that the inequality 2n < n! holds for all integers n > 3.
14. 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.)
15. Another familiar calculus formula (see Problem 14) says that
1 n
if , then g ′ (x) = − n+1
g(x) =
xn x
for every positive integer n. Prove this by induction, assuming both the
n = 1 case and the product rule.
52 1. Preliminaries: Numbers, Sets, Proofs, and Bounds


16. 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 45.

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.

17. If your wallet contains two $5 bills and an unlimited supply of $3 bills.
then you can pay out some amounts, like $8 and $300, but not others, like
$2 and $7. Exactly which amounts can you pay out? Guess an answer and
prove it by induction.

18. Claim: In any group of n kittens, if one is orange, then all are orange.
That’s absurd, of course, but what’s 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.
1.6. Sets 103: Finite and Infinite Sets; Cardinality 53

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 . . . }.
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 7→ 2, 2 7→ 4, 3 7→ 6, ..., n 7→ 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 7→ 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
54 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.

Thus, for any given b ∈ (0, 1), the positive number a = b/(1 − b) satisfies
g(a) = b. ♦

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
1.6. Sets 103: Finite and Infinite Sets; Cardinality 55

some properties we will accept, without formal proofs, as intuitively reasonable.


• 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: We discuss this further in
Problem 3, page 50.
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 , . . . .
56 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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


234 7→ t234 , and so on. The details follow.
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.
1.6. Sets 103: Finite and Infinite Sets; Cardinality 57

(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 7→ nth entry in the list is the desired bijection. 

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.
58 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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.

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 , . . .


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

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:

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

There are ten choices for each digit, so there are plenty of ways to choose the ei ,
and therefore countless possible numbers x0 . What matters is that x0 differs from Pun intended.
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.

Exercises
1. Assume (it’s true!) that the union F1 ∪ F2 of any two finite sets is finite.
Prove by induction that F1 ∪ F2 ∪ · · ·∪ Fn is finite for every positive integer
n and finite sets Fi .
2. Find a one-to-one correspondence f : A → B (expressed as a simple
formula) in each part below.

(a) A = {1, 2, 3, 4, . . . , 10}; B = {2, 4, 8, . . . , 1024}.


(b) A = N; B = {−3, −2, −1, . . . }.
(c) A = [0, 1); B = (0, 1].
(d) A = R; B = (0, ∞)

3. 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?

4. 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.)
5. 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?
6. 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.
60 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

7. 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 of
Problem 6.)

(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.

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


9. Suppose A is infinite, B is finite, and B ⊂ A. Show that A \ B is infinite.
10. 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.

11. 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 .
S∞
(c) Show that Q1 ⊆ Q2 ⊆ Q3 ⊆ . . . and that i=1 Qi = Q.

12. 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.)
1.6. Sets 103: Finite and Infinite Sets; Cardinality 61

13. Show that [0, ∞) and (0, ∞) have the same cardinality.

14. Use results from these problems to explain why all intervals in R have the
same cardinality.

15. 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?

16. 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.)

17. (This extended “problem” could be the basis of a possible project.) Suppose
we have two sets A and B and a one-to-one function f : A → B. Then it’s
reasonable to say that the cardinality of A is not greater than that of B; in
symbols, |A| ≤ |B|. (Think of |A| as the “size” of A, not as an absolute
value.) For instance, the one-to-one function f : N → Z given by f (n) = n
suggests, correctly, that |N| ≤ |Q|. In words, N is “not greater” than Z.
If there is also a one-to-one function g : B → A, then we can write both
|A| ≤ |B| and |B| ≤ |A|, and it’s natural to expect that A and B have the
same cardinality—i.e., |A| = |B|, or A ∼ B in our preferred notation.
The famous Cantor–Schröder–Bernstein theorem says that this is indeed so.
For any sets A and B and injective functions f : A → B and g : B → A,
we can construct from f and g a bijective function h : A → B.

(a) Find out (from books or online) exactly what the Cantor–Schröder–
Bernstein theorem says, and describe a proof in your own words.
(b) Let A = [0, 1] = B, and consider the functions f : [0, 1] → [0, 1]
given by f (x) = x/2 and g : [0, 1] → [0, 1] given by g(x) = x/2. Il-
lustrate the proof idea in the previous part by constructing from f and
g the advertised bijective function h. (The identity function h(x) = x
62 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

is obviously bijective, but it’s not constructed from f and g as the


proof idea describes.)
(c) Try to describe the function h using the binary expansion of points in
[0, 1].

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 right of 1/2, the
Make a sketch. midpoint of (−2, 3); equivalently, x > 1/2.
Inequality (ii) can also be interpreted in distance language, after a little rear-
Is all the algebra OK? rangement:

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 ). ♦
1.7. Numbers 102: Absolute Values 63

Absolute Truths
We collect some key properties of absolute values in two theorems. The first is
easy; proofs are omitted or left as exercises.
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|.

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

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| .
64 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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
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 Z Z
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 <
These bounds follow from the |y| < 7.02. Thus,
triangle inequality; common
sense works, too. |x| 7.01
|xy| = |x||y| ≤ 7.01 · 7.02 ≈ 49.21 and ≤ ≈ 1.004.
|y| 6.98

Exercises
1. It’s well known that | sin(x)| ≤ 1 and | cos(x)| ≤ 1 for all x. Assume this
and other familiar properties of sine and cosine in this problem.

(a) The triangle inequality says that |sin(x) + cos(x)| ≤ 2? Does a num-
ber smaller than 2 actually work in this inequality?
1.7. Numbers 102: Absolute Values 65

(b) What does the reverse triangle inequality say about |sin(x) − cos(x)|?
Can this inequality be “improved”? Explain.
(c) Use the triangle inequality to show that sin(x)2 + cos(x)2 ≤ 2. Can
this inequality be “improved”? Explain.

2. 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?

3. Explain why the inequalities

|x − y| ≤ |x| + |y| and |x − y| ≥ |x| − |y|

hold for all real numbers x and y.


4. 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

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

(a) |x − 3| < |x + 1|

(b) x2 − 4 < 0.07

(c) x2 + 2x + 1 < 4

6. 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.

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

(a) Show that |y − 4| > 0.96.


(b) Find K, as small as possible, such that |y − x| < K.
66 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(c) Find L, as large as possible, such that |y − x| > L.

8. Suppose that |x − 1| < 0.03 and |y| > 5.

(a) Find L, as large as possible, such that |y − x| > L.


(b) Find all the possible values of |y − x|.

9. 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.
10. 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?
11. 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.
12. Let ǫ be a positive number, and suppose |x − 7| < ǫ and |y − 7| < ǫ. Show
that |x − y| < 2ǫ.
13. (a) Suppose that |x − 1| < 0.5. Show that x > 0.5.
|c| |c|
(b) Suppose that c 6= 0 and |x − c| < 2 . Show that |x| > 2 .

14. Yet another triangle-type inequality has the form


Z 1 Z 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 67

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.
• Unboundedness: A set is unbounded if it is not bounded. The definition is And similarly for sets
far from surprising, but deciding whether a set is bounded or unbounded unbounded above or
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? See the exercises.

• Boundedness and absolute values: Absolute values—which measure magnitude—


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 (straightforward) proof in the exercises.


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

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 at |t| ≤ MT for all s ∈ S and t ∈ T . Hence we have
work?
|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. ♦

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.
1.8. Bounds 69

• 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.

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;
see Fact 1.16, page 55.) Now it is clear that δ = d1 /2 works in Definition 1.28. Any positive δ smaller than d1
♦ would work here.
70 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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, A =
sin x increases on this interval. [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
the other hand, g is bounded on every bounded set A. If, say, A is the interval
Thanks, triangle inequality. [−K, K] and a ∈ A, then we have

|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. Prove parts (a) and (c) of Example 1, page 68.

2. Show that if S ⊂ R is a finite set, then S contains both sup(S) and inf(S).
(Hint: See Fact 1.16, page 55.)

3. In each part, give an example of an interval I ⊆ R with the given properties.


1.8. Bounds 71

(a) I has a minimum but no supremum


(b) I has a supremum but no infimum
(c) I has a supremum and an infimum, but no minimum
(d) Can any set S have a maximum but no supremum? Why?

4. We said 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. Equivalently,
S ⊆ [−M, M ].

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

5. Consider the functions f (x) = ex and g(x) = sin(x) and the set A =
[0, 10].

(a) Find upper and lower bounds for f and g on A. Is either f or g


bounded above or below on R?
(b) Find upper and lower bounds for the composite functions f ◦ g and
g ◦ f on A. Is either of these function bounded on R?

6. Consider the function f : R → R given by f (x) = x2 + 2x.

(a) Explain briefly why f is bounded below but not bounded above on R.
(b) Find a set A ⊆ R (as large as possible) such that f is bounded above
on A by M = 120.
(c) Find a set A ⊆ R (as large as possible) such that f is bounded below
on A by m = −1.
(d) Find a set A ⊆ R (as large as possible) such that f is bounded above
on A by M = 0.
(e) Let A ⊂ R be any set with 1234 points. Explain briefly why f is
bounded above and below on A.

7. Show that if A ⊆ R is bounded and f (x) = 3x + 5, then f is bounded on


S.
72 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

8. Let f : R → R and g : R → R be functions, with −2 ≤ f (x) ≤ 1 and


−3 ≤ g(x) < 4 for all x ∈ R.

(a) Find upper and lower bounds for the function f + g on R.


(b) Find upper and lower bounds for the function |f g| on R.
(c) Find upper and lower bounds for the function f ◦ g and g ◦ f on R.

9. For each set S following find—if possible—inf(S) and sup(S). Are any of
these maxima or minima? No proofs needed.

(a) S = n ∈ N | n2 < 10
(b) S = {p ∈ N | p is prime}
(c) S = {p ∈ N | p is an even prime}
(d) S = {sin(x) + 42 | x ∈ R}

(e) S = r ∈ Q | r2 ≤ 2

(f) S = x ∈ R | x2 ≤ 2
10. Is each of the following sets bounded? If so, give upper and lower bounds.
If not, why not? (No proofs needed; 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

11. 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.
1.8. Bounds 73

12. 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?

13. In each part following, describe the sets S ⊆ R with the given property.

(a) ∀s ∈ S ∃M ∈ R such that |s| ≤ M


(b) ∃M ∈ N such that |s| ≤ M ∀s ∈ S
(c) ∃M ∈ N such that |s| ≥ M ∀s ∈ S

14. 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.

15. 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.)

16. 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.)

17. (This problem alludes to Definition 1.28, page 69.) 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 = ∅.

18. (This problem alludes to Definition 1.28, page 69.) In each of the following
cases either give an example or say why none can exist.
74 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

(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.

19. 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) If a ∈
/ J, must J be bounded away from a? Why or why not?
(c) If a ∈
/ N , must N be bounded away from a?

20. 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 2numbers y (with y >
2

2) is a real number r that deserves the name 2 because r = 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 6= ∅, and S is bounded above, then there is a real number β such
that β = sup(S).

Like other succinct mathematical statements, this one can use some unpacking:
1.9. Numbers 103: Completeness 75

• 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
version. See the exercises.

• The real advantage: The completeness axiom guarantees that every bounded
set of rationals has a supremum—which may or may not be a rational num- Rational numbers are also real.
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?
This is far from clear at a glance—and the completeness
√ axiom is no help The question boils down to
at all. To decide, we’d need to discover whether 152399024 is rational, whether 152399024 is a perfect
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.
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.
76 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

a 2a 3a b na

0 0.01 5003.47

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

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:

(0, 1) ⊇ (0, 1/2) ⊇ (0, 1/3) ⊇ (0, 1/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

[0, 1] ⊇ [0, 1/2] ⊇ [0, 1/3] ⊇ [0, 1/4] ⊇ . . .

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 ⊇ . . .
1.9. Numbers 103: Completeness 77

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

a1 ≤ 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 ,
is largest. But then the interval (rn , y) must contain no rationals, which contra- Recall: Every nonempty finite
dicts (a). Exactly the same proof applies to irrational numbers, so we conclude set of reals has a maximum
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
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
78 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

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. The list 21 , 13 , 41 , . . . , 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.

2. In the spirit of Problem 1:


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

3. 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).

4. 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
6 a < b?
0 < a < b with a < b? What if 0 =

5. (a) Show with a counterexample that the following statement (which re-
sembles the Archimedean principle) is false: If a and b are real num-
bers with a < b, then there exists a positive integer n such that na > b.
(b) Prove (using the Archimedean principle) or disprove (with a coun-
terexample) the following statement: If a and b are nonzero real num-
bers with a < b, then there exists an integer n such that na > b.
1.9. Numbers 103: Completeness 79

(c) Prove without using the Archimedean principle: If a and b are positive
numbers with a < b, then there exists a real number n such that na >
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 there 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. Use the completeness axiom for sups to prove the analogous result for infs:
If S ⊂ R, S = 6 ∅, 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.)

9. In each case, find a nested collection I1 ⊇ I2 ⊇ . . . of intervals as de-


scribed.

(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].

10. Show that every closed interval [a, b] is the intersection of a nested I1 ⊃
I2 ⊃ . . . of open intervals.

11. Show that no open interval (a, b) is the intersection of a nested I1 ⊃ I2 ⊃


. . . of closed intervals. Hint: It’s OK to assume the (true) fact that if I is a
closed interval and (a, b) ⊆ I, then [a, b] ⊆ I, too.
80 1. Preliminaries: Numbers, Sets, Proofs, and Bounds

12. This problem is about some details in the proof of Theorem 1.31, page 76;
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 .

13. We said in this section that completeness of R guarantees that 2 has a real
square root.

(a) Let S = {x | x2 < 2}. Explain why S has a least upper bound; call
it β. We’ll show that β 2 = 2.
(b) Suppose toward contradiction that β 2 < 2. Now choose any h > 0
such that (i) 0 < h < 1 and (ii) h ≤ (2 − β 2 )/(2β + 1). Show that
(β + h)2 < 2. Hint: Use the fact that h2 < h.
(c) The preceding calculation leads to a contradiction. Identify it, and
conclude β 2 < 2 is impossible.
(d) Prove by contradiction that β 2 > 2 is also impossible. (Hint: Set
k = (β 2 − 2)/(2β) and consider β − k.)

14. Imitate Problem 13 to show that every positive number a has a unique pos-
itive square root.
15. Use the result of Problem
√ √14 √ √ that every positive number a has
to show
unique positive roots a, 4 a, 8 a, 16 a, etc.
16. In the spirit of Problem 14, it’s true that every positive number a has a
unique positive cube root. We can show this by defining S = {x | x3 < a},
setting β = sup(S), and proving that β 3 = a. Complete details below.

(a) Suppose toward contradiction that β 3 < a. Choose h with 0 < h < 1
and h < (a − β 3 )/(3β 2 + 3β + 1). (Why is this possible?) Show that
(β + h)3 < a, a contradiction.
(b) Show that β 3 > a also leads to a contradiction. To do so, choose an
appropriate positive value of k and show that (β − k)3 > a.

17. Use results of problems above


√ √ √ that every positive number a
to show that
has unique positive roots 6 a, 12 a, and 18 a.
18. 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
1.9. Numbers 103: Completeness 81

Here is a slightly subtler fact: Every infinite string of decimal digits corre-
sponds 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 β.)
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 }.

83
84 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.
2.1. Sequences and Convergence 85

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

Pre-proof discussion. The fact that an → 0 seems obvious; how could it be oth-
erwise? 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.

Proof: 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.

Discussion. 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
|xn − L| = − 3 = = = 13
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.

Proof. 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. ♦


86 2. Sequences and Series

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


−1, . . . diverges.

Discussion. 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.

Proof. 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. ♦

Visualizing 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.

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.


2.1. Sequences and Convergence 87

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.

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.

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
88 2. Sequences and Series

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 .

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


We could play the same game definition—there is some N such that L − 1 < an < L + 1 for all n > N .
with smaller ǫ, but there’s no In particular, the “upper tail” {aN +1 , aN +2 , aN +3 , . . . } is bounded (above by
need.
L + 1 and below 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.
2.1. Sequences and Convergence 89

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


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

Discussion. 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.

Proof. 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.

Discussion. 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
90 2. Sequences and Series

for n ≤ 42. If n > 42, then we can indeed drop the absolute value in good
But check all algebra carefully. conscience, and solve our inequality without undue fuss:

170 170 170 85
2n − 85 = 2n − 85 < ǫ ⇐⇒ 2ǫ + 2 < n.

The last inequality is what we wanted—a value of n beyond which |wn − L| < ǫ.
Here comes the proof.

Proof. 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
a nice collapse! 170 170
< = 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
n o
(b) √1n
n o
1
(c) 1+ln n

2. This problem is about ǫ–N tables for convergent sequences, like those in
Problem 1, 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?
2.1. Sequences and Convergence 91

(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 {xn } converges to L, and a ≤ xn ≤ b for all n. Show that


a ≤ L ≤ b.
4. Prove or disprove: If xn < 17 for all n and {xn } converges to L, then
L < 17.
5. 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.

6. 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.

7. Suppose that {xn } converges to 4.

6 4 for infinitely many n? If so, give an example.


(a) Is it possible that xn =
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.

8. Suppose that {xn } converges to a number L, with L > 4.

(a) Can xn = 4 for exactly 1234 values of n? If so, give an example. If


not, explain why not.
(b) Can xn = 4 for infinitely many values of n? If so, give an example.
If not, explain why not.

9. Prove that each of the following sequences converges. (Example 2, page 85,
is similar.)
2n
(a) {an }, with an = .
3n + 5
2n + 300000
(b) {bn }, with bn = .
3n + 5
92 2. Sequences and Series

2n
(c) {cn }, with cn = .
3n2 + 5

10. 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

11. Suppose that {an } converges to 1. Prove (use ǫ and N , not theorems) that
{17an} converges to 17.

12. Suppose {xn } is monotone decreasing and inf{xn } = 17. Show that xn →
17.

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

14. Convert the informal discussion after Theorem 2.4, page 88, into a concise
proof.

15. Let {xn } be a sequence. Define a new sequence {yn } by yn = xn − 5. Use


the definition of convergence to show that xn → 5 ⇐⇒ yn → 0.

16. 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.)

17. 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.)
2.1. Sequences and Convergence 93

18. Show that every real number β is the limit of an increasing sequence of
rational numbers. Hint: One approach uses infinite decimal expansion; see
Exercise 18, page 80.
19. Some sequences {xn } have ǫ–N tables (in the sense of Exercise 1) 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?


20. Some sequences {xn } have ǫ–N tables (in the sense of Exercise 1) 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?

21. Consider the sequence {xn } given by xn = 1/n. Decide whether each of
the following sentences is true; explain answers briefly.

(a) The sequence {xn } is bounded above by 2.


(b) The sequence {xn } is bounded below.
(c) If n > 42, then |xn | < .01.
(d) There is some integer N such that |xn | < .0001 for all n such that
n > N.
(e) There is some integer N such that |xn − xn+1 | < .0001 for all n such
that n > N .
(f) There is some integer N such that |xn | > 0.001 for all n such that
n > N.
(g) For every positive number ǫ there is some integer N such that |xn | < ǫ
for all n such that n > N .

(−1)n+1
22. Like Problem 21, but with the sequence {xn } given by xn = .
n
(a) The sequence {xn } is bounded above by 2.
(b) The sequence {xn } is bounded below.
(c) If n > 42, then |xn | < .01.
94 2. Sequences and Series

(d) There is some integer N such that |xn | < .0001 for all n such that
n > N.
(e) There is some integer N such that |xn − xn+1 | < .0001 for all n such
that n > N .
(f) There is some integer N such that |xn | > 0.001 for all n such that
n > N.
(g) For every positive number ǫ there is some integer N such that |xn | < ǫ
for all n such that n > N .
sin(n)
23. Like Problem 21, but with the sequence {xn } given by xn = .
n
(a) The sequence {xn } is bounded above by 2.
(b) The sequence {xn } is bounded below.
(c) If n > 42, then |xn | < .01.
(d) There is some integer N such that |xn | < .0001 for all n such that
n > N.
(e) There is some integer N such that |xn − xn+1 | < .0001 for all n such
that n > N .
(f) There is some integer N such that |xn | > 0.001 for all n such that
n > N.
(g) For every positive number ǫ there is some integer N such that |xn | < ǫ
for all n such that n > N .

24. Suppose that {xn } is unbounded above. Use the definition of convergence
to show that {xn } does not converge to L = 1000.

25. For each sequence, guess a limit L (e.g., try large values of n), if you think
one exists. Then complete an associated ǫ–N table like the one below.
(There are many possible values for N .)

ǫ 1.00000 0.10000 0.01000 0.00100 10−10


N

1
(a) If an = √ , then L = .
n
1
(b) If an = 2 , then L = .
n
sin n
(c) If an = 2 , then L = .
n
2.1. Sequences and Convergence 95

3n
(d) If an = , then L = .
n+2
(e) If an = min{n, 42}, then L = .

26. (Do Problem 25 first.) Write a brief sentence or two in each part.

(a) Look at your rightmost N -entry in any table above. Could you cor-
rectly use this same entry in every N -position in that table?
(b) Suppose you’ve found “good” N -entries for a table like these. Would
your table still be OK if you double every N -entry but leave the ǫ-
entries alone? What if you double the ǫ-entries and leave the N -
entries alone?

27. 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
28. 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 > φ.
96 2. Sequences and Series

29. Following are several meaningful (if possibly clumsy) sentences about a
sequence {an }. Describe in your own words what each sentence means
about {an }. Do any of these sentences imply any others?

(a) ∀ǫ > 0 ∃N ∈ N such that n > N =⇒ |an − π| < ǫ


(b) ∃N ∈ N such that ∀ǫ > 0, n > N =⇒ |an − π| < ǫ
(c) ∀ǫ > 0 and ∀N ∈ N, n > N =⇒ |an − π| < ǫ

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 6= 0 and bn 6= 0 for all n, then the sequence {an /bn }


converges to a/b.
Let’s use the theorem first; proofs come later.

E XAMPLE n1. InoExample 2, page 85, 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
1 → = 3,
1+5· n 1+5·0
2.2. Working with Sequences 97

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 }
converges. Find your own example where
Theorem 2.5 does help with {an + cn }; let’s call it {dn } for the moment. If {an + bn } diverges.
{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?

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 88, 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
98 2. Sequences and Series

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
Watch for a technical trick, too. will come in very handy; watch for it in the following proof.
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. 

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 88, says so); in other words, there exists M > 0
2.2. Working with Sequences 99

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 = 6 0


and bn 6= 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.

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 suggests additional “squeeze-like” properties of sequences.


Proposition 2.7 (More squeezing). Let {an } and {bn } be sequences and L a
number.
100 2. Sequences and Series

(a) an → 0 ⇐⇒ |an | → 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
Here one sequence is constant. reverse triangle inequality now gives our squeezing inequality:
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. 
Sequences to order. Sequences with specified properties can often be made to
order, as the following two (similar) samples suggest. We’ll call them lemmas
because the sequences involved here are often used in proofs of other results.
The German Hilfsatz, or (Lemmas are junior-grade theorems, normally used to prove something else.)
“helping sentence,” is more
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.
Proof: 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 similar, and left as
exercises. 
Lemma 2.9. Let C ⊆ R be any nonempty bounded set, with α = inf(C) and
β = sup(C). There exist sequences {an } and {bn } contained in C with an → α
and bn → β.
The {an } case is similar. Proof: Let’s find {bn }. For each n ∈ N we know β − 1/n is not an upper bound
for C, so there is some bn ∈ C with
1
β− ≤ bn ≤ β and so bn → β
n
by the “squeezing” principle, Theorem 2.6. Further details are in an exercise. 
2.2. Working with Sequences 101

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.10. 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.

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?


102 2. Sequences and Series

S OLUTION . In a word, yes. Observe first that sn ≥ hn for all n, so it is enough


If using unproved calculus to show that hn → ∞. One approach is to recall from elementary calculus that
results seems like cheating, see Z n
the exercises for another 1 1 1 1 dx
approach. hn = + + + · · · + > = ln n.
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 96: If an → a and c is any
constant, then can → ca. (Hint: The result is trivial if c = 0, so assume
c=6 0.)
2. Another part of Theorem 2.5, page 96, says that an /bn → a/b if b = 6 0 and
bn 6= 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|.
(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/|bn b| ≤ 1/(δ|b|) for all n .

3. Let {xn } be a sequence and L a number. Show that xn → L ⇐⇒ (xn −


L) → 0 ⇐⇒ |xn − L| → 0.
2.2. Working with Sequences 103

4. This problem is about Lemma 2.8, page 100.



(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. As in Lemma 2.9, page 100, let C ⊆ R be a nonempty set with α = inf(C).


Explain carefully how to construct a sequence {an } with an ∈ C for all n
and an → α.

6. Let C be the set of irrational numbers between 0 and 1. Describe the se-
quences {an } and {bn } mentioned in Lemma 2.9, page 100.

7. Let C ⊆ R be a bounded set, with sup(C) = β. Complete the details


following to show that there is a sequence {bn } ⊆ C with bn → β.

(a) Find such a sequence if C = [0, 1).


(b) Find such a sequence if C = {0, 1}.
(c) Explain why the claim is trivial if β ∈ C.
1
(d) Explain: For each n ∈ N we can choose some bn ∈ C with β − n <
bn ≤ β.
(e) Show: The sequence {bn } defined in the preceding part converges to
β. Hint: Squeeze.

8. Let S ⊆ R be a bounded set, with sup S = β. Show that there is a mono-


tone sequence {sn } ⊆ S with sn → β.

9. Consider the sequence {sn } in Example 3, page 97. Show by induction that
{sn } is strictly decreasing; i.e., show sn+1 < sn for all n ≥ 1.

1 1 1
10. Consider the sequence {sn } given by sn = + √ + · · · + √ . We
1 2 n
showed in Example 4, page 101, that {sn } diverges
√ to infinity. Give another
comparison proof, this time with the sequence { n}.

11. Consider again the sequence {hn } in Example 4, page 101. Observe that
1 1 1 1
h2n = hn + +···+ ≥ hn + n · = hn + . Use this idea to
n+1 2n 2n 2
prove (without calculus) that {hn } diverges to infinity.
104 2. Sequences and Series

12. The sequence {Sn } given by


1 1 1 1
Sn = + + 2 + ···+ 2
1 22 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.)

13. 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.)
√ √
14. Suppose an > 0 for all n and an√→ 3. Show that an → 3. (Hint:

Show first by algebra that | an − 3| < |an − 3|.)
15. 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
np o
(b) n2 + 1
np o
(c) n2 + n − n
 2 
n + arctan n
(d)
n+2
16. For any sequence {an } we can form a new sequence {bn } by the rule bn =
max{ |a1 | , |a2 | , . . . , |an |}. Show that bn converges if and only if {an } is
bounded.
2.2. Working with Sequences 105

17. Given any two sequences {an } and {bn }, we can construct a new sequence
{cn } with the rule cn = max{ an , bn }.

(a) Give an example (as simple as possible; there are many possibilities)
to show that {cn } may converge even if both {an } and {bn } diverge.
(b) Suppose {an } and {bn } converge to a and b respectively. Show that
{cn } converges, too. (Guess the limit first.)

18. A sequence {xn } is quasi-positive if ∃ N ∈ N such that ∀ n > N, xn > 0.

(a) Is the sequence xn = 2n − 50 quasi-positive?



(b) Is the sequence xn = (−1)n n + 100 quasi-positive?
(c) Suppose a > 0 and xn → a. Prove or disprove that {xn } is quasi-
positive.

19. It’s well known that the golden ratio, ϕ, satisfies ϕ ≈ 1.61803. Let x1 = 1
1
and xn+1 = 1 + .
xn
(a) Find (first as rational numbers and then as decimals) x1 through x8 .
What patterns do you see? Is this sequence monotone?
(b) Assume (it’s true) that {xn } converges to some number L. Explain
1
why L = 1 + . Then use the equation to find an exact formula for
L
L, involving a square root.

20. As every calculator knows, 3 ≈ 1.732051. Consider the sequence defined
xn + 3/xn
by x1 = 2 and xn+1 = for n ≥ 1.
2
(a) Find x2 , x3 , x4 by hand, as rational numbers. Then find decimal
approximate values.

(b) Show that if xn > 0, then xn+1 ≥√ 3. (It’s OK to use a little calculus
if you like.) Conclude that xn ≥ 3 for all n.
(c) Explain why xn+1 < xn for all n.
(d) We know now that xn → L for some number L. Which theorem(s)
say this?
L + 3/L
(e) We also know now that L = . Which theorems say this?
2
(f) What’s the exact value of L? Why?

x2n + 4
21. Suppose {xn } is defined by x1 = 3 and xn+1 = .
5
106 2. Sequences and Series

(a) Prove that {xn } is a decreasing sequence.


(b) It is clear that xn ≥ 0 for all n ∈ N. Use this fact and the result from
part (a) to prove that {xn } converges. (Hint: Your proof should be
quite short.)
(c) Find the limit L = lim xn .
n→∞

22. A sequence {xn } pseudo-diverges to ∞ if ∀M, N ∈ N there exists n >


N such that xn > M . Prove or disprove that {xn } = (−1)n n pseudo-
diverges to ∞.
23. Show that if {xn } is bounded, all yn 6= 0, and yn → ∞, then xn /yn → 0.

2.3 Subsequences
Basic Ideas
Any given sequence x1 , x2 , x3 , x4 , . . . has many, many subsequences. Here are
three examples:
x1 , x3 , x5 , x7 , . . . x1 , x4 , x9 , x16 , . . . x123 , x124 , x125 , . . .
Subsequences are formed by choosing—in order—any infinite subset of the orig-
inal sequence {xn }. The last example above could be called an upper tail sub-
sequence, 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.
2.3. Subsequences 107

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?

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 , . . . .


108 2. Sequences and Series

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.
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.11 (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 , a3 , a5 , a7 , . . . 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| < ǫ.


2.3. Subsequences 109

Now it turns out that N = max {2K1 , 2K2 } “works” for ǫ in the parent sequence.
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.12. 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.13. Every sequence has a monotone subsequence.

Proposition 2.13 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,
110 2. Sequences and Series

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, . . . .

It is hard to see much pattern there, but Proposition 2.13 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.13 through two technical lemmas
about special cases.
Lemma 2.14. 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.15. 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.14 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.14 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.13. Watch for the completeness axiom to
pop up, and for Lemma 2.15 to provide the key technical insight.
2.3. Subsequences 111

Proof (of Proposition 2.13): Let {xn } be our sequence. If {xn } is unbounded,
we’re done, by Lemma 2.14. 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.
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.15, 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.15, 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.16 (Bolzano–Weierstrass). Every bounded sequence {xn } has a con-


vergent subsequence.

Proof: By Proposition 2.13, {xn } has a monotone subsequence {xnk }, which is


also bounded because {xn } is. By Theorem 2.3, page 88, every monotone and
bounded sequence converges. 

Exercises
1. 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 ∞.
112 2. Sequences and Series

(e) A sequence of positive integers with subsequences that converges to


every positive integer.

2. 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?

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 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.

5. Consider the subsequence x4242 , x4243 , x4244 , . . . formed from a parent se-
quence x1 , x2 , x3 , . . . . If the subsequence converges to L, then so does the
parent sequence.

6. Suppose xn → ∞. Then every subsequence {xnk } diverges to ∞, too.

7. Following are several statements about a sequence {an }. They belong in


two groups. What are the groups?

(a) {an } converges to 3


(b) a subsequence of {an } converges to 3
2.3. Subsequences 113

(c) ∀ǫ > 0 only finitely many an are not in (3 − ǫ, 3 + ǫ)


(d) ∀ǫ > 0, infinitely many of the an are in (3 − ǫ, 3 + ǫ)
(e) ∀ǫ > 0 ∃N ∈ N such that n > N =⇒ |an − 3| < ǫ
(f) ∀ǫ > 0 ∃N ∈ N such that aN +1 , aN +2 , aN +3 , . . . are all in (3 −
ǫ, 3 + ǫ)
n
8. Consider the sequence {xn } defined by xn = (−1)n n+1 .

(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.

9. Let {xn } be a sequence that does not converge to 3.

(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.

10. 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 .)
11. This problem is about Theorem 2.12, page 109.

(a) Prove Theorem 2.12(b).


(b) State the contrapositive of Theorem 2.12(a). How is this related to
Theorem 2.12(c)?

12. Let {xn } be a sequence and x0 a number. Show that xn → x0 if and only
if xnk → x0 for every monotone subsequence {xnk }.
13. The sequence {xn } given by xn = 1/n converges, relatively slowly, to
L = 0. Find a subsequence {xnk } that converges rapidly to 0 in the sense
that |xnk − L| < 1/10k for all k.
14. Show that for any sequence {xn } with xn → L, there’s a subsequence
{xnk } for which |xnk − L| < 1/10k for all k.
15. Given any two sequences {an } and {bn }, we can construct a new sequence
{zn } by “zipping” {an } and {bn } together: {zn } is the new sequence
a1 , b1 , a2 , b2 , . . . , a42 , b42 , . . . . Show that {zn } converges to L if and
only if both {an } and {bn } converge to L.
114 2. Sequences and Series

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.

Cauchy Basics
The formal definition describes precisely what we mean by “close to each other
for large n.”
Definition 2.17. 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 .
2.4. Cauchy Sequences 115

• 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 ,
then Notice where we use n > m.
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. ♦

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:

s2 < s4 < s6 < s8 < · · · < s7 < 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. ♦
116 2. Sequences and Series

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.18. 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| <
Why is it OK to use ǫ/2, not ǫ? ǫ/2 whenever n > N . This N works in the Cauchy sequence definition, because
if n > m > N , then
ǫ ǫ
|xn − xm | ≤ |xn − L| + |xm − L| < + = ǫ;
2 2
we used the triangle inequality in the first step. 

Proposition 2.19. 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. 

Combining Proposition 2.19 with the Bolzano–Weierstrass theorem lets us prove


Watch for another ǫ/2 trick. our main theoretical result.
Theorem 2.20. A sequence {xn } converges if and only if {xn } is Cauchy.

Proof: Proposition 2.18 is the “only if” part. To prove the “if” part, suppose that
{xn } is Cauchy. Proposition 2.19 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 .


2.4. Cauchy Sequences 117

Because {xnk } converges to L, we can choose a member of the subsequence, say


xN , with N > N1 and |xN − L| < ǫ/2. Now this N works in the definition of Infinitely many possible xN
convergence of {xn } to L, because if n ≥ N , then exist; any one will do.

ǫ ǫ
|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


happened on one try: Some decimals are rounded.

−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.20. 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

1 1 1
|an − am | = ± m ± m+1 ± · · · ± n−1

2 2 2
1 1 1
≤ m + m+1 + · · · + n−1
2 2
 2 
1 1 1 1 1
= m−1 + + · · · + n−m < m−1 .
2 2 22 2 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. ♦
118 2. Sequences and Series

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)
As we’ll do later. unambiguously.
Another C-word—completeness—is at the heart of Theorem 2.20. 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.13, page 109, for example.) Indeed, completeness is sometimes defined not
in terms of the supremum (as was done earlier; see page 74) 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 .
n
(c) {zn }, where zn = n+1 .
sin n
(d) {wn }, where wn = n2 +1 .

2. Let {xn } and {yn } be Cauchy sequences. Use Definition 2.17 to show that
{xn + yn } is Cauchy, too.

3. Let {xn } be a Cauchy sequence such that x1 = 0 = x10 = x100 = x1000 =


. . . . Use Definition 2.17 (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? (Hint: See Problem 4.)
2.4. Cauchy Sequences 119

(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 117.
(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 sequence {π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 the product sequence {xn yn } is Cauchy, too.
(a) Use Theorem 2.20, page 116, and any other already-proved results to
explain why the fact holds.
(b) (Harder.) Prove the same fact without using Theorem 2.20, page 116.
(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.19) to
complete the proof.)
11. Let {an } be a sequence for which successive terms are “very close” in the
sense that |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?
120 2. Sequences and Series

12. In each part, either give an example of the given type or say briefly (per-
haps by citing an appropriate theorem) why no such example can exist. To
describe a sequence {an }, either give a formula for an or just write enough
terms to make the pattern clear.
(a) a sequence {an } that is not monotone but diverges to ∞
n a o
n
(b) a divergent sequence {an } such that converges
1717
(c) two divergent sequences {an } and {bn } such that {an + bn } con-
verges to 17
(d) two convergent sequences {an } and {bn } such that such that {an /bn }
diverges
(e) a sequence with no convergent subsequence
(f) a Cauchy sequence with an unbounded subsequence

2.5 Series 101: Basic Ideas


An infinite series is a sum with infinitely many summands, or terms:

X
ak = a1 + a2 + a3 + . . . .
k=1

Here are two important examples, each of which we will revisit:


∞ ∞
X 1 1 1 X 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
P kin to sequences—about which we
already know a lot. Indeed, every series ak corresponds in a natural way to
We’ll define it in a moment. a certain sequence {An } whose properties tell us “everything” about the series.
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.
P∞
Definition 2.21. 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 , ....
Pn
In general, An = k=1 ak .
2.5. Series 101: Basic Ideas 121

E XAMPLE 1. Describe the partial sum sequences for the two series illustrated
above. Do they have limits?

S OLUTION . The series


∞ ∞
X X 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
multiple. Here we have Much more about geometric
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 = = 2 − n−1 .
2n−1 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
∞ ∞
X X 1 1 1 1
hk = = 1 + + + + ...
k 2 3 4
k=1 k=1

is the famous harmonic series. Here are the first few partial sums Hn , also known More soon about this, too.
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
No pattern seems obvious, so let’s try some numerical experiments: Thanks, technology; values are
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
{Hn } bounded, and therefore convergent, or do the harmonic numbers diverge to By Theorem 2.3 page 88
infinity?
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. ♦
122 2. Sequences and Series

Series: The Basics


Our systematic discussion starts, as usual, with a formal definition.
P∞
Definition 2.22. Let k=1 ak be a series of numbers, and {An } its P sequence

of partial sums. If {An } convergesP∞ to a finite limit A, thenP∞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
Convince yourself by writing out expressions mean exactly the same thing:
some terms.
∞ ∞ 103 ∞ ∞ ∞
X 1 X 1 X 1 X 1 X 1 X 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 P won’t causePtrouble. 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, observe that the equation

X n
X
ak = lim ak = A
n→∞
k=1 k=1
P
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
Efficiency isn’t everything. bit, so we might write, instead,

a1 + a2 + a3 + · · · = lim (a1 + a2 + a3 + · · · + an ) = A.
n→∞

P∞ 1
E XAMPLE 2. Does the series k=1 1/(k 2 + k) = 2 + 61 + . . . converge? If so,
to what limit?

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 directly on partial


sums can be difficult, as we’ve said. Things are simpler for a nonnegative series
2.5. Series 101: Basic Ideas 123

P
ak : one for which ak ≥ 0 for all k. In this case the partial sum sequence
{A1 , A2 , A3 , . . . } is increasing:

a1 ≤ a1 + a2 ≤ a1 + a2 + a3 ≤ a1 + a2 + a3 + a4 ≤ . . . .

By Theorem 2.3, page 88, 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 96. Proofs of the following theorem, too, follow
easily from those for sequences.
P P
Theorem 2.23 (Algebra with convergent series). Let an and bn be con-
vergent sequences, with respective sums A and B.
P
• Sums and differences: (an ± bn ) converges to A ± B; equivalently,
X X X
(an ± bn ) = an ± bn .

P
• Constant multiples: can converges to cA; equivalently,
X X
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 ), . . . ,

or, equivalently, as
cA1 , cA2 , cA3 , . . . , cAn , . . . ,
P
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. 
124 2. Sequences and Series

E XAMPLE 3. Does the series


∞  
X 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—discussedP in Example 1. In Pfact, every such
sum
P diverges. To see why, suppose that a n converges and bn diverges. If
(an + bn ) were convergent, then, by Theorem 2.23, the series
X X
bn = ( (an + bn ) − an )

would also converge, against our assumption. ♦

Detecting Convergence and Divergence


Theorem 2.23 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.
P∞
Proposition 2.24 (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:


P
if {an } does not converge to zero, then an diverges.
The converse,
P
if an → 0 then an converges,
Don’t give in. (The harmonic P
series is one counterexample.) is tempting but false: a series an may diverge even if an → 0.
Watch the difference Proof: Observe first that, for all n > 1,
“telescope.”
An − An−1 = (a1 + · · · + an−1 + an ) − (a1 + · · · + an−1 ) = an .
P
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. 
2.5. Series 101: Basic Ideas 125

Geometric series: the nicest examples. Proposition 2.24 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

X
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:
∞ ∞
X 1 1 1 1 X
=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
P∞ terms have common ratio r = 1.1, and so the standard geometric
that successive
template k=1 3 × 1.1k−1 fits the pattern.
Geometric series satisfy a useful algebraic equation: It’s readily proved by induction.

1 − rn
a + ar + ar2 + ar3 + · · · + arn−1 = a (∗)
1−r
holds if r 6= 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.
6 0.
Proposition 2.25. Let a and r be any real constants, with a =
P∞ a
(a) If |r| < 1, then k=1 a rk−1 converges to 1−r .
P∞
(b) If |r| ≥ 1, then a rk−1 diverges.
k=1
P∞
We can infer, for instance,
P∞ that k=1 0.5k−1 converges to 2—as we proved in
Example 1. By contrast, k=1 3 × 1.1k−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,
6 ±1 we have
and Equation (∗) above tells almost the whole story. If r =
n
X 1 − rn
a rk−1 = a .
1−r
k=1
126 2. Sequences and Series

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.25 and Theorem 2.23 justify calculations like the
Watch the tricky index change following:
from k to j.
∞ ∞ ∞ ∞  j−1 ∞  j−1
X 3k + 4k X 3k X 4k X 3 X 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 X k−1 1 1
=π+e+ (−1/2) =π+e+ ≈ 6.082.
3 3 1 + 1/2
k=1

Numerical experiments support these results. According to Mathematica,


50 50
X 3k + 4k 1X k−1
≈ 7.4993; π+e+ (−1/2) ≈ 6.0821. ♦
5k 3
k=0 k=1

Comparison and comparison testing. Compare these two series:



X 1 1 1 1 1 1
= + + + + + ...;
2k−1 1 2 4 8 16
k=1

X 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?
2.5. Series 101: Basic Ideas 127

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.
P P
Theorem 2.26 (Comparison test). Let ak and bk be series, with 0 ≤ ak ≤
bk for all k.
P P
(a) If bk converges to a number B, then ak converges to a number A,
with A ≤ B.
P P
(b) If ak diverges, then bk diverges, too.
P P
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?
∞ ∞ ∞
X 2k − 1 X 1 X sin k
(a) (b) (c)
3k 2k − 1 2k
k=1 k=1 k=1

S OLUTION . Series (a) converges by comparison to a convergent geometric se-


ries:
2k − 1 2k
<
3k 3k
holds for all k ≥ 1, and so
∞ ∞
X 2k − 1 X 2k
< = 2.
3k 3k
k=1 k=1
128 2. Sequences and Series

We can evaluate (a) exactly if we recognize it as the difference of two convergent


geometric series:
∞ ∞ ∞
X 2k − 1 X 2k X 1 1
= − =2− .
3k 3k 3k 2
k=1 k=1 k=1

Series (b) sums the reciprocals of odd integers:



X 1 1 1 1 1
= + + + + ....
2k − 1 1 3 5 7
k=1

The harmonic series 11 + 12 + 31 +. . . comes to mind, but term-by-term comparison


goes the wrong way. A better strategy is to multiply the harmonic series by 1/2:

X 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. P
For series (c), comparison with ∞ k
k=1 1/2 is tempting, but some terms of (c)
may be negative, and so Theorem 2.26 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
It’s a triangle inequality, but for Series (c) from Example 5 stumped us. The next theorem comes just in time.
infinitely many summands. P P
Theorem 2.27. If |ak | converges then ak converges too, and

X∞ X∞

an ≤ |an | .

k=1 k=1

Let’s polish off series (c) from Example 5 before proving this. Clearly,

|sin k| 1
< k
2k 2
for all k, and so Theorem 2.26 guarantees that the left-hand series converges,
to some positive limit less than one. Theorem 2.27, in turn, says that series (c)
We don’t know exactly where. converges too, to a limit somewhere in the interval (−1, 1).
2.5. Series 101: Basic Ideas 129

P P
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
then invoke Theorem 2.20, page P116. We worked hard to prove the
Observe first that, because |an | converges, its partial sum sequence theorem; here comes the
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 },
because if n > m > N , then Watch for the (finite) triangle
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


X X

ak = lim |An | ≤ lim Cn = |ak | .
n→∞ n→∞

This finishes the proof.


P P
Conditional convergence. A series ak for which |ak | converges is called
absolutely convergent. Theorem 2.27 says that every absolutely convergent series
is
Palso convergent in the ordinary
P sense. The converse, however, is false: A series
ak may converge while |ak | diverges. A series with this property is called
conditionally convergent.

E XAMPLE 6. The alternating harmonic series The signs alternate.


X 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?


130 2. Sequences and Series

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.

X
(a) 0 = 0 + 0 + 0 + ...
k=1
X∞
(b) 42 = 42 + 42 + 42 + . . .
k=1
X∞
(c) (−1)k = −1 + 1 − 1 + . . .
k=1
X∞
(d) k = 1 + 2 + 3 + ...
k=1
2.5. Series 101: Basic Ideas 131


X
(e) 0.99k−1
k=1

X 1
(f) (Hint: First guess a formula for Sn and prove it by
k2
+k
k=1
induction.)
P
2. For a certain series an , we know that An = a1 +a2 +· · ·+an = 4+1/n
for all n ∈ N.
P
(a) Does the series an converge? If so, to what limit? How do you
know?
(b) Does the sequence {an } converge? If so, to what limit? How do you
know?
P
(c) Does the series An converge? If so, to what limit? How do you
know?
(d) Note that a1 = A1 = 5. Find a2 and a3 .
(e) Find a formula in terms of n for an .

3. This problem is about partial sums Hn of the harmonic series (see Exam-
ple 1, page 121).

(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
n
Deduce that H2n > 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 } were
convergent, then the subsequence {H2n } would have to converge,
too.)
(c) Yet another proof that Hn converges follows from the inequality Hn >
ln n for all positive integers n and the fact that ln n → ∞. Without a
formal definition of ln n we can’t prove this rigorously. Instead, draw
a picture illustrating that Hn > ln n; view ln n as the area under the
graph y = 1/x from x = 1 to x = n.
132 2. Sequences and Series

4. Decide whether each of the following series converges or diverges. The


comparison test will be useful in some parts.

X 1
(a)
k + 2k
k=1

X k
(b)
2k 2 − 1
k=1

X k
(c) (Hint: Compare to a geometric series.)
3k
k=1

X k2 + 2
(d)
3k 2 + 4
k=1

5. Decide whether each of the following series converges or diverges. Do any


converge conditionally?

X (−1)k
(a)
3k 2 + 1
k=1

X k2 − 1
(b)
k4 + 1
k=1

X sin(k)
(c)
3k
k=1

X 1
(d)
2 + sin(k)
k=1

6. A telescoping series is one for which the partial sums Sn “collapse” to


some shorter, simpler form.
P
(a) For the series ∞ 1 1
k=1 ( k − k+1 ), write out (by hand) S2 and S5 . Do you
see the “telescoping” behavior? Find a formula
P∞ for Sn and deduce the
limit. (Note: This series, rewritten as k=1 1/(k 2 + k), appears in
an earlier problem.)
P∞
(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 .)
P
(c) For the series ∞ 1 1
k=1 ( k − k+10 ), 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.)
2.5. Series 101: Basic Ideas 133

7. Prove the claim about sums and differences in Theorem 2.23, page 123.
(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.)
8. This problem ties up some loose ends concerningP
Proposition 2.25, page 125,
which addresses convergence and divergence of ∞ k=1 a r
k−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.25 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.
6 0 and rn → L, then L = 0. (Hint: Use the two preceding
(iii) If r =
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.)

9. This problem is about the alternating harmonic series. See Example 6,


page 129, 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.)
(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.

10. This problem


P explores implications of Theorem
P 2.23, page 123. Through-
out, let ck be a convergent series and let dk be a divergent series.
P
(a) Use Theorem 2.23 to show that dk /10 diverges.
P
(b) Can ck dk converge? Can it diverge? Give examples or proofs as
needed.
P
(c) Let A be a constant. Can Ack diverge? Give a proof or counterex-
ample.
134 2. Sequences and Series

(d) Is it possible that dk ≤ ck for all k? If so, give an example. If not,


why not?
P∞ P∞
11. Let k=1 ak and k=1 bk be two series, and suppose that ak = bk when-
ever k > 42.
P P
(a) Show that ak converges if and only if bk converges.
P∞ 2
P∞that k=1 ak = 100 and that bk = ak + k for 1 ≤ k ≤ 42.
(b) Suppose
Find k=1 bk .
P P
12. Let Pak be a series with positive terms. Show thatPif ak P
converges,
then a2k converges, too. (Hint: Compare the series ak and a2k .)
13. 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 6= 1 and a any real number.
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.

Meet the family: p-series. A p-series has the form



X 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

X 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:
P∞
Proposition 2.28. The p-series k=1 k1p converges if p > 1 and diverges if p ≤ 1.
2.6. Series 102: Testing for Convergence and Estimating Limits 135

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 + . . . + 1.3
|2 {z 3 4
} | {z 7 8
} | {z 15 } | 16 {z 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 {z 2 } |4 {z 4 } |8 {z 8 } |16 {z 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
Here comes the punchline: The last quantity can be rewritten in geometric form:
1 1 1 1
S31 < 1 + 0.3 + 0.3 + 0.3 + 0.3
2 4 8 16
 2  3  4
1 1 1 1
= 1 + 0.3 + + +
2 20.3 20.3 20.3
∞  k−1 ∞
X 1 X 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


S31 , and (by the same argument) all partial sums S2n −1 , are bounded above by Mathematica says S1000 ≈ 3.51
the sum—about 5.326—of a convergent geometric series. This completes the and S2000 ≈ 3.59; the numerical
evidence is reassuring but only
proof for p = 1.3; other exponents p > 1 can be handled similarly. anecdotal.

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.
136 2. Sequences and Series

Limit comparison test. The ordinary comparison test (Theorem 2.26, page 127)
is simple and powerful, but can be hard to apply. The limit comparison test can
simplify the work.
P P
Theorem 2.29 (Limit comparison test). Consider two series ak and bk with
positive terms, and suppose that {ak /bk } converges to a finite limit L.
P P
(a) If bk converges, then ak converges, too.
P P
(b) If L 6= 0, then either both ak and bk converge or both diverge.

Before proving the theorem, let’s try it out.

P∞
E XAMPLE 1. We showed in Example 2, page 122, that the series k=1 bk =
P ∞ 2
k=1 1/(k + k) converges, with sum 1. Use limit comparison to deduce that
some other series converge.

P P
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
P
which implies (again) that 1/k 2 converges.
Similar arguments apply to uglier series. If, say,
∞ ∞
X X k 2 + 7k − 3 sin k
ak = ,
2k 4 − k
k=1 k=1

powers of k in the numerator and denominator suggests limit com-


then a look atP
Note the algebra with sequence parison with 1/k 2 . The strategy turns out to work:
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 = .
k→∞ 2 − 1/k 3 2

Because the limit is finite, the ugly series converges. ♦

We’ll prove Theorem 2.29 using two auxiliary facts, each of interest in its own
right.
2.6. Series 102: Testing for Convergence and Estimating Limits 137

ak = bk for all k > N , where N is any constant.


Proposition 2.30.PSuppose P
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. 
P
Proposition 2.31 (Bounded comparison test). Consider two series
P ak and
bk with positive terms, and suppose that the sequence {ak /bk } is bounded
above.
P P
(a) If bk converges, then ak converges, too.
P P
(b) If ak diverges, then bk diverges, too.

Proof: The hypothesis means P number M , we have ak <


P that, for some positive
M bk for all k. Now if P bk converges, then M bk also converges. By the The second series is a constant
(ordinary) comparison test, ak must also converge, as claimed in (a). Part (b) multiple of the first.
is the contrapositive of (a). 

The limit comparison test is a special case of Proposition 2.31, so the proof is
easy.
Proof (of Theorem 2.29): Because {ak /bk } converges, it is also bounded above,
and so Proposition 2.31 implies part (a).
Now suppose, as in (b), that L 6= 0. P In this case {bk /aP
k } converges to 1/L,
and we can apply (a) to conclude that if ak converges, bk must do so, too. Sorting out the a’s and b’s is a
This establishes the claim in (b) about convergence; the statement about diver- little confusing . . . but it all works
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.
138 2. Sequences and Series

P
Theorem 2.32 (Ratio test). Consider a series ak with positive terms, and sup-
pose that the sequence {ak+1 /ak } converges to a finite limit L.
P
(a) If L < 1 then ak converges.
P
(b) If L > 1 then ak diverges.
P
(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 X 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.
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
The ratio test wasn’t the right harmonic series diverges. ♦
tool for this job.
Proof (of the ratio test): We prove (a) and leave (b) and (c) to the exercises. Given
Plenty of choices exist. L < 1, as in (a), choose any real number r with L < r < 1. Then the geometric
series 1 + r + r2 + . . . converges,
P and we’ll use “bounded comparison” (Propo-
sition 2.31) 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.31, we’ll show that the sequence
The remaining terms, with k ≤ {ak /rk } is bounded. To do this it is enough to assume k > N . In this case,
N, form a finite set.
2.6. Series 102: Testing for Convergence and Estimating Limits 139

we can write (here comes the algebraic trick)


ak ak ak−1 ak−2 aN −1 aN
k
= ...
r ak−1 ak−2 ak−3 aN r k
aN rk−N aN aN
< |r · r · {z
r · . . . r} · k = k
= N.
r r 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

X sin k sin 1 sin 2 sin 3 sin 4
= + + + + ...
2k 1 4 8 16
k=1

and

X (−1)k−1 1 1 1 1 1
√ = √ − √ + √ − √ + √ − ...,
k=1
k 1 2 3 4 5
which have both positive and negative terms. What
P can wePdo?
We’ve already seen one work-around: test |ak |, not ak , for convergence.
Theorem 2.27, page 128, guarantees that if the former converges, so does the
latter. Indeed, we already used this method (Example 5, page 127) to show that
the first series converges.
This approach fails for the second series, however, because

(−1)k−1
= √1 + √1 + √1 + . . . ,
X

k 1 2 3
k=1

which diverges. WeP needk−1another


√ strategy. It’s a p-series with p = 1/2.

P The series (−1) / k resembles the alternating harmonic series


(−1)k−1 /k, which we’ve shown to converge. (See Example 6, page 129.)
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
P terms alternate in sign. It is convenient to write such a series in
the form ∞ k=1 (−1) k−1
ak = a1 − a2 + a3 − . . . , where ak ≥ 0 for all k. A series that starts with a1 + a 2
P∞ – . . . needs a tiny change in
Theorem 2.33 (Alternating series test). Let k=1 (−1)k−1 ak be an alternating notation, but no new 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 .
140 2. Sequences and Series

P∞ k−1

E XAMPLE 3. Finish off the series k=1 (−1) / 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 . ♦

Proof (of Theorem 2.33): The proof depends on a pleasing pattern among the par-
tial sums:
S2 ≤ S4 ≤ S6 ≤ S8 ≤ · · · ≤ S7 ≤ 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
Start small. See, e.g., why oneself.
S 5 ≥ S 8. In particular, the odd-index subsequence S1 , S3 , S5 , . . . is decreasing and
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 inequal-
ity:
S2 ≤ 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.
2.6. Series 102: Testing for Convergence and Estimating Limits 141

E XAMPLE 4. We used the ratio test in Example 2 to show that the series

X 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 X 1
+ + + ··· = ,
11! 12! 13! k!
k=11

contribute, at most?
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. ♦
P
Bounding the tail: lessons from Example 4. For any convergent series ak
and any partial sum Sn we can write

X
ak = (a1 + a2 + · · · + an ) + (an+1 + an+2 + . . . ) = Sn + Rn ,
k=1
P∞
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.
142 2. Sequences and Series

E XAMPLE 5. An alternating version of the series in Example 4 looks like this:


X (−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.27, page 128. 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
1 1 1 1 1 1 1
series. |R10 | = − + − + . . . ≤ + + + ··· < 9.
11! 12! 13! 11! 12! 13! 2
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.33, 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. (Similar series appeared in exercises for the
preceding section; now we know more techniques.)

X 1
(a)
2k −1
k=1

X k
(b)
2k 2 − 1
k=1

X k
(c)
3k
k=1

X k2 + 2
(d)
3k 2 − 2
k=1

2. Use methods of this section, where possible, to decide whether each of the
following series converges or diverges. Do any converge conditionally?
(Similar series appeared in exercises for the preceding section. With new
techniques we can handle some more efficiently.)
2.6. Series 102: Testing for Convergence and Estimating Limits 143


X (−1)k
(a)
3k 2 + 1
k=1

X k2 + k
(b)
k4
k=1

X sin(k)
(c)
3k − 1
k=1

X 1
(d)
2 + sin(k)
k=1

3. Decide whether each of the following series converges or diverges; use the
ratio test.

X 2k
(a)
3k 2
k=1

X k2
(b)
1.3k
k=1

X 2k + k
(c)
3k
k=1

4. Each series following involves a constant a ≥ 0. Decide for each series


following which values of a give a convergent series. (The ratio test will be
useful.)

X
(a) ak
k=1

X a
(b)
1.3k
k=1

X ak
(c)
1.3k
k=1
X∞
(d) ak 2 k
k=1

X 1
(e)
ak 2
k=1

5. For which values of x does each of the following series converge abso-
lutely? (Series like this are called power series.)
144 2. Sequences and Series


X
(a) xk
k=0
X∞
(b) kxk−1
k=1

X xk
(c)
k
k=1
X∞
(d) k!xk
k=0

6. Prove or disprove that each of the following series converges.



X 100k
(a)
k!
k=1

X sin k
(b)
1.0001k
k=1

X k2 + k + 1
(c)
k3 + k2 + k + 1
k=1

X (−1)k
(d)
ln ln(k + 100)
k=1

7. In both parts, assume ak > 0 for all k.


P P 2
(a) Give examples to show that if ak diverges, then ak may either
converge or diverge.
P P 2
(b) Show that if ak converges, then ak converges, too. (Hint: Use
limit comparison.)
P
8. In the situation and notation of Theorem
P 2.29, page 136, show that if bk
diverges and ak /bk → ∞, then ak diverges, too. (Hint: If ak /bk → ∞,
then bk /ak → 0.)
9. (This generalizes Problem 11, page 134.) Complete and prove
Pthe following
P
version of Proposition 2.30, pageP
137: Consider two series
P ak and bk
such that ak = bk for k > NP. If bk diverges, then ak diverges, too. If
P
bk converges to B, then ak converges to .
P
10. In Example 2, page 138, we used the ratio test to show that ∞ k=0 1/k!
converges. Prove the same thing using the comparison or limit comparison
test.
2.6. Series 102: Testing for Convergence and Estimating Limits 145

P∞
11. Let {Sn } be the partial sum sequence for the series k=1 √1 . Show that
√ k
Sn > n for all n; conclude that the series diverges.
P
12. In our proof sketch for Proposition 2.28, page 134, we
Pshowed 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.)
P∞
13. Consider the series k=1 1/(2k−1 + 1), which converges to some limit S.

(a) Explain why the series converges.


(b) Mathematica approximates the tenth partial sum: 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.
P∞
14. 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 limit S? Why?
P∞
15. For any p-series k=1 k1p with p > 0, it can be shown that all upper tails
satisfy
∞ Z ∞
X 1 dx
Rn = < .
kp n xp
k=n+1

(a) Draw a picture to illustrate this inequality. (Leaf through any standard
calculus text, if necessary.)
P∞
(b) Estimate k=1 k13 with error less than 0.001. (Technology will be
helpful.)

16. Does each of the following series converge absolutely, converge condition-
ally, or diverge? Prove your answers. (It’s OK to assume basic facts about
geometric series, p-series, etc.)
∞  
X 1 1
(a) −
k k+3
k=1

X cos k
(b)
2k + 2k + 2
k=1
146 2. Sequences and Series


X 81
(c) (−1)k
347k
k=1

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
Results of this section are not known as the upper limit and the lower limit, respectively).
needed in later sections of the
book. Defining the lim sup. Given any bounded sequence {xn }, we can define the new
We will discuss unbounded sequence {vn }
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?
2.7. Lim sup and lim inf: A Guided Discovery 147

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.34. 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.
148 2. Sequences and Series

Proof: Claim (a) is essentially Lemma 2.14, page 110.


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.
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, 5), 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”—if the function f is continuous every-
where 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- The IV theorem says that the
ness, suprema and infima, limits, the Bolzano–Weierstrass theorem, and more. range of a continuous function
has no “gaps”; details come
Our work starts, as usual, with clear definitions of words like “limit” (as applied later.
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| < δ.

149
150 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 =6 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 2
3x − 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?


3.1. Limits of Functions 151

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,


152 3. Limits and Continuity

which is clearly absurd. ♦


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 about another continuous function g 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 6= 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.
3.1. Limits of Functions 153

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 .
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 96, which allows
algebraic combinations like the following for limits of sequences: No worries here about zero
denominators.
3x2n + 5xn + 2 2
3(lim xn ) + 5(lim xn ) + 2
lim =
n→∞ 2xn − 7 2(lim xn ) − 7
3 · 52 + 5 · 5 + 2 102
= = ,
2·5−7 3
as claimed. ♦
154 3. Limits and Continuity

New function limits from old. The following theorem does for functions what
Theorem 2.5, page 96, 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 = 6 0.
if M =
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-
6 0.
sures us that all is well if M =
• 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
x+2 5+2
317x2 − 5 x+3 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 96) 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. 
3.1. Limits of Functions 155

Squeezing functions. A squeeze principle works for function limits. We’ve al-
ready proved the sequence version (Theorem 2.6, page 99):
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 6= 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 = 6 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 Flavors


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.
156 3. Limits and Continuity

Definition 3.5 (Variant limits). Let f be a function and let a and L be real num-
bers.
• 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 limit claims:


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
3.1. Limits of Functions 157

Example 2, page 85, and the function version is almost the same. First, we see
that for any positive ǫ,

3x + 2 3x + 2 − 3(x + 5)
= 13 .
x + 5 − 3 =

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 = ǫ,


x+5 − 3 x+5 M
as desired. Limit (a) is left to you.
For (c), only positive x matter, and so

2x
= 2x√ < 2x < ǫ ǫ


1 + x√ − 0 1+ x ⇐⇒ x< .
2
Thus, for given ǫ > 0 the value δ = ǫ/2 works: if 0 < x < δ, then

2x

1 + x − 0 =< 2x < 2δ = ǫ,

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.
158 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. ♦
3.1. Limits of Functions 159

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 p
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:
√  √ 
p x2 + 2x − x x2 + 2x + x
x2 + 2x − x = √
x2 + 2x + x
2x 2
= √ = p .
2
x + 2x + x 1 + 2/x + 1

√and denominator by x in the last equality.) This


(We divided numerator pis 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. ♦
160 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.

6 0 and f (0) = 42. Show that limx→0 f (x) = 0.


2. Suppose f (x) = 0 if x =
What’s limx→42 f (x)?

3. Guess a value for each of the following limits; prove your answers using
Definition 3.1, page 149.

(a) lim 2x + 3
x→1

x2 − 1
(b) lim
x→−1 x + 1

4. Guess a value for each of the following limits; prove your answers using
Definition 3.1, page 149.

x2 + x − 2
(a) lim
x→1 x−1
2 + sin x
(b) lim x
x→0 3 − cos x
5. 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).
In each case following, decide whether this happens. If so, prove it; if not,
say why not. (Theorem 3.3, page 154, 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
6. See directions in Problem 5. (At a domain endpoint, use the appropriate
one-sided limit.)

(a) f (x) = x, a = 0 .
3.1. Limits of Functions 161

(b) f (x) = |x|; a = 0.


(c) f (x) = 1 + πx + ex2 + πex3 ; a = any constant.

7. Prove Proposition 3.4. (One way is to use Theorem 2.6, page 99, and
Lemma 3.2.)
8. Show that (ii) implies (i) in Lemma 3.2.
9. 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.

10. 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.
p
We claimed in Example 9 that 1 + 2/x → 1 (or, equivalently, that
(c) p
1 + 2/x − 1 → 0) as x p→ ∞. Deduce this by showing that the
squeezing inequality 0 < 1 + 2/x − 1 < 2/x holds for all x > 0.
11. Use a computer plotting utility in this problem, which explores the graphi-
cal interpretation of Definition 3.1, page 149. 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 δ.
(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.
162 3. Limits and Continuity

12. Suppose that f (x) = 0 if x = 6 0 and f (0) = 42. Explain carefully why
limx→a f (x) = 0 for all real numbers a.
13. 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.
14. 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?
15. 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.
16. Explain why the function g in Example 8, page 158, satisfies the squeez-
ing inequality −|2x| ≤ g(x) ≤ |2x|. Use this to give another proof that
limx→0 g(x) = 0.
17. 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?)

3.2 Continuous Functions


In everyday use the word “continuous” means something like “unbroken” or
“without gaps.” In elementary calculus, for instance, a continuous function 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. Pen-
Even sharp ones. cils 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| < δ.
3.2. Continuous Functions 163

Otherwise, f is discontinuous at x = a.

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.
• Continuity along sequences: Continuous functions play well with sequences.
If f is a function and {xn } a sequence, both defined on an interval I with
a ∈ I, and f is continuous at x = a, then

xn → a =⇒ f (xn ) → f (a).

This fact should sound reasonable in light of the “no surprises” property
just discussed. A formal proof can be based on Lemma 3.2, page 152.

Let’s see some examples and non-examples.

x2 − 4x − 5
E XAMPLE 1. Where is the function f (x) = continuous? Can any
x2 − 25
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
164 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.

Summarized in Theorem 3.3, Thanks to algebraic properties of limits the answer is yes—except perhaps at
page 154. a = ±5, where the denominator vanishes. So f is continuous at all a =6 ±5.
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 6= ±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
might appear at x = 5, 3/5, but that the discontinuity at a = −5 is there to stay. A look at the graph of f
depending on the technology. suggests the same conclusion. ♦

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
6 0, because (as the graph also suggests) limx→a sign(x) = ±1 = sign(a).
a =
Formal proofs are straightforward; see the exercises.
3.2. Continuous Functions 165

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 =6 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
rn ∈ Q and pn ∈ / Q for all n. Then we have Such sequences do exist.

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 definition
√ apply. Still, it seems reasonable to call f continuous at 0, because f (x) =
can’t
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. ♦
166 3. Limits and Continuity

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.

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.
3.2. Continuous Functions 167

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.

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) 6= 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 154) 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.

In other words, a and b are not


domain endpoints.
168 3. Limits and Continuity

let ǫ > 0 be given. Since f is continuous at b, there exists δ1 > 0 such that

|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))| < ǫ,

We will explore another proof, as desired. 


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.

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.
3.2. Continuous Functions 169

Exercises
1. It’s no surprise that the identity function f (x) = x is continuous at every
domain point x = a. Show this carefully using Definition 3.7, page 162.

2. It’s no surprise that the constant function f (x) = 42 is continuous at every


domain point x = a. Show this carefully using Definition 3.7, page 162.

3. This problem explores the ǫ–δ definition of continuity for the function
f (x) = 345x + 678.

(a) Let a = 3 in the notation of Definition 3.7, page 162, and set ǫ =
0.001. Find a value of δ, as large as possible, that works with this ǫ.
(b) Let a = 3, as above, and fix any ǫ > 0. Find a value of δ, as large
as possible, that works with this ǫ. Conclude that f is continuous at
x = 3.
(c) Let a be any number and ǫ > 0 any positive number. Find a value
of δ that works in this situation. Conclude that f is continuous at all
points a ∈ R.

4. This problem explores roles of ǫ and δ in Definition 3.1, page 149.

(a) If a = 3 and f (x) = x2 , then (assume this—it’s true) lim f (x) = 9.


x→3
Let ǫ = 1. Explain carefully why δ = 0.16 works in the definition.
(Hint: Look at the domain interval (2.84, 3.16).)
(b) Explain why δ = 0.17 does not work in the situation of the preceding
part.
(c) If a = 10 and f (x) = x2 , then lim f (x) = 100. Again let ǫ = 1.
x→10
Does δ = 0.16 work now? If not, find a value of δ (as big as possible)
that does work.
(d) If a = 10 and f (x) = x2 , then (again) lim f (x) = 100. Find a
x→10
value of δ (the bigger the better) that works for ǫ = 0.1.
(e) If a = 0 and f (x) = x2 , then limx→0 f (x) = 0. Find a value of δ (as
big as possible) that works for ǫ = 0.01.
(f) If a = 1 and g(x) = x10 , then limx→1 g(x) = 1. Find a value of δ
(as big as possible) that works for ǫ = 1.

5. Suppose in both parts following that f is continuous at x = c and g is not


continuous at x = c.

(a) Show that f + g is not continuous at x = c.


170 3. Limits and Continuity

(b) Give examples to show that f g may or may not be continuous at x =


c.

6. Here is the negation of the definition of continuity: f is not continuous


at x = a if ∃ǫ > 0 such that ∀δ > 0 ∃x such that |x − a| < δ, but
|f (x) − f (a)| ≥ ǫ. Use this in each part below.
(
1 + x if x ≤ 2
(a) Show that g(x) = is not continuous at x = 2.
4 if x > 2
(
x if x ≤ 2
(b) Show that f (x) = is not continuous at x = 2.
5 − x if x > 2

7. Let A, B, and c be any real numbers—positive, negative, or zero. Use Def-


inition 3.7 to prove the unsurprising fact that f (x) = Ax + B is continuous
at x = c.
8. Use Definition 3.7 to show that f (x) = |x| is continuous at every domain
point a ∈ R.
9. Suppose that a function f is continuous at x = 42. In each part follow-
ing, use ǫ and δ to show that the new function (concocted from f ) is also
continuous at x = 42.

(a) g(x) = f (x)/345


(b) h(x) = f (x) + 345
(c) k(x) = |f (x)|

10. Suppose {xn } is a sequence such that xn → 0. Explain using results of this
section why cos(xn ) sin(xn )) → 0.
11. Suppose {xn } is a sequence such that xn → 0. Explain using results of this
section why cos(sin(xn )) → 1.
12. We said in Example 2, page 164, 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;
6 0.
(b) limx→a sign(x) = sign(a) if a =
13. Suppose f : R → R is continuous at x = 0 and f (1/n) > 0 for all n.
Show that f (0) ≥ 0.
14. 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 + δ).
3.2. Continuous Functions 171

15. Suppose f (3) > 5 and f is continuous at 3. Show that there exists δ > 0
such that f (x) > 5 for x ∈ (3 − δ, 3 + δ).
16. 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].)
17. A function f has a removable discontinuity at a point x = a if (i) f is dis-
continuous at a; but (ii) we can define (or redefine) f (a) so that f becomes
continuous at x = a. In each part, decide whether the function has a re-
movable discontinuity at the given point. If so, explain how to remove it. If
not, why not?
1
(a) f (x) = ; a = 0.
x
2
x −4
(b) f (x) = ; a = −2.
x+2
1
(c) f (x) = x sin ; a = 0.
x
18. 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π].
(b) Show that
|f (x) − g(x)| + f (x) + g(x)
max{f (x), g(x)} = .
2
Find a similar “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 fact that a(x) = |x| is continuous.)
f (x) = |x| is continuous at every domain point a ∈ R.

19. Suppose that f is continuous on R and that f (x) = 0 if x is rational. Show


that f (x) = 0 for all x.
20. 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 6= 0. Show that g is continuous at x = a if and only if f is
continuous at x = a.
172 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.

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
We made up the fancy name. (“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.)


3.3. Why Continuity Matters: Value Theorems 173

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].


174 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 1 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) =6 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.
6 b, since we know f (b) > v.
We see, too, that c =
That’s Proposition 3.14, To complete the proof, we show that f (c) < v is impossible; the PoPI is the
page 172. 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. 
3.3. Why Continuity Matters: Value Theorems 175

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 164.
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.
176 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 6= 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.
3.3. Why Continuity Matters: Value Theorems 177

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 calculus—


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 inter-
vals, 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. ♦
178 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| < ǫ. 


3.3. Why Continuity Matters: Value Theorems 179

Exercises
1. Assume in both parts of this problem that f : [0, 2] → R is continuous on
[0, 2].

(a) Describe (by graph or formula) such a function f where f (0) is the
minimum value and f (1) is the maximum value of f on [0, 2].
(b) Suppose that f that attains a maximum value at x = 1. Show that f
is not one-to-one.

2. 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.

3. This problem revisits Proposition 3.19, page 176. 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?

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 .

(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).)
180 3. Limits and Continuity

(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 177.

(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 176.)

7. (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?

8. Does f (x) = x2 − 2x achieve maximum and/or minimum values some-


where in (−1, 2)? What about a supremum or infimum?

9. 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, ∞).

10. Suppose that f : R → R is continuous on all of R, that f (π) = 42, and


that f (x) ≤ 42 for all x. It’s clear (why?) that f is not onto. Show that f is
also not one-to-one.
3.3. Why Continuity Matters: Value Theorems 181

11. 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.
12. 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.
13. Suppose that f : R → R is continuous and one-to-one, and that f (1) >
f (0). Show that f (2) > f (1).
14. The Principle of Persistent Inequalities (Proposition 3.14, page 172), 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.
15. 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.
16. 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.)
182 3. Limits and Continuity

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| < δ.

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
2
2 1 1
|g(x) − g(y)| = x − y = n +
− n2 = 2 + 2 > 2 > ǫ.
n n
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.
3.4. Uniform Continuity 183

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.

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) =
f (a). In Section 3.1 we described this condition graphically: For any given See Figure 3.1, page 151.
ǫ > 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)?
184 3. Limits and Continuity

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.
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. 
3.4. Uniform Continuity 185

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. ♦
186 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. 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.
2. Use Definition 3.21 in each part.

(a) Show that every constant function f (x) = C is uniformly continuous


on R.
(b) Show that every linear function L(x) = Ax + B is uniformly contin-
uous on R. Does anything special happen if A = 0?

3. Show in two steps that f (x) = 1/(x2 + 1) is uniformly continuous on R.

(a) Assume in this part that, for all x and y, |f (x) − f (y)| ≤ |x − y|.
Show that, for any ǫ > 0, the value δ = ǫ works in Definition 3.21.
(b) Show that, indeed, |f (x) − f (y)| ≤ |x − y| for all x and y. (This part
involves “only” algebra—no ǫ or δ needed.)

4. Use Definition 3.21 (not theorems) in each part.


(a) h(x) = x2 + 7 is uniformly continuous on [−100, 42].
3.4. Uniform Continuity 187

(b) l(x) = 1/x is not uniformly continuous on (0, 1). Hint: Let ǫ = 1
and show that no suitable δ can be chosen.
5
5. Theorem 3.22 implies that f (x) = + 3 is uniformly continuous on the
x
interval [1/4, 10]. Give an ǫ–δ proof of this fact.

6. Assume in both parts that f : I → R is uniformly continuous on the interval


I. Use Definition 3.21 in each part.

(a) Show that the function g(x) = −137f (x) is uniformly continuous on
I.
(b) Show that the function h(x) = |f (x)| is uniformly continuous on I.

7. 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.

8. 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.
(Note: The claim is pretty obvious; the point is to give a definition-based
proof.)

9. Use Definition 3.21 to show in two steps that f (x) = x is uniformly
continuous on [0, ∞).
√ √ √
(a) Show that if 0 ≤ y ≤ x, then x − y ≤ x − y.
(b) Use the preceding part to finish the problem.
188 3. Limits and Continuity

10. Consider the piecewise-linear function f : R → R with f (x) = x for


x < 0 and f (x) = 42x for x ≥ 0. Show that f is uniformly continuous on
R.
11. Let f (x) = x3 .
(a) Use Definition 3.21 to show directly 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 Problem 8 to show (again) that f
is uniformly continuous on [−3, 42).
12. Show that if f is uniformly continuous on an interval I, then it is also
continuous in the ordinary sense.
13. Assume in both parts that both f and g are uniformly continuous on an
interval 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).
14. Assume in both parts that both f and g are uniformly continuous on an
interval I.
(a) Show that if I = [a, b] is closed and bounded, then f g is uniformly
continuous on I.
(b) Show that if both f and g are bounded on I, then f g is uniformly
continuous on I. (This is a little harder.)
15. A function f : I → R is called Lipschitz continuous (after a nineteenth-
century German mathematician) on I if, for some constant K, |f (x) − f (y)|
≤ K |x − y| holds for all x and y in I. Lipschitz and uniform continuity
are both ‘stronger” versions of ordinary continuity.

(a) Show that if f is Lipschitz continuous on I, then it is also uniformly


continuous on I.
(b) Show that every linear function L(x) = Ax + B is Lipschitz contin-
uous on R.
(c) Suppose that f is Lipschitz continuous on an interval I. Show that the
ratio |f (x) − f (y)|/|x − y| is bounded for x, y ∈ I and x 6= y.

(d) We know (e.g., from Theorem 3.22) that g(x) = x is uniformly
continuous on [0, 1]. Show that g is not Lipschitz continuous on [0, 1].
Hint: Let x > 0 and fix y = 0. Show that the ratio in the preceding
part is not bounded in the desired sense.
3.4. Uniform Continuity 189

16. In each part, either use Definition 3.21 or cite appropriate theorems or
propositions.

(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].)

17. 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)| < ǫ.

18. 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 two 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 185.)
(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
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.)
190 3. Limits and Continuity

3.5 Topology of the Real Numbers


Topology is the mathematical study of objects and properties that stay unchanged
after “continuous” transformations, like stretching and twisting, but may change
after other operations, like cutting or puncturing. Topology might be said, more
picturesquely, to be about pliable, rubber things; geometry, by contrast, is about
rigid, steel things. A topologist, says an old joke, can’t tell a coffee cup from
a bagel, since either shape can be moulded from the other without cutting or
puncturing.
These amusing metaphors only hint at the many mathematical faces of topol-
ogy, some quite abstract. In real analysis, fortunately, topology focuses on con-
crete and familiar objects: individual real numbers (called points), various sets of
real numbers, and relations between sets and points. Seen this way the subject is
called point-set topology; here and in the next section we sample some highlights.

No coffee—but plenty of points and sets. Coffee cups and bagels aren’t seen
in real analysis. As rough analogues, however, consider two open intervals, say
I = (0, 1) and J = (−13, 42). In obvious ways I can be stretched (“dilated”)
and slid (“translated”), without tearing or cutting, to coincide with J, and vice
versa. In this sense I and J are topologically “the same”. The closed interval
K = [0, 1], by contrast, is genuinely “different” from I and J: It contains left and
right endpoints that can’t be created or destroyed by stretching and sliding.
We’ve already seen that closed and open intervals like [0, 1] and (0, 1) have
That’s Theorem 3.17, page 175. quite different properties in real analysis. The extreme value theorem, for in-
stance, says that every continuous function assumes maximum and minimum val-
ues on [0, 1]. No such guarantee holds on the interval (0, 1); a function continuous
Consider f (x) = 1/x, for there need not even be bounded. In this sense the sets [0, 1] and (0, 1) are topo-
instance. logically different.
Individual points can also have differing topological properties with respect
to sets. The points x1 = 0.5 and x2 = 0.6 are both interior to the set [0, 1], and
in this sense “the same”. The point x3 = 1, by contrast, is on the boundary of the
set [0, 1]: every open interval, say (0.999, 1.001) contains points both inside and
outside [0, 1].

Open and closed sets Open and closed sets are the most important objects in
topology. Among open sets, the most familiar are open interval, like (0, 1). We’ve
The word “basis” is used more used open intervals freely throughout this book, and they’re the basis for two more
formally in a theoretical general definitions:
development of topology.
Definition 3.25. A set U ⊆ R is called open if U is the union of any collection of
open intervals. A set A ⊆ R is called closed if its complement R \ A is open.

. To begin, some comments and examples.


3.5. Topology of the Real Numbers 191

• R and ∅, open and closed: In these definitions the cases U = ∅, A = ∅,


U = R, and A = R are all allowable, and the union in the first definition is
allowed to involve any collection—empty, finite, or infinite—of open inter-
vals. Indeed, the set U = ∅ is both open—it’s the union of no intervals at
all—and closed—its complement is one giant interval, R. Taking comple-
ments shows that A = R is also both closed and open. In one unlovely word, R and ∅
are “clopen”.
• Neighborhoods: An interval (x−ǫ, x+ǫ), with center x and positive radius
ǫ, is called an ǫ-neighborhood of x. The notation Nǫ (x) is convenient when
we want to emphasize the center and radius of such an interval.
• Elbow room: Sets like (0, 1), (0, 1)∪(2, 3), and (0, 1)∪(1, 2)∪(2, 3)∪. . .
are written explicitly as unions of open intervals, and therefore obviously
open by definition. Whether or not other sets are open may be less obvious,
and the following alternative condition can be useful.

A set U ⊆ R is open if and only if for each x ∈ U there is some


ǫ > 0 such that Nǫ (x) ⊆ U .

We can think of the interval Nǫ (x) as “elbow room.” For each element x,
U holds not just x itself but also tiny left and right “ǫ-elbows” on either
side of x. We see, for instance, that S = (0, 1] is not open: 1 ∈ S but
no “right ǫ-elbow” of 1 fits into S. As another example, we see that the
set R \ Z is open: every non-integer, say x = 2.93, has some integer-free
ǫ-neighborhood, say (2.92, 2.94). We see, too, that the set Z is closed. Here ǫ = 0.01.

• Not open, not closed: Many familiar subsets of R are neither open nor closed.
The sets Q and R \ Q are good examples. We’ve seen that every open in-
terval contains both rationals and irrationals. Equivalently, neither Q nor
R \ Q contains any intervals; clearly, neither can be open.
Some examples will expand on these definitions and suggest new definitions,
some of which we pursue in exercises.

E XAMPLE 1. Can or must a nonempty finite set S = {s1 , s2 , s3 , . . . , sn } of


numbers be open or closed? What if S = {s1 , s2 , s3 , . . . } is countably infinite?

S OLUTION . Every finite set is closed. To see why, suppose without loss of gen-
erality that s1 < s2 < · · · < sn . Now we can write If not, we can reorder and
rename the elements.
R \ S = (−∞, s1 ) ∪ (s1 , s2 ) ∪ (s2 , s3 ) ∪ · · · ∪ (sn , ∞),
which shows that R \ S is open.
No nonempty finite or even countably infinite set is open: Open sets are unions
of open intervals, and intervals are uncountable sets. ♦ See Section 1.6 for more on
countability.
192 3. Limits and Continuity

We see in the next example that a countably infinite set may or may not be
closed.

E XAMPLE 2. Let
   
1 1 1 1 1 1
S = 1, , , , . . . and T = 0, 1, , , , . . . .
2 3 4 2 3 4
Is either S or T open or closed?

S OLUTION . Neither S nor T includes any ǫ-neighborhoods at all, so neither S


In the preceding example we nor T is open.
gave another reason why S and What about complements? Notice first that we can write R \ T explicitly as
T can’t be open.
an (infinite) union of intervals:

R \ T = (−∞, 0) ∪ (1, ∞) ∪ (1/2, 1) ∪ (1/3, 1/2) ∪ . . . .

Thus R \ T is open and so T is closed. The set R \ S differs from R \ T in only


one element, 0. But that makes all the difference: No neighborhood Nǫ (0) misses
all points of S, and so R \ S is not open. We conclude that S is neither open nor
closed, and that T is closed but not open. ♦

E XAMPLE 3. Let U1 and U2 be open sets, and A1 and A2 closed sets. What can
be said about unions and intersections?

Do you see why? De Morgan S OLUTION . We’ll see that both U1 ∪ U2 and U1 ∩ U2 are open; it follows that
can help. both A1 ∪ A2 and A1 ∩ A2 are closed.
To see why U1 ∪ U2 is open recall that U1 and U2 are themselves unions of
intervals. Thus U1 ∪ U2 is itself a union—the union of all the open intervals that
make up either U1 or U2 .
To see why U1 ∩ U2 is open we use ǫ-neighborhoods. Suppose x ∈ U1 ∩ U2 .
Since x ∈ U1 there is some ǫ1 > 0 with x ∈ Nǫ1 (x) ⊆ U1 . Similarly, there is
ǫ2 > 0 with x ∈ Nǫ2 (x) ⊆ U2 . Then, for ǫ = min{ǫ1 , ǫ2 } we have Nǫ (x) ⊆
U1 ∩ U2 . ♦
Example 3 points to more general results:
Proposition 3.26. Unions and intersections of open and closed sets behave topo-
logically as follows:
(a) The union of any collection of open sets is open. The intersection of any finite
collection of open sets is open.
(b) The intersection of any collection of closed sets is closed. The union of any
finite collection of closed sets is closed.
3.5. Topology of the Real Numbers 193

Proof: The first assertion in (a) can be proved exactly as for unions of two open
sets. We proved the second part in the preceding example. Part (a) implies (b) via
De Morgan’s laws. 

Topology and sequences. Topology words and ideas are useful in studying se-
quences.

E XAMPLE 4. Let {an } be any sequence that converges to a, and U any open set
with a ∈ U . Then an ∈ U for all but finitely many n.

S OLUTION . By hypothesis, there is some ǫ > 0 with Nǫ (a) ⊆ U . Since an →


a, we can choose N such that an ∈ Nǫ (a) for all n > N . So U contains all the
an with at most finitely many exceptions: a1 , a2 , . . . , aN . ♦
The preceding example suggests a more general property of closed sets. We’ve already seen that this
holds for closed intervals.
Fact 3.27. Suppose the set A ⊆ R is closed, and that {an } is a sequence with
an ∈ A for all n. If an → a, then a ∈ A.

Proof: If not, then a ∈ R \ A, an open set. Hence, for some ǫ > 0 we have
a ∈ Nǫ (a) ⊆ R \ A. This means that Nǫ (a) contains none of the an , which
contradicts the claim in Example 4. 

Limits and limit points. A point a is defined to be a limit point of a set A if every
open neighborhood Nǫ (a) contains at least one element of A other than a.

E XAMPLE 5. Specific examples illustrate some of the possibilities.

(a) Let A = (0, 1]. All points of A are limit points. The point a = 0 is also a
limit point of A, even though 0 ∈ / A. No other point in R is a limit point. For
the point a = 1.001, for example, the neighborhood N0.0001 (a) misses the
set A entirely.
 
1 1 1
(b) Let S = 1, , , , . . . , as in Example 2. No point of S is a limit point:
2 3 4
every point of S has a (perhaps tiny) ǫ-neighborhood that contains no other
point of S. The point 0, although not in S, is a limit point of S, since every
set Nǫ (0) contains infinitely points of S.

(c) For the set Q of rational numbers, every real number is a limit point.

Some of these points are pursued further in exercises. ♦


As the parts of Example 5 suggest, limit points of a set A, whether or not in A,
can be approximated closely by other points from within A. The analogy with
limits of sequences is no accident:
194 3. Limits and Continuity

Proposition 3.28. A point a is limit point of a set A if and only if a = lim{an }


for some sequence {an } with an ∈ A and an = 6 a for all n.

Proofs are left as exercises.

Topology, functions, and continuity. Topological language is also convenient in


describing behavior of functions.

E XAMPLE 6. Suppose the function f : R → R is continuous everywhere, and b


is any constant. Show that the set U = {x | f (x) < b} is open.

S OLUTION . If U = ∅ we’re done already. If U = 6 ∅ we can invoke the Principle


The PoPI is Proposition 3.14, of Persistent Inequalities (PoPI). Suppose, then, that c ∈ U , which means f (c) <
page 172. b. By the PoPI, there exists δ > 0 such that f (x) < b for x ∈ (c − δ, c + δ). But
this is another way of saying that Nδ (c) ⊆ U , so indeed U is open. ♦

Inverse images and continuity. Continuity is fundamental in topology, just as in


real analysis. Topological language offers a convenient and general description
based on “inverse images”: For any function f : A → B and any set U ⊆ B, the
set
f −1 (U ) = {a ∈ A | f (a) ∈ U }
The notation f −1 has nothing is the inverse image of U .
to do with a reciprocal.

E XAMPLE 7. Suppose that f : R → R is continuous everywhere, and let U =


(a, b). Explain why f −1 (U ) is open.

S OLUTION . We did half the work just above. Unpacking the notation a bit gives

f −1 (U ) = f −1 ( (a, b) ) = {x | f (x) < b} ∩ {x | f (x) > a}.

Of the last two sets on the right, the first is open by Example 6; the second is open
by essentially the same argument. As the intersection of two open sets, f −1 (U )
is open, too. ♦

E XAMPLE 8. Define f : R → R by f (x) = x2 .


(a) If U = (4, 9) then

f −1 (U ) = x ∈ R | 4 < x2 < 9 = (−3, −2) ∪ (2, 3),

a union of two open intervals.

(b) If U = (−42, −3) then f −1 (U ) = ∅, since f (x) ≥ 0 for all x.


3.5. Topology of the Real Numbers 195

 √ √ 
(c) If U = (−42, 3) then f −1 (U ) = f −1 ([0, 3)) = − 3, 3
n √ √ o
(d) If U = {1, 2, 3}, then f −1 (U ) = ±1, ± 2, ± 3 .

The pattern suggested above—inverse images of open sets are open, and simi-
larly for closed sets—is no accident. Proposition 3.29 gives a brief but general
description of continuity in topological language. Proposition 3.29 can be used to
−1
define continuity.
Proposition 3.29. A function f : R → R is continuous on R if and only if f (U )
is open whenever U ⊆ R is open.
Proof: For the “if” part, fix a ∈ R. Indeed, for any ǫ > 0, we can let U be
the open interval (f (a) − ǫ, f (a) + ǫ). Then a ∈ f −1 (U )—an open set by our
hypothesis—and so there is δ > 0 such that (a − δ, a + δ) ⊆ f −1 (U ). Unraveling
these notations shows that this is just another way of saying that |f (x) − f (a)| <
ǫ when |x − a| < δ. This is precisely the ǫ–δ condition for continuity of f at
x = a, so the “if” part is proved.
Proving the “only if” part is similar. Here’s a sketch: Suppose U ⊆ R is open. Further details are left as an
If f −1 (U ) = ∅, we’re done already. If not, and a ∈ f −1 (U ), then f (a) ∈ U , and exercise.
since U is open we can choose ǫ > 0 with Nǫ ( f (a) ) ⊆ U . By continuity of f at
x = a we can choose δ > 0 with Nδ (a) ⊆ f −1 (U ). Hence f −1 (U ) is open as
claimed. 
Open intervals are good enough. The condition in Proposition 3.29 can be re-
laxed a little: f is continuous if and only if f −1 (I) is open for every open interval
I = (a, b). This is because, roughly speaking, inverse images “play well” with
unions: the inverse image of a union is the corresponding union of inverse images. See the exercises for more on
this.
R is a “metric space”. A metric space is a set X equipped with a reasonable
notion of distance, known more formally as a metric. In real analysis the absolute
value plays this role: For any numbers x and a, |x − a| is the distance from x to
a, and the inequality |x − a| < ǫ means that x is “within distance ǫ” of a.
The following abstract definition makes more general sense.
Definition 3.30. Let X be any set and d : X × X → R a function. We say d is a
metric on X if the following conditions hold for all x, y, and z in X:
(i) d(x, y) ≥ 0, and d(x, y) = 0 only when x = y (aka, positivity)
(ii) d(x, y) = d(y, x) (aka, symmetry)
(iii) d(x, z) ≤ d(x, y) + d(y, z) (aka, triangle inequality)
All parts of the definition are easy to check in our most familiar case, X = R and
d(x, y) = |x − y|; the metric triangle inequality, in particular, is a long-familiar
property of the absolute value.
196 3. Limits and Continuity

Open balls, open neighborhoods. If d is a metric on a set X, a ∈ X and ǫ > 0,


it makes sense to describe the set

Bǫ (a) = {x ∈ X | d(x, a) < ǫ}

as the open ball of radius ǫ about x = a. When d(x, y) = |x − y|, this “ball”
is really just an interval of radius ǫ, the set we’ve called an ǫ-neighborhood, and
denoted Nǫ (a). If X is a higher-dimensional set, like R2 or R3 , with appropriate
metrics, a “ball” might resemble a disk or a child’s notion of a ball.

Building a metric space. Given any set X and any metric d, we can can create
a useful topology on X—called a metric space topology—by defining open sets
to be unions of open balls. Indeed, we did exactly that earlier in this section: real
open intervals are actually open balls, and so our earlier definition is in fact the
metric definition. Metric spaces are in some sense “nice,” and this happy state is
sometimes summarized by saying that R with its “usual” topology is is a metric
space. We explore this idea further in exercises.

Exercises
1. We said in Example 3 that because the union of two open sets is open, “it
follows” that the intersection of two closed sets is closed. Use De Morgan’s
laws to give details.

2. An open set U ⊆ R is defined as the union of any collection of open inter-


vals.

(a) Suppose U1 , U2 , U3 , . . . are all open sets. Explain why the infinite
union U1 ∪ U2 ∪ U3 ∪ . . . is open.
(b) Suppose A1 , A2 , A3 , . . . are all closed sets. Use De Morgan’s laws
(they hold for infinite unions and intersections, too) to explain why
the infinite intersection A1 ∩ A2 ∩ A3 ∩ . . . is closed.

3. As in Problem 2, let Ui and Ai denote open and closed sets, respectively.

(a) Give an example to show that U1 ∩ U2 ∩ U3 ∩ . . . can be the closed


interval [−1, 1]
(b) Give an example to show that A1 ∪ A2 ∪ A3 ∩ . . . can be the open
interval (−1, 1).

4. We said in Example 3 that because the union of two open sets is open, “it
follows” that the intersection of two closed sets is closed. Use De Morgan’s
laws to give details.
3.5. Topology of the Real Numbers 197

5. We said in this section that a set U ⊆ R is open if and only if for each
p ∈ U there is some ǫ > 0 such that Nǫ (p) ⊆ U .
(a) Let U = (0, ∞); we know U is open. For p = 0.0042 find a specific
value of ǫ for which Nǫ (p) ⊆ U .
(b) Let p be any element of (0, ∞). Find a value of ǫ (depending on p, of
course) for which Nǫ (p) ⊆ U .
(c) Prove the statement above for any open set U ⊆ R. (Hint: For the
“only if” part note that if p ∈ U then p ∈ (a, b) ⊆ U for some open
interval (a, b).)
6. Let S ⊆ R be any set. A point p ∈ R is called a boundary point of S if
every ǫ-neighborhood Nǫ (p) intersects both S and R \ S.

(a) Show that S = R has no boundary points.


(b) What are the boundary points, if any, of S = [0, 1] and S = {0, 1}?
Are any boundary points of S contained in S?
(c) Find the boundary points, if any, of S = (0, 1)? Are any boundary
points contained in S?
(d) Show that 1 is both a limit point and a boundary point of (0, 1).
(e) Show that a finite set F has no boundary points.

7. Here’s the converse of the claim in Example 4, page 193: Let {an } be a
sequence, and a a number. Suppose that for any open set U with a ∈ U ,
an ∈ U for all but finitely many n. Then {an } converges to a.
8. (a) Problem 6 illustrates that an open set U may have boundary points.
Show that U contains no boundary points.
(b) Suppose p is a boundary point of a closed set A ⊆ R. Show that
p ∈ A.
9. Let S ⊆ R be any set. A point p ∈ S is an interior point of S if Nǫ (x0 ) ⊂ S
for some ǫ > 0.

(a) Which points are interior to [0, 1]?


(b) Show that every point in an open set U is interior to U .
(c) Show that a finite set F has no interior points.
(d) Every point p ∈ R is interior to R, since R is open. Which points of
Q are interior to Q?

10. This problem resembles Example 8, page 194. Define f : R → R by


f (x) = 2x + 3.
198 3. Limits and Continuity

(a) Find f −1 (R). Is the answer an open set?


(b) Find f −1 ( (0, ∞) ). Is the answer an open set?
(c) Find f −1 ( (−3, 42) ). Is the answer an open set?
(d) Let (a, b) be any open interval. Find f −1 ( (a, b) ). Conclude that (as
expected) f is continuous.

11. In the notation of Proposition 3.29, page 195, show the following.
(a) For any set S ⊆ R, f −1 ( R \ S ) = R \ f −1 ( S ).
(b) f : R → R is continuous on R if and only if f −1 (A) is closed when-
ever A ⊆ R is closed.
12. Repeat Problem 10, but use the (continuous) function f (x) = |x|. Hint:
For (d), use cases, depending on whether 0 ∈ (a, b).
13. A set D ⊆ R is dense in R if D has nonempty intersection with every open
interval (a, b) ⊂ R.

(a) Show that Q and R \ Q are both dense in R.


n n o
(b) Is the set S = | n ∈ Z dense in R? Why or why not?
1000
14. Clean up any needed details to prove the “only if” part of Proposition 3.29,
page 195.
15. Consider a function f : R → R and sets A, B ⊆ R.
(a) Show that f −1 (A ∩ B) = f −1 (A) ∩ f −1 (B).
(b) Show that f −1 (A ∪ B) = f −1 (A) ∪ f −1 (B).
16. The “sign function” f : 
−1 if x < 0,

R → R given by f (x) = 0 if x = 0, is a poster child for discontinu-


1 if x > 0,
ity. (See Example 2, page 164.)

(a) Let U = (0, 1). Find f −1 (U ). Is f −1 (U ) an open set?


(b) Find an open set U ⊆ R for which f −1 (U ) is not open.
(c) Find a closed set A ⊆ R for which f −1 (A) is not closed.

17. We said in this section that the “usual” topology on R can be thought of as
given by the metric d(x, y) = |x − y|. This means, in particular, that every
open set U ⊆ R is a union of one or more open balls Bǫ (a). For example,
U = (3, 7) = B2 (5). In that spirit, write each set following as a union
(perhaps infinite) of open balls.
3.6. Compactness 199

(a) (0, 1)
(b) R
(c) R \ Z
(d) (0, ∞)

18. In the spirit of(Definition 3.30, page 195, define for any real numbers x and
1 if x = 6 y
y, d(x, y) = .
0 if x = y

(a) Show that d is a metric on R. (The resulting topology is called the


discrete topology.)
(b) Let p ∈ R. What are the balls B1 (p) and B2 (p)?
(c) What are the open sets in this metric topology?

19. Define, for any real numbers x and y, d(x, y) = min {|x − y|, 1}.

(a) Show that d is a metric on R.


(b) Let p ∈ R. What are the balls B1 (p) and B2 (p)?
(c) What are the open sets in this metric topology?

3.6 Compactness
Compactness is a “nice” topological property enjoyed by certain subsets of R—
e.g., finite sets, closed and bounded intervals, and convergent sequences—but not
others. We’ve seen, for instance, that a function defined and continuous on a
closed and bounded interval [a, b] assumes maximum and minimum values, while
a function defined and continuous on an open interval need not even be bounded.
Formal definitions follow soon; here’s a preview.

Almost finite. Compact sets need not be finite. We’ll see, for instance, that the Finite sets are compact, though.
unit interval [0, 1]—an uncountably infinite set—is compact. On the other hand,
[0, 1] is both bounded and closed, and these properties turn out to be almost as
good as finiteness for some purposes.

E XAMPLE 1. Following are some properties enjoyed both by finite sets F ⊂ R


and compact sets S ⊂ R. Proofs are given below or are
left to exercises.
(a) If F1 and F2 are finite, then so are F1 ∪ F2 and F1 ∩ F2 . If S1 and S2 are
compact, then so are S1 ∪ S2 and S1 ∩ S2 .
200 3. Limits and Continuity

(b) If F is finite and nonempty, then F contains maximum and minimum ele-
We’ve discussed this before. ments. If S is compact and nonempty, then S contains maximum and mini-
See, e.g., Problem 3, page 50. mum elements.
(c) Every finite set F is bounded. Every compact set S is bounded.
(d) Every finite set F is closed. Every compact set S is closed.
(e) Let f : R → R be a continuous function. If F ⊂ R is finite and nonempty,
then f achieves maximum and minimum values on F . If S ⊂ R is compact
and nonempty, then f achieves maximum and minimum values on S.

Definitions. The “open cover” definition we’ll soon give for compactness looks
awkward at first glance. Indeed, other possible definitions of compactness (we’ll
see one soon) turn out to be equivalent for subsets of R. But the open cover
definition makes sense in any topological space, and turns out to be useful in and
beyond real analysis.
First, an auxiliary definition and some basic examples:
Definition 3.31. Let S ⊆ R be any set of real numbers. An open cover of S is
any collection U of open sets that “covers” S—i.e., for each s ∈ S there is some
U ∈ U with s ∈ U . A subcover is any subcollection U ′ ⊆ U that still covers all
of S; U ′ is “proper” if U ′ ( U.

E XAMPLE 2. Let S = (0, 2). The open sets

U1 = (1, 2), U2 = (1/2, 2), ..., Un = (1/n, 2), ...

form an (infinite) open cover of S; we can write U = {U1 , U2 , . . . }. We don’t


really need all the sets in U to cover S. For instance, the proper but still infinite
subcover
U ′ = {U1 , U3 , U5 , . . . }
does the job. ♦

E XAMPLE 3. Let S be any set of real numbers, and fix ǫ > 0. The collection
Each point of S gets its own U = {Nǫ (s) | s ∈ S} completely covers S.
ǫ-neighborhood. Whether any proper subcover exists depends on S, and perhaps on ǫ. If, say,
S = Z and ǫ = 0.1, then none of the Nǫ (s) can be omitted. If S = R, on the
other hand, the proper (but still infinite) subcover U ′ = {Nǫ (q) | q ∈ Q} works.
It has about 10,000 members. If S = [0, 1000] and ǫ = 0.1, then we can find a finite subcover, like this one:

U ′ = {N0.1 (x) | x = 0, 0.1, 0.2, . . . , 999.9, 1000} .


3.6. Compactness 201

The same idea works for any bounded set S ⊂ R and any fixed ǫ > 0. ♦
We’re ready for that awkward definition, and some basic examples.

Definition 3.32. A set S ⊂ R is compact if every open cover of S has a finite


subcover.

E XAMPLE 4. The empty set ∅ is compact. So is every finite set F ⊂ R. The full
set R is not compact. ♦ Proofs are left as exercises.

E XAMPLE 5. The open interval (0, 2) is not compact. Why?

S OLUTION . The nested open intervals

U = {(1, 2) , (1/2, 2) , (1/3, 2) , . . . , (1/n, 2) , . . . }

from Example 2 cover (0, 1), but no finite subcollection suffices: If we stop with
(1/N, 2), then the set (0, 1/N ] is left uncovered. ♦

E XAMPLE 6. Let {an } be any convergent sequence of real numbers, with limit
a. Then the set S = {a, a1 , a2 , a3 , . . . } is compact. The set S ′ = {a1 , a2 , a3 , . . . }
need not be compact.

S OLUTION . Let U be any open cover of S. Since a ∈ S there is some open set
Ua in U with a ∈ Ua . As we showed in Example 4, page 193, Ua contains all but
(at most) finitely many of the an . We can cover these outliers, if any, with finitely
many members of U, say U1 , U2 , . . . UN . Thus U ′ = {Ua , U1 , U2 , . . . , UN }
works as a finite subcover. We leave the claim about S ′ as an exercise. ♦

Properties of compact sets. Compact subsets of R have various nice properties,


some analogous to those of finite sets; see Example 1 above. Here are some
proofs.

Proposition 3.33. If S ⊂ R is compact then S is (i) closed; and (ii) bounded.

Proof: To prove (i) we check that R \ S is open: For any p ∈ R \ S we’ll find
a neighborhood of p that’s disjoint from S. To wit, for each ǫ > 0 we define
Uǫ = {x ∈ R | |x − p| > ǫ}. The sets Uǫ form an open cover U of S. By
compactness, some finite collection Uǫ1 , Uǫ2 , Uǫ3 , . . . , UǫN covers S. If we take
ǫ0 to be the smallest of these ǫ’s, then we see that S ⊆ Uǫ0 . Thus, the open There is a smallest one since
interval (p − ǫ0 , p + ǫ0 ) is disjoint from S, as desired. our set of ǫ’s is finite.
Proving (ii) is easier. The nested collection

U = {(−1, 1), (−2, 2), (−3, 3), . . . }


202 3. Limits and Continuity

is an open cover of R, and hence also of S. Because S is compact some finite


subcollection {(−1, 1), (−2, 2), (−3, 3), . . . , (−N, N )} covers S. This means
that −N < s < N for all s ∈ S, and so S is bounded. 

A big theorem. Theorem 3.35 below is a famous result, dating from around 1900.
More general versions of It fully describes the compact subsets of R in down-to-earth language. We need
Theorem 3.35 hold in some just one more technical fact.
topological spaces other than
R.
Lemma 3.34. Let S ⊂ R be compact and A a closed subset of S. Then A is
compact.

Proof: Let U be any open cover of A. Tossing one more open set, R \ A, into U
produces an open cover V of S. By compactness of S, some finite subcover V ′
covers S. Ejecting R \ A from V ′ gives the desired finite subcover of U. 

Theorem 3.35. (Heine–Borel) A subset S of R is compact if and only if S is


closed and bounded.

Proof: The “only if” part is Proposition 3.33, above.


This part is clever and tricky; Now for the “if” part. Although S itself need not be an interval, boundedness
tread carefully. of S implies that S ⊆ [a, b] for some closed interval [a, b]. By Lemma 3.34, it’s
good enough to show that every closed interval [a, b] is compact. We do this for
And see the exercises. the closed interval [0, 1]; the case for general [a, b] follows easily. To do this we’ll
It has to do with completeness; use the the nested intervals property of the real numbers.
see Theorem 1.31, page 76. Suppose then, toward contradiction, that some open cover U of I1 = [0, 1] has
no finite subcover. Then one or both of [0, 1/2] or [1/2, 1] has no finite subcover.
Call such an interval I2 . Similarly, either the left half or the right half (or both) of
I2 has no finite subcover; let I3 be such an interval. Continuing this process gives
a nested sequence of closed intervals I1 ⊃ I2 ⊃ I3 ⊃ . . . , with length(In ) =
1/2n .
The nested interval property says that the intersection I1 ∩ I2 ∩ I3 ∩ . . . is a
single point, say p. Since p ∈ [0, 1] we have p ∈ U0 for some U0 ∈ U. Since U0
is open, we know p ∈ Nǫ (p) ⊆ U0 for some ǫ > 0.
Now for any N large enough so 1/2N < ǫ, we have IN ⊆ U0 . Here comes
our contradiction: IN , which supposedly lacks any finite subcover from U, is
actually covered by just one set, U0 . 

Compactness revisited: the sequence view. A close cousin of compactness as


defined above is as follows:

Definition 3.36. A set A ⊆ R is called sequentially compact if every infinite


sequence {an } contained in A has a convergent subsequence whose limit is also
in A.
3.6. Compactness 203

The Bolzano–Weierstrass theorem asserts that every closed and bounded interval Theorem 2.16, page 111
A = [a, b] is sequentially compact. In fact, A need not be an interval:

Proposition 3.37. Every closed and bounded set A ⊂ R is sequentially compact.

Proof: Let A be closed and bounded, and {an } a sequence with an ∈ A for
all n. The sequence {an } is bounded, so Bolzano–Weierstrass says there’s a
convergent subsequence {ank }; call its limit a. Since A is closed, Fact 3.27,
page 193, guarantees that a ∈ A, as desired. 

The converse holds, too: Proofs are in exercises.

Proposition 3.38. A sequentially compact set A ⊂ R is closed and bounded.

Now we have all the pieces for the big-picture result:

Theorem 3.39. A set A ⊂ R is compact if and only if A is sequentially compact.

E XAMPLE 7. Use sequential compactness to show that if A and B are compact


subsets of R, then A ∩ B is compact, too.

S OLUTION . Let {cn } be any sequence contained in A ∩ B. Compactness of


A means that some subsequence {dn } of {cn } converges to a point d ∈ A. It
remains to show that d ∈ B. Compactness of B implies that some subsequence
of {dn } converges to some point e ∈ B. But {dn } is a convergent sequence, so
all subsequences converge to the same limit, d. Thus d = e and we’re done. ♦

Using Compactness
Compact sets have, as claimed earlier, several pleasant properties that “play well”
with continuous functions. Following are three (now) simple but important exam-
ples.

Proposition 3.40. A nonempty compact set K ⊂ R has maximum and minimum


elements.

Proof: Since K is bounded, there exist α = inf(K) and β = sup(K). By


Lemma 2.9, page 100, there are sequences {an } and {bn } in K with limits α
and β, respectively. Since K is closed, Fact 3.27, page 193, guarantees that both
α ∈ K and β ∈ K, as desired. 

Proposition 3.41. Let f : R → R be a continuous function, and K ⊂ R a


compact set. The image set f (K) = {f (x) | x ∈ K} is also compact.
204 3. Limits and Continuity

Another proof is outlined in Proof: Let’s show that f (K) is sequentially compact. To this end, let {yn } be
exercises. any sequence contained in f (K); we seek a convergent subsequence with limit in
f (K).
Since {yn } ⊆ f (K), there are x1 , x2 , x3 , . . . , all in K, with f (xn ) = yn
for all n. By compactness of K the sequence {xn } has a convergent subsequence
{xnk }, with limit x0 ∈ K. Setting ynk = f (xnk ) for all k, and y0 = f (x0 )
See page 163. produces the sought-after subsequence of {yn }. Continuity of f guarantees that

xnk → x0 =⇒ f (xnk ) → f (x0 ),

as desired. 

Proposition 3.42. Let f : R → R be continuous, and K ⊂ R a nonempty com-


The extreme value theorem pact set. Then f achieves maximum and minimum values on K.
says the same thing for
compact intervals. Proof: There is almost nothing to do. By Proposition 3.40, f (K) includes maxi-
mum and minimum values. 

E XAMPLE 8. Suppose K ⊆ R is compact and p ∈


/ K. Some point x0 ∈ K is
“closest” to p.

S OLUTION . The function f (x) = |x − p| is everywhere continuous; note that


f (x) > 0 for all x ∈ K. Proposition 3.42 says that f achieves a minimum
Note that x0 is not necessarily f (x0 ) > 0, as desired. ♦
unique.

Exercises
1. Use Definition 3.31 to prove the claims in Example 4:

(a) Every finite set F = {x1 , x2 , . . . , xn } ⊂ R is compact.


(b) R is not compact.
(c) ∅ is compact.

2. Use Definition 3.31 to show that Z is not compact.


3. Consider the set S ′ in Example 6.

(a) Show that if {an } is given by an = 1/n, then S ′ is not compact. (Find
a suitable open cover.)
(b) Suppose {an } is the sequence 1, 0, 1/2, 0, 1/3, 0, . . . . Is the set {an }
compact? Why or why not?
(c) Give an example of a divergent sequence {an } for which the set {an }
is compact.
3.6. Compactness 205

4. Give details in each part to prove Proposition 3.38: A sequentially compact


set S ⊆ R is (a) closed and (b) bounded.

(a) It’s enough to show R \ S is open. Let p ∈ R \ S. We’re done if


Nǫ (p) ⊆ R \ S for some ǫ > 0. If not, then (why?) there’s a sequence
{sn } in S with
1 1
|s1 − p| < 1, |s2 − p| < , |s3 − p| < , ....
2 3
Then sn → p, which is a contradiction. (Why?)
(b) Toward contradiction, suppose S is unbounded. Then there exists
(why?) a sequence {sn } ⊆ S with |s1 | > 1, |s2 | > 2, |s3 | > 3,
etc. The sequence {sn } has no convergent subsequence (why?).

5. We said in this section that if [0, 1] is compact, then so is every closed


interval [a, b]. Prove this using Proposition 3.31.
6. This problem is about the situation of Example 8, page 204. Use the nota-
tion there.

(a) What’s the closest point x0 if K = [0, 1] and p = π?


Give an example of a compact set K in which there is more than one
closest point to p = π Could there be three “closest points”?
(b) Is there a closest point to p = π in (the noncompact set) [0, 1)?
(c) Is there a closest point to p = π in Z? In Q?

7. A junior-grade version of Proposition 3.40 says that if f : R → R is con-


tinuous and K ⊂ R is compact, then f is bounded on K—i.e., the set
{f (x) | x ∈ K} is bounded.
Prove this by considering the open cover U consisting of sets Ui = {x | f (x) < |i|}
is bounded.
Why are the Ui open? Why do they cover K? How does compactness
help?
8. Explain why the extreme value theorem (see page 175) follows from Propo-
sition 3.40 in this section.
9. There is no continuous function f : R → R such that f ([0, 1]) = (0, 1).
Which result in this section says so?
10. Is there a continuous function f : R → R such that f ( (0, 1) ) = [0, 1]? If
so, give an example. If not, why not?
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

207
208 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.
4.1. Defining the Derivative 209

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.


If f (x) = x2 and a = 0, then
ℓ0 (x) = f (0) + f ′ (0)(x − 0) = 0 + 0(x − 0) = 0.
210 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.

• 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 =
6 0,
f (x) =
0 if x = 0,
is differentiable at a = 0. What is the linear approximation there?

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
4.1. Defining the Derivative 211

which we’ve already shown (by squeezing; see Example 6, page 155) 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.

E XAMPLE 4. If f (x) = x, what’s f ′ (x)? How are the domains of f and f ′
related to each other?
212 4. Derivatives

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.

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.


4.1. Defining the Derivative 213

1.0

0.5

̟ ̟
–̟ – 2 2
̟

– 0.5

– 1.0

Figure 4.2. Linear and quadratic approximations to the cosine function.

(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.

Digging deeper. The following lemma delves a little further into good-behavior
implications of differentiability.
214 4. Derivatives

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) 6= 0, then f (x) 6= f (a) for all x 6= 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.
(iv) If f ′ (a) > 0, then there exists δ > 0 such that (i) f (x) < f (a) when
a − δ < x < a; and (ii) f (x) > f (a) when a < x < a + δ.

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) 6= 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) 6= 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)
x − a < ǫ, or, equivalently, |f (x) − f (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
4.1. Defining the Derivative 215

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 = 6 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.
2. Consider a linear function L(x) = Ax + B. Show using Definition 4.1 that
L′ (x) exists for all x, and that L′ is a constant function.
216 4. Derivatives


3. Consider the functions f (x) = x2 and g(x) = x.

(a) Carefully draw—by hand—the graphs of f and g in the “window”


0 ≤ x ≤ 2, 0 ≤ y ≤ 2. Then draw the tangent lines to both f and
g at the point (1, 1). Note that all four graphs pass through the point
(1, 1).
(b) Use Definition 4.1 to show that f ′ (1) = 2 and g ′ (1) = 1/2.
(c) How does the symmetry of your picture in (a) reflect the values you
found in (b)?

4. Use Definition 4.1 to find each of the following 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.)

5. Consider the function f (x) = 1/(x2 + 5). Compare answers here to what
you recall from elementary calculus.

(a) Use Definition 4.1 to find f ′ (0).


(b) Use Definition 4.1 to find f ′ (c) for any c.

6. (a) Use Definition 4.1 to show that if f (x) = 1/x and c 6= 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.)

7. 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 the difference quotient.)
(b) Suppose that |f (x)| ≤ |x| for all x. What can be said about f ′ (0)?

8. Assume in all parts 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).)
4.1. Defining the Derivative 217

(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 the derivative at a minimum
point of a function? (We’ll further explore this famous connection
soon.)
9. 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 that (f g)′ (0) = 0.
(Use Definition 4.1; the product rule does not apply.)
10. 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).
11. 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.
Interpret the result geometrically.
12. Suppose f (x) is differentiable at x = 2, with f ′ (2) = 3. Let g(x) =
f (x + 4) + 5. We claim that g(x) is differentiable at x = −2, and that
g ′ (−2) = 3.

(a) Give an informal geometric argument for the claim. (Hint: How are
graphs of f and g related?)
(b) Calculate g ′ (−2) using Definition 4.1. (Hint: In the difference quo-
tient for g ′ (−2), write x = y − 4; note that x → −2 is equivalent to
y → 2.)

13. Consider the function defined by


(
−x2 if x < 0,
f (x) =
x2 if x ≥ 0.

(a) Show that f is continuous at x = 0. (Hint: Use one-sided limits.)


(b) Is f differentiable at x = 0? If so, find f ′ (0).

14. 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) Make f differentiable at x = 1 by replacing 3x−2 with another linear
expression.
218 4. Derivatives

15. Let f : R → R be any function such that |f (x)| ≤ x2 for all x. Show that
f ′ (0) = 0.

16. Throughout this problem let f : (−1, 1) → R be any bounded (not neces-
sarily continuous) function.

(a) Define a new function g : (−1, 1) → R by g(x) = xf (x). Show that


g is continuous at x = 0.
(b) Give an example to show that g need not be differentiable at x = 0.
(Hint: Think absolutely.)
(c) Define a new function h : (−1, 1) → R by h(x) = x2 f (x). Show
that h is differentiable at x = 0.
(
6 0
x sin(1/x) if x =
17. Let f (x) = . Show that f is continuous but not
0 if x = 0
differentiable at x = 0.

x2 cos x
18. Use Definition 4.1 to show that g(x) = is differentiable at x = 0,
3 + cos x

with g (0) = 0. (We don’t know the quotient rule yet.)

19. Assume in this problem that both f and g are continuous at x = 0.

6 0, then f (0) ≥ 42.


(a) Show that if f (x) > 42 for all x =
(b) Suppose that g(0) = 42, and let h(x) = xg(x). Show that h′ (0)
exists and find its value.

20. Expand the following proof sketch for Claim (iv) of Lemma 2. Set ǫ =
f (x) − f (a)
f (a) > 0. Since lim exists, we can choose δ > 0 so that
x→a x−a
f (x) − f (a)

x−a − f (a) < ǫ = f (a) when 0 < |x − a| < δ. This δ does
what’s needed.

21. If f (x) = sin(100x), then (just assume this) f ′ (x) = 100 cos(x).

(a) What does Claim (iv) of Lemma 2, page 164, say about this f when
a = 0?
(b) Find a value of δ that works in this case.
4.2. Calculating Derivatives 219

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.

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.
Propositions 3.11 and 3.12 say that if f and g are continuous at the domain points See page 167.
in question, then so are all the combinations just mentioned.
We do need to avoid division by
We want to show now that similar properties hold for derivatives: if f and zero in combinations like f / g.
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

6 0), with derivatives as follows:


are all differentiable at a (for f /g we need g(a) =
• 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.
220 4. Derivatives

• 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).

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,
Following minor the linear combination rule says that for x near a we have
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)
add and subtract the same thing lim = lim
x→a x−a x→a x−a
f (x) − f (a) g(x) − g(a)
algebra with limits = lim g(x) + lim f (a)
x→a x−a x→a x−a
f (x) − f (a) g(x) − g(a)
more limit algebra = lim g(x) lim + lim f (a) lim
x→a x→a x−a x→a x→a x−a
= g(a) f ′ (a) + f (a)g ′ (a).
4.2. Calculating Derivatives 221

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 213.

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?

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-
tiable for all x, we only need to observe that f (x) = x is differentiable, with Or prove . . . it’s easy.
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.
222 4. Derivatives

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
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-
As always, due care for entiable, and describes how the respective derivatives are combined.
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 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 .

We could substitute x for a, but S OLUTION . The chain rule applies directly to f ◦ g:
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.
4.2. Calculating Derivatives 223

• 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) ,

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),
224 4. Derivatives

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) = 6 g(a) for all x = 6 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

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) 6= 0. In this case, g(x) =


6 g(a) for all x 6= a in some interval
See Lemma 4.4, page 214. containing a. We can therefore argue as above to obtain the chain rule.

Case 2: g ′ (a) = 0. In this special case, we’ll show that (f ◦ g) (a) = 0—again,
It makes no difference as the chain rule claims. For notational simplicity, let’s assume that a = f (a) = 0.
mathematically. Our claim then is that, for any ǫ > 0, we can find δ > 0 with

f (g(x))
x ≤ ǫ or, equivalently, |f (g(x))| ≤ ǫ |x|

whenever x ∈ (−δ, δ).


Challenging values of ǫ are near To see this, let ǫ > 0 be given; we can assume WLOG that ǫ < 1. Note first
zero. that, because the limit
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)
x ≤ M, or, equivalently, |f (x)| ≤ M |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) ǫ ǫ
x ≤ M or, equivalently, |g(x)| ≤ M |x|

4.2. Calculating Derivatives 225

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. 

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 167, says that every
such elementary function is continuous throughout its natural domain. A similar We didn’t prove every detail
claim holds for differentiability: rigorously.

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,
so we give only some brief samples here. More details are in the
exercises.

E XAMPLE 4. (Trigonometric derivatives). All six standard trigonometric deriva-


tive formulas follow from two basic limits: We proved the first in
Example 6, page 155. The
sin h cos h − 1 second follows from the first.
lim =1 and lim = 0.
h→0 h h→0 h

How? Why?
226 4. Derivatives

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).
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. ♦
4.2. Calculating Derivatives 227

y
g(x)

f (x)

f (a)

x
f (a) a

Figure 4.4. Derivatives of inverse functions f and g.

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) 6= 0. Then g is differentiable at f (a), and

1
g ′ (f (a)) = .
f ′ (a)

Figure 4.4 illustrates the idea.

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) =
6 0.
228 4. Derivatives

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 . ♦

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 14, page 51.
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 219)?

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.2. Calculating Derivatives 229

4. Prove the claim about linear combinations in Theorem 4.5, page 219.

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 219. Assume throughout that f and g are differentiable at
x = a and that g(a) 6= 0.

(a) Assume (it is easy to show) that the function k(x) = 1/x is differen-
6 0, with k ′ (x) = −1/x2 . Use this and the chain rule
tiable for all x =

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.

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 )

3x7 − 5x + 2
8. Consider the function q(x) = . The quotient rule guarantees
x3 − x
that q is differentiable except where the denominator is zero.

(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. Let g : R → R be everywhere differentiable, with g ′ (n) = 0 for all inte-


gers n.
230 4. Derivatives

(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.

11. Suppose throughout this problem that f is differentiable at x = 17. Let


g(x) = |f (x)|.

(a) Show that g(x) is continuous at x = 17.


(b) Give an example to show that g(x) need not be differentiable at x =
17.
(c) Show that g(x)2 is differentiable at x = 17.

12. Let k be a positive integer, like 3 or 4. A function f : R → R is said to


vanish to order k at x = a if
f (a) = 0 = f ′ (a) = f ′′ (a) = f ′′′ (a) = · · · = f (k−1) (a), but f (k) (a) =
6 0.
(a) Show that x3 vanishes to order 3 at x = 0.
(b) To what order does x2 sin(x) vanish at x = 0? Why?
(c) Show carefully that if f vanishes to order 2 at x = a and g vanishes
to order 3 at x = a, then f g vanishes to order 5 at x = a.

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.
4.3. The Mean Value Theorem 231

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).

In graphical terms, the new hypothesis says that the graph has the same height
at x = a and at x = b; the conclusion says that the graph has a horizontal tangent More than one possible c is fine
somewhere in between. Figure 4.6 shows two such horizontal tangents. with Rolle.

Car talk. If f (t) is the position of a car at time t, then (f (b) − f (a))/(b − a) The units might be miles and
is the car’s average velocity over the time interval [a, b], and f ′ (t) is the car’s hours.
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 =


6 0. If we rule out such “disconnected”
domains, the converse is true—but the proof requires the MVT. Here are the de-
tails.

y
f (x)
L(x)
f (b)

f (a)

x
a c b

Figure 4.5. The mean value theorem illustrated.


232 4. Derivatives

f (x)

f (0)

x
0 c1 c2 b

Figure 4.6. Rolle’s theorem: two possible c-values.

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.

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-
Find the largest rectangular mentary calculus. Second, we’ve already proved it (and a bit more), as part (c) of
pigpen . . . one side is a river . . . . Lemma 4.4, page 214. Let’s move on.
4.3. The Mean Value Theorem 233

About Step 2. We assume that g : [a, b] → R is continuous on [a, b] and differ- We use g, not f, to avoid
entiable on (a, b), and that g(a) = g(b); we need to show that g ′ (c) = 0 for some confusion in Step 3.
c ∈ (a, b).
To apply Step 1, we invoke the EVT: Because g is continuous on [a, b], it as- The extreme value theorem;
sumes both maximum and minimum values somewhere on that closed interval. If see page 175
both the maximum and the minimum are assumed at endpoints, then the maxi-
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.

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.
(i) f ′ (x) ≥ 0 for all x ∈ I if and only if f is increasing on I. f need not be strictly increasing.

(ii) If f (x) > 0 for all x ∈ I, then f is strictly increasing on I.
(iii) If f ′ (x) =
6 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
234 4. Derivatives

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 157. 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.

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 ′ .
4.3. The Mean Value Theorem 235

S OLUTION . For x 6= 0 the function is clearly differentiable; standard derivative


rules apply. At x = 0, the function f is also differentiable, but the derivative f ′ is
discontinuous. Details are 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?

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.)
236 4. Derivatives

(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).

(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.
4.3. The Mean Value Theorem 237

(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].



(b) f (x) = x2 − 10x + 21 ; [a, b] = [4, 6].

(c) f (x) = x2 − 10x + 21 ; [a, b] = [2, 4].

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
R tables in elementary calculus books are full of formulas like
cos x dx = sin x + C. Forget the C on a test and lose
a point.
(a) Why exactly is the C there? What does this have to do with the MVT?
238 4. Derivatives

R dx
(b) A very fussy professor might find fault with the formula 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 233.

(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.
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. 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?

21. 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.
4.4. Sequences and Series of Functions 239

(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.

22. In the situation of Example 1, find a (two-part) formula for f ′ , and show
that f ′ is not continuous at x = 0.

23. In the special case a = 0 and b = 1, Taylor’s theorem (Theorem 4.14) says
f ′′ (0) f ′′′ (c)
that f (1) = f (0) + f ′ (0) + + for some c ∈ (0, 1). Prove
2 6
this in the following steps.

f ′′ (0) 2
(a) Consider the function p2 (t) = f (0) + f ′ (0)t + t . Show that
′ ′ ′′ ′′
2
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); conclude that there is some t1 in (0, 1)
with g ′ (t1 ) = 0.
(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.

24. Prove Taylor’s theorem (Theorem 4.14) without assuming a = 0 and b =


1, as we did in the preceding problem. (Hint: Given a function f as in
Theorem 4.14, define a new function h(x) = f ( a + x(b − a) ). Apply
the result of the preceding problem to h; calculate carefully to derive the
general case.)

4.4 Sequences and Series 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 ,


n
. . . , fn (x) = x . Figure 4.7(a) shows graphs of several fn on the interval [0, 1];
Figure 4.7(b) shows one typical function, f20 . Does the sequence {fn } converge
to some limit function?
240 4. Derivatives

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
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)
|gn (x) − g(x)| =
≤ 1
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. ♦

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 }.


4.4. Sequences and Series of Functions 241

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}.

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
function that is discontinous at x = 1. On the domain [2, 3], by contrast, the same Not shown in Figure 4.7, but
functions become larger and larger with n, and so have no sensible limit func- easily visualized.
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→∞
242 4. Derivatives

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].
• 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)
|gn (x) − g(x)| = ≤ 1 < 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 6= 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 6= 1, the preceding
inequality boils down to two conditions:

(i) |fN +1 (x)| < 0.1 if x =


6 1; (ii) |fN +1 (1) − 1| < 0.1.
4.4. Sequences and Series of Functions 243

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. ♦

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 ± gn → 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
sequence need not be positive. Similar questions arise for sequences of functions. Consider {1/n}, for instance.
244 4. Derivatives

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. 6 0 and f (1) = 1.
limit—the function f defined f (x) = 0 if x = ♦

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.

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).

Watch for three ǫ/ 3’s. We make this three-step approximation precise in the formal proof.

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
4.4. Sequences and Series of Functions 245

0.5

±1 ±0.5 0 0.5 1

Figure 4.9. Smooth functions approaching the absolute value function.

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.

1+1/n
E XAMPLE 6. For each positive integer n, define fn (x) = |x| . Figure 4.9
shows several of the fn ; the sequence appears to approach the absolute value
function. What is happening with derivatives?

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 =
6 0, and not hard
to prove if x = 0. See the exercises.

• fn → f uniformly on [−1, 1]. This follows from the fact, readily shown,
that
1
|f (x) − fn (x)| <
n
for all x ∈ [−1, 1]. Again, see the exercises.
246 4. Derivatives

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. ♦

Series of Functions
See Definition 2.21, page 120. We saw in Section 2.5 the close relationship between series and sequences: Any
given series
X∞
ak = a1 + a2 + a3 + . . .
k=1

determines the associated sequence {An } of partial sums:

A1 = a1 , A2 = a1 + a2 , ..., An = a1 + a2 + · · · + an , ....
P
Convergence or divergence of the series ak now reduces to theP same questions
for the sequence {An }. Per Definition 2.22, page 122, the series ak converges
to the sum A if and only if the sequence {An } of partial sums converges to A.
Exactly the same approach works for series of functions.

Definition 4.19 (Convergence of function series). Let g1 , g2 , g3 , . . . be a


sequence of functions, all defined on a fixed interval I. Define the partial sum
functions f1 , f2 , f3 , . . . by

f1 (x) = g1 (x); f2 (x) = g1 (x)+g2 (x); f3 (x) = g1 (x)+g2 (x)+g3 (x); ...


X
The function series gn converges (pointwise or uniformly) to the sum function
n=1
g on I if and only if the function sequence f1 , f2 , f3 , . . . converges (pointwise
or uniformly) to g on I.

Power series. Power series are function series in which the summands are “mono-
mials,” like 3x7 and x5 /120, and the partial sums are polynomials—familiar,
convenient, and well-behaved functions in their own right. Power series arise
You’ve probably met these in naturally and usefully in theory and applications. Taylor and Maclaurin series are
calculus courses. crucial examples; we explore them briefly in the next section.
The topic of function series in general, and power series in particular, is vast.
We take just a quick glance to suggest the topic’s contours. The next example
concerns the simplest and arguably most useful power series; note the close con-
nection to geometric series already studied.
4.4. Sequences and Series of Functions 247

E XAMPLE 7. Make sense of the function series



X
xk = 1 + x + x2 + x3 + . . . .
k=0

Does the power series converge to some function g on some interval I? Is the
convergence pointwise? Uniform?

S OLUTION . In the notation of Definition 4.19 we have gn (x) = xn for n ≥ 0,


and the partial sum functions are

f0 (x) = 1; f1 (x) = 1+x; f2 (x) = 1+x+x2; f3 (x) = 1+x+x2+x3 ; ....

Here’s the key point: For each x, 1 + x + x2 + x3 + . . . is a geometric series


in powers of x, and and therefore converges if (but only if) |x| < 1. (Review
geometric series around page 125, if necessary.) We even know the limit:

X 1
xk = 1 + x + x2 + x3 · · · = if |x| < 1;
1−x
k=0

the series diverges for |x| ≥ 1. In the language of function series: the geometric
power series converges pointwise for x ∈ I = (−1, 1) to the function g(x) =
1/(1 − x).
Convergence in this case is not uniform on all of I = (−1, 1), but it is uni-
form if we restrict x to smaller closed
P nintervals, such as [−0.8, 0.8]. To see why,
let ǫ > 0 be given. Because 0.8 converges, we can choose N such that
P∞ k
PN k
k=N +1 0.8 < ǫ. This is another way of saying that fn (x) = k=0 0.8
P∞ k
differs from the k=0 0.8 (which is g(0.8)) by less than ǫ. Similar reasoning
applies to any x ∈ [−0.8, 0.8]: If n > N ,
∞ ∞
X X
k
0.8k < ǫ,

|g(x) − fn (x)| = x ≤

k=n+1 k=N +1

as uniform convergence requires. ♦

More on power series. We saw above and will see again below that the limits
of convergent function sequences and series may be functions that are less well-
behaved (e.g., not differentiable) than the terms or summands that approach those
limits.
Power series turn out to be especially well-behaved in this and other respects.
Following, without proofs, are some special properties of power series not neces- Proofs are within our reach, but
sarily shared by arbitrary function series. complicated and off our main
path.
248 4. Derivatives

P
Proposition 4.20. Consider a power series an xn , and the function f defined
by

X
f (x) = a0 + a1 x + a2 x2 + · · · = an xn
n=0

for all inputs x for which the series converges.

(a) The series obviously converges (to a0 ) if x = 0. If it converges for some


x0 6= 0, then it also converges for all x with |x| < R = |x0 |. The supre-
mum (possibly) infinite of all such r is the radius of convergence of the power
series.

(b) If a power series function f (x) has radius of convergence R, and r < R, then
the series converges uniformly to f (x) for x ∈ [−r, r].

(c) A power series function with radius of convergence R > 0 is differentiable,


and can be differentiated “term by term”:

If f (x) = a0 +a1 x+a2 x2 +a3 x3 +. . . then f ′ (x) = a1 +2a2 x+3a3 x2 +. . . .

The series for f and f ′ have the same radius of convergence.

E XAMPLE 8. The power series function



x2 x3 X xn
f (x) = 1 + x + + + ··· =
2! 3! n=0
n!

is justly famous. Why?

And see Example 2 for a similar S OLUTION . Apply the ratio test (Theorem 2.32, page 138): Since
calculation.
|x|k+1 /(k + 1)! |x|
lim = lim =0
k→∞ |x|k /k! k→∞ k + 1

we see that the series f (x) converges for all x ∈ R.


Do this for yourself; it’s easy but Differentiating f (x) term by term, as Proposition 4.20 permits, shows some-
striking. thing more remarkable: f is its own derivative. Since we have both f ′ = f and
f (0) = 1, we conclude from basic calculus theory that f (x) has another famous
formula: f (x) = ex for all x, and the series formula for f (x) converges uniformly
to ex on all x-intervals [−r, r]. ♦
We touch on some further aspects of power series in exercises. We mention
Maclaurin and Taylor series in the next section, designed for self-discovery.
4.4. Sequences and Series of Functions 249

A function of Weierstrass: everywhere continuous, 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:

f0 (x) = cos(πx)
f1 (x) = cos(πx) + a cos (bπx)

f2 (x) = cos(πx) + a cos (bπx) + a2 cos b2 πx
...
Xn

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?
1
(a) fn (x) = n for all n; f (x) = 0; I = R.
x
(b) fn (x) = n for all n; f (x) = 0; I = R.
sin x
(c) fn (x) = n for all n; f (x) = 0; I = R.
250 4. Derivatives

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.

(
n if x ≥ n,
2. Consider the sequence {fn } defined by 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. Let f : R → R be a function. Define new functions f1 , f2 , . . . by fn (x) =


f ( x + 1/n ).

(a) Suppose f is continuous on R. Show that fn → f pointwise on R.


(b) Give an example to show that “continuous” is necessary in the pre-
ceding part.
(c) Suppose f is uniformly continuous on R. Show that fn → f uni-
formly on R.
(d) Let f be defined by f (x) = 1 if x ∈ Q and f (x) = 0 otherwise. Does
fn → f pointwise? Uniformly?
(e) Find a continuous function f : R → R such that fn → f pointwise
but not uniformly.

4. In the situation of Proposition 4.17, page 243, suppose that fn → f and


gn → g, both pointwise on I. Suppose that for all x ∈ I we have g(x) 6= 0
6 0 for all n. Show that fn /gn → f /g pointwise on I.
and gn (x) =
5. 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,
4.4. Sequences and Series of Functions 251

for each x ∈ I, the sequence {fn (x)} is Cauchy. (Such a sequence is said
to satisfy a Cauchy criterion.)

6. In the situation and notation of Proposition 4.17, page 243, 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.”

7. For old times’ sake, prove informally or disprove (with a counterexample)


the following statements about limits of sequences of numbers.

(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.

8. This problem is about Example 6, page 245; consider the functions fn de-
fined there.
1+1/n
(a) Let n be any positive integer. Show that fn (x) = |x| 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. It’s a bit tricky, but we can show using
elementary calculus that |f (x) − fn (x)| < n1 for all x ∈ [−1, 1]. Try
it.
(c) Use the inequality in the preceding part to show that fn → f uni-
formly on [−1, 1].

9. Consider the situation and notation of Proposition 4.17, page 243.

(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: One possibility is to
consider fn (x) = gn (x) = x + 1/n on I = R.

10. 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.

11. 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.
252 4. Derivatives

12. In Example 8, page 248, we observed that the power series f (x) converges
uniformly to ex on bounded and closed intervals, like I = [−1, 1]. If ǫ = 1,
for instance, then N = 1 satisfies the conditions of Definition 4.16. (Use
technology to plot ex and f2 (x) = 1 + x + x2 /2 for −1 ≤ x ≤ 1 to see for
yourself.)

(a) Let I = [−1, 1] and ǫ = 0.01. Use plotting technology to find a value
of N that works for this I and ǫ.
(b) Let I = [−2, 2] and ǫ = 1. Use plotting technology to find a value of
N that works for this I and ǫ.

13. In the spirit of Example 8, page 248, consider the power series

x3 x5 x7 X x2k−1
f (x) = x − + − + ··· = (−1)k+1 .
3! 5! 7! (2k − 1)!
k=1

(a) Use the ratio test to show that the series f (x) converges (in absolute
value) for all x.
(b) Differentiate f term by term—twice—to see that f ′′ = −f ; notice
also f (0) = 0 and f ′ (0) = 1. What famous calculus function has
these properties?
(c) Differentiate f term by term to find a power series for f ′ . What fa-
mous function is this? How do you know?
(d) Use technology to plot some partial sums of f and f ′ for −π ≤ x ≤
π. Do the results look familiar?

14. This problem is about the power series g(x) = x+x2 /2+x3/3+x4 /4+. . . .

(a) Use the ratio test to show that g(x) converges for −1 < x < 1.
(b) Explain why g ′ (x) = 1/(1 − x) for −1 < x < 1. Note that g(0) = 0,
too.
(c) Explain why g(x) = − ln(1 − x) for −1 < x < 1.
(d) The 5th partial sum of g(x) is f5 (x) = x+x2 /2+x3 /3+x4/4+x5 /5,
and f5 (1/2) = 661/960. Interpret this as an estimate to the natural
logarithm of something.

4.5 Taylor Series and Taylor’s Theorem: A Guided


Discovery
This brief section, designed as an outline for self-study, explores an important
See Theorem 4.14, page 235. application of Taylor’s theorem, which we met earlier as a generalization of the
4.5. Taylor Series and Taylor’s Theorem: A Guided Discovery 253

mean value theorem. Here is a slightly modified form of the version from Sec-
tion 4.3:
Theorem 4.21 (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
As we observed earlier, Taylor’s formula says that if the right-hand quantity
is small, then the error committed in the approximation
f ′′ (a)
f (b) ≈ f (a) + f ′ (a)(b − a) + (b − a)2 .
2
See Example 2, page 235, for more on this perspective.

Taylor polynomials: good approximations. The expression f (a) + f ′ (a)(b −


f ′′ (a)
a) + (b − a)2 in the preceding theorem points to a natural definition:
2
Definition 4.22 (Taylor polynomials). Let f be a function defined on an interval
containing x = a, such that the values and derivatives f (a), f ′ (a), f ′′ (a), . . . ,
f (n) (a) all exist. Then the polynomial function

f ′′ (a) f ′′′ (a) f (n) (a)


Pn (x) = f (a)+f ′ (a)(x−a)+ (x−a)2 + (x−a)3 +· · ·+ (x−a)n
2 3! n!
makes sense, and is called the Taylor polynomial of order n for f based at x = a.
If a = 0 we refer to Maclaurin polynomials.
Let’s work out some basic examples.
1. Let f (x) = ex and a = 0. Find the Maclaurin polynomials for f for orders
up to 5.
2. Let f (x) = ex and a = 1. Find the Taylor polynomials through order 5
based at a = 1.
1
3. Let f (x) = and a = 0. Find the Maclaurin polynomials for f for
1−x
orders up to 5.
4. Let f (x) = a + bx + cx2 + dx3 . Find the Maclaurin polynomials of f
through order 3.
5. Find derivatives of Pn (x) to show that
f (a) = Pn (a); f ′ (a) = Pn′ (a); f ′′ (a) = Pn′′ (a); ... f (n) (a) = Pn(n) (a).
254 4. Derivatives

As the examples show, the function f and the polynomial Pn have the same
value and first n derivatives at x = a. In this sense Pn could reasonably be
described as the “best polynomial approximation” to f at x = a. The version
of Taylor’s theorem above says something about how closely P2 (b) approximates
f (b) when calculations are based at x = a.

An inequality form of Taylor’s theorem. The version of Taylor’s theorem above


pertains specifically to the second-order Taylor polynomial P2 , and involves an
equality, though with an unknown value c. The following more general version,
which involves an inequality, works well for our purposes. We state it for a = 0
for simplicity:
Theorem 4.23 (Taylor’s theorem, inequality version). Suppose f , f ′ , f ′′ , . . . ,
f (n+1)
all exist for x in some interval I = [−b, b], and that for some constant
K, f (n+1) (x) < K for x ∈ [−b, b]. Then

|x|n+1 |b|n+1
|f (x) − Pn (x)| ≤ K ≤K
(n + 1)! (n + 1)!

for x ∈ [−b, b].

Again, some examples.

1. What does the theorem say for f (x) = ex , n = 4, and b = 2? Use plotting
technology to check that the claimed inequality does indeed hold.
2. What does the theorem say for f (x) = x4 , n = 4, and I = [−2, 2]? What
if f (x) = x5 ?

Toward a proof. Complete the following ingredients of a proof of Theorem 4.23


for the case 0 ≤ x ≤ b. (The case −b ≤ x ≤ 0 is similar.)

1. Let g(x) = f (x) − Pn (x) for x ∈ [−b, b]. Show that 0 = g(0) = g ′ (0) =
g ′′ (0) = . . . g ( n)(0), and g (n+1) (x) = f ( n + 1)(x).
2. Suppose h and k are functions on [−b, b] with (i) h(0) = k(0), and (ii)
h′ (x) ≤ k ′ (x) for 0 ≤ x ≤ b. Then h(x) ≤ k(x) for 0 ≤ x ≤ b. Hint: The
mean value theorem or a corollary may be useful.
3. Our hypothesis is that

−K ≤ g ( n + 1)(x) ≤ K for x ∈ [0, b].

By the preceding fact, we can antidifferentiate:

−Kx ≤ g ( n)(x) ≤ Kx for x ∈ [0, b].


4.5. Taylor Series and Taylor’s Theorem: A Guided Discovery 255

For the same reason, antidifferentiating gives

x2 x2
−K ≤ g ( (n − 1))(x) ≤ K for x ∈ [0, b].
2 2
Repeating this process a total of n + 1 times gives

xn+1 xn+1
−K ≤ g(x) ≤ K
(n + 1)! (n + 1)!

which is what we wanted to show.

Taylor series. If f has derivatives of all orders at x = a, then we can write its
Taylor series:

f ′′ (a) X f (k) (a)
S(x) = f (a) + f ′ (a)(x − a) + (x − a)2 + · · · = (x − a)k .
2 k!
k=0

Note that the partial sums of S are the Pn .


Like any power series, S(x) may or may not converge for particular x. Even
if S(x) does converge, there’s no automatic guarantee that it converges to f (x),
as we’d hope. But under good conditions, Taylor’s theorem can assure us that all
is well.

Let’s explore one poster-child example.

1. Write the Taylor (i.e., Maclaurin) series for f (x) = ex centered at a = 0.


2. Use the ratio test to show that the Maclaurin series for f (x) = ex converges
for all x.
3. Consider the interval [−b, b] = [−10, 10]. What does Theorem 4.23 say
about Pn and f in this situation? Hint: All derivatives of f are the same,
and are bounded by e10 on [−10, 10].
4. Conclude from the preceding part that S(x) converges uniformly to f (x) =
ex on [−10, 10].
5. Use technology to plot f and some of the Pn for −10 < x < 10.
CHAPTER 5
Integrals

5.1 The Riemann Integral: Definition


and Examples
Familiar Ideas Revisited
Expressions and calculations like
Z 1 Z π Z 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


Z 1 Z 1 Z 1 Z 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.

257
258 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-
Rb
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
Z 7 Z 3 Z 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
Z 3 Z π Z 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
Z ∞ Z 1
1 1
2
dx = 1 and √ dx = 2
1 x 0 x
5.1. The Riemann Integral: Definition and Examples 259

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 kPk, is the largest of the ∆xi . Requir- Also known as the mesh.
ing that kPk < δ, 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
X
f (si )∆xi = f (s1 )∆x1 + f (s2 )∆x2 + · · · + f (sn )∆xn .
i=1
260 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 integral.
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.

R2
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 kPk = 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},


5.1. The Riemann Integral: Definition and Examples 261

we have kPk = 0.8 and the Riemann sum RS(f, P, S) becomes


4
X
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 kPk = 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


Rb
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 kPk < δ 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
R7
suggests that 1 f = 18. Does the definition agree? Can the idea be generalized?
262 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
X n
X n
X
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
Z 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.
Rb Rb
Proposition 5.3. Suppose f (x) ≥ 0 for all x ∈ [a, b]. If a
f exists, a
f ≥ 0.

Rb
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 kPk < δ, 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 6 1.
if x =
Z 2
Does f exist?
0
5.1. The Riemann Integral: Definition and Examples 263

R2
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 kPk < δ. 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
X
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.
Z 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
Xn X 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
X n
X
RS (f, P, S) = g(si )∆xi = 0 · ∆xi = 0.
i=1 i=1
264 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];
R4
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-


R3
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 kPk < δ, 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
5.1. The Riemann Integral: Definition and Examples 265

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 kPk < δ, 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
monotone-but-nasty function.
We will study the question of integrability more carefully in Section 5.3.
Meanwhile, here’s one useful criterion.

Proposition 5.4. If f is integrable on [a, b], then f is bounded on [a, b].


266 5. Integrals

About the proof. We sketch the proof of a special case, leaving generalities
R3
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 kPk < δ. 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
R3
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
R3
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 kPk?
(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.
R4
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.
5.1. The Riemann Integral: Definition and Examples 267

(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].
R2
Show that 0 f ≥ 6. (Mimic the proof of Proposition 5.3, page 262.)

4. Use Definition 5.1 to prove Proposition 5.2: If f (x) = k is a constant


Rb
function, then f is integrable and a k dx = k · (b − a).

5. Let f (x) = 0 for x = 6 0 and f (0) = 42. We explore the proof that f is
R1
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 kPk < δ and S =
{s1 , . . . , sn } is any set of samples from P, then 0 ≤ RS(f, P, S) < ǫ.
R1
Conclude that 0 f = 0.

6 0 and f (1) = 42. Prove as follows that f is integrable


6. Let f (x) = 0 for x =
R2
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 kPk < δ and S =
{s1 , . . . , sn } is any set of samples from P, then 0 ≤ RS(f, P, S) < ǫ.
R2
Conclude that 0 f = 0.
Rb
7. Suppose g is integrable on [a, b], with a
g = 0. Suppose 0 ≤ f (x) ≤ g(x)
Rb
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.
268 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 .)
Rb
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 kP1 k < δ and kP2 k < δ, 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 kPk < δ, 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).


R1
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
R1
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


Rb
every interval [a, b], and that a x dx = (b2 − a2 )/2.
14. Let f (x) = 1/x if x = 6 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.
5.2. Properties of the Integral 269

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.
Z 1  Z 1 Z 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 Z Z Z Z Z
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:
Z 5 Z 5 Z 5 Z
π  π 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
Rb Rb
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 ,

X n
ǫ
kPk < δf =⇒ f (si )∆xi − If < ;
2
i=1
X n ǫ

kPk < δg =⇒ g(si )∆xi − Ig < .
2
i=1
270 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 kPk < δ, and let S = {s1 , s2 , . . . sn } be any corre-
Watch for the triangle inequality. sponding choice of sampling points. Now we calculate:
n
X

(f (si ) + g(si )) ∆xi − (If + Ig )

i=1

X n Xn

= f (si )∆xi − If + g(si )∆xi − Ig

i=1 i=1

X n X 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].
Z b Z b
If f (x) ≤ g(x) for all x ∈ [a, b], then f≤ g.
a a

Combining ideas from Example 3, page 262, and Theorem 5.5 produces some
possible surprises.

E XAMPLE 1. Suppose

f (1) = 1, f (2) = 2, f (3) = 3, ..., f (1000) = 1000


R 1000
and f (x) = 0 for other x. Does 0 f exist?

R 1000
S OLUTION . Yes, and 0 f = 0. Example 3, page 262, slightly modified,
shows that functions like f17 : [0, 1000] → R, given by
(
17 if x = 17,
f17 (x) =
0 otherwise
R 1000
are all integrable on [0, 1000], and that 0
f17 = 0. Our given f satisfies

f = f1 + f2 + · · · + f1000 ,
5.2. Properties of the Integral 271

and so Theorem 5.5 gives


Z 1000 Z 1000 Z 1000 Z 1000
f = f1 + f2 + · · · + f1000
0 0 0 0
= 0 + 0 + · · · + 0 = 0,

as desired. ♦

Rb
E XAMPLE 2. Suppose f is integrable on [a, b], with
f = 42, and suppose a
Rb
g(x) = f (x) for all but finitely many x in [a, b]. What can be said about a g?

Rb
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
Rb
Example 1 shows that a (g − f ) = 0. By Theorem 5.5,
Z b Z b Z b Z b
g= f + (g − f ) = f+ (g − f ) = 42 + 0 = 42.
a a a a

Rb
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-


R4
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:
Z 4 Z 1 Z 3 Z 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. ♦
272 5. Integrals

1 2 3 4

Figure 5.3. Clumsy joinery.

Rb
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
Z c Z b
f¯ = f = I.
a a

The live issue, by the way, is integrability of f¯. Once we know that, it is no
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
Rc Rb
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 kPk < δ, and S is any choice of sampling points for P, then

Xn

¯
f (si )∆xi − I < ǫ.

i=1
Rb
Let’s use what we know about the original integral a f to produce such a δ.
Rb
The ǫ/2 will come in handy later. First, since a f exists, we can choose δf > 0 so that
m
X ǫ

f (si )∆xi − I <
2
i=1
5.2. Properties of the Integral 273

holds whenever P ′ = {x0 , x1 , . . . xm } is a partition of [a, b] with kP ′ k < δn , Here a = x0 and b = xm .


Rb
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
n ǫ o glance.
δ = min δf ,
4M
has the desired properties. To this end, let P = {x1 , x2 , . . . xn } be any partition
of [a, c] with kPk < δ, let S be any selection of sampling points from P, and
consider the corresponding Riemann sum
n
X
S= f¯(si )∆xi = f¯(s1 )∆x1 + f¯(s2 )∆x2 + · · · + f¯(sn )∆xn .
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 .
Rb
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 )
Rb
is a Riemann sum for a f , corresponding to the new partition P ′ = {a, x1 , x2 , . . . , xi0 , b};
note that kP ′ k < δ. (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 )

≤ f¯(si0 +1 )∆xi0 +1 + |f (b) (b − xi0 )|
ǫ ǫ
< M δ + M δ ≤ 2M = .
4M 2
Combining this with inequality (∗∗) gives
ǫ ǫ
|S − I| ≤ |S − S ′ | + |S ′ − I| < + = ǫ,
2 2
as desired. 
274 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
Rc Rb Rb
and b. If both a f and c f exist, then a f exists, too, and
Z b Z c Z 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
Z b Z c Z b Z b
f1 = f and f2 = f.
a a a c

To finish up, we add up integrals, as Theorem 5.5 permits:


Z b Z b Z b Z c Z 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 R c is


guaranteed to work only if we know in advance that the “smaller” integrals a f
Rb
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 293) appears
in the next section.
5.2. Properties of the Integral 275

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).
Rb
Then a
f = F (b) − F (a).
Rb
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 kPk < δ. 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
X n
X
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. 


276 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:
Z 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
Rb
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 261 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. ♦
5.2. Properties of the Integral 277

R1
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 kPk < δ. We
claim that, for any samples S = {s1 , s2 , . . . , sn } drawn from P,
n
X n
X
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
X n
X
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
X n
X
2xi ∆xi = ( xi + xi−1 + ∆xi ) ∆xi
i=1 i=1
Xn
= (xi + xi−1 ) ∆xi + ∆xi 2
i=1
n
X n
X

= 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
X n
X n
X
S2 = ∆xi 2 < ǫ ∆xi = ǫ ∆xi = ǫ · 1 = ǫ.
i=1 i=1 i=1
278 5. Integrals

Putting our results together gives


n
X n
X
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 270.

(a) Consider the function h(x) = g(x) − f (x) on [a, b]. Why must h be
Rb
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
Z 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].


R7
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.
Z 
200 
sin(x2 )
(a) 5+ dx
100 100
Z 200  
sin2 x
(b) 5+ dx
100 100
Z 200
1
(c) 2 dx
100 100 + sin 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 ∈
Rb
[a, b]. Show that a f > 0, too. (Hint: Use the extreme value theorem
and Corollary 5.6, page 270.)
5.2. Properties of the Integral 279

Rb
(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.)
(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
Rb Rb
Theorem 5.5, page 269) that 3f is also integrable and that a 3f = 3 a f .
Rb Rb
7. Suppose that both a f and a |f | exist. Prove the “triangle-like” inequality
Z
b Z b

f ≤ |f | .
a a

8. Consider the function f defined by f (n) = sin n if n ∈ Z and f (x) = 0


R 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].
R1
(b) What is −1 f ? Why?
Rn
(c) What is −n f ? Why?

10. We showed in and near Problem 12, page 268, that f (x) = x is integrable
Rb
on [a, b], and that a x dx = (b2 − a2 )/2.
R5
(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
R4
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.
R1
(a) 0 x42 dx

(b) 0 sin x dx
280 5. Integrals

Rb 
(c) a
C + Dx + Ex2 + F (x3 ) dx
R1 2
(d) 0
xex dx

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),
R1
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
R1
integrable, and 0 fǫ (x) = ǫ. (iii) We have f (x) ≤ fǫ (x) for all but finitely
R1 R1
many x, so 0 f ≤ 0 fǫ (x) = ǫ.
Rb Rb
13. Suppose that both a f and g exist, and that f (x) ≤ g(x) for all but
a Rb Rb
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 265. • If f is integrable, then f is bounded.

See Example 3, page 262, and • A discontinuous function f may or may not be integrable.
Example 4, page 263.
• We’ve also said—but not proved—that every continuous function is inte-
See Example 4, page 276. 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.
5.3. Integrability 281

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 )| < ǫ

whenever P1 and P2 are partitions of [a, b] such that both kP1 k < δ and kP2 k <
Rb
δ, 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 kP1 k < δn and
kP2 k < δ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 kPn k < δ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 261, 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 kPk < δ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.
282 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.

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].
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
5.3. Integrability 283

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

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
X
US (f, P) = Mi ∆xi = M1 ∆x1 + M2 ∆x2 + · · · + Mn ∆xn ;
i=1
Xn
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) .


Rb
(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 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 .


284 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.

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
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 area 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.
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.
5.3. Integrability 285

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 184. This means we
can choose δ > 0 such that
ǫ
|f (s) − f (t)| < whenever |s − t| < δ and s, t ∈ [a, b].
b−a

a x1 x2 b

Figure 5.6. Fine partitions, small box sums.


286 5. Integrals

A regular partition will do. Now let P be any partition with kPk < δ. 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
X
box sum = (Mi − mi ) ∆xi
i=1
n n
X ǫ ǫ X
< ∆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.
Rc Rb
(i) If a < c < b, then a f and c f exist, and
Z b Z c Z b
f= f+ f.
a a c

(ii) The function |f | is integrable, and


Z
b Z 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 274. See Problem 7, page 279, 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.
Rb
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 ǫ.
5.3. Integrability 287

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 |.

Rc Rb
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.
288 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


Z 100 Z 100 Z 100 Z 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 274, we can conclude that all of
Z 100 Z 100 Z 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 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
Rb
I= a. For any given ǫ > 0, we’ll find a partition P of [a, b] with box sum less
5.3. Integrability 289

than ǫ. Since f is integrable, we can choose δ > 0 such that


ǫ ǫ
I− < RS (f, P, S) < I +
4 4
for every Riemann sum RS (f, P, S) based on a partition P with kPk < δ 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 281, 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 kPk < δ 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 kPk < δ, 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)δ.


290 5. Integrals

In words: Adding one point to P decreases upper sums and increases lower
sums—but by no more than (M − m)δ.

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 kPk < δ. Consider the new partition
P ′ 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 kPk < δ,
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
5.3. Integrability 291

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
kP1 k < δ and kP2 k < δ, 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
Rb
Lemma 5.10 is satisfied, and the integral a f exists.

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].
R 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
R 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.
R 100
8. We said in Example 2, page 288, that 0 cos x dx can be shown to exist
using Proposition 5.17, page 287 and Theorem 5.8, page 274. 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.
292 5. Integrals

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 289. (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.)
Rb
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

M 1
 if a ≤ x < x1

M
2 if x1 ≤ x < x2
fbig (x) =
. . .
 ...


Mn if xxn−1 ≤ x ≤ b
Rb
Why is fbig integrable? What is its integral? How does a
fbig compare to
Rb
a f ?)

14. Consider the function f given by f (1/n) = 1 if n ∈ N and f (x) = 0


R1
otherwise. Show, using box sums and Theorem 5.14, that I = 0 f exists.
(We know already—see Problem 12, page 280—that if the integral exists,
then I = 0.)

5.4 Some Fundamental Theorems


We met a useful but preliminary version of the fundamental theorem of calculus
(Theorem 5.9, page 275) in Section 5.2. Using Theorem 5.15, page 285, we can
now tie up a serious loose end—existence of the integral—in connecting integrals
and derivatives. Here is a new, improved version:
5.4. Some Fundamental Theorems 293

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
Z b
f = F (b) − F (a).
a

Proof: We’ve already done all the hard work. By Theorem 5.15, the integral
Rb
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—
Z 1 1
2 x3 1
x 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
Z π
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.
294 5. Integrals

Theorem 5.20 (Fundamental theorem of calculus, version 2). Let f : [a, b] →


R be continuous. Define a new function F by
Z x
F (x) = f for all x ∈ [a, b].
a

Then F (c) = f (c) for all c ∈ (a, b).
Proof: Note first that F (x) is defined for all x ∈ [a, b]. Part (i) of Proposi-
tion 5.16, page 286. 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,
R c+h Rc R c+h
F (c + h) − F (c) a
f− af f
= = 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
Z c+h Z c+h Z c+h
mh · h = mh dx ≤ f (x) dx ≤ Mh dx = Mh · h,
c c c

and therefore R c+h


c
f
mh ≤ ≤ 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
R c+h
c
f
= f (xh ).
h
As h → 0+ , we have xh → c, and since f is continuous at c, we have
R c+h
f
lim c = lim f (xh ) = f (c),
h→0 + h h→0+

as desired. 
5.4. Some Fundamental Theorems 295

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
Rb
f
a
average value = .
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
Z 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
Rb
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.
Rb Rb
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?
R2
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).
296 5. Integrals


(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
Rb
x ∈ [a, b] and that a h = 0. Use Theorem 5.20 to show that h(x) = 0 for
Rx
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 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
R1 R1
0 hn converge to 0 h? Explain.
5.4. Some Fundamental Theorems 297

(b) Show that the sequence {hn } converges uniformly to h on [0.1, 1].
R1 R1
Does 0.1 hn converge to 0.1 h? Explain.

14. (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.

(a) We showed in Section 4.4 that the sequence {fn } converges pointwise
R1 R1
to f on [0, 1]. Does 0 fn converge to 0 f ? Explain.
R 0.9
(b) The sequence {fn } converges uniformly to f on [0, 0.9]. Does 0 fn
R 0.9
converge to 0 f ? 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].


R1 R1
(b) Prove that 0 fn converges to 0 f .
Selected 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. (a) 1 ∈ S1 but −1 ∈
/ S1
(b) 2 ∈ S2 but 1/2 ∈
/ S2
√ √ √
(c) 2 ∈ S3 but 1/ 2 = 2/2 ∈
/ S3
(d) π ∈ S4 but π 2 ∈
/ S4
7. All of xy, x + y, x − y and x/y can be either rational or irrational. Examples are
easy to find.

9. Assume toward contradiction that 3 = a/b for integers a and b, where a/b is 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.
11. Parts (i) and (ii) follow from the fact that 1 < a/b < 2. For part (iii), note that
a′2 (2b − a)2 4b2 − 4ab + a2
′2
= 2
= 2 ,
b (a − b) 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. Matrix addition in M2×2 is commutative, but multiplication is not; examples are
easy to find. Every matrix A in M2×2 has an additive inverse −A, but multiplicative
inverses exist only for some nonzero matrices (those with nonzero determinant);
again, examples are easy to find. Distributivity does indeed hold in M2×2 .
15. 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.)

299
300 Selected Solutions

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.
3. (a) R \ A = (−∞, 1) ∪ (3, ∞)
(c) R \ A = (−∞, 1]) ∪ [2, 3] ∪ [4, ∞)
(e) R \ A = {0}
5. To say that a is in R \ (R \ A) means that a is not in R \ A; this means, in turn that
a ∈ A.
7. We know R \ A1 = (−∞, 1] ∪ [3, ∞) and R \ A2 = (−∞, 2] ∪ [5, ∞). Also,
R \ (A1 ∩ A2 ) = (−∞, 2] ∪ [3, ∞) and R \ (A1 ∪ A2 ) = (−∞, 1] ∪ [5, ∞).
It’s easy to see that, as claimed, R \ (A1 ∩ A2 ) = (−∞, 2] ∪ [3, ∞) = (−∞, 1] ∪
[3, ∞) ∪ (−∞, 2] ∪ [5, ∞) = (R \ A1 ) ∪ (R \ A2 ). Similarly, R \ (A1 ∪ A2 ) =
(−∞, 1] ∪ [5, ∞) = ((−∞, 1] ∪ [3, ∞)) ∩ ((−∞, 2] ∪ [5, ∞) = (R \ A1 ) ∪
(R \ A2 )).
9. If x ∈ T ′ then x ∈ / S, which means x ∈ S ′ , as
/ T . Since T ⊃ S, we have x ∈
desired.
11. (a) I = (−42, 0) and J = (0, ∞) work.
(b) I = (−42, 0) and J = [0, ∞) work.
(c) The given conditions (draw a picture) mean that a < c < 0 < b < d, so
I ∪ J = (a, d) which is indeed an open interval.
13. It’s easy for I and R \ I to be intervals. For instance, if I = (−∞, 0), then
R \ I = [0, ∞) is another interval. I and R \ I cannot both be bounded intervals;
two bounded intervals can’t “add up” to the unbounded set (−∞, ∞).
15. No.√Suppose a and b are rational numbers in I, with a < b. Consider c = a + (b −
a)/ 2. Note that c ∈ R \ Q and that a < c < b. If I were an interval, we’d have
c ∈ I, which is impossible.
17. (a) The complement of {1, 2, 3} consists of four open intervals.
(b) R \ Z is the union of all open intervals of the form (n, n + 1), where n ∈ Z.
(c) If Q were open, we could find for each rational q an open interval I with
q ∈ I ⊆. But I ⊆ Q is impossible.
(d) If (0, 1] were open there would be an open interval I with 1 ∈ I ⊆ (0, 1].
That’s impossible—every such I includes points “to the right” of x = 1. A
similar argument with 0 ∈ R \ (0, 1] shows that R \ (0, 1] isn’t open, so (0, 1]
isn’t closed.
Selected Solutions 301

19. (a) There are 10 × 9 × 8 = 720 ways to choose 3 different elements in order.
There are six ways to reorder each such choice, so the answer is that S had
720/6 = 120 elements.
(b) T has 10 × 10 × 10 = 1000 elements.
(c) S10 has 10! = 10 × 9 × 8 × · · · × 1 = 3628800 elements.
(d) The sets N10 , S, T , S10 have no elements in common.
21. We have S ∈ A42 if and only if N100 \S ∈ A58 , so there is a one-to-one correspon-
dence between A42 and A58 , which therefore have the same number of elements.
23. (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).

3. (a) The natural domain is all of R.


(b) The natural domain is all of R except for points x at which cos x = 0.
(c) The natural domain is (−∞, −1] ∪ [1, ∞).
5. (a) f (x) = x2 + 1 works
(b) f (x) = (x − 2)2 = x2 − 4x + 4 works
(c) f (x) = (x + 5)2 = x2 + 10x + 25 works
7. (a) Horizontal lines intersects the graph at most once.
302 Selected Solutions

(b) Every horizontal line y = a, where 0 ≤ a ≤ 1, intersects the graph.


(c) f (x) = 1 − x, f (x) = 1 − x2 , f (x) = 1 − x42 all work. So do many others.

(d) Here f (1/ 2) = f (1/2) = 1/2, so f is not one-to-one. But f is onto, since
every irrational number in [0, 1] has an irrational square root, also in [0, 1].
9. It’s reasonable to use f : (0, ∞) → (−∞, ∞) and g : (−∞, ∞) → (0, ∞).
Graphs of f and g are mirror images across the line y = x. We have f (g(x)) = x
and g(f (x)) = x for x in the appropriate domains.
11. (a) The domain is the set A = {a, e, i, o, u}; a good codomain is B =
{1, 2, 3, 4, 5}.
(b) f is one-to-one because no two elements of G have the same second coor-
dinate. f is onto because every element of B is the second coordinate of an
element of G.
(c) The graph of f −1 is the set {(1, a), (2, e), (3, i), (4, o), (5, u)}.
(d) We might call these functions VOWEL N UMBER and N UMBERO F VOWL , or
something similar.
13. (a) One approach is to look at the graph. Or note that L(x) = L(y) means that
3x + 2 = 3y + 2, and this can happen only if x = y. Thus L is one-to-one.
Also, for any b ∈ R we can set a = (b − 2)/3, and see that f (a) = b. Thus
L is onto.
15. (a) f is one-to-one and onto for all odd positive integers, and not for even positive
integers.
(b) Here f is one-to-one and onto for all integers, positive or negative.
17. ℓ is both one-to-one and onto; make a table of some early values to see why. This
might seem weird since N might seem “smaller” than Z. In fact (as we’ll see)
they’re the same “size” in the sense at hand.
19. Use domain [−π, π] and codomain [−1, 1] for the sine function; and codomain
[−π, π] and domain [−1, 1] for the arcsine function. Then the arcsine becomes an
honest inverse for the sine.
21. (a) That M OD 5 is reflexive and symmetric is obvious. To see it’s transitive, sup-
pose xM OD 5y and yM OD 5z. This means that 5 divides both x − y and y − z.
But then 5 also divides the sum (x − y) + (y − z) = x − z, which means
xM OD 5z.
(b) The equivalence class [0] is the set {. . . , −10, −5, 0, 5, 10, . . . } of multiples
of 5. The equivalence class [1] is the set {. . . , −9, −4, 1, 6, 11, . . . } of num-
bers one more than a multiple of 5. Similarly, [2] = {. . . , −8, −3, 2, 7, 12,
. . . } and so on.

1.4 Proofs 101: Proofs and Proof-Writing


1. Statement P is false, R is true, and Q is nonsense. R is the negation of P.
3. (a) If a function f is increasing for all x, then f ′ (x) ≥ 0 for all x.
Selected Solutions 303

(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.
P
(d) If a series an converges, then lim an = 0. (This is known as the nth term
test.)
5. (a) The statement is false; no integer is greater than all real numbers.
(b) The statement is true; x = 0.1 works, for instance.
7. (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).
(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).

9. R: Negation: ∃n ∈ N such that n2 + 6 ∈ / N. This is true.

S: Negation: ∀ ∈ N, n2 + 6 ∈ / N. This is true.
T: Negation: ∃x ∈ [0, 1] such that cos(x) < 0.6. This is true; look at x = 1,
for instance.
U: Negation: Some positive even integer n with 4 < n < 24 is not the sum of
two odd primes. This is false; one just checks.
11. (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 6= −1.
(e) Negation: ∃x ∈ R such that ∀y ∈ R we have xy 6= 1.
13. (a) Statement: If x > 3 then x2 > 9. Converse: If x2 > 9 then x > 3. Contra-
positive: If x2 ≤ 9 then x ≤ 3. These are true, false, and true, respectively.
(b) Statement: If x > 3 then x3 −4x2 +3x > 0. Converse: If x3 −4x2 +3x > 0
then x > 3. Contrapositive: If x3 −4x2 +3x ≤ 0 then x ≤ 3. The statements
are true, false, and true, respectively. (It may be useful to plot the function.)
(c) Statement: If a > 0 and b > 0 then |a + b| = |a| + |b|. Converse: If
|a+b| = |a|+|b|, then a > 0 and b > 0. Contrapositive: If |a+b| = 6 |a|+|b|,
then a ≤ 0 or b ≤ 0. The statements are true, false, and true, respectively.
304 Selected Solutions

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. The claim is obvious for n = 1. Given F = {x1 , x2 , . . . , xn }, consider F ′ =
{x1 , x2 , . . . , xn−1 }. By the inductive hypothesis F ′ has a largest member, say
xn−1 . The largest member of F is then xn if xn > xn−1 , and xn−1 otherwise.
5. (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.
n n n
X X X n(n + 1)
(c) Calculate with sums: (2n−1) = 2 n− 1=2 −n = n2 .
2
k=1 k=1 k=1

7. Prove this by induction. The base case n = 1 is clear. For the inductive step,
suppose that (1 + x)k ≥ 1 + kx for a particular k. Multiplying both sides by
(1 + x) and doing a little algebra shows that (1 + x)k+1 ≥ 1 + (k + 1)x, as
desired.
9. (a) Rewrite f1 f2 f3 as (f1 f2 )f3 and use the ordinary product rule twice.
(b) The formula is (f1 f2 f3 · · · fn )′ = f1′ f2 f3 · · · fn + f1 f2′ f3 · · · fn + f1 f2 f3′
· · · fn + · · · + f1 f2 f3 · · · fn′ . We’ve proved the first few cases. For the in-
ductive step, we write f1 f2 f3 · · · fn+1 = (f1 f2 f3 · · · fn )fn+1 and apply the
ordinary product rule.
11. (a) Checking early cases suggests the answer n(n + 1)(n + 2)/3; this is readily
proved by induction.
(b) Notice that
n n n
X X X n(n + 1)(2n + 1) n(n + 1)
j(j + 1) = j2 + j= + .
j=1 j=1 j=1
6 2

The result now follows from basic algebra.


Selected Solutions 305

13. Note first that P (n) is obviously true for the base case 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.


15. The base case is an assumption. (We’ll prove it later in the course.) The inductive
step follows readily from the product rule.
17. Among small amounts, it’s clear we can pay out $3, $5, $6, $8, $9. In fact, we can
pay all numbers greater than $9, too. Here’s an informal inductive proof. Note first
that the base case $10 is clearly possible. Suppose we can pay out all amounts from
$10 to $k. To show $k + 1 is also possible, note that k + 1 − 3 = k − 2 ≥ 8, so
$k − 2 is payable. Adding one more $3 bill brings the total to $k.

1.6 Sets 103: Finite and Infinite Sets; Cardinality


1. Here’s a sketch: The base case is given. For the inductive step, write F1 ∪ F2 ∪
· · · ∪ Fn = (F1 ∪ F2 ∪ · · · ∪ Fn−1 ) ∪ Fn and use the inductive hypothesis.
3. (a) f (x) = 7x − 2 is one-to-one: If f (a) = f (b), then 7a − 2 = 7b − 2, which
implies a = b. g(x) = x/(1 + x) is also one-to-one: if g(a) = g(b), then
a/(1 + a) = b/(1 + b). A little algebra (do it—keep in mind that a and b are
positive) shows that a = b.
(b) For any b ∈ R we can set a = (b+2)/7 and see that f (a) = b. If b ∈ (−2, 5)
then b + 2 ∈ (0, 7) and (b + 2)/7 ∈ (0, 1) as desired.
(c) We know that both f and g are one-to-one and onto; it follows (from one of
our theorems) that f ◦ g is one-to-one and onto. This means (among other
things) that all of the sets under consideration here have the same cardinality.
5. 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.
7. (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.
9. 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.
11. (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.
306 Selected Solutions

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.
13. As one possible bijection f : [0, ∞) → (0, ∞) we can define f (x) = x + 1 if
x ∈ Z and f (x) = x otherwise.
15. 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 .
17. Different approaches are possible. In the case discussed, it’s fun to see that, in bi-
nary digit notation, h(0.1stuff) = 0.01stuff, h(0.01stuff) = 0.1stuff, h(0.001stuff)
= 0.0001stuff, h(0.0001stuff) = 0.001stuff, etc.

1.7 Numbers 102: Absolute Values



1. (a) From elementary calculus we can see that |sin(x) + cos(x)| ≤ 2.
(b) The RTI says that |sin(x) − cos(x)| ≥ || sin(x)| − | cos(x)|| ≥ 0. We can’t
improve on this, since |sin(x) − cos(x)| = 0 when x = π/4.
(c) Yes. A famous trigonometric identity says that sin(x)2 + cos(x)2 = 1 for all
x.
3. For the first inequality, use the ordinary triangle inequality and the fact that |x−y| =
|x + (−y)|. The second inequality is half of the RTI.
5. (a) x ∈ (1, ∞)
 √ √  √ √ 
(b) x ∈ − 4.07, − 3.93 ∪ 3.93, 4.07

(c) x ∈ (−3, 1)
7. (a) Subtracting 4 from all parts of 4.96 < y < 5.04 gives 0.96 < y − 4 < 1.04;
note also that y − 4 = |y − 4|.
(b) Note that 2.93 < x < 3.07 and 4.96 < y < 5.04. Thus |y − x| < 5.04 −
2.93 = 2.11 = K.
(c) Since 2.93 < x < 3.07 and 4.96 < y < 5.04, we have |y − x| > 4.96 −
3.07 = 1.89 = L.
9. The base case (n = 2) is the ordinary TI. For the inductive step, let’s assume that
the TI holds for n summands. To show it holds for n + 1 summands we calculate
Selected Solutions 307

just as in the problem, except that we use n + 1 summands instead of three.

|x1 + · · · + xn + xn+1 | = |(x1 + · · · + xn ) + xn+1 | ≤ |x1 + · · · + xn | + |xn+1 |


≤ |x1 | + · · · + |xn | + |xn+1 | .

11. (a) Look separately at the cases x ≥ y (so |x − y| = x − y) and x < y (so
|x − y| = y − x).
x + y − |x − y|
(b) min{x, y} = .
2
f (x) + g(x) − |f (x) − g(x)|
(c) We can use h(x) = .
2
(d) A good interval is something like [−20, 2].
13. (a) |x − 1| < 0.5 implies 1 − x < 0.5, or x > 0.5.
|c|
(b) Use the triangle inequality: |c| = |c − x + x| ≤ |c − x| + |x| < 2
+ |x|.
This implies |c| < |c|
2
+ |x|, or |x| > |c|
2
.

1.8 Bounds
1. Following are sketches.
(a) Say m ≤ t ≤ M for all t ∈ T . If s ∈ S, then s ∈ T , too, so m ≤ s ≤ M .
Thus S is bounded.
(c) If |S| is bounded, then |s| < K for all s ∈ S and some K > 0. But then
−K < s < K for all s ∈ S, so S is bounded. The converse is similar.
3. (a) I = [1, 3) works
(b) I = (−∞, 3) works
(c) I = (1, 3) works
(d) No; if max(S) exists then max(S) = sup(S).
5. (a) We have 1 = e0 ≤ f (x) = ex ≤ e10 and −1 ≤ g(x) = sin(x) ≤ 1 for
x ∈ A. We know from calculus that (i) f (x) = ex is bounded below by 0 but
is unbounded above on R, and (ii) g(x) = sin(x) is bounded below by −1
and above by 1 on all of R.
(b) For f ◦ g: When x ∈ [0, 10] we have 0.37 ≈ e−1 ≤ esin(x) ≤ e1 ≈ 2.72.
For g ◦ f : When x ∈ [0, 10] we have −1 ≤ sin(ex ) ≤ 1.
7. Since A is bounded we know that −M ≤ x ≤ M for some M > 0 and all x ∈ A.
But then also −3M + 5 ≤ 3x + 5 = f (x) ≤ 3M + 5 for all x ∈ A, as desired.
9. (a) inf(S) = min(S) = 2; sup(S) = max(S) = 3.
(b) inf(S) = min(S) = 2; sup(S) does not exist, as there are infinitely many
primes.
308 Selected Solutions

(c) Here S = {2}, so inf(S) = min(S) = 2 = sup(S) = max(S)


(d) inf(S) = min(S) = 41; sup(S) = max(S) = 43.
√ √
√ = − 2; sup(S) = 2. Maximum and minimum values don’t exist,
(e) inf(S)
as 2 ∈ / S.
√ √
(f) inf(S) = min(S) = − 2; sup(S) = max(S) = 2.
11. (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.
13. (a) All subsets S ⊆ R have this property
(b) The given property means that S is bounded.
(c) For all s ∈ S, |s| ≥ 1.
15. (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 r ight 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).
17. (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
1 1 1
s ∈ S. Thus, if t ∈ T we have |t| = = < , so T is bounded. The
s |s| δ
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.
19. (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.

1.9 Numbers 103: Completeness


1 1 1 1
1. (a) One possibility 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
Selected Solutions 309

(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, . . . . “Successive averaging” is another possibility.
3. For given ǫ > 0, consider the positive number 1/ǫ. Since N is unbounded, there
exists an integer n with n > 1/ǫ. But then 0 < 1/n < ǫ, as desired.
5. (a) The statement is false if a = 0 and b = 1.
(b) The statement is true. If 0 < a < b then the the Archimedean principle
applies. If a < b < 0 and n = −1, then na > b. The case a < 0 < b is left
to you.
(c) Clearly b + 1 > b, so we can choose n ∈ R with na = b + 1; i.e., n =
(b + 1)/a. Nothing Archimedean needed.
7. (a) The italicized statement is true; this is essentially the well-ordering principle.
(b) The italicized statement is now false. The set S of rationals less than π has
supremum π, but π ∈ / Q.
9. (a) In = (3 − 1/n, 3 + 1/n) works.
(b) In = [−3 − 1/n, 42 + 1/n] works.
(c) In = (−3 − 1/n, 42 + 1/n) works.
11. The hint explains the problem: If (a, b) is contained in all the Ii , then [a, b] is
contained in all these intervals, too.
13. (a) The set S is certainly bounded above; by completeness there’s a least upper
bound, β.
(b) Note that (β + h)2 = β 2 + 2βh + h2 < β 2 + 2βh + h = β 2 + (2β + 1)h.
Now use property (ii) of h.
(c) The preceding calculation shows β + h—a number larger than β—has square
less than 2. This contradicts the supremum property of β.
(d) Note that (β − k)2 = β 2 − 2βk + k2 < β 2 − 2βk. Substitute for k and
simplify.
√ p√ √ p√
15. The point is simply that 4 a = a, 8 a = 4
a, and so on.
√ p√
17. We have, for instance, a =
6 3
a; other parts are similar.

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 10 1000 ≈ 31.6
4
(b) N 1 100 10 106
(c) N 1 e9 ≈ 8103 e99 e999
310 Selected Solutions

3. Suppose toward contradiction that L > b. Set ǫ = b − L and choose N as in the


definition of convergence. Then (explain why!) we must have xn > b for n > N ,
which is absurd. A similar argument shows that L ≥ a.
5. (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) Yes, it’s possible. We might have xn = 4 − 1/n, for instance.
(b) Yes, it’s possible. Our series could have the pattern 4.1, 3.9, 4.01, 3.99, 4.001,
3.999, . . . .
9. (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.
(b) The proof is like that for (a), except that now we have

899900 899900/ǫ − 15
|bn − L| = <ǫ ⇐⇒ < n.
9n + 15 9
899900/ǫ−15
Thus N = 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. Here’s a sketch. Let ǫ > 0 be given, and set ǫ′ = ǫ/17. Since ǫ′ > 0 we can choose
N so that n > N implies |xn − 1| < ǫ′ . This same N works in the definition of
convergence of {17an } to 17.
Selected Solutions 311

13. Suppose {an } is decreasing. Since {an } is bounded, this set has an infimum; call
it L. To see L is also the limit, let ǫ > 0 be given. Because L is the infimum,
L + ǫ is not a lower bound for {an }, and so there is some aN with L + ǫ > aN .
This N “works”: If n > N , then an ≤ aN (because {an } is decreasing) and so
L ≤ aN < L + ǫ, as desired.
15. Suppose xn → 5. To show yn → 0, let ǫ > 0 be given. Since xn → 5 we can
choose N so that n > N =⇒ |xn − 5| < ǫ. This is just another way of saying
that |yn | < ǫ, and so yn → 0 as desired. The converse is almost identical.
17. (a) For any given ǫ > 0 we have |1/n − 0| ≥ ǫ only when n ≤ 1/ǫ. There are
only finitely many such n.
(b) Let ǫ > 0 be given, and consider the set F = {n | |xn − L| ≥ ǫ}. By
hypothesis, F is finite. If F is nonempty, then F has a largest element, say
N ; this N works in the definition of convergence. If F is empty, then N = 0
works.
(c) A sequence {xn } does not converge to zero if, for some ǫ > 0, we have
|xn | ≥ ǫ for infinitely many n.
(d) A sequence {xn } does not converge to zero if, for some ǫ > 0, there is no N
such that |xn | < ǫ whenever n > N .
19. Every constant sequence has such a table.
21. (a) true
(b) true; 0 is a lower bound
(c) false; n = 43 is a counterexample
(d) true; N = 10000 works
(e) true; N = 1 works, for instance
(f) false
(g) true; for a given ǫ we can choose N = 1/ǫ (or the next integer if 1/ǫ isn’t an
integer)
23. (a) true
(b) true
(c) false; use technology to find a counterexample, like n = 45
(d) true; N = 10000 works
(e) true; N = 20000 works . . . use the triangle inequality
(f) false; see (d)
(g) true; N = 1/ǫ (or the next integer) works
312 Selected Solutions

25. The limits L are 0, 0, 0, 3, 42, respectively. Possible tables:

ǫ 1.000 0.100 0.010 0.001 10−10


(a) N 1 100 10000 106 1020
√ √ √
(b) N 1 10 100 1000 105
√ √ √
(c) N 1 10 100 1000 105
(d) N 6 60 600 6000 6 · 1010
(e) N 41 41 41 41 41

27. (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.
29. Implications are as follows: .
(a) The statement says that an → π.
(b) The statement says that for some n, an = π for n > N .
(c) The statement says that an = π for n > 1.
In particular, (c) =⇒ (b) =⇒ (a).

2.2 Working with Sequences


1. Here is a sketch. For any constant c 6= 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. Both equivalences follows directly from the ǫ − N definition. The second also
follows from (a) of Proposition 2.7, page 99.
5. Imitate the (partial) proof given for Lemma 2.9.
1
7. (a) We can define {bn } by bn = 1 − n
.
(b) We can define {bn } by bn = 1 for all n.
Selected Solutions 313

(c) Because β − n1 is not an upper bound for C, there must exist bn as desired.
(Note the strict inequality.)
1
(d) Apply the squeeze principle to β − n
< bn ≤ β.
9. 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.
11. 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.
13. (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 →
−∞.
(b) Suppose
xn → ∞. Let ǫ > 0 be given; we need to find N so n > N implies
1
xn = x1n < ǫ. 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 → ∞ ⇐⇒ − x1n →
0 ⇐⇒ x1n → 0.
15. (a) The limit is 2/5.
(b) The sequence diverges to ∞.
(c) The sequence converges to 1/2.
n2 +arctan n
(d) The sequence diverges to ∞. One strategy is to observe that n+2
>
2
n −4
n+2
= n − 2.
17. (a) One possibility is to let an = (−1)n and bn = (−1)n+1 for all n.
(b) We’ll show that cn → max{a, b}.
One approach is to use the curious fact (which appears in a later section) that
for any numbers an and bn ,
an + bn + |an − bn |
cn = max{an , bn } = .
2
Invoking Theorem 2.5 (on algebra with convergent sequences) and Proposi-
tion 2.7.b (on how absolute values play nicely with limits) we see that
an + bn + |an − bn | a + b + |a − b|
cn = converges to c = = max{a, b},
2 2
as desired.
Here is another approach. We assume WLOG that a ≤ b and show that
cn → b.
Suppose first that a = b. Then for given ǫ > 0 we can choose Na and Nb
such that n > Na implies |an − b| < ǫ, and n > Nb implies |bn − b| < ǫ.
314 Selected Solutions

Let N = max{ Na , Nb }. If n > N , then we have both |an − b| < ǫ and


|bn − b| < ǫ. Now recall that, for all n, either cn = an or cn = bn . Thus
|cn − b| < ǫ for all n > N , and we’re done.
The other possibility is that a < b. Set ǫ = b−a2
and choose N (as above) so
that both |an − a| < ǫ and |bn − b| < ǫ hold whenever n > N . This means
(draw a picture if this isn’t clear) that an < bn for all n > N . In other words
cn = bn for all n > N , and so surely {cn } and {bn } converge to the same
limit, b.
19. (a) We have x1 = 1, x2 = 2, x3 = 3/2, x4 = 5/3, x5 = 8/5, x6 = 13/8,
x7 = 21/13, x8 = 34/21. Note the connection to the Fibonacci sequence
1, 1, 2, 3, 5, 8, 13, . . . . The sequence is not monotone, but has the pattern
x1 < x2 > x3 < x4 > x5 < . . . .
1
(b) We know xn+1 = 1 + . Since {xn } converges to L we can take limits on
xn
both sides to get L = 1 + 1/L. Solving √ for L gives L2 − L − 1 = 0. The
quadratic formula says L = (1 ± 5)/2; from context it’s clear we want the
positive root L ≈ 1.61803.
21. (a) Check first that since x1 = 3, we have 1 < xn < 4 for all n. Also, xn+1 =
(x2n + 4)/5 < xn ⇐⇒ x2n − 5xn + 4 < 0, and it’s easy to see that this
holds when 1 < xn < 4.
(b) The sequence {xn } converges because it’s monotone and bounded.
(c) Because the sequence converges, we must have L = (L2 + 4)/5, so L = 1
or L = 4. In context it’s clear that L = 1.
23. We’ll show |xn /yn | → 0. (Why is this enough?) First choose M > 0 such that
|xn | < M for all n. (Why can we do this?) Now choose ǫ > 0. Since yn → ∞
we can find N so that n > N implies |yn | > M ǫ can we do this?) This N
. (Why
xn M M
works for the sequence {|xn /yn |}: If n > N , then < < = ǫ.
yn yn M/ǫ

2.3 Subsequences
1. (a) The sequence 1, 2, 3, 1, 2, 3, . . . works.
(b) The sequence 1, −1, 1/2, −1/2, 1/3, −1/3, . . . works.
(c) The sequence 0, 1, 0, 2, 0, 3, . . . works.
(d) The sequence 1, 1, 1/2, 2, 1/3, 3, . . . works.
(e) The sequence 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, . . . works.
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.
Selected Solutions 315

(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. In general it’s possible for a subsequence to behave differently from its parent.
The point here is that this particular kind of subsequence—the “tail” of a given
sequence—behaves in a more special way.
Here’s the idea: Let ǫ > 0 be given, and suppose that some N1 , say N1 = 1000,
works for the subsequence. Note that the 1001th term of the subsequence is x5242 ,
and we know that from then on, all terms of the subsequence are within ǫ of L. But
this is just another way of saying that all terms past x5242 in the original sequence
are within ǫ of L; that is N = 5242 works for the given ǫ in the parent sequence.
In general, if N1 works for the subsequence, then N = 4242 + N1 works in the
parent sequence. Clean this up a little to get an impeccable proof.
7. Statements (a), (c), (e), and (f) are all equivalent to each other. Statements (b) and
(d) are also equivalent.
9. (a) The sequence 0, 3, 0, 3, 0, 3, . . . is one example.
(b) The statement xn → 3 means that, for every ǫ > 0, all but finitely many
xn are within ǫ of 3. Negating this condition means that, for some ǫ > 0,
infinitely many xn are at leastǫ away from 3. These {xn } can be taken in
order to give the desired subsequence.
11. (a) For M > 0, choose N such that xn > M whenever n > N . The same N
works for the subsequence {xnk }, since if k > N , then nk ≥ k > N , and
so xnk > M , as desired.
(b) The contrapositive of Theorem 2.12(a) says that if some subsequence {xnk }
does not converge to L, then the original sequence {xn } doesn’t converge to
L either. This implies Theorem 2.12(c), because if L is any number, then at
least one subsequence fails to converge to L, and so L can’t be the limit.
13. The sequence {x11 , x101 , x1001 , . . . } does the job. For this sequence we have
nk = 10k + 1.
15. Notice first that zn = bn/2 for even n and zn = a(n+1)/2 for odd n. In particular,
both sequences {an } and {bn } are subsequences of {zn }, so if zn → L we must
have an → L and bn → L, too.
For the converse, we suppose that both an → L and bn → L. Let ǫ > 0 be
given. We can choose N1 and N2 such that n > N1 =⇒ |an − L| < ǫ, and
n > N2 =⇒ |bn − L| < ǫ. Now let N = 2 max{N1 , N2 }. This N “works”
for {zn }, because if n > N and n is even, then n/2 > N ≥ N2 , so |zn − L| =
|bn/2 − L| < ǫ. Similarly, if n > N and n is odd, then (n + 1)/2 > N ≥ N1 , so
|zn − L| = |a(n+1)/2 − L| < ǫ.

2.4 Cauchy Sequences


1. (a) For given ǫ > 0 we can choose N = 2/ǫ. This N works because if m, n > N
1 1 ǫ ǫ
then |xn − xm | ≤ |xn | + |xm | = + < + = ǫ.
n m 2 2
316 Selected Solutions

(b) The sequence is not Cauchy. If we choose, say ǫ = 0.001, then no N works,
since 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 |zn − zm | =
n m n−m n−m n 1
n + 1 m + 1 = (n + 1)(m + 1) < nm < nm = m . It follows

that for ǫ > 0 we can choose N = 1/ǫ.



sin n
(d) The sequence is Cauchy. If n > m, we have |wn − wm | = 2 −
n +1
sin m sin n sin m 2 2 2
≤ 2 + ≤ < , and 2 < ǫ if
m2 +p1 n + 1 p m2 + 1 m2 + 1 m2 m
m > 2/ǫ. Thus, N = 2/ǫ works in the definition.
3. For ǫ > 0 choose N that works for ǫ in the sense of Definition 2.17. 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 (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, the limit L is in [0, 1],
too.
(0, 1] is not complete because {1/n} is a Cauchy sequence in (0, 1], but its
limit 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. Use the fact that 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 m+1 + m+2 + · · · + n < m , regardless of n. This fact
2 2 2 2
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.
n(n + 1)
(d) Sn = for all n; this diverges (to ∞).
2
Selected Solutions 317

1 − rn
(e) The series is geometric, with r = 0.99, so Sn = = 100−100·0.99n ,
1−r
and Sn → 100.
n
(f) One shows by induction that Sn = . Thus Sn → 1.
n+1
n
3. (a) Since H2n > for all n and the right-had sequence diverges to infinity, we
2
must have H2n → ∞, too. Since {Hn } has a divergent subsequence, {Hn }
must diverge, too.
(b) Suppose toward contradiction that Hn → H for some finite number H. Since
{H2n } is a subsequence, we’d have H2n → H, too. But we also have H2n >
1 1
+ Hn ; taking limits of both sides gives H ≥ + H, which is absurd.
2 2

X 1
5. (a) The series converges absolutely by comparison to .
k2
k=1

X 1
(b) The series converges absolutely by comparison to 2
.
k=1
k

X 1
(c) The series converges absolutely by comparison to the geometric series k
.
k=1
3
(d) The series diverges by the nth term test—all terms exceed 1/3.
P P P
7. 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.
9. (a) It’s 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
− + −···± adds up to a positive result; group
1001 1002 1003 1000 + n
summands in pairs to see why. Claim (ii) holds because every string of the
1 1 1 1
form − + − + ··· ± has negative sum; again,
1002 1003 1004 1000 + n
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.
P P
11. (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.
318 Selected Solutions

(b) We know (see the preceding part) that Bn = An − A42 + B42 . Because
X4
bk − ak = k2 , we must have B42 − A42 = 2k2 = 25585. Thus,
k=1
Bn = An + 25585, and since An → 100 we must have Bn → 25685.
13. A similar problem appears in Section 1.5.

2.6 Series 102: Testing for Convergence


and Estimating Limits
∞ ∞
X 1 X 1
1. (a) converges by comparison limit comparison to .
2k −1 2k
k=1 k=1
∞ ∞
X k X 1
(b) diverges; one approach is limit comparison to .
k=1
2k2 − 1 k=1
k

X k
(c) converges by the ratio test.
3k
k=1

X k2 + 2
(d) diverges; use the nth term test.
k=1
3k2 − 2
3. (a) The series diverges by the ratio test.
(b) The series converges by the ratio test.
(c) The series converges by the ratio test; a little algebra is needed.
5. (a) The series converges absolutely for −1 < x < 1; it’s geometric.
(b) The series converges absolutely for −1 < x < 1; use the ratio test when
x=6 0.
(c) The series converges absolutely for −1 < x < 1; use the ratio test when
x 6= 0. converges conditionally when x = −1.)
(d) The series converges absolutely for all x; use the ratio test when x 6= 0.
X X 1 X 2 X X1 X 2
7. (a) If ak = √ then ak diverges. If ak = then ak
k k
converges.
a2
(b) Use the limit comparison test: Here k = ak , and this tends to zero by the
X 2 ak
kth term test. Hence ak converges.
K
X K
X
P P
9. If bk converges to B, then ak converges to B − bk + ak . This is
k=1 k=1
similar to a problem in the preceding section, where K = 42.
Selected Solutions 319

1 1 1 1 1 1
11. Notice that the sum Sn = √ + √ + · · · + √ > √ + √ + · · · + √ =
1 2 n n n n
n √ √
√ = n. Since n → ∞, we must have Sn → ∞, too.
n

X 1
13. (a) The series converges by comparison to k−1
, which converges to 2.
k=1
2
∞ ∞
X 1 X 1 1
(b) We have R10 = < = 9.
k=11
2k−1 + 1 k=11
2k−1 2
1
(c) We have S = S10 + R10 < 1.26255 + ≈ 1.26450. This means that S
29
lies somewhere in the interval [1.26255, 1.26450].
15. (a) See your favorite calculus text.
(b) We need to choose n so RZn < 0.001. By the given inequality, this holds if

dx
n is large enough so that < 0.001. A calculus calculation shows
Z ∞ n x3
dx 1
that 3
= 2
, and the last quantity is less than 0.001 if n ≥ 23. This
n x 2n
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) lim (2x + 3) = 5. Note that |f (x) − 5| = 2, |x − 1|. It follows that for
x→1
given ǫ > 0 we can set δ = ǫ/2.
x2 − 1
(b) Factoring the numerator gives lim = lim (x − 1) = −2. (For
x→−1 x+1 x→−1
given ǫ > 0 we can set δ = ǫ.)
5. (a) For f (x) = x2 , we have lim f (x) = lim x2 = 422 = f (42), so the
x→42 x→42
condition does hold at a = 42.
(b) For f (x) = x2 and any input a, we have lim f (x) = lim x2 = a2 = f (a),
x→a x→a
so the condition holds at every a.
x2 −4
(c) Since the function f (x) = x−2
is not defined at a = 2, the condition can’t
possibly hold.
x2 − 4 32 − 4
(d) We have lim f (x) = lim = = f (3), as desired.
x→3 x→3 x − 2 3−1
7. Let {xn } be any sequence with xn → a and xn 6= a for all n. Then {f (xn )},
{g(xn )}, and {h(xn )} are all sequences, and the hypotheses imply that (i) f (xn ) ≤
g(xn ) ≤ h(xn ) for all n; (ii) f (xn ) → L and h(xn ) → L. Now the sequence
version of the squeezing theorem implies that g(xn ) → L, too. Since this applies
320 Selected Solutions

to any sequence {xn } of the given type, Lemma 3.2 implies that lim g(x) = L, as
x→a
desired.
9. (a) We say lim f (x) = L if for all ǫ > 0 there exists M < 0 such that
x→−∞
|f (x) − L| < ǫ whenever x < M .
(b) We say lim g(x) = L if for all ǫ > 0 there exists δ > 0 such that
x→0−
|g(x) − L| < ǫ whenever −δ < x < 0.
(c) Here’s the idea of a proof that lim f (x) = L implies that lim f (1/x) =
x→−∞ x→0−
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 δ = −1/M .
11. (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.)
13. First suppose a ∈ Z0. Let ǫ > 0 be given. Set δ = 1. This δ works, since if
0 < |x − 0| < δ, then x ∈
/ Z, and so |f (x) − 0| = 0 < ǫ, as desired.
If a ∈/ Z, then we can take δ to be the (positive!) distance from a to the nearest
integer.
15. The key idea is that, because S is a finite set, there is a smallest distance, say d,
between any two points in S. Therefore, to show that limx→a j(x) = 0 when
a ∈ S, we can use δ = d works for any ǫ > 0.
To show that 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. Such a δ exists because S is finite.
17. (a) The point is that all three quantities in the claimed inequality are even func-
tions of θ—i.e., they have the same value for θ and for −θ.
(b) Draw the right triangles indicated, and note that θ is the area of the pie-shaped
wedge with angle θ at the origin.

3.2 Continuous Functions


1. For given ǫ > 0, δ = ǫ works.
3. Give details as needed.

(a) δ = 0.001/345 works.


(b) δ = ǫ/345 works.
Selected Solutions 321

(c) δ = ǫ/345 works regardless of the value of a.

5. (a) The idea: If f + g is continuous, then (f + g) − f = g is continuous, too.


Give details.
(b) There are many possiblities.
ǫ
7. Suppose first that A 6= 0. Let ǫ > 0 be given. Set δ = ; note that δ > 0. If
|A|
|x − c| < δ, then |f (x) − f (c)| = |Ax + B − (Ac + B)| = |A||x − c| < |A|δ = ǫ,
as desired.
If A = 0 then f is a constant function. In this case any number δ > 0 works for a
given ǫ > 0.
9. (a) Let ǫ > 0. Since f is continuous at 42 we can choose δ > 0 so |x −
42| < δ =⇒ |f (x) − f (42)| < ǫ. The same δ works for g, because
|g(x) − g(42)| < |f (x) − f (42)|.
(b) For given ǫ > 0 the same δ works for f and for h.
(c) For given ǫ > 0 the same δ works for f and for k.
11. The composite function cos(sin(x)) is continuous; see the relevant fact on page 163.

13. By the continuity hypothesis, f (0) = limn→∞ f (1/n). Since all terms of the
sequence f (1/n) are positive, the limit can’t be negative. (One can argue this more
formally using general properties of sequences. Or see Problem 3, page 91.)
15. Note that limx→3 f (x) = f (3). Let ǫ = f (3) − 5. If we choose any δ > 0 that
works for this ǫ, we’re done.
17. (a) The discontinuity of f (x) = 1/x at a = 0 is not removable; lim f (x) does
x→0
not exist.
(b) The discontinuity is removed if we set f (−2) = −4 = lim f (x).
x→−2

(c) The discontinuity is removed if we set f (0) = 0 = lim f (x).


x→0

19. We need to show that f (c) = 0 if c is any irrational number. Recall (why?) that
there is a sequence {rn } of rationals such that rn → c; note that f (rn ) = 0 for
all n. Continuity of f at c requires that f (rn ) → f (c). In other words, f (c) =
lim f (rn ) = lim 0 = 0.
n→∞ n→∞

3.3 Why Continuity Matters: Value Theorems


1. (a) There are many possibilities; one has the tent-shaped graph through (0, 0),
(1, 1) and (2, 0).
(b) If f (0) = f (1), f (2) = f (1), or f (0) = f (2) we’re done. We might as well
assume, then, that either f (0) < f (2) < f (1) or f (2) < f (0) < f (1). In
the former case, by the IVT, there exists c with 0 < c < 1 and f (c) = f (2),
so indeed f is not one-to-one. The remaining case is similar.
322 Selected Solutions

3. (a) First write

p(x) = xn + an−1 xn−1 + · · · + a1 x + a0


 an−1 an−2 a1 a0 
= xn 1 + + + · · · + + .
x x2 xn−1 xn
Now as x → ∞ the quantity in parentheses tends to 1 and so the product
tends to ∞.
(b) Let M = 0. Then there exists N so that f (x) > M = 0 whenever x > N .
Thus if b is any number with b > N , we have f (b) > 0.
(c) Numerical experiments reveal that q(−1) < 0, q(0) = 1, q(1) = 0, q(1.5) <
0, and q(2) > 0. This means, by the IVT, that there must be a root between
−1 and 0 and another between 1.5 and 2. Factoring gives q(x) = (x −
1)(x2 + x + 1)(x2 − x − 1), from which we can find the real roots exactly.
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. (a) f (x) = |2x − 1| is one possibility
sin(2πx) + 1
(b) f (x) = is one possibility.
2
(c) No such function exists. A continuous function on [0, 1] must achieve a min-
imum value.
9 (a) f (x) = −(x − 0.5)2 is one possibility.
(b) No such function g can exist. Note that we have f (a) = e < 3 < π = f (b)
for some a and b in [0, 1]. Thus 3 is an “intermediate value” and so must be
attained for some c ∈ [0, 1].
(c) p(x) = −3 + x2 is one possibility.
(d) No such function q can exist. If q has odd degree then q is unbounded above
and below. If q has even degree then q may be bounded below, but in this case
q achieves a minimum value rather than just approaching a minimum.
(e) f (x) = ex − 3 is one possibility.
11. Suppose f attains a maximum value at some c ∈ (a, b). If f (c) = f (a) or f (c) =
f (b) then we’re done already, so assume that f (c) > f (a) and f (c) > f (b).
Let v be any number less than f (c) but greater than both f (a) and f (b). (There
are infinitely many possibilities.) By the IVT, f (d) = v for some d ∈ (a, c), and
f (e) = v for some e ∈ (c, b). Thus f (d) = f (e), so f is not one-to-one.
Selected Solutions 323

13. Suppose toward contradiction f (2) ≤ f (1). If f (2) = f (1) or f (2) = f (0), then
f is not one-to-one, a contradiction. Thus we have either f (0) < f (2) < f (1) or
f (2) < f (0) < f (1). In the former case, by the intermediate value theorem there
exists c with 0 < c < 1 and f (c) = 2, which again contradicts the one-to-one
property. The remaining case, f (2) < f (0) < f (1) is similar.
Alternatively, just note that Problem 12 says that f is strictly monotone, and there-
fore strictly increasing.
15. If f is not constant then the range of f is an interval. But every interval contains
both rational and irrational numbers.

3.4 Uniform Continuity


1 (a) For given ǫ > 0 we can use any positive δ, such as δ = 1.
(b) For any s and t, we have |g(s) − g(t)| = |2s + 7 − 2t − 7| = 2 |s − t|.
This implies that for any given ǫ > 0 the value δ = ǫ/2 works.
3. (a) Let ǫ > 0. The value δ = ǫ “works” because if |x−y| < δ then |f (x) − f (y)| ≤
|x − y| < δ = ǫ.

1 1
(b) We have |f (x) − f (y)| = 2 − 2 . Work with a common de-
x +1 y + 1
nominator inside the absolute value to complete the proof.
|x − y|
5. Show first that for x and y in [1/4, 10], |f (x) − f (y)| = 5 ≤ 90|x − y|.
xy
Then, for given ǫ > 0 we can set δ = ǫ/90.
7. In part (c), values of δ that work for f 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. On the other
hand, δ = 0.0005 works for ǫ = 1 on the entire interval [1, 1000].
The difference for g is that δ = 0.1 works for all of c = 1, c = 10, c = 100, and
c = 1000, and would work for all c. This is what uniform continuity on R means.
9. (a) Start by squaring both sides of the desired inequality.
(b) For given ǫ > 0 it works to√set δ = ǫ2 . If 0 < x−y < δ then |f (x) − f (y)| =
√ √ √
x − y ≤ x − y < ǫ2 = ǫ.

11. (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.
324 Selected Solutions

13. (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
Now show that δ = min(δ1 , δ2 ) works for f + g.
(b) One of many possibilities is f (x) = x = g(x) on I = R.
15. (a) For given ǫ > 0 the number δ = ǫ/K works in the definition.
(b) If A = 0 then L is constant, and K = 0 works. Otherwise, for given ǫ > 0
the number δ = ǫ/|A| works.
(c) The ratio in question is bounded by K.

√ g(x) − g(0)
= x = √1 blows up as x →
(d) For g(x) = x, the ratio
x−0 x x
0+ . By the preceding part, g is not Lipschitz continuous on [0, 1].
17. (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 value by more than 1 on intervals
of length δ. Such a function could have jumps, and so need not even be
continuous.

3.5 Topology of the Reals


1. By De Morgan, the intersection of two closed sets is the complement of the union
of two open sets.
3. (a) Let Ui = (−1 − 1/i, 1 + 1/i).
(b) Let Ai = [−1 + 1/i, 1 − 1/i].
5. (a) The value ǫ = 0.0042 works.
(b) The value ǫ = p works.
(c) Suppose U is open and p ∈ U . Since U is a union of open intervals, we must
have p ∈ (a, b) ⊆ U for some open interval (a, b). Since a < p < b we can
take ǫ to be the smaller of p − a and b − p.
7. Let ǫ > 0 be given, and consider the open interval U = (a − ǫ, a + ǫ). Our
assumption means that there is a largest N for which aN ∈
/ U . This N works in the
usual definition of sequence convergence.
9. (a) All points in (0, 1) are interior to [0, 1].
(b) Every point p in U has Nǫ (p) ⊂ U for some ǫ > 0.
Selected Solutions 325

(c) A finite set contains no open intervals.


(d) No points of Q are interior, because Q contains no intervals.
11. (a) x ∈ f −1 ( R \ S ) ⇐⇒ f (x) ∈
/ S ⇐⇒ x ∈ R \ S
(b) Suppose f : RtoR is continuous, and A ⊆ R is closed. Then U = R \ A
is open, so f −1 (U ) is open. By the previous part, f −1 (A) = R \ f −1 (U ),
which is closed. The converse is similar.
13. (a) As we know, every interval (a, b) contains both rationals and irrationals.
(b) The set S is not dense in R. The interval (0, .0005), for instance, has empty
intersection with S.
15. Proofs are routine. Show that every element of the right-hand set is an element of
the left-hand set, and vice versa.
17. (a) (0, 1) = B0.5 (0.5)
(b) R = B1 (0) ∪ B2 (0) ∪ B3 (0) ∪ . . .
(c) R \ Z = B0.5 (0.5) ∪ B0.5 (−0.5) ∪ B0.5 (1.5) ∪ B0.5 (−1.5) . . .
(d) (0, ∞) = B1 (1) ∪ B2 (2) ∪ B3 (3) ∪ . . .
19. (a) All parts of Definition 3.30 are easily checked, including the triangle inequal-
ity.
(b) B1 (p) = (p − 1, p + 1); B2 (p) = R.
(c) This topology has the same open sets as with the usual metric.

3.6 Compactness
1. (a) Each xi is in some Ui , so it takes at most n such Ui to cover F .
(b) We can cover R with open sets Ui = (−i, i) for i ∈ N. A finite subcollection
covers only a bounded subset of R.
(c) It takes zero open sets to cover ∅; that’s certainly finite!
3. (a) Cover each term 1/k with a small open interval that contains no other term of
the sequence.
(b) The set {an } is compact in this case, because it contains its own limit.
(c) Many sequences are possible. One is 0, 1, 0, 1, . . . .
5. Find a linear (therefore certainly continuous) function f : R → R that maps [0, 1]
onto [a, b].
7. The Ui are open because they are inverse images of the open intervals (−i, i). The
Ui cover all of R, and so all of K. Compactness of K means that we need only
finitely many Ui to cover K. This amounts to boundedness of f on K.
9. Proposition 3.41 says that the image of a compact set is compact.
326 Selected Solutions

4.1 Defining the Derivative


1. The difference quotients for g ′ (a) and for f ′ (a) are identical, so their limits are
equal.
3. (a) Draw your own picture.
(b) The difference quotient calculations are straightforward.
(c) The graphs of f and g are reflections of each other in the line y = x. The
same is true of the respective tangent lines. In particular, the two tangent lines
have reciprocal slopes.
5. (a) Calculation with the difference quotient gives f ′ (0) = 0.
2c
(b) Calculation with the difference quotient gives f ′ (c) = 2 .
(c + 5)2
f (x) − f (0)
7. (a) The difference quotient is strictly positive for all x, and so f ′ (0)
x−0
must be nonnegative.
f (x) − f (0)
(b) We have −1 ≤ ≤ 1 for all x, and so −1 ≤ f ′ (0) ≤ 1.
x−0
f (x)g(x) f (x)
9. Definition 4.1 gives (f g)′ (0) = lim = lim g(x) lim g(x) =
x→0 x x→0 x→0 x

g(0)f (0) = 0. Both limits exist by hypothesis.
11. The limit-of-difference-quotient calculation for g ′ (2) is like that for f , except for a
factor of 4. Note that the g-graph is formed by vertical stretching of the f -graph.
13. (a) It’s easy to show that both lim f (x) = 0 and lim f (x) = 0; thus
x→0− x→0+
lim f (x) = 0 = f (0), which means that f is continuous at 0.
x→0
f (x) − f (0)
(b) Yes, f is differentiable at x = 0. Again, we have lim =
x→0− x−0
f (x) − f (0)
lim = 0.
x→0+ x−0
f (x)
15. Note first that f (0) = 0. Thus, f ′ (0) = lim . This limit exists, and is zero,
x
x→0
f (x)
by squeezing: |f (x)| ≤ x2 implies − |x| ≤ ≤ |x|. Since the right and left
x
quantities tend to zero, so must the middle.
17. We need to show that lim x sin(1/x) = 0. Exactly this limit is discussed in Exam-
x→0
ple 6, page 155.
19. (a) This is essentially the Principle of Persistent Inequalities. Assume toward
contradiction that f (0) < 42. Then, says the PoPI, for some δ > 0 we have
f (x) < 42 for x ∈ (−δ, δ), contradicting our assumption.
h(x)
(b) Clearly h(0) = 0. Now h′ (0) = lim = lim g(x) = 42. (The last
x→0 x x→0
equality holds because g is continuous.)
21. (a) Claim (iv) of Lemma 2 says that since f ′ (0) = 100 > 0, we must have
f (x) < 0 on (−δ, 0) and f (x) > 0 on (0, δ) for suitable small δ.
(b) δ = π/100 ≈ 0.03 works in this case.
Selected Solutions 327

4.2 Calculating Derivatives



1. One can show that xn − an = (x − a) xn−1 + axn−2 + · · · + an−1 ; there are
n summands. Taking the limit as x → a gives nan − 1 as desired.
h(x) − h(a)
3. The derivative h′ (a) is defined by lim . We can evaluate this using
x→a x−a
the definition of h from f and g and algebraic properties of the limit:

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 = 3f ′ (a) − 42g ′ (a).
x→a x−a x→a x−a

5. (a) The chain rule says that if h(x) = 1/g(x), then h′ (a) = −g ′ (a)/g(a)2 .
(b) Applying the product rule to f (x)/g(x) = f (x) · h(x) gives the derivative
f ′ (a) · h(a) + f (a)h′ (a) = f ′ (a)/g(a) − f (a)g ′ (a)/g(a)2 , which is (after
a bit of algebra) seen to be the desired expression.
7. All parts are straightforward—but perhaps messy—calculations.
9. Clearly, g(a) = f (a)2 = 0. Also the chain rule gives g ′ (a) = 2f (a)f ′ (a) = 0.
11. (a) Notice first that f is continuous at x = 17, by Theorem 4.3, page 213. We
also know, or can easily prove, that h(x) = |x| is continuous everywhere.
Since g(x) is the composition h(f (x)), we know that g(x) must also be con-
tinuous.
(b) If f (x) = x − 17, then g(x) = |x − 17|, which is clearly not differentiable
at x = 17.
(c) Note that g(x)2 is really the same thing as f (x)2 , which is the product of two
differentiable functions, and therefore differentiable.

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.
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 4 roots, f ′ (a quadratic polynomial) would have at least 3
roots, which is impossible.
328 Selected Solutions

(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 .
(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.
9. (a) Every number c in (1, 7) works.
(b) The only solution is c = 4.
f (b) − f (a)
(c) In this case the MVT equation f ′ (c) = reduces to 100c99 = 1,
b−a
1
which gives c = ≈ 0.955.
1001/99
f (b) − f (a)
(d) In this case the equation f ′ (c) = reduces to 6c + 5 = 3a +
b−a
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
f (b) − f (a)
the equation f ′ (c) = reduces to B + 2Ac = B + A(a + b).
b−a
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.
f (b) − f (a)
15. If we write m = , then L(x) = m(x−a)+f (a), and the rest follows.
b−a
17. (a) This should be straightforward.
(b) The proof of (i) can be essentially rerun with strict inequalities.
(c) If f were not monotone, then we’d have f (a) = f (b) for some a and b in I.
Rolle’s theorem now says there is c ∈ I with f ′ (c) = 0, which contradicts
the hypothesis.
19. Suppose f (b) ≥ b for some b > 0. Then the MVT implies that f ′ (c) =
f (b) − f (0) f (b)
= ≥ 1 for some c between 0 and b; this contradicts our as-
b−0 b
sumption.
21. (a) The function f is continuous, and so must attain a minimum on the interval
[s, t] by the extreme value theorem. The minimum can’t be at either endpoint
because f ′ (s) < 0 and f ′ (t) > 0.
Selected Solutions 329

(b) The function g(x) = f (x) − vx satisifies the conditions in (a), so there is
some c between s and t with 0 = g ′ (c) = f ′ (c) − v. Thus f ′ (c) = v as
desired.
23. (a) All parts follow by plugging t = 0 into f and p2 .
(b) That g(0) = 0 = g(1) is an easy calculation. The t1 in question exists by
Rolle’s theorem applied to g.
(c) That g ′ (0) = 0 = g ′ (t1 ) is an easy calculation. The t2 in question exists by
Rolle’s theorem applied to g ′ .
(d) As in the previous parts, the claimed t3 exists by Rolle’s theorem applied to
g ′′ .

4.4 Sequences of Functions


1. (a) For any real number x and ǫ > 0, let N = 1/ǫ. If n > N then |fn (x) − f (x)| =
1
fn (x) = < ǫ. Thus fn → f pointwise on R. Because the same inequality
n
holds for all x, the convergence is also uniform.
(b) For any fixed real number x we have fn (x) = nx → 0 as n → ∞, so
fn → f pointwise on R. The convergence is not uniform on R. For ǫ = 1,
for instance, no N works: for every n we have |fn (x) − f (x)| = |x/n| > 1
whenever |x| > n.
(c) For any fixed real number x we have fn (x) = sinn x → 0 as n → ∞. Thus
fn → f pointwise on R. The convergence is also uniform; the proof is similar
to that in (a).
3. (a) Fix a ∈ R and let an = a + 1/n. Note that an → a and that f (an ) = fn (a)
for all n. Since f is continuous at a, fn (a) = f (an ) → f (a), as desired.
(c) Let ǫ > 0 be given. Choose δ > 0 that works for ǫ in the definition of uniform
continuity, and choose an integer N with 1/N < δ. This N works for ǫ in the
definition of uniform convergence: if n > N then—for all real x—we have

|fn (x) − f (x)| = |f (x + 1/n) − f (x)| < ǫ.

(The last inequality holds because |(x + 1/n) − x| < δ.)


5. The result is just a restatement of the analogous fact for Cauchy sequences of num-
bers.
7. (a) The statement is true. A convergent sequence of integers must eventually be
constant.

(b) The statement is false. The sequence { 2/n} is irrational, but converges to
0.
(c) The statement is true by a “squeezing” property of limits.
9. (a) The claim follows from analogous properties of number sequences.
330 Selected Solutions

2x 1
(b) Here is the key identity: (x + 1/n)2 − x2 = + 2 . The right-hand
n n
side is large for large |x|.
11. 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.
13. (a) The ratio calculation is slightly messy, but it works.
(b) We get f ′′ = −f . This combined with f (0) = 0 and f ′ (0) = 1 says that
f (x) = sin(x).
(c) Differentiate f term by term to find a power series for f ′ . What famous
function is this? How do you know?
(d) The graphs should resemble the sine and cosine functions, respectively.

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; kPk 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.
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.
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, can choose δ1 > 0 that works
for I1 and ǫ. 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 kPk < δ. 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].
Selected Solutions 331

(b) Note that


n
X

|RS(f, P, S) − RS(f, P, T )| = (f (si ) − f (ti )) ∆xi

i=1
n
X n
X
≤ |f (si ) − f (ti )| ∆xi < ǫ ∆xi = ǫ(b − a).
i=1 i=1

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) = f (x)−g(x). Theorem 5.5
Rb Rb Rb
says that h is integrable and that a f − a g = 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
Z b Z b
f≥ m = m (b − a) > 0,
a a

as claimed.
(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.
R1
(c) Let f (x) = 1 for x ≥ 0 and f (x) = 1 for x < 0. Then −1 f = 0, but
6 0 for all c.
f (c) =
Rb Rb Rb
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 274.
R1
(b) A look at the graph shows −1 f = −1.
Rn
(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.
332 Selected Solutions

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}.
R2
7. Given any box sum for 0 f with value less than ǫ, add (if necessary) one more
point at x R= 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.
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
Rb
on [a, b] by Theorem 5.8, page 274. 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 270) we have
Z b Z b
US (f, P) = fbig ≥ f = I,
a a

The proof that LS (f, P) underestimates I is almost identical.

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].
Rb
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].
Rb
9. The hypothesis means that F (b) = 0 f = b2 /2 for all x. Thus f (b) = F ′ (b) = b
all b.
11. The interval [0, 8/3] is one possibility.
13. (a) Note that hn (0) = 0 for all n, so clearly hn (0) → h(0) = 0. If x > 0,
then hn (x) = 0 for all x with x < 1/n, so again hn (x) → h(x) = 0.
R 1 that the sequence {hnR}1converges pointwise to h on [0, 1]. By contrast,
Show
0
hn = 1 for all n, while 0 h = 0.
Selected Solutions 333

(b) The sequence {hn } converges uniformly to h on [0.1,


R 1 1], because hn (x) = 0
for all x ∈ [0.1, 1] whenever n > 10. Similarly, 0.1 hn = 0 for all n > 10,
so the integrals converge as well.
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
Z 1 Z 1 Z 1 Z 1 Z 1


fn − f = (fn − f ) ≤
|fn − f | < ǫ = ǫ,
0 0 0 0 0

which completes the proof.


Index

nth term test, 124 bounded comparison test, 137


bounded sequence, 87
absolute convergence, 128 bounded set, 67
absolute value boundedness
distance interpretation, 62 and integrability, 265
in calculus, 62 and uniform continuity, 186
algebra of continuous functions, 173
with derivatives, 219 bounding the tail, 141
with function sequences, 243 box sum
with functions, 154 criterion, 284
with integrals, 269 definition, 282, 283
with sequences, 96 brute force, 46
with series, 123
algebraic number, 61 car talk, 231
alternating harmonic series, 139 cardinality, definition, 53
alternating series, 139 cases, 46
and, 37 Cauchy criterion
antiderivatives for function sequences, 250
and integrals, 274 for integrals, 281
existence of, 293 Cauchy sequences
approximation and completeness, 118
first-order, 209 and uniform continuity, 185
linear, 209 definition, 114
quadratic, 212 chain rules, 222
second-order, 212 clopen set, 191
Archimedean principle, 75 closed interval, 14
average value, 295 closed set, 14, 190
codomain of a function, 19
ball compact
open, 196 sequentially, 202
Bolzano–Weierstrass theorem, 111, 116, compact set, 199
174, 175, 186, 203 definition, 201
bound compactness, 199
greatest lower, 68 comparison test
least upper, 68 for sequences, 101
lower, 67 for series, 127
upper, 67 complement
bounded away, 69 of a set in R, 12

335
336 Index

completeness definition, 207


and Cauchy sequences, 118 higher, 212
axiom, 74 of inverse function, 227
via Cauchy sequences, 118 derivatives
completeness axiom, 88 calculating, 219
composition of elementary functions, 225
and chain rule, 222 difference quotient, 209
of functions, 24 differentiable function, 207
conditional convergence, 129 direct proof, 44
conjugate trick, 159 discrete topology, 199
continuity divergence
and integrability, 285 of sequence, 84
at an endpoint, 165 to infinity, 101
Lipschitz, 188 divergent series, 122
uniform, 182 domain
uniform vs. ordinary, 182 natural, 167
continuity at a point, 162 of a function, 19
continuity on a set, 166
continuous function, 162 element of a set, 10
contrapositive, 39 elementary functions
convergence definition, 166
absolute, 128 derivatives of, 225
conditional, 129 enumeration, 46
of a sequence, 84 equivalence, 37
of a sequence of functions, 241 equivalence relation, 27
of a series, 122 equivalent statements, 37
pointwise, 241 exhaustion, 46
uniform, 241 existential quantifier, 38
convergent series, 122 exists (∃), 38
converse, 39 extreme value theorem, 175
countable set, 54
countably infinite set, 54 Fibonacci sequence, 83
counterexample, 39 field, definition of, 5
cover finite set, 53
open, 200 first-order approximation, 209
fixed point, 177
Darboux’s theorem, 234 for all (∀), 38
De Morgan’s laws, 12, 38 function
decimal expansion, infinite, 58, 80 average value of, 295
decreasing sequence, 87 continuous, 162
derivative definition, 19
as a function, 211 differentiable, 207
as linear approximation, 209 elementary, 166
as magnification, 211 everywhere continuous but nowhere
as rate, 209 differentiable, 249
as slope, 209 injective, 22
Index 337

integrable, 261 in closed form, 295


one-to-one, 22 of continuous functions, 285
onto, 23 integrable function, 261
squeezing, 155 integral
surjective, 23 definition, 261
uniformly continuous, 182 Riemann, 257
Weierstrass, 249 integrals and antiderivatives, 274
function limit, 149 integrand, 258
function sequence, 239 intermediate value theorem, 174
fundamental theorem of calculus interval
version 0, 275 closed and bounded, 174, 175, 184
version 1, 293 definition, 14
version 2, 294 inverse function, derivative of, 227
inverse image, 194
geometric series, 125 irrational number,
√ 6
glb, 68 irrationality of 2, 6
Goldbach’s conjecture, 37, 46
left-hand limit, 156
harmonic numbers, 121 lim inf, 146
harmonic series lim sup, 146
alternating, 139 limit
definition, 121 at infinity, 155
Heine–Borel theorem, 202 combining algebraically, 154
higher derivatives, 212 infinite, 155
left-hand, 156
identity theorem, 237 of a function, 149
implication, 37 of a sequence, 84
increasing sequence, 87 of a series, 122
index variable, 83 of a series of functions, 246
indirect proof, 44 of function sequence, 241
induction one-sided, 155
formally described, 47 pointwise, 241
mathematical, 47 right-hand, 156
inequality uniform, 241
persistent, 172, 194 visualizing, 151
reverse triangle, 63 limit comparison test, 136
triangle, 63 limit point
infimum, 68 of a set, 193
infinite decimal expansion, 58, 80 linear approximation, 209
infinite limit, 155 Lipschitz continuity, 188
infinite sequence, 83 lower bound, 67
infinite series, definition, 120 lower limit, 146
integrability lower sum, 283
and boundedness, 265 lub, 68
and box sums, 282
box-sum criterion, 284 Maclaurin polynomial, 253
338 Index

magnification, 211 by enumeration, 46


mapping, 19 by exhaustion, 46
maps to (7→) , 22 by induction, 47
mathematical induction, 47 direct, 44
mean value theorem, 230 indirect, 44
for integrals, 279 proof types, 43
metric proper subset, 11
definition, 195
metric space quadratic approximation, 212
definition, 195 quotient rule for derivatives, 219
monotone sequence, 87
monotone subsequence, 109 radius of convergence, 248
random walk sequence, 117
natural domain, 167 range of a function, 20
negation, 37 ratio test, 138
neighborhood reduced form of a rational number, 4
epsilon, 191 regular partition, 259
nested intervals theorem, 76 relation
norm of a partition, 259 definition, 26
equivalence, 27
one-sided limit, 155 remainder of a series, 141
one-to-one function, 22 removable discontinuity, 171
onto function, 23 reverse triangle inequality, 63
open ball, 196 Riemann integral
open cover, 200 definition, 261
open interval, 14 history, 257
open set, 14, 190 Riemann sum, 259
operations on sets, 11 right-hand limit, 156
or, 37 Rolle’s theorem, 231
root of a function, 176
partial sums, 120
partition sampling points from a partition, 259
of an interval, 259 second-order approximation, 212
regular, 259 sequence
subintervals of, 259 bounded, 87
pigeonhole principle, 55 Cauchy, 114
pointwise convergence, 241 convergence of, 84
polynomial decreasing, 87
Taylor, 253 definition, 83
PoPI, 172, 194 divergence of, 84
power series, 246 increasing, 87
principle of persistent inequalities, 172, limit of, 84
194 monotone, 87
product rule for derivatives, 219 of functions, 239
proof of partial sums, 120
by brute force, 46 recursively defined, 97
Index 339

strictly decreasing, 87 tail


strictly increasing, 87 bounding, 141
strictly monotone, 87 of a sequence, 88
sequences Taylor polynomial, 253
combining algebraically, 96 Taylor series, 252, 255
new from old, 96 Taylor’s theorem, 235, 252
squeezing, 99 telescoping series, 132
visualizing, 86 telescoping sum, 275
sequentially compact, 202 terms
series of a sequence, 83
algebra with, 123 of a series, 120
alternating, 139 test
convergence and divergence, 122 nth term, 124
bounded comparison, 137
geometric, 125
comparison, 127
harmonic, 121
limit comparison, 136
limit of, 122
ratio, 138
of functions, 246
topology
power, 246
discrete, 199
telescoping, 132 of the reals, 190
set transcendental number, 61
bounded, 67 transitive relation, 27
definition, 10 triangle inequality, 63
notations, 11 for a metric, 195
operations, 11
uncountable, 58 uncountable set, 58
set-builder notation, 13 uniform continuity
sigma notation, 122 and boundedness, 186
squeeze principle and Cauchy sequences, 185
for functions, 155 definition, 182
for sequences, 99 of a function, 182
statement, 36 visualizing, 183
subcover, 200 uniform convergence, 241
subinterval of a partition, 259 universal quantifier, 38
subsequence upper bound, 67
definition, 108 upper limit, 146
monotone, 109 upper sum, 283
upper tail, 106 upper tail, 88, 141
subset, proper, 11
Weierstrass function, 249
sum of a series, 122
well-ordering property, 3
sum rule for derivatives, 219
sums zero of a function, 176
Riemann sum, 259
sums, upper and lower, 283
supremum, 68
symmetric relation, 27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy