(Andrei Bourchtein, Ludmila Bourchtein) CounterExa PDF
(Andrei Bourchtein, Ludmila Bourchtein) CounterExa PDF
(Andrei Bourchtein, Ludmila Bourchtein) CounterExa PDF
CounterExamples
CounterExamples
This book provides a one-semester undergraduate introduction to
counterexamples in calculus and analysis. It helps engineering, natu-
ral sciences, and mathematics students tackle commonly made er- From Elementary Calculus to
roneous conjectures. The book encourages students to think criti-
cally and analytically, and helps to reveal common errors in many the Beginnings of Analysis
examples.
In this book, the authors present an overview of important concepts
and results in calculus and real analysis by considering false state-
ments, which may appear to be true at first glance. The book cov-
ers topics concerning the functions of real variables, starting with
elementary properties, moving to limits and continuity, and then to
differentiation and integration. The first part of the book describes
single-variable functions, while the second part covers the functions
of two variables.
The many examples presented throughout the book typically start
at a very basic level and become more complex during the develop-
ment of exposition. At the end of each chapter, supplementary exer-
cises of different levels of complexity are provided, the most difficult
of them with a hint to the solution.
This book is intended for students who are interested in develop-
ing a deeper understanding of the topics of calculus. The gathered
Bourchtein
counterexamples may also be used by calculus instructors in their Bourchtein
classes.
Andrei Bourchtein
K23601
Ludmila Bourchtein
PUBLISHED TITLES
RISK ANALYSIS IN ENGINEERING AND ECONOMICS, SECOND EDITION
Bilal M. Ayyub
COUNTEREXAMPLES: FROM ELEMENTARY CALCULUS TO THE BEGINNINGS OF ANALYSIS
Andrei Bourchtein and Ludmila Bourchtein
INTRODUCTION TO THE CALCULUS OF VARIATIONS AND CONTROL WITH MODERN APPLICATIONS
John T. Burns
MIMETIC DISCRETIZATION METHODS
Jose E. Castillo
AN INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS WITH MATLAB®, SECOND EDITION
Mathew Coleman
RISK MANAGEMENT AND SIMULATION
Aparna Gupta
ABSTRACT ALGEBRA: AN INQUIRY-BASED APPROACH
Jonathan K. Hodge, Steven Schlicker, and Ted Sundstrom
QUADRACTIC IRRATIONALS: AN INTRODUCTION TO CLASSICAL NUMBER THEORY
Franz Holter-Koch
GROUP INVERSES OF M-MATRICES AND THEIR APPLICATIONS
Stephen J. Kirkland
AN INTRODUCTION TO NUMBER THEORY WITH CRYPTOGRAPHY
James Kraft and Larry Washington
REAL ANALYSIS AND FOUNDATIONS, THIRD EDITION
Steven G. Krantz
ELEMENTS OF ADVANCED MATHEMATICS, THIRD EDITION
Steven G. Krantz
APPLYING ANALYTICS: A PRACTICAL APPROACH
Evan S. Levine
ADVANCED LINEAR ALGEBRA
Nicholas Loehr
PUBLISHED TITLES CONTINUED
CounterExamples
From Elementary Calculus to
the Beginnings of Analysis
Andrei Bourchtein
Ludmila Bourchtein
Pelotas State University, Brazil
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 stor-
age or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copy-
right.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 pro-
vides licenses and registration for a variety of users. For organizations that have been granted a photo-
copy 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
To Haim and Maria with love and gratitude;
to Maxim with love and pride
This page intentionally left blank
Contents
Preface xiii
List of Figures xv
Introduction xix
0.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
0.1.1 On the structure of this book . . . . . . . . . . . . . . xix
0.1.2 On mathematical language and notation . . . . . . . . xxi
0.2 Background (elements of theory) . . . . . . . . . . . . . . . . xxii
0.2.1 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
0.2.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
2 Limits 35
3 Continuity 53
ix
x Contents
4 Differentiation 89
5 Integrals 133
8 Differentiability 237
9 Integrability 287
Bibliography 323
Index 327
This page intentionally left blank
Preface
xiii
xiv Preface
reading of a specific chapter one does not need any knowledge of the next
chapter subjects.
This book is not appropriate as the main textbook for a course, but rather,
it can serve as a supplement that can help students to master important
concepts and theorems. So we think the best way to use this book is to read
its parts while taking a respective calculus course: the chapters 2-4 correspond
roughly to the topics of the first semester calculus, chapters 5-6 - to the second
semester, and chapters 7-9 - to the third semester. On the other hand, the
students already familiarized with the subjects of calculus sequence can find
here deeper interpretation of the results and finer relation between concepts
than in standard presentations. Also, more experienced students will better
understand provided examples and ideas behind their construction.
To facilitate the reading of the main text (containing counterexamples)
and make the text self-contained, and also to fix terminology, notation and
concepts, we gather the relevant definitions and results in the introductory sec-
tions of each chapter. Additionally some basic notions of the theory of sets and
functions used everywhere in the book are presented in the Introduction chap-
ter. For many examples, we make explicit references to the concepts/theorems
to which they are related.
A representative (but by no means exhaustive) bibliography can be found
at the end of the book, including both collections of problems and textbooks
in calculus/analysis. On the one hand, these references are the sources of dif-
ferent examples collected here, although it was out of our scope to trace all
the original sources. On the other hand, they may be used for finding further
information (examples and theory) on various topics. Some of these references
are classic collections of the problems, such as that by Demidovich [3] and by
Gelbaum and Olmstead [5]. Our preparation of this text was inspired in the
first place by the latter book. We tried to extend its approach to a broader
and less specialized range of topics in calculus and analysis by providing an
alternative set of counterexamples, which require less training in mathemat-
ics and are accessible not only for mathematics majors, but also for natural
science and engineering students. We hope that both mathematics and non-
mathematics students will find our book as stimulating, challenging and useful
as we found the above two books during our student days and as we continue
to find it until now.
List of Figures
1.2.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.4 Example 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.5 Example 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.6 Example 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.2 Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.1 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.4.2 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.4.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.5.2 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.6.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.6.2 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.6.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.6.4 Example 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.6.5 Example 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.7.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.7.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.7.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.2.1 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.2.2 Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.2.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.2.4 Example 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.1 Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.3.2 Example 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.3.3 Example 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.2.1 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.2.2 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.3.1 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.3.2 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.3.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.3.4 Example 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
xv
xvi List of Figures
3.3.5 Example 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.4.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.4.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.4.3 Example 9, Remark 1 . . . . . . . . . . . . . . . . . . . . . . 73
3.4.4 Example 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.4.5 Example 14, Remark 1 . . . . . . . . . . . . . . . . . . . . . 77
3.4.6 Example 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.4.7 Example 16 . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.5.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.5.2 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.5.3 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.5.4 Example 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
0.1 Comments
This book consists of the Introductory chapter and nine chapters of coun-
terexamples divided into two parts. In the first part (chapters 1-6), the sub-
jects of single-variable functions, corresponding approximately to the first two
terms of the standard university calculus sequence, are considered:
1) in chapter 1 - elementary properties of functions, such as elements of defi-
nition, periodicity, even/odd functions, monotonicity and extrema;
2) in chapter 2 - limits, with analysis of limit definition and properties;
3) in chapter 3 - continuity, with an emphasis on global properties;
4) in chapter 4 - differentiability, considering elementary properties, main
theorems and applications;
5) in chapter 5 - different kinds of integrals (indefinite, definite and improper)
with applications;
6) in chapter 6 - infinite sequences and series, including both basic and finer
convergence/divergence tests.
The second part (chapters 7-9) contains the topics of the functions of two
variables, which are quite representative for the most topics of the multi-
variable functions. All the chapters of the second part include a few examples
similar to those presented in the first part in order to show how the ideas ap-
plied in one-dimensional case can be generalized/extended to many variables.
However, the main part of the chapters 7-9 is devoted to examples that high-
light a specificity of concepts and results for multi-variable functions. The
subjects of the second part correspond to the third term of the university
calculus courses:
xix
xx Introduction
0.2.1 Sets
General sets
Numerical sets
Natural numbers. The set N of the natural numbers is the set of all
numbers used for counting: N = {1, 2, 3, ...} .
Integers. The set Z of the integers is the set including all the natural
numbers, zero and the negatives of the natural numbers: Z = {0, ±1, ±2, . . .}.
Rational numbers. The set Q of the rational numbers is composed of all
the fractions pq such that p ∈ Z, q ∈ N.
Decimal fractions. A decimal fraction is the number represented in the
form (±) a0 , a1 a2 a3 . . ., where a0 ∈ N ∪ {0} and the digits ai ∈ N ∪ {0} , 0 ≤
ai ≤ 9, i = 1, 2, 3, . . . . This is the decimal representation of every point on a
coordinate line.
A decimal fraction is called finite if ai = 0 for all i ≥ m, where m is some
natural number. A decimal fraction is called periodic if ak+i = ak+i+p for
some k ∈ N ∪ {0}, p ∈ N, and all i ∈ N, that is, there exists a finite string of
digits (of length p), that is repeated infinitely many times starting from the
(k + 1)-th digit. Otherwise, a decimal fraction is called aperiodic.
Remark 1. A finite fraction can be considered as a special case of a periodic
fraction.
Remark 2. The set of the rational numbers can be equivalently defined as
the set of all decimal periodic fractions.
Irrational numbers. The set I of the irrational numbers is composed of
all decimal aperiodic fractions.
Real numbers. The set R of the real numbers is the set of all decimal
fractions.
Remark. Although I is not a common notation for the set of irrational
numbers, we will use this symbol for brevity of notation (another, more com-
mon option is R\Q).
Basic properties: N ⊂ Z ⊂ Q ⊂ R, I ⊂ R, Q ∪ I = R, Q ∩ I = ∅.
Remark 1. Real numbers are also called real points (or simply points) due
to existence of a one-to-one correspondence between the set R and the set of
all points on a coordinate line called the real axis (see more about one-to-one
correspondence in section 1.2 )
Remark 2. Frequently it is convenient to consider the extended real axis,
including positive (+∞) and negative (−∞) infinities. In this case all real
xxiv Introduction
(geometric) points are called the finite points, and infinities are called the
infinite points.
Remark 3. The Cartesian product R × R = R2 is the set of all the ordered
pairs of real numbers. Due to existence of a one-to-one correspondence between
the set R2 and the set of all points on a plane, with the above pairs being the
Cartesian coordinates of the points, these elements of R2 are also called the
points.
Sets in Rn
which means, in particular, that the distance between x and y is small if, and
only if, all the coordinates get close.
Sphere. The set of all points equidistant from a given point c is called a
Introduction xxv
sphere , that is, for a given centerpoint c and radius r > 0, the sphere Sc,r is
defined by the analytical relation Sc,r = { x ∈ Rn : d (x, c) = r}.
Open ball. The set of all points located inside the sphere Sc,r is called an
open ball . The usual notation is Bc,r and the analytical description is Bc,r =
{ x ∈ Rn : d (x, c) < r} . In the case n = 1, n = 2 and n = 3, the open ball
2 2
is the open interval (c − r, c + r), the open disk (x1 − c1 ) + (x2 − c2 ) < r2 ,
2
and the open ball (in the common geometrical sense of the word) (x1 − c1 ) +
2 2
(x2 − c2 ) + (x3 − c3 ) < r , respectively.
2
Closed ball. The set of all points located both inside and on the sphere
SC,r is called a closed ball . The notation and analytical description is B̄c,r =
{x ∈ Rn : d (x, c) ≤ r} .
Neighborhood. The open ball Bc,δ , δ > 0 is called a δ-neighborhood
of the point c. Frequently the term is shortened to neighborhood of c. The
number δ is called the radius of the neighborhood.
Deleted neighborhood. The δ-neighborhood with the deleted central
point, that is, the set Bc,δ \ {c}, δ > 0 is called the deleted neighborhood of c.
Special sets in R
finite points, that is a and b are some points on the real axis. If a or b are
infinite points, the interval is unbounded . A closed interval [a, b] is supposed
to be always bounded.
Remark. Sometimes a bounded interval is called a finite interval and un-
bounded - infinite. Of course, the number of the points in any non-singular
(a < b) interval is always infinite. Usually, the specific meaning of the term
“finite/infinite” as applied to intervals is clear in the used context.
Theorem. Any connected set in R is an interval.
0.2.2 Functions
Concepts
Equivalent sets. Two sets are called equivalent if there exists a one-to-
one correspondence between them.
Finite/infinite sets. A set is called finite if it has a finite number of
elements. Otherwise a set is infinite. The empty set is considered to be finite.
Countable/uncountable set. A set is countable if it is equivalent to N.
A set is uncountable if it is neither finite nor countable.
Elementary properties
1
This page intentionally left blank
Chapter 1
Elementary properties of functions
Concepts
3
4 Counterexamples: From Calculus to the Beginnings of Analysis
Equivalent sets. Two sets are called equivalent if there exists a one-to-
one correspondence between them.
Finite/infinite sets. A set is called finite if it has a finite number of
elements. Otherwise a set is infinite. The empty set is considered to be finite.
Countable/uncountable set. A set is countable if it is equivalent to N.
A set is uncountable if it is neither finite nor countable .
Elementary properties
Example 1. “If A and B are two subsets of the domain X of f (x), then
f (A ∩ B) = f (A) ∩ f (B).”
Solution.
Consider the function f (x) = sin x and choose A = [0, 2π] e B = [π, 3π].
Then f (A ∩ B) = f ([π, 2π]) = [−1, 0], while f (A)∩f (B) = [−1, 1]∩[−1, 1] =
[−1, 1].
Remark 1. The following relation is true: f (A ∩ B) ⊂ f (A) ∩ f (B).
Remark 2. For the union the statement is true, that is, f (A ∪ B) =
f (A) ∪ f (B).
Remark to Examples 1 and 2. The first two examples of this section show
that some properties of domains cannot be extended to their images.
Remark. This example shows that the existence of an inverse does not
related to the “sizes” of the domain and image.
neither the union A ∪ B nor the function f (x) have “jumps”: more strictly,
the set A ∪ B is connected and f (x) is continuous (continuous functions will
be considered in chapter 3). However, again f (A) = f (B), which means that
f (x) is not injective on A ∪ B.
Remark 1. The following strengthened version of the statement is still
false: “if f (x) is injective on a neighborhood of each point of its domain
X, then f (x) is injective on X”. The corresponding counterexample can be
f (x) = |x| or f (x) = x2 considered on X = R\ {0}.
Remark 2. The statement in Remark 1 (but not the original one) becomes
true if f (x) is continuous on a connected domain X (continuous functions will
be considered in chapter 3).
Remark 3. Similar statement for the intersection of sets is true: if f (x) is
injective on A and B (and A ∩ B ̸= ∅), then f (x) is injective on A ∩ B.
Remark to Examples 7 and 8. These two examples show that the injective
property does not extend on the union of domains (although it does extend
on the intersection) and the surjective property does not extend on the inter-
section of domains (while it does extend to the union).
10 Counterexamples: From Calculus to the Beginnings of Analysis
1.3 Boundedness
bounded, and hence the numerators m would be bounded too. But this would
permit only finitely many rational numbers in such neighborhood. It leads
to a contradiction with the known property that in any neighborhood of an
arbitrary real point there exist infinitely many rational numbers.
1.4 Periodicity
Example 2. “If both functions f (x) and g (x) have a fundamental period
T, then f (x) + g (x) has the same fundamental period.”
Solution.
If f (x) = sin x and g (x) = 1 − sin x (both functions have the fundamental
period T = 2π), then h (x) = f (x) + g (x) = 1 and it does not have a
fundamental period (although T = 2π is one of the periods of h (x)).
Remark 1. Another simple example when a fundamental period of the
sum exists, but is smaller than T : f (x) = sin x and g (x) = sin 2x − sin x have
the fundamental period T = 2π, but h (x) = f (x) + g (x) = sin 2x has the
fundamental period π.
Remark 2. Similar examples can be constructed for other arithmetic oper-
ations. For example, the false statement for the product has the form: “if both
functions f (x) and g (x) have a fundamental period T , then f (x)·g (x) has the
same fundamental period”. The corresponding example can be f (x) = sin x,
g (x) = 2 cos x (both functions have the fundamental period T = 2π), and
h (x) = f (x) · g (x) = sin 2x has the fundamental period π.
Remark 3. The correct statement asserts that if f (x) and g (x) have a
fundamental period T , then f (x) + g (x) has the same period T . It just may
be a non-fundamental period for the sum.
Example 3. “If both functions f (x) and g (x) are periodic, then f (x) +
g (x) is also periodic.”
Solution.
Consider f (x) = sin x with the fundamental period Tf = 2π and g (x) =
sin πx with the fundamental period Tg = 2. Let us show that h (x) = f (x) +
g (x) = sin x + sin πx has no period. In fact, if there existed a period T of the
function h (x), then the following would hold for an arbitrary x:
or
sin (x + T ) − sin x = − sin π (x + T ) + sin πx,
or ( ) ( )
T T T T
sin cos x + = − sin π cos π x + .
2 2 2 2
Now, we specify the two values of x in the last equation. First, let us set
16 Counterexamples: From Calculus to the Beginnings of Analysis
It is easy
( to ) that T1 and T2 are periods of fS (x): if x ∈ S then √
√ see (x + 1) ∈ S
and x + 2 ∈ S, and therefore fS (x) = fS (x + 1) = fS (x + 2) = 1; if
( √ )
x∈ / S and x + 2 ∈
/ S then (x + 1) ∈ / S, and therefore fS (x) = fS (x + 1) =
√
fS (x + 2) = 0.
Remark 1. This statement becomes true if the condition of the continuity
of function is added.
Remark 2. It is worth to notice that in the provided
√ counterexample any
rational number and also any number of the form 2q, q ∈ Q are periods of
the presented function.
Example 5. “If the sum of two functions is periodic, then each of the
functions is also periodic.”
Solution.
The functions f (x) = x and g (x) = − [x] are not periodic, but their sum
f (x) + g (x) = x − [x] is periodic with the fundamental period 1.
Remark. Similar examples can be constructed ( for other
) arithmetic op-
erations. For example, the functions f (x) = x2 + cos x cos x and g (x) =
x2 + cos x are not periodic, but their ratio fg(x)
(x)
= cos x is periodic with the
fundamental period 2π (note that x + cos x ̸= 0 for any x ∈ R, so the ratio
2
is defined on R).
and g (y) is not, then the function g (f (x)) is always periodic having the same
period as that of f (x) (of course, we consider here only the cases when the
composition is defined), but the function f (g (x)) can be periodic or not,
depending on a specific choice of √ functions. If one chooses f (x) = sin x and
√
g (y) = y, then f (g (x)) = sin x is a non-periodic function, but for f (x) =
sin x and g (y) = y the composition f (g (x)) = sin x is periodic.
both even and odd). The product or ratio of an even function and an odd
function is always an odd function (when it is defined).
Example 2. “If the sum of two functions is even, then each of these two
functions is also even.”
Solution.
Let f (x) = x2 + x and g (x) = x2 − x. Both functions are neither even nor
odd, but h (x) = f (x) + g (x) = 2x2 is an even function.
Remark 1. Similar simple examples can be given for the difference, product
and ratio. For example, the product of the functions f (x) = x − 1 and g (x) =
x + 1, which are neither even nor odd, gives the even function h (x) = f (x) ·
g (x) = x2 − 1.
Remark 2. The converse is correct: the sum, difference, product and ratio
of two even functions is again an even function (when it is defined).
Example 3. “If the sum of two functions is odd, then each of these two
functions is also odd.”
Solution. { {
x, x < 1 x, x < 1
Let f (x) = and g (x) = . Both functions are
−x, x ≥ 1 3x, x ≥ 1
neither even nor odd, but h (x) = f (x) + g (x) = 2x is an odd function.
Remark 1. A similar simple example can be given for the difference.
Elementary properties of functions 21
Remark 2. The converse is correct: the sum and difference of two odd
functions is again an odd function (when it is defined).
Remark 3. For the product and ratio, if each of two functions is odd then
the result (when defined) is an even function. Therefore, it is hard even to
suppose that the product (or the ratio) of two odd functions will give another
odd function.
Example 4. “If the product of two functions is odd, then one of these
functions is even and another is odd.”
Solution. { {
x, x < 1 1, x < 1
Let f (x) = and g (x) = . Both functions are
−x, x ≥ 1 −1, x ≥ 1
neither even nor odd, but h (x) = f (x) · g (x) = x is an odd function.
Remark 1. A similar simple example can be given for the ratio.
Remark 2. The converse is correct: the product and ratio of an even
function and an odd function is an odd function (when it is defined).
Example 5. “If the absolute value of a function is even, then the function
itself is also even.”
Solution.
If f (x) = x (odd function), then |f (x)| = |x| is even function.
22 Counterexamples: From Calculus to the Beginnings of Analysis
Remark
{ 1. Of course, the original function can be neither even nor odd:
x, x < 1
f (x) = gives the same even function |f (x)| = |x|.
−x, x ≥ 1
Remark 2. The same counterexamples can be used to the following false
statement: “if the square of a function is even, then the function itself is also
even”.
Remark 3. The converse is true: if a function is even, then its absolute
value and its square are also even functions.
1.6 Monotonicity
Example 1. “If both functions f (x) and g (x) are increasing (decreasing)
on the same domain, then f (x) − g (x) is also increasing (decreasing) on this
domain.”
Solution.
Let f (x) = x and g (x) = x2 with both functions defined and strictly
increasing on [0, +∞). However, h (x) = f (x)−g (x) = x−x2 is not monotone
on [0, +∞), as it is seen from the following evaluation:
( )
h (x2 ) − h (x1 ) = x2 − x1 − x22 − x21 = (x2 − x1 ) (1 − x2 − x1 ) ,
and notice that for x1 < x2 the first parenthesis is positive, but the second
changes its sign on [0, +∞) (for 0 ≤ x1 < x2 ≤ 12 the second expression is
positive, but for 12 ≤ x1 < x2 it is negative).
For the functions defined on R, one can use the counterexample with
f (x) = x and g (x) = x3 . Evidently, both functions are strictly increasing
on R. However, h (x) = f (x) − g (x) is not monotone on R, as it is seen from
the following evaluation:
( ) ( )
h (x2 ) − h (x1 ) = x2 − x1 − x32 − x31 = (x2 − x1 ) 1 − x22 − x2 x1 − x21 ,
and notice that for x1 < x2 the first parenthesis is positive, but the second
changes its sign on R (for − 21 < x1 < x2 < 12 the second expression is positive,
but for 1 < x1 < x2 it is negative).
Remark. A similar statement for the sum of two increasing (decreasing)
functions is true.
Example 2. “If both functions f (x) and g (x) are increasing (decreasing)
on the same domain, then f (x) · g (x) is also increasing (decreasing) on this
domain.”
Solution.
Let f (x) = x1 and g (x) = x1 be considered on (−∞, 0). Evidently, both
Elementary properties of functions 23
function are strictly decreasing on (−∞, 0). However, h (x) = f (x)·g (x) = x12
is strictly increasing on (−∞, 0).
Another pair of functions can produce non-monotone product. For in-
stance, f (x) = x and g (x) = x are defined and strictly increasing on R.
However, h (x) = f (x) · g (x) = x2 is not monotone function on R.
Remark. In the particular case when f (x) = g (x) the above statement
is transformed as follows: “if a function f (x) is increasing (decreasing) on its
domain, then f 2 (x) is also increasing (decreasing) on this domain”. The same
function f (x) = x disproves the last statement.
Example 3. “If both functions f (x) and g (x) are monotone on the same
domain, then f (x) + g (x) is also monotone on this domain.”
Solution.
Let f (x) = x + sin x and g (x) = −x (both defined on R). Evidently, g (x)
is strictly decreasing on R, and f (x) is strictly increasing on R, because for
an arbitrary pair x1 , x2 ∈ R, x1 < x2 , we have
g (x) = sin x is not monotone on R (and on any interval of the length greater
than π).
Example 4. “If f (x) is not monotone and g (x) is monotone on the same
domain, then f (x) + g (x) is monotone on this domain.”
Solution.
Let f (x) = |x| and g (x) = x2 be considered on R. Evidently, both functions
satisfy
{ x the above conditions, but the resulting function h (x) = f (x) + g (x) =
−2 , x < 0
is not monotone on R.
2 , x≥0
3x
Remark. The statement with the opposite conclusion is also false. The
corresponding counterexample can be constructed with the functions f (x) =
|x| and g (x) = 2x defined on R. Although f (x) is not monotone { and g (x) is
x, x < 0
monotone on R, the resulting function h (x) = f (x) + g (x) =
3x , x ≥ 0
is monotone on R.
Example 5. “If both functions f (x) and g (x) are non-monotone on the
same domain, then f (x) + g (x) is also non-monotone on this domain.”
Solution. {
3x , x < 0
Let f (x) = |2x| and g (x) = x − |2x| = be defined on R.
−x , x ≥ 0
Elementary properties of functions 25
Remark to Examples 3-5. All the statements presented above for the sum
can also be used for the difference, product and ratio of two functions. For
instance, the false statement for the product, similar to Example 5, can be
formulated as follows: “if both functions f (x) and g (x) are non-monotone
on the same domain, then f (x) · g (x) is also non-monotone on this domain”.
The counterexample
{ 1 can be constructed using the functions f (x) = x2 and
g (x) = x , x ̸= 0 , both defined and non-monotone on R. Their product
0, x = 0
h (x) = f (x) · g (x) = x is strictly increasing on R.
is monotone on R.”
Solution. {
x − 1, x ≤ 0
Let f (x) = . Evidently, this is a strictly increasing func-
x + 1, x > 0
{ 1
tion on R. However, the function g (x) = f (x) =
1 x−1 , x ≤ 0 is not mono-
1
x+1 , x > 0
tone on R. Indeed, this function is strictly decreasing on separate intervals
26 Counterexamples: From Calculus to the Beginnings of Analysis
(−∞, 0] and (0, +∞), since for any x1 < x2 ≤ 0 it follows that
1 1 x1 − x2
g (x2 ) − g (x1 ) = − = <0
x2 − 1 x1 − 1 (x2 − 1) (x1 − 1)
(the numerator is negative and the denominator is positive) and for any x2 >
x1 > 0 one obtains
1 1 x1 − x2
g (x2 ) − g (x1 ) = − = <0
x2 + 1 x1 + 1 (x2 + 1) (x1 + 1)
(again the numerator is negative and the denominator is positive). However,
g (x) is not decreasing on R: if one chooses x1 = −1 and x2 = 1, then g (x2 ) −
1
g (x1 ) = 1+1 − −1−1
1
= 1 > 0.
Example 7. “If a function f (x) is not monotone on (a, b), then its square
also is not monotone on (a, b).”
Solution.
{ Let f (x) be defined on [0, 2] in the following way: f (x) =
−x , x ∈ [0, 1]
. Evidently, f (x) is not monotone on [0, 2]. However,
x , x ∈ (1, 2]
f 2 (x) = x2 is strictly increasing on [0, 2] .
Example 9. “If a function f (x) has an inverse on [a, b], then f (x) is
monotone on [a, b]. ”
Solution.
{ Let f (x) be defined on [0, 2] in the following way: f (x) =
x , x ∈ [0, 1]
. It is easy to see that f (x) is one-to-one correspon-
1 − x , x ∈ (1, 2]
dence between{[0, 2] and [−1, 1] with the inverse function defined as follows:
y , y ∈ [0, 1]
x = f −1 (y) = . On the other hand, f (x) is not mono-
1 − y , y ∈ [−1, 0)
tone on [0, 2].
Remark 1. The same function can be used if the closed interval is sub-
stituted by open. In the last case, if one wishes to obtain an open inter-
val
{ as the image of f (x), then the function should be modified to f (x) =
x , x ∈ (0, 1)
.
1 − x , x ∈ [1, 2) {
x, x ∈ Q
Remark 2. A slightly more complex function f (x) = on
1 − x, x ∈ I
28 Counterexamples: From Calculus to the Beginnings of Analysis
[0, 1] gives the counterexample both for the above statement and the following
strengthened statement (also false): “if f (x) has an inverse on [a, b], then there
exists a subinterval of [a, b] on which f (x) is monotone” (see explanations in
Example 10).
Remark 3. The converse is true if the monotonicity is strict.
1.7 Extrema
Example 2. “If a function has an infinite set of strict local maxima, then
there is the largest function value among these maximum function values.”
Solution.
For an infinite interval, we can consider f (x) = x cos x on (0, +∞). All
the points xk = 2kπ, ∀k ∈ N are strict local maxima and the function values
at these points f (xk ) = xk = 2kπ increase infinitely as k approaches infinity,
so there is no largest number among these values. In the same way, there is
no smallest number among the minimum values f (xn ) = −xn = −π − 2nπ at
the minimum points xn = π + 2nπ, ∀n ∈ N ∪ {0}.
For a finite interval, we can choose f (x) = x1 cos x1 defined on (0, 1). Its
1
strict local maxima are the points xk = 2kπ , ∀k ∈ N where the function takes
the values f (xk ) = xk = 2kπ, k ∈ N, and there is no largest value among
1
these values. In the same way, there is no smallest value among the minimum
30 Counterexamples: From Calculus to the Beginnings of Analysis
values f (xn ) = − x1n = −π − 2nπ that the function takes at the minimum
1
points xn = π+2nπ , ∀n ∈ N ∪ {0}.
1
Example 4. “If f (x) has a minimum at x0 , then f (x) has a maximum at
x0 .”
Solution.
First, for local extrema, we can consider the function f (x) = |x|, that has
1 1
a local (and global) minimum at x0 = 0, but the function f (x) = |x| has no
maximum at 0 (it does not defined at 0).
For global extrema, the function f (x) = x2 − 1 has a global minimum at
Elementary properties of functions 31
1 1
x0 = 0, but the function f (x) = x2 −1 has a local, but not global, maximum
at x0 = 0.
Example 5. “If f (x) and g (x) have a maximum at x0 , then f (x) · g (x)
also has a maximum at x0 .”
Solution.
The functions f (x) = g (x) = − |x| have a local (and global) maximum at
x0 = 0, but f (x) · g (x) = x2 has a local (and global) minimum at this point.
{ Another interesting counterexample is f (x) = − |x| and g (x) =
x + 1, x ≤ 0
. Both functions have a local (and global) maximum at
−x , x > 0 { 2
x + x, x ≤ 0
x0 = 0, but their product h (x) = f (x) · g (x) = is strictly
x2 , x > 0
[ ]
increasing at x0 = 0, since x2 + x is strictly increasing on − 12 , 0 , and x2 is
strictly increasing on [0, +∞).
Remark. The statement is true for the sum of two functions.
Example 6. “If a function has more than one local minima on an interval,
then it is not invertible on this interval.”
Solution.
The function f (x) = x − 2 [x] has local minimum at each integer point. In
fact, on an interval (n − 1, n + 1), for any fixed n ∈ Z, the function is defined
32 Counterexamples: From Calculus to the Beginnings of Analysis
{
x − 2 (n − 1) , x ∈ (n − 1, n)
as follows: f (x) = , and f (n) = −n is the
x − 2n , x ∈ [n, n + 1)
minimum value on this interval. Therefore, f (x) has infinitely many local
minima on R. However, f (x) is invertible with the inverse given by formula
f −1 (y) = y + 2 [y]: on each interval [n, n + 1) the function is defined by the
formula y = f (x) = x − 2n, which is simply invertible x = f −1 (y) = y + 2n,
and the image of each interval [n, n + 1) is [−n, −n + 1), which is different
for different values of n; therefore gluing the inverses for each n we obtain the
general inverse f −1 (y) = y + 2 [y].
Remark. Of course, the same is true for local maxima.
Elementary properties of functions 33
Exercises
14. Give a non-trivial example that shows that the situation described
in Remark 3 to Example 3 in section 1.5 is feasible, albeit is rare. That is,
construct a counterexample to the following false statement: “if the product
of two odd functions is odd then both functions are zero” (Hint: Since the
product of two odd functions is always an even function and the condition
says that the result is an odd function, it follows that the product is zero.
Now, to decompose zero into two non-zero odd factors, divide all the domain,
say R, into two parts symmetric with respect to zero. Set the first function to
be zero and the second to be any non-zero odd function, say x, on the first
part, say (−1, 1), and vice-versa on the remaining part R\(−1, 1). )
15. Verify if the following statement is true: “if the composite function
g(f (x)) is odd then at least one of the functions is odd”. If not, provide a
counterexample. What about even functions?
16. Show that the difference of two functions monotone on the same domain
can be both a monotone and non-monotone function. Formulate these results
in the form of counterexamples.
17. Provide a counterexample to the statement in Example 4, section 1.6,
with the product instead of sum of functions.
18. Provide a counterexample to the statement in Example 5, section 1.6,
with the ratio instead of sum of functions.
19. Verify if Dirichlet’s function provides a counterexample for Example 1
in section 1.7.
20. Consider a refined version of the statement in Example 4, section 1.7:
1
“if f (x) has a minimum at x0 and f (x) is defined on the same domain as f (x),
1
then f (x) has a maximum at x0 .” Is this statement still false? If so, provide a
counterexample.
21. Consider the following statement: “if f (x) has a maximum at x0 and
g (x) has a minimum at x0 , then f (x) /g (x) has a maximum at x0 .” Analyze
if the statement is true. If not, provide a counterexample.
22. Consider the following stronger version of the statement in Example
6, section 1.7: “if a function has more than one local minima and maxima on
an interval, then it is not invertible on this interval”. Verify if the statement
is true and construct a counterexample if it is not.
23. Analyze the following statement: “if f (x) and g(x) attain their global
maximum values A and B on domain X, then h(x) = f (x) + g(x) has the
global maximum value A + B on X”. If it is false, provide a counterexample.
Chapter 2
Limits
Concepts
35
36 Counterexamples: From Calculus to the Beginnings of Analysis
Elementary properties
Remark 1. In the properties below it is supposed that f (x) and g (x) are
defined on the same domain.
Remark 2. The point a can be finite or infinite.
Comparative properties
1) If lim f (x) = A, lim g (x) = B and f (x) ≤ g (x) for all x ∈ X in a deleted
x→a x→a
neighborhood of a, then A ≤ B.
2) If lim f (x) = A, lim g (x) = B and A < B, then f (x) < g (x) for all
x→a x→a
x ∈ X in a deleted neighborhood of a.
The squeeze theorem. If lim f (x) = lim g (x) = A, and the inequality
x→a x→a
Limits 37
2.2 Concepts
general limit does not exist. Actually, it can be easily shown that the set of
all the partial limits of this function covers the entire interval [−1, 1].
Remark 1. Of course, under the above conditions, if lim f (x) exists then
x→a
it is equal to A.
Remark 2. This is a weakened version of the Cauchy-Heine criterion:
lim f (x) = A if, and only if, lim f (xn ) = A for all sequences xn such that
x→a xn →a
xn → a, xn ̸= a.
n→+∞
Remark 3. Evidently, the following more general statement is also false:
“if a finite or an infinite number of partial limits exist and coincide, then a
general limit also exists”. Both counterexamples provided above work in this
case too.
Remark 4. The existence and equality of partial limits can guarantee the
existence of a general limit only in the case when the subsets of real numbers
used in these limits cover all the points of the function domain in a deleted
neighborhood of the limit point a. For example, if f (x) is defined in some
deleted neighborhood of a, then this is the case of two one-sided limits. Also
this is the case of two partial limits based first on all rational numbers and
second on all irrational numbers in a deleted neighborhood of a.
Remark 5. In practice, when an evaluation of a general limit is difficult, the
comparison of partial limits can be a useful way to get an idea about a general
limit and, in the case of inexistence of some partial limits or inequality between
two partial limits, it leads to the immediate conclusion about inexistence of a
general limit.
Example 5. “If a function has both one-sided limits, then it has a general
limit too.”
Solution.
−1 , x < 0
Let f (x) = sgn x = 0 , x = 0 . Then both one-sided limits exist:
1, x > 0
lim sgn x = lim (−1) = −1 and lim sgn x = lim 1 = 1, but since they
x→0− x→0− x→0+ x→0+
are different, the general lim f (x) does not exist.
x→0
Remark. The well-known in Calculus result states that a general limit
exists if, and only if, both one-sided limits exist and coincide (this statement
is true both for finite and infinite limits). Notice, however, that this result is
true in the context of the Calculus simplified supposition that the function is
defined in a deleted neighborhood of the limit point a. In general, this result
is not valid as is shown in Example 7 (although it is still true that when both
one-sided limits exist and coincide then a general limit exists also and has the
same value.)
Example 6. “If the one-sided limits at point a coincide, then there exists
a finite limit at a.”
Solution.
40 Counterexamples: From Calculus to the Beginnings of Analysis
The function f (x) = x12 has both one-sided limits that are equal:
lim x12 = lim x12 = +∞. The general limit also exists, but it is infinite:
x→0− x→0+
lim 12 = +∞.
x→0 x
Example 11. “If for a specific function f (x) and point a the dependence
of δ from ε in the limit definition cannot be expressed in the form δ = cε ,
where c is a positive constant, then f (x) does not have a limit at a.”
Solution. √
For f (x) = 3 x considered in a neighborhood
√ of the point a = 0, if δ = ε3
then the limit definition is satisfied: lim 3 x = 0. However, there is no constant
x→0
√ that δ = cε. Indeed, if 0 < |x| < δ = cε, then we can obtain
c√> 0 such
| 3 x| < 3 cε, but for any fixed c the expression in the right-hand side is
greater than ε, if ε √is sufficiently small. Therefore, we will not obtain the
required evaluation | 3 x| < ε if δ = cε.
Remark. Of course, similar statements with requirement of any other
specific law δ (ε) are also false.
Example 12. “If for a specific function f (x) and point a there are two
different ways to determine δ (ε) in the limit definition, then f (x) does not
have a limit at a.”
Solution.
Actually, if the limit definition is satisfied, then always there are infinitely
many ways to determine δ (ε). For example, if f (x) = x and a = 0 then an
evident choice to satisfy the definition of lim x = 0 is δ = ε. But it means
x→0
that for any{constant
} 0 < c < {1 the}law δ = cε is also suitable, as well
as δ = min ε, ε2 , or δ = min ε, ε3 , or more exotic δ = ln (1 + ε) and
δ = 1 − e−ε , or many others.
44 Counterexamples: From Calculus to the Beginnings of Analysis
Example 1. “If ̸ ∃ lim f (x) and ̸ ∃ lim g (x) then ̸ ∃ lim (f (x) + g (x)).”
x→a x→a x→a
Solution.
Let f (x) = −g (x) = D (x). Then for an arbitrary a the limit of f (x)
and g (x) does not exist (see Example 1, section 2.2 for details). However,
h (x) = f (x) + g (x) = 0 has zero limit at any point a.
Remark 1. Similar simple examples can be given for other arithmetic
operations. For example, for the product we can use{ the following modification
1, x ∈ Q
of Dirichlet’s function: f (x) = −g (x) = D̃ (x) = , with h (x) =
−1 , x ∈ I
f (x) · g (x) = −1.
Remark 2. This is a false “negative” version of the sum rule for limits.
Remark 3. This “negative” formulation is equivalent to the direct con-
verse to the sum rule, that is the following statement is equally false: “if
∃ lim (f (x) + g (x)) then ∃ lim f (x) and ∃ lim g (x)”.
x→a x→a x→a
Example 2. “If both limits lim f (x) and lim g (x) exist and the former
x→a x→a
equals zero, then lim fg(x)
(x)
= 0.”
x→a
Solution.
Let f (x) = g (x) = x and a = 0. Then lim f (x) = lim g (x) = 0, but
x→0 x→0
f (x) x x
lim = lim = lim 1 = 1. (The function x is defined in a deleted neigh-
x→0 g(x) x→0 x x→0
borhood of zero, which is sufficient to consider the concept of the limit, and
in any such neighborhood xx =1, which justify the equality lim xx = lim 1).
x→0 x→0
Remark 1. This is a false extension of the ratio rule for limits.
Remark 2. It is important (and interesting) to note that if lim f (x) = 0
x→a
and lim g (x) = 0 then the result for lim fg(x)(x)
is unpredictable in a general
x→a x→a
case, and it can lead to a bunch of different conclusions depending on a specific
choice of functions f (x) and g (x). This is why this general situation is called
an indeterminate form and is denoted by symbol 00 . To specify different sit-
uations that can occur under the general assumption that lim f (x) = 0 and
x→a
lim g (x) = 0, let us briefly consider the following examples with the limit
x→a
point a = 0:
1) if f (x) = x2 and g (x) = x then lim f (x) = lim g (x) = 0 and lim fg(x)
(x)
=
x→0 x→0 x→0
lim x = 0.
x→0
2) if f (x) = cx (c = const) and g (x) = x then lim f (x) = lim g (x) = 0 and
x→0 x→0
f (x)
lim = lim c = c.
x→0 g(x) x→0
Limits 45
f (x)
3) if f (x) = x and g (x) = x3 then lim f (x) = lim g (x) = 0 and lim =
x→0 x→0 x→0 g(x)
lim 12 = +∞.
x→0 x
f (x)
4) if f (x) = −x and g (x) = x3 then lim f (x) = lim g (x) = 0 and lim =
x→0 x→0 x→0 g(x)
lim −12 = −∞.
x→0 x {
x, x ∈ Q
5) if f (x) = and g (x) = x then lim f (x) = lim g (x) = 0 and
0, x ∈ I x→0 x→0
f (x) f (x)
g(x) = D (x) in R\ {0}; hence lim g(x) does not exist.
x→0
Therefore, depending on a specific choice of functions f (x) and g (x), an
indeterminate form 00 can result in an arbitrary constant (including zero),
infinity or even nonexistence of the limit. This makes false any statement
about a specific property of lim fg(x)
(x)
- existence/non-existence, assuming a
x→a
specific value or be infinite - and the above specifications of f (x) and g(x) are
counterexamples to such statements.
Remark 3. The indeterminate form 00 is one of seven indeterminate forms,
∞
others being denoted by 0·∞, ∞ , ∞−∞, 1∞ , ∞0 , 00 . It is easy to specify what
each symbol means just comparing with the description for 00 . For example, an
indeterminate form 0·∞ means that lim f (x) = 0 and lim g (x) = (±) ∞ and
x→a x→a
we are considering the limit lim f (x)· g (x). Of course, similar statements and
x→a
corresponding examples can be constructed for each of indeterminate forms.
Remark 4. All the above considerations are true for both finite and infinite
limit points a.
Remark 5. The condition of non-zero limit of denominator is the important
condition for the validity of the ratio rule. At the same time, a mere fact that
the denominator has zero limit does not mean that the limit of the ratio does
not exist. This last observation is of extreme importance for one of the central
concepts in Calculus and applications - derivative, which is dealing with the
indeterminate form 00 .
Remark to Examples 3 and 4. The two last Examples show that slight mod-
ifications of the signs in formulations of the comparative properties (changing
strong inequality to non-strong and vice-versa) lead to wrong results.
Example 5. “If lim f (x) = A and lim g (x) = (±) ∞, then lim f (x) ·
x→a x→a x→a
g (x) = (±) ∞.”
Limits 47
Solution.
1
Let f (x) = x2 , g (x) = x2 and a = 0. Then lim f (x) = 0, lim g (x) = +∞,
x→0 x→0
but lim f (x) · g (x) = 1.
x→0
Remark 1. This statement is false for both finite and infinite limit points
a.
Remark 2. Of course the simplest example is with f (x) ≡ 0, but it can
give a wrong impression that f (x) ≡ 0 is the only function when the limit of
the product exists.
Remark 3. The statement will be true if to add that A ̸= 0.
Remark 4. For the sum the corresponding statement is true: if lim f (x) =
x→a
A and lim g (x) = (±) ∞, then lim (f (x) + g (x)) = (±) ∞. The same is for
x→a x→a
the difference.
Example 6. “If lim f (x) = A and lim g (x) does not exist, then lim f (x)·
x→a x→a x→a
g (x) does not exist.”
Solution.
Let f (x) = x, g (x) = D (x) and a = 0. Then lim f (x) = 0 and lim g (x)
x→0 x→0
does
{ not exist (see Example 1, section 2.2), but h (x) = f (x) · g (x) =
x, x ∈ Q
and lim h (x) = 0 (since lim h (x) = lim x = 0 and
0, x ∈ I x→0 x→0,x∈Q x→0,x∈Q
lim h (x) = lim 0 = 0 and Q ∪ I = R).
x→0,x∈I x→0,x∈I
Remark 1. This statement is false for both finite and infinite limit points
a.
Remark 2. Of course the simplest example is with f (x) ≡ 0, but it can
give a wrong impression that f (x) ≡ 0 is the only case when the limit of the
product exists.
Remark 3. The statement will be true if to add that A ̸= 0.
Remark 4. The existence of finite limits of both functions f (x) and g(x)
guarantees the existence of the limit of their product (and also sum and differ-
ence). On the other hand, the existence of one of the limits and non-existence
of another one assures the non-existence of the limit of the sum and difference,
but not of the product.
Remark 5. The corresponding statement for the ratio is also false.
Example 7. “If lim f (x) = A and lim g (x) = B , then lim g (f (x)) =
x→a x→A x→a
B.”
Solution.
If f (x) = 0, ∀x ∈ R and a = 0 then lim f (x) = 0 = A. Further, if
{ x→0
0, x ̸= 0
g (x) = then lim g (x) = 0 = B. However, g (f (x)) = 1, ∀x ∈ R
1, x = 0 x→0
and hence lim g (f (x)) = 1 ̸= B.
x→0
48 Counterexamples: From Calculus to the Beginnings of Analysis
Exercises
13. Suppose that f (x) and g(x) are defined on X, a is a limit point of X,
and lim f (x) does not exist (either finite or infinite) while lim g (x) = ∞.
x→a x→a
Show that under the above conditions the following statements are false:
1) “f (x) + g(x) has no limit at a”
2) “f (x) + g(x) has the infinite limit at a”
3) “f (x) · g(x) has no limit at a”
4) “f (x) · g(x) has the infinite limit at a”
14. Show that the functions f (x) = x2 cos πx and g(y) = sgn2 y with the
limit point a = 0 provide another counterexample to the statement in Example
7, section 2.3.
15. Use the function in Remark 2 to Example 8 in section 2.3 to disprove
the statement in that Remark.
16. Give a counterexample to the following statement: “if f (x) is defined
on (a, +∞), bounded on any finite interval (a, b), and lim f (x)x = A, then
x→+∞
lim (f (x + 1) − f (x)) = A”. (The converse is true: if f (x) is defined on
x→+∞
(a, +∞), bounded on any finite interval (a, b), and lim (f (x+1)−f (x)) = A,
x→+∞
then lim f (x) = A.)
x→+∞ x
17. Provide a counterexample to the following false modification of the
squeeze theorem: “if lim f (x) = A ≤ B = lim g (x), and the inequality
x→a x→a
f (x) ≤ h (x) ≤ g (x) holds for all x ∈ X in a deleted neighborhood of a, then
A ≤ lim h (x) ≤ B”.
x→a
Chapter 3
Continuity
General Remark. Due to the close connection between the concepts of limit
and continuity, the majority of the examples of chapter 2 can be reformulated
for continuous functions. A few of them are described in this chapter to ex-
emplify the modifications required. Notice that all these properties are of a
local character, and they appear in section 3.2 together with some additional
examples of local properties. The greatest attention in this chapter is paid
to global properties of functions related to continuity, because these issues
were not discussed so far and they are important both in mathematics and
applications.
Concepts
53
54 Counterexamples: From Calculus to the Beginnings of Analysis
Local properties
Comparative properties
1) If f (x) and g (x) are continuous at a, and f (x) ≤ g (x) for all x ∈ X in a
deleted neighborhood of a, then f (a) ≤ g (a).
2) If f (x) and g (x) are continuous at a, and f (a) < g (a), then f (x) < g (x)
for all x ∈ X in a neighborhood of a.
Global properties
Uniform continuity
Calculus books (see Example 1), the converse statement presented in Example
2 is generally accepted as correct, although there are some nuances regarding
this.
xk kπ
lim g (xk ) = lim = lim = +∞.
xk →0+ k→+∞ 2x2k k→+∞ 2
Remark. A similar example can be given for an infinite point a. The false
statement: “if f (x) is continuous, positive and unbounded on (0, +∞), then
1
f (x) is bounded on (0, +∞)”, can be disproved by using counterexample with
function f (x) = x sin x + x + x1 .
Remark 1. This Example shows that the continuity does not prescribe
any rate of approximation of a function to its value at the continuity point.
The only thing that is guaranteed is the existence of approximation (but not
its form).
Remark 2. The converse statement is true.
We can use the same example as for the limits (Example 1, section 2.3):
f (x) = −g (x) = D (x). Since Dirichlet’s function does not have a limit at
any point, it is discontinuous at any point. However, h (x) = f (x) + g (x) = 0
has zero limit at any point a.
Remark 1. This is a false “negative” version of the sum rule for continuous
functions.
Remark 2. Since there are different kinds of discontinuity, it is worth
noting that a counterexample can be constructed with discontinuity of any
kind: { sin x {
x , x ̸= 0 and g (x) =
0 , x ̸= 0
1) if f (x) = , both with a re-
0, x = 0 1, x = 0
movable discontinuity at a = 0, then the function h (x) = f (x) + g (x) =
{
x , x ̸= 0
sin x
is continuous at the origin.
1, x = 0
{ 2 {
x + 1, x < 0 x, x < 0
2) if f (x) = and g (x) = , both with a
x, x ≥ 0 x2 + 1 , x ≥ 0
jump discontinuity at a = 0, then the function h (x) = f (x)+g (x) = x2 +x+1
is continuous{at zero. {
x2 , x ̸= 0 and g (x) = x − x12 , x ̸= 0
1
3) if f (x) = , both having the
0, x = 0 0, x = 0
infinite limits at a = 0, that is, an essential discontinuity at a = 0, then the
function h (x) = f (x) + g (x) = x is continuous at zero.
Remark 3. If f (x) and g (x) have different kinds of discontinuities at a
point a then the statement of this Example is true.
Remark 4. Similar simple examples can be given for other arithmetic op-
erations. For instance, for the product we can use the same modified Dirichlet
function as in Example 2, {section 2.2 of the limits:
1, x ∈ Q
f (x) = −g (x) = D̃ (x) = , with h (x) = f (x) · g (x) = −1.
−1 , x ∈ I
Example 9. “If f (x) is continuous at a point a and g (x) is discontinuous
at a, then f (x) · g (x) is discontinuous at this point.”
Solution.
We can use an example similar to that applied in limits
{ (Example 6, section
0, x ∈ Q
2.3): f (x) = x is continuous and g (x) = 1 − D (x) = is discon-
1, x ∈ I
tinuous
{ at a = 0 (an essential discontinuity). However, h (x) = f (x) · g (x) =
0, x ∈ Q
is continuous at a = 0, because lim h (x) = 0 = h (0).
x, x ∈ I x→0
Remark 1. Other simple examples can be provided with other types of
discontinuity: {
sin x, x ̸= 0
1) f (x) = x is continuous and g (x) = has a removable dis-
1, x = 0
continuity at a = 0, but f (x) · g (x) = x sin x is continuous at a = 0.
2) f (x) = x is continuous and g (x) = sgn x has a jump discontinuity at a = 0,
but f (x) · g (x) = |x| is continuous at a = 0.
62 Counterexamples: From Calculus to the Beginnings of Analysis
{
2 1/x, x ̸= 0
3) f (x) = x is continuous and g (x) = has an essential dis-
1, x = 0
continuity at a = 0, but f (x) · g (x) = x is continuous at a = 0.
Remark 2. The statement will be true if to add that f (a) ̸= 0.
Remark 3. The corresponding statement for the ratio is also false, but the
statement for the sum and difference is true.
Example 1. “If f 2 (x) is continuous on [a, b], then f (x) is also continuous
on this interval.”
Solution. {
1, x ∈ Q
The modified Dirichlet function D̃ (x) = is not continuous
−1 , x ∈ I
at any point (it does not even have a limit - see Example 2, section 2.2), but
D̃2 (x) = 1 is continuous on an arbitrary interval [a, b] .
Remark 1. The same counterexample works also for (a, b).
Remark 2. The same counterexample works also for following false state-
ment about the absolute value of a function: “if |f (x)| is continuous on [a, b]
(or (a, b)) then f (x) is also continuous on this interval”.
f (x) is constant. However, this( function takes ) its global maximum infinitely
many times. Indeed, f (x) = x −1 + cos x1 ≤ 0 for ∀x ∈ [0, 1] and f (0) = 0,
so 0 is the global maximum value of f (x). It is easy to see that the function
takes this value in all points xn = 2nπ 1
, n ∈ N. Since all these points lie in
[0, 1], f (x) takes its global maximum infinitely many times.
Remark 1. A similar example can be constructed for a global mini-
mum or for both minimum and maximum. In the former case one can just
use the function { symmetric to the shown above with respect to the x -axis:
x − x cos x1 , x ̸= 0
g (x) = −f (x) = on [0, 1]. In the latter case, the func-
0, x = 0
−x + x cos πx , x ∈ (0, 1]
tion h (x) = −x + (2 − x) cos 2−x π
, x ∈ (1, 2) considered on [0, 2] shows
0 , x = 0 ; −2 , x = 2
that continuous anywhere non-constant function can take both the global
maximum and minimum values infinitely many times.
Remark 2. Since the behavior of the continuous on an interval function
is supposed to be sufficiently “smooth”, it may appear that it cannot have
too many oscillations within a finite interval in order to attain infinitely many
extreme values. However, it is possible.
Solution: {
x, x ∈ Q
The function f (x) = is discontinuous at any point, except
−x , x ∈ I
for 0. In fact, in any neighborhood of every point x0 there are rational and
irrational points. Hence, we can consider two partial limits at x0 :
and
lim f (x) = lim (−x) = −x0 .
x→x0 , x∈I x→x0 , x∈I
Since these partial limits are different for any x0 ̸= 0, it follows that the limit
of f (x) does not exist at any x0 ̸= 0, and therefore, f (x) is not continuous
at any x0 ̸= 0. At the point x0 = 0 we get lim f (x) = 0 = f (0), so f (x) is
x→0
continuous at x0 = 0.
Remark. Of course, the statement is also false for an arbitrary domain.
For example, if the domain is the interval (−a, a), then one can choose the
same function in the counterexample.
and discontinuous
{ functions defined on different sets. For instance, the func-
1 , x ∈ [−1, 0]
tion f (x) = defined on [−1, 1] is continuous at every
D (x) , x ∈ [0, 1]
point in [−1, 0) and discontinuous at every point in [0, 1].
Much more interesting counterexample arises if we interpret the inexact
term “at the same time” in a more strict sense: on any interval in the function
domain. In this case, one can use the Riemann function defined as follows.
Suppose that any rational number is represented in the form x = m n , where
m is integer, n is natural, and the fraction m n is in lowest terms (the last
means that m and n have no common factor). In this case the numbers m
and
1 n are uniquelymdetermined, and the Riemann function f (x) = R (x) =
n , x ∈ Q, x = n
0, x ∈ I is well-defined on R. It can be shown that this function
1, x = 0
is continuous at every irrational point and discontinuous at every rational
point. Indeed, in any neighborhood of a rational point x1 ∈ Q there exist
irrational ones. Therefore, the partial limit lim f (x) = 0 is different
x→x1 , x∈I
from f (x1 ) which is equal n1 if x1 = m
n or 1 if x1 = 0. It means that f (x) is
discontinuous at every rational point in R. Now, let us consider an arbitrary
irrational point x2 ∈ I. First, approaching x2 by irrational points we readily
obtain lim f (x) = 0 = f (x2 ). If we choose any set of rational points
x→x2 , x∈I
x = m n approaching x2 , then we can note that the denominator n should
approach infinity, because if it would not be so, that is, if the denominator
n would be bounded, say n ≤ n0 , then it will be only finitely many numbers
of the form x = m n , n ≤ n0 in a neighborhood of the point x2 . However, it
will contradict the well-known fact that in any neighborhood of an arbitrary
real point there are infinitely many rational points. But if the condition that
the rational points x = mn approach x2 implies that n → +∞, then it follows
that lim f (x) = lim n1 = 0 = f (x2 ). Since the two considered partial
x→x2 , x∈Q n→+∞
limits involve all the real points (Q∪I = R), we can conclude that lim f (x) =
x→x2
0 = f (x2 ), i.e., f (x) is continuous at every irrational point in R.
Remark. It can be shown that there does not exist a function continuous
at every rational point and discontinuous at every irrational point.
1
Example 8. “If function f (x) is continuous on an interval, then f (x) is
also continuous on this interval.”
Solution.
The function f (x) = sin x is continuous on R, but f (x)
1
= sin1 x is discon-
tinuous at all points xk = kπ, k ∈ Z.
Remark. The statement will be true with the additional condition f (x) ̸=
0 for all points of the interval.
Example 10. “If f (x) is continuous and unbounded on (0, +∞), and
f (x) > 0 , ∀x ∈ (0, +∞), then lim f (x)
1
= 0.”
x→+∞
Solution.
Consider f (x) = x sin x+x+1 on (0, +∞). Evidently, f (x) is continuous on
(0, +∞) due to the arithmetic properties of continuous functions and f (x) =
x (sin x + 1) + 1 > 0 for ∀x ∈ (0, +∞). Also, choosing xn = nπ, n ∈ N one
obtains the following partial limit
implying that f (x) is unbounded on (0, +∞). On the other hand, for the same
sequence xn = nπ we obtain
1 1
lim = lim = 0,
xn →+∞ f (xn ) n→+∞ nπ (sin nπ + 1) + 1
Continuity 69
1 1
lim = lim
xk →+∞ f (xk ) k→+∞ (2kπ − π/2) (sin (2kπ − π/2) + 1) + 1
1
= lim = 1.
k→+∞ 0 + 1
1
It means that the limit lim does not exist.
x→+∞ f (x)
Remark 1. We can also consider a modified statement: “if f (x) is contin-
uous and unbounded on (0, +∞), and f (x) > 0 , ∀x ∈ (0, +∞), then f (x)1
is
bounded on (0, +∞)”. A similar counterexample is provided by the function
f (x) = x sin x + x + x1 on (0, +∞).
Remark 2. Similar statements for bounded intervals are also false.
Example 1. “If f (x) is continuous on (a, b), then its image is also an
open interval.”
Solution.
Evidently, the function f (x) = x2 is continuous on (−1, 1), but its image
f ((−1, 1)) is the interval [0, 1), which is not open.
Remark 1. This false statement can be reformulated in a more general
form (which is also false): “if f (x) is continuous on an open set S then its
image is also an open set”.
Remark 2. This is a wrong reformulation of the following result (frequently
70 Counterexamples: From Calculus to the Beginnings of Analysis
Example 2. “If f (x) is continuous on a closed set [a, +∞), then its image
is also a closed set.”
Solution.
1
The function f (x) = 1+x 2 is continuous on [0, +∞) (just apply the arith-
metic properties), but its image f ([0, +∞)) is the interval (0, 1], which is not
closed (to determine the image notice that f (0) = 1, f (x) is strictly decreas-
ing and positive on [0, +∞) and lim f (x) = 0).
x→+∞
Remark 1. This false statement can be reformulated in a more general
form (which is also false): “if f (x) is continuous on a closed set S then its
image is also a closed set”.
Remark 2. This is a wrong reformulation of another characterization of
continuous functions: f (x) is continuous on a domain X if, and only if, the
inverse image f −1 (S) of any closed set S contained in the image f (X) is
closed.
Continuity 71
is f (x) = sgn x considered on such [a, b], that 0 ∈ (a, b) (it has a jump
discontinuity at the point zero).
Remark 3. The converse is true and represents the first Weierstrass theo-
rem.
Example 8. “If f (x) is continuous and bounded on (a, b), then it attains
its global minimum and maximum on this interval.”
Solution.
The function f (x) = x is continuous and bounded on (−1, 1), but it does
not attain either minimum or maximum values.
Remark. For an infinite interval, for example (−∞, +∞), the function
f (x) = arctan x provides a counterexample.
attain its minimum, because lim f (x) = 0, but all the function values are
x→0
positive.
Remark 1. Another counterexample when function, which satisfies the
above conditions, does not attain
either global minimum or maximum is pro-
x + 1, x ∈ [−1, 0)
vided by the function f (x) = x − 1, x ∈ (0, 1] on [−1, 1].
0, x = 0
Remark 2. Of course, the discontinuity point c can be one of the endpoints.
For instance, the function of the above counterexample considered on [0, 1],
has a discontinuity at the left-hand endpoint.
Example 10. “If f (x) attains its global minimum and maximum on [a, b],
then it is continuous on this interval.”
Solution.
The counterexamples proposed in Example 7 (including Remarks 1 and 2)
work here.
Remark. The converse statement is true and represents the second Weier-
strass theorem.
Example 11. “If f (x) is defined on [a, b] and continuous on (a, b), then for
any constant C between f (a) and f (b) there is c ∈ (a, b) such that f (c) = C.”
Continuity 75
Solution.
The function f (x) = sgn x considered on [0, 1] is continuous on (0, 1), and
consequently satisfies the conditions. However, for C = 1/2, 0 = f (0) < C <
f (1) = 1, there is no point in (0, 1) (neither in [0, 1]) such that f (c) = C.
Remark. Of course, continuity on (a, b) can be substituted by continuity
on [a, b) or (a, b] with the same effect. For instance, for (a, b] = (0, 1] the above
function provides a counterexample.
Example 12. “If f (x) is continuous on [a, b] ∪ [α, β], where b < α, then
for any constant C between f (a) and f (β) there is a point c ∈ [a, b] ∪ [α, β]
such that f (c) = C.”
Solution.
Let us consider f (x) = sgn x on the set S ≡ [−2, −1] ∪ [1, 2]. Evidently,
this function is continuous on S, but for C = 0, −1 = f (−2) < C < f (2) = 1,
there is no point in S such that f (c) = C.
Remark 1. The values f (a) and f (β) can be substituted for any other
pair with the same effect.
Remark 2. The closed intervals can be substituted for any other kind
of intervals (and more generally by non-connected set). For instance, for the
set (−2, 1) \ {0} = (−2, 0) ∪ (0, 1) the same functions and C = 0 provide a
counterexample.
Example 14. “If f (x) satisfies the intermediate value property on [a, b]
(that is, if f (x) takes on two values somewhere on [a, b], it also takes on every
value in between), then f (x) is continuous on [a, b].”
Solution. {
sin x1 , x ̸= 0
The function f (x) = is continuous at any point different
0,x=0
from 0 (as a composition of continuous functions), but it is not continuous
at 0, because the limit as x approaches 0 does not exist (see Example 4,
section 2.2 for details). So, this function is not continuous on [0, 1], but it
does satisfy the intermediate value property on [0, 1]. The latter is evident
for (0, 1], because f (x) is continuous there, and therefore the intermediate
value property is satisfied. For any pair 0 = x1 < x2 ≤ 1 the property is also
satisfied, because on any interval (0, x2 ) there are points x̄k = kπ 1
, k ∈ N such
that f (x̄k ) = f (0) = 0 and x̄k ∈ (0, x2 ) for sufficiently large k. Again, on the
interval [x̄k , x2 ] the function f (x) is continuous and consequently it assumes
all the values between f (x̄k ) and f (x2 ), or equivalently, between f (0) and
f (x2 ).
Remark 1. It is possible to construct a function with the intermediate value
property, which has infinitely many points of discontinuity on a finite interval.
The above counterexample can be { used as a base for construction of such a
π
sin x−a , x ̸= a
function. First notice that fa (x) = keeps the properties of
0,x=a
the above function f (x) on [a, a + δ] for ∀δ > 0. Then construct a collection of
{ π
sin x−1/(n+1) , x ̸= n+1
1
such functions fn (x) = 1 each of which is defined on
0 , x = n+1
[ ]
its own domain Xn = n+1 1
, n1 , ∀n ∈ N. Finally notice that ∪ Xn = (0, 1]
n∈N
Continuity 77
Example 15. “If f (x) attains its global minimum and maximum on
[a, b] and the image of this interval is [f (a) , f (b)], then f (x) is continuous on
[a, b].”
Solution {
x, x ∈ [0, 1] ∪ [2, 3]
The function f (x) = attains the minimum (f (0) =
3 − x , x ∈ (1, 2)
0) and maximum (f (3) = 3) at the endpoints of the domain [0, 3]. It also
assumes any value between 0 and 3, because the image of [0, 1], defined by
the function f (x) = x, is [0, 1], the image of (1, 2), defined by the function
f (x) = 3−x, is (1, 2), and the image of [2, 3], defined by the function f (x) = x,
is [2, 3]. So the total image is the interval [0, 3] = [f (0) , f (3)]. However, f (x)
has a jump discontinuity at the points 1 and 2: lim f (x) = 1, lim f (x) = 2,
x→1− x→1+
lim f (x) = 1, lim f (x) = 2.
x→2− x→2+
Remark. Another example of a function, which satisfies
{ the above con-
sin πx , x ̸= 0
ditions and has an essential discontinuity, is f (x) = on the
0,x=0
interval [−2, 2].
Example 16. “If f (x) attains its global minimum A and maximum B
on [a, b] and its image is [A, B], then f (x) is continuous at least at one point
on [a, b]. ”
Continuity 79
Solution
x, x ∈ Q, x ̸= 0, x ̸= 1
Let us consider f (x) = −x, x ∈ I on [−1, 1]. Evidently,
1, x = 0 ; 0, x = 1
all function values are located between −1 and 1, this function achieves its
global minimum (f (−1) = −1) and maximum (f (0) = 1) and it assumes
every value in [−1, 1], that is its image is the interval [−1, 1]. Therefore, the
conditions of the statement are satisfied. However, there is no point in [−1, 1]
where function is continuous. In fact, in any neighborhood of a point x0 there
are rational points different from 0 and 1 (denote them Q1 ≡ Q\ {0, 1}) and ir-
rational points. Let us consider the two partial limits at x0 : lim f (x) =
x→x0 , x∈Q1
lim x = x0 and lim f (x) = lim (−x) = −x0 . Since these par-
x→x0 , x∈Q1 x→x0 , x∈I x→x0 , x∈I
tial limits are different for any x0 ̸= 0, it follows that the limit of f (x) does
not exist at any x0 ̸= 0, and therefore, f (x) is not continuous at any x0 ̸= 0.
Finally, at the point x0 = 0 the limit exists lim f (x) = 0, but it is different
x→0
from the function value f (0) = 1. Therefore,f (x) is not continuous at x0 = 0
also. Hence, we have exhausted all possibilities and there is no point in [−1, 1]
where f (x) is continuous.
Remark 1 to Examples 15 and 16. The last two Examples are strengthened
versions of Example 10, with the conditions including the conclusions of the
80 Counterexamples: From Calculus to the Beginnings of Analysis
Weierstrass and Compact Set theorems. It shows that these theorems are
not convertible: even if a function satisfies the resulting properties of both
theorems, this is not sufficient to guarantee the function continuity, even at a
single point.
Remark 2 to Examples 15 and 16. Note that the conditions on images
in these Examples do not mean that a function satisfies the intermediate
value property, because these conditions require only that the function should
assume all the values between the minimum and maximum on the entire in-
terval, but there is no requirement for its subintervals, which is important in
the intermediate value property.
Example 1. “If f (x) is continuous and bounded on (a, b), then f (x) is
uniformly continuous on (a, b).”
Solution.
The function f (x) = sin πx is bounded and continuous on (0, 1) (as a
composition of continuous functions), but it does not possess uniform con-
tinuity on (0, 1). Indeed, let us consider two sequences of points in (0, 1):
xn = n1 , ∀n ∈ N, n > 1 and x̃n = 1+4n 2
, ∀n ∈ N. For sufficiently large n
the distance between the corresponding
points of the two sets gets as close as
1 2
we wish: |xn − x̃n | = n − 1+4n → 0, but |f (xn ) − f (x̃n )| = |0 − 1| = 1,
n→+∞
∀n ∈ N, n > 1. It means that for ε < 1 whatever δ > 0 we choose, there exist
pairs of points xn , x̃n ∈ (0, 1) with the distance between them less than δ,
such that the difference between the corresponding function values is greater
than ε. Therefore, we have a contradiction to the definition of uniform conti-
nuity.
Remark 1. Another interesting example for an infinite interval is the func-
tion f (x) = sin x2 continuous but not uniformly continuous on R.
Remark 2. If f (x) is continuous on a compact set, in particular, on [a, b],
then f (x) is uniformly continuous on [a, b] according to the Cantor theorem.
Example 3. “If f (x) is uniformly continuous on (a, c) and (c, b), then
f (x) is uniformly continuous on (a, c) ∪ (c, b).”
Solution. {
x − 1, x ∈ (−1, 0)
Let f (x) = . This function is uniformly continuous
x + 1, x ∈ (0, 1)
on (−1, 0) and (0, 1), but it does not keep uniform continuity on (−1, 0)∪(0, 1).
In fact, for (0, 1) we get: for an arbitrary pair x1 , x2 such that |x1 − x2 | < δ it
follows that |f (x1 ) − f (x2 )| = |x1 − x2 | < δ = ε, that is the definition holds.
The same is true for (−1, 0). However, for (−1, 0) ∪ (0, 1), if x1 ∈ (0, 1) and
x2 ∈ (−1, 0), then we obtain |f (x1 ) − f (x2 )| = |2 + x1 − x2 | > 2 whatever
close points x1 , x2 are chosen.
Remark 1. A similar statement for continuous functions is also false (see
Example 6 in section 3.3).
Remark 2. The statement is also false for a pair of intervals (a, c] and
(c, b), and for a pair of intervals (a, c) and [c, b). For instance, to construct a
counterexample for the first pair it is sufficient to define the above function
82 Counterexamples: From Calculus to the Beginnings of Analysis
additionally at the point 0 as follows: f (0) = −1. For these cases, a similar
statement for continuous functions is also false.
Remark 3. For a pair of intervals (a, c] and [c, b), and also for closed
intervals [a, c] and [c, b], a similar statement is correct both for uniformly
continuous and continuous functions.
Example 5. “If f (x) and g (x) are uniformly continuous on a set S, then
f (x) · g (x) is also uniformly continuous on S.”
Solution.
Evidently, the function f (x) = x is uniformly continuous on R (see Ex-
ample 2 for details). The uniform continuity of g (x) = sin x on R is also of an
Continuity 83
elementary proof:
x1 − x2 x1 + x2
|sin x1 − sin x2 | = 2 sin cos ≤ |x1 − x2 | < δ = ε,
2 2
for ∀x1 , x2 ∈ R such that |x1 − x2 | < δ (here, we used two elementary prop-
erties of the trigonometric functions: |sin α| ≤ |α|, ∀α and |cos β| ≤ 1, ∀β).
However, for the function h (x) = f (x) · g (x) = x sin x we can choose xn =
2nπ + n1 , ∀n ∈ N and x̃n = 2nπ , ∀n ∈ N such that |xn − x̃n | = n1 → 0,
n→+∞
but
( ) ( )
1 1 1 21 2
|h (xn )−h (x̃n )| = 2nπ+ sin > 2nπ+ = 4+ 2 > 4, ∀n ∈ N
n n n πn πn
( )
(here the trigonometric inequality sin x > π2 x for x ∈ 0, π2 was applied). It
means that h (x) is not uniformly continuous on R.
Remark 1. If S is a bounded domain, then the statement is true.
Remark 2. The sum of uniformly continuous functions on a set S is uni-
formly continuous function on S.
The function f (x) = x satisfies the conditions of the statement on (0, 1):
f (x) ̸= 0 for x ∈ (0, 1) and it is uniformly continuous on R (see the proof
1
in Example 2). However, the function g (x) = f (x) = x1 is not uniformly
continuous on (0, 1). In fact, choosing the points in (0, 1) in the form xn =
1 1
n , x̃n = n+1 , ∀n ∈ N\ {1}, we obtain: |xn − x̃n | = n − n+1 → 0, but
1 1
n→∞
|g (xn ) − g (x̃n )| = |n − (n + 1)| = 1.
Example 7. “If f (x) and g (x) are not uniformly continuous on a set S,
then f (x) · g (x) also is not uniformly continuous on S.”
Solution.
{ Let us consider a slight modification to the function of { Example 3: f (x) =
x − 1, x ∈ (−1, 0) −1, x ∈ (−1, 0)
, and also the function g (x) = .
x + 1, x ∈ [0, 1) 1, x ∈ [0, 1)
These functions are uniformly continuous on (−1, 0) and [0, 1), but they are
not uniformly continuous on (−1, 0) ∪ [0, 1) = (−1, 1), because both have a
jump discontinuity at the point 0. At the same time,
{
−x + 1, x ∈ (−1, 0)
h (x) = f (x) · g (x) = = 1 + |x|
x + 1, x ∈ [0, 1)
At the same time, the composite function h(x) = g(f (x)) = x is uniformly
continuous on R and, therefore, on (0, 1).
Remark 2. The change of order of a non-uniform continuous and uniformly
continuous functions in the composite function leads to the same results.
Remark 3. The well-known result on uniform continuity of composite func-
tion states that if f (x) is uniformly continuous on X, and g(x) is uniformly
continuous on f (X), then the composite function g(f (x)) is uniformly contin-
uous on X. If one tries to weaken the conditions on one of the functions, then
the result may be wrong.
Remark 4. Of course, the composite function is continuous on X as com-
position of continuous functions.
86 Counterexamples: From Calculus to the Beginnings of Analysis
Exercises
function g(f (x)) is uniformly continuous on X” and “if f (x) is uniformly con-
tinuous on X, and g(x) is continuous on f (X), then the composite function
g(f (x)) is not uniformly continuous on X”.
28. Show that the following statement is false: “if f (x) is uniformly con-
tinuous on any interval [a, b], then it is uniformly continuous on R”.
29. Since the violation of uniform continuity for one of the functions in
the composition can lead to loss of uniform continuity by the composite func-
tion, it may be tempting to state that “if f (x) is non-uniformly continuous on
X, and g(x) is non-uniformly continuous on f (X), then the composite func-
tion g(f (x)) is non-uniformly continuous on X”. Show that it is not true by
providing a counterexample.
30. A function f (x) is called Lipschitz-continuous on an interval I if there
exists a constant C ≥ 0 such that |f (x) − f (y)| ≤ C|x − y| for ∀x, y ∈ I.
It is straightforward to see that the Lipschitz-continuity implies the uniform
continuity. What about the converse?
Chapter 4
Differentiation
Concepts
89
90 Counterexamples: From Calculus to the Beginnings of Analysis
Basic properties
Applications
The first derivative test for local extremum. Let f (x) be differen-
tiable in a neighborhood of a point c. Then
1) if f ′ (x) > 0 in a left-hand neighborhood of c and f ′ (x) < 0 in a right-hand
neighborhood of c, then c is a strict local maximum;
2) if f ′ (x) < 0 in a left-hand neighborhood of c and f ′ (x) > 0 in a right-hand
neighborhood of c, then c is a strict local minimum;
3) if f ′ (x) < 0 (f ′ (x) > 0) in both one-sided neighborhoods of c, then c is
not a local extremum.
The second derivative test for local extremum. Let f (x) be twice
differentiable at a point c and f ′ (c) = 0. Then
1) if f ′′ (c) < 0, then c is a strict local maximum;
2) if f ′′ (c) > 0, then c is a strict local minimum.
Asymptotes
The line y = A is a horizontal asymptote of f (x) if either lim f (x) = A
x→−∞
or lim f (x) = A, or both.
x→+∞
The line y = Ax + B is an oblique (slant) asymptote of f (x) if either
lim (f (x) − Ax − B) = 0 or lim (f (x) − Ax − B) = 0, or both.
x→−∞ x→+∞
The line x = a is a vertical asymptote if lim f (x) = (±) ∞ or
x→a−
lim f (x) = (±) ∞, or both.
x→a+
4.2 Concepts
(a, b), then f 2 (x) is not differentiable at least at one point in (a, b)”. This
statement can be disproved
{ by the counterexample with the modified Dirichlet
1, x ∈ Q
function D̃ (x) = , which has no limit (and therefore is not
−1 , x ∈ I
differentiable) at any point (see Example 2, section 2.2), but its square is the
constant function D̃2 (x) = 1 differentiable on R. {
x, x ∈ Q
Another simple counterexample is the function f (x) = that
−x , x ∈ I
is not differentiable at any x ∈ R. In fact, it was shown in Example 3, section
3.3, that f (x) is discontinuous at any x ̸= 0, so it is not differentiable at any
x ̸= 0, and for x = 0 two partial limits in the definition of derivative give
different results:
f (x) − f (0) x
lim = lim =1
x→0,x∈Q x−0 x→0,x∈Q x
and
f (x) − f (0) −x
lim = lim = −1,
x→0,x∈I x−0 x→0,x∈I x
Solution.
The same
{ functions in Remark 2 to the
{previous Example 4 work here: both
1, x ∈ Q x, x ∈ Q
D̃ (x) = and f (x) = are not differentiable
−1 , x ∈I −x , x ∈ I
at any x ∈ R, but D̃ (x) = 1 is differentiable on R and |f (x)| = |x| is
differentiable on R\ {0}.
Remark 1. The following extended statement is also false: “if a function
f (x) is not differentiable at any point in (a, b), then |f (x)| is not differen-
tiable at least at one point in (a, b)”. The same functions can be used for the
counterexamples: the function D̃ (x) on R, and the function f (x) on (0, +∞).
Remark 2. The converse is also false. The corresponding example is f (x) =
x, which is differentiable on R, but |f (x)| = |x| is not differentiable at a = 0 .
Remark 3. It is worth to note that relation between f (x) and |f (x)| in
terms of differentiability is different from that for continuous functions. For
continuous functions the continuity of f (x) implies the continuity of |f (x)|,
while the converse implication does not hold. For differentiability both impli-
cations are not true.
e− x 2
1
t 1
f ′ (0) = lim = lim t2 = lim 2 = 0
x→0 x t→∞ e t→∞ 2tet
Let us show that the derivative does not exist at any point xn = 1
2n ,n ∈
Z\ {0}. In fact,
( π π)
lim f ′ (x) = lim 2x sin − π cos = −π,
x→xn− x→xn− x x
while ( π π)
lim f ′ (x) = lim −2x sin + π cos = π.
x→xn+ x→xn+ x x
Note that xn = 1
→ 0,
2n n→±∞ but, at the same time the function is differentiable
at x = 0:
f (x) − f (0) π
f ′ (0) = lim = lim x sin = 0.
x→0 x−0 x→0 x
100 Counterexamples: From Calculus to the Beginnings of Analysis
and
′ (x + 1) − 1 ′ (−x + 1) − 1
g+ (0) = lim = 1 and g− (0) = lim = −1.
x→0+ x x→0− x
Example 1. “If both functions f (x) and g (x) are differentiable on R and
f (x) > g (x) on R, then there exists at least one point in R where f ′ (x) >
g ′ (x).”
Solution.
Evidently, the functions f (x) = e−x and g (x) = −e−x are differentiable
on R and f (x) > g (x) on R, but f ′ (x) = −e−x < e−x = g ′ (x) on R.
2 1 √
lim cos 2 = lim 2 2kπ cos 2kπ = +∞,
xk →0 xk xk k→+∞
Example 4. “If f (x) is continuous on [a, b], has a tangent line at each
point of its graph on (a, b) and f (a) = f (b), then at least one of these tangent
lines is horizontal.”
Solution. √
The function f (x) = x2 is continuous on [−a, a], ∀a > 0, satisfies the
3
condition f (−a) = f (a), and has the derivative f ′ (x) = 3 √ 3 x ̸= 0 for every
2
x ̸= 0. Therefore, a tangent line at any point (x, f (x)), x ∈ [−a, 0) ∪ (0, a],
exists, but it is √
not horizontal. At the point x = 0 the derivative does not
3 2
exist, since lim xx = ∞, but the tangent line at this point exists, although
x→0
it is vertical and not horizontal.
Remark . This statement is a wrong weakened geometric version of Rolle’s
theorem: if f (x) is continuous on [a, b], differentiable on (a, b) and f (a) = f (b)
then there is a point c ∈ (a, b) such that f ′ (c) = 0. (It implies that the tangent
line at the point (c, f (c)) is horizontal.)
Example 9. “If f (x) is differentiable on (a, +∞) and both the function
and its derivative are bounded on (a, +∞), then the existence of lim f (x)
x→+∞
implies the existence of lim f ′ (x), and vice-versa.”
x→+∞
Solution.
sin x2 2
First, consider f (x) = x on (1, +∞). Since sinxx ≤ 1
x for x > 1, it
2
′ sin x2
follows that lim sin x = 0. However, f (x) = 2 cos x − 2
x2 has no limit at
x→+∞ x
infinity. It is sufficient√to compare two partial limits: the first corresponding
to the sequence xn = 2nπ, n ∈ N gives
(√ )
lim f ′ (xn ) = lim f ′ 2nπ = lim 2 = 2,
xn →+∞ n→+∞ n→+∞
√
and the second related to xk = π + 2kπ, k ∈ N results in
(√ )
lim f ′ (xk ) = lim f ′ π + 2kπ = lim (−2) = −2.
xk →+∞ k→+∞ k→+∞
Since two partial limits are different, the limit lim f ′ (x) does not exist.
x→+∞
Second, consider f (x) = cos (ln x) on (1, +∞). The derivative
f ′ (x)
=
sin(ln x) ′ sin(ln x)
− x has zero limit at infinity lim f (x) = 0, because − x ≤ x1
x→+∞
for x > 1. However, the function has no limit at infinity, since for the partial
limit with the points xn = e2nπ , n ∈ N we have
( )
lim f (xn ) = lim f e2nπ = lim 1 = 1,
xn →+∞ n→+∞ n→+∞
√ √
However, its derivative f ′ (x) = √ 3
1 1
sin 3 x + 3 √
3 x cos
3
x is bounded and
3 x2
has limit at infinity equal to zero.
Example 10. “If f ′ (x) = 0 on a set S then f (x) = const on this set.”
Solution. {
1, x ∈ (0, 1)
Let f (x) = with the set S = (0, 1) ∪ (1, 2). Evidently,
2, x ∈ (1, 2)
′
f (x) = 0 at every point x ∈ S, but f (x) is not a constant function.
Remark . The statement will be correct if the set S is connected (that is,
S is an interval).
112 Counterexamples: From Calculus to the Beginnings of Analysis
4.5 Applications
f (x) − f (0) 1
lim = lim √ = +∞,
x→0+ x−0 x→0+ 3
x
f (x) − f (0) 1
lim = lim √ = −∞,
x→0− x−0 x→0− 3
x
which means that x = 0 is the vertical tangent to the graph of f (x). At the
same time c = 0 is a strict local (and global) minimum of f (x).
Remark. Let us consider the statement with the opposite conclusion: “if
f (x) is continuous on (a, b) and at some point c ∈ (a, b) the tangent line to
the graph of the function is vertical, then f (x) has a local extremum √at c”.
This statement is also false and a simple counterexample is f (x) = 3 x at
c = 0.
Differentiation 113
Example 5. “If f (x) is strictly increasing and differentiable on (a, b), then
f ′ (x) > 0 on (a, b).”
Solution.
The function f (x) = x3 is strictly increasing and differentiable on (−1, 1),
but f ′ (0) = 0.
Remark 1. This is the wrong converse to the following statement: if
114 Counterexamples: From Calculus to the Beginnings of Analysis
f ′ (x) > 0 on (a, b), then f (x) is strictly increasing on (a, b). This is also
the wrong extension of the statement: if f (x) is increasing and differentiable
on (a, b), then f ′ (x) ≥ 0 on (a, b).
Remark 2. Of course, the same is true for decreasing functions.
there are both positive and negative values of f ′ (x). Therefore, the derivative
does not preserve the sign in one-sided neighborhoods of zero, so f ′ (x) does
not change its sign passing through the point ( c = 0. On
) the other hand, the
following evaluation is satisfied: f (x) = x2 2 + cos x1 > 0 = f (0), ∀x ̸= 0.
Therefore, by the definition, c = 0 is a strict local (and global) minimum of
f (x).
Remark 1. This is a warning to use with caution the following popular
“rule”: “if f ′ (x) exists in a neighborhood of a point c, but it does not change
sign passing through this point, then c is not a local extremum”. This “rule”
is a non precise shortened version of a part of the so-called First Derivative
test: if f ′ (x) exists in a neighborhood of a point c, and f ′ (x) keeps the same
sign on both sides of c, then c is not a local extremum.
Remark 2. An analogous false “rule”, also disproved by this counterex-
ample, is the following: “if f (x) is continuous in a neighborhood of a local
minimum point c, then f (x) is decreasing in a left-hand neighborhood of c and
increasing in a right-hand neighborhood of c” (and a similar “rule” for a local
maximum). This “rule” is a non precise shortened version of another part of
the First Derivative test: if f ′ (x) exists in a neighborhood of a point c, and
f ′ (x) changes sign passing through the point c, then c is a local extremum.
118 Counterexamples: From Calculus to the Beginnings of Analysis
Example 11. “If f (x) is strictly concave upward and twice differentiable
on (a, b), then f ′′ (x) > 0 on (a, b).”
Solution.
The function f (x) = x4 is strictly concave upward and twice differentiable
on (−1, 1), but f ′′ (0) = 0.
Remark 1. This is the wrong converse to the following statement: if
f ′′ (x) > 0 on (a, b), then f (x) is strictly concave upward on (a, b). This
is also the wrong extension of the statement: if f (x) is concave upward and
twice differentiable on (a, b), then f ′′ (x) ≥ 0 on (a, b).
Remark 2. Of course, the same is true for strictly concave downward
functions.
Remark . This is a warning to use with caution the following too simplified
“rule”: “if the tangent line at the point c lies above (below) the graph of f (x) in
a left-hand neighborhood of c and below (above) the graph of f (x) in a right-
hand neighborhood of c, then c is an inflection point”. Or even more simplified
“definition”: “c is called an inflection point of f (x) if the tangent line to the
graph of f (x) at (c, f (c)) crosses the graph”. These “rules” are non precise
shortened versions of the following theorem: if f (x) is twice differentiable in a
deleted neighborhood of a point c, and f ′′ (x) changes its sign passing through
the point c, then c is an inflection point.
′ f (x) − f (0)
f− (0) = lim = lim (x + 1) = 1,
x→0− x−0 x→0−
′ f (x) − f (0)
f+ (0) = lim = lim (2 − x) = 2.
x→0+ x−0 x→0+
At the same time, f ′′ (x) = 2 for x < 0, and f ′′ (x) = −2 for x > 0, that
122 Counterexamples: From Calculus to the Beginnings of Analysis
is, the function is concave upward on (−∞, 0) and downward on (0, +∞).
Therefore, c = 0 is an inflection point.
Remark . Let us consider the statement with the opposite conclusion: “if
f (x) is continuous on (a, b) and is not differentiable at a point c ∈ (a, b), then
c is an inflection point of the graph {of f (x)”. This statement is also false and
x2 + x, x < 0
a simple counterexample is f (x) = at c = 0.
x2 − x, x ≥ 0
of f (x). On the other hand, the derivative can be easily found using the
arithmetic and chain rules for x ̸= 0 and the definition of the derivative for
x = 0 (see Example 5, section { 4.3 and Example 14 in this section for analo-
′ 4x3 sin x1 − x2 cos x1 , x ̸= 0
gous calculations): f (x) = . Furthermore, the
0, x=0
Differentiation 123
FIGURE 4.5.11: Example 16, graphs of the first and second derivatives
second derivative { also 2exists and can be found by applying similar calcula-
12x sin 1
− 6x cos x1 − sin x1 , x ̸= 0
tions: f ′′ (x) = x . At the points xn =
0, x=0
′′
(4n+1)π , ∀n ∈ Z\ {0} the second derivative is negative f (xn ) = 12xn −1 < 0,
2 2
4.5.4 Asymptotes
Example 18. “The graph of a function cannot cross or touch its asymp-
tote.”
Solution.
The function f (x) = sinx x has the horizontal asymptote y = 0 (since
lim f (x) = lim sinx x = 0) and the graph of f (x) crosses this asymptote
x→+∞ x→+∞
infinitely many times at the points xn = nπ , ∀n ∈ N.
Another function f (x) = e−x (1 − cos x) has the horizontal asymptote
y = 0 (since lim f (x) = lim e−x (1 − cos x) = 0) and the graph of f (x)
x→+∞ x→+∞
touches this asymptote infinitely many times at the points xn = 2nπ , ∀n ∈ N
(at all these points, y = 0 is the tangent line to the graph of f (x)).
Remark. The statement becomes true under the additional condition that
f (a) ̸= 0. Notice, however, that without the continuity of f (x) and g (x),
the last condition does not guarantee the existence{of a vertical asymptote. A
x + 1 , x ̸= 0
simple counterexample is: f (x) = x + 1, g (x) = , which at
0, x = 0
the point x = 0 gives lim fg(x)
(x)
= lim x+1
x+1 = 1.
x→0 x→0
Example 21. “If f (x) and g (x) are differentiable in a deleted neighbor-
′
hood of a point c, g ′ (x) ̸= 0 in this neighborhood and lim fg′ (x)
(x)
exists, then
x→c
′
f (x)
lim = lim fg′ (x)
(x)
.”
x→c g(x) x→c
Solution.
The functions f (x) = x + 2 and g (x) = x + 1 are differentiable on R, and
′
g ′ (x) = 1 ̸= 0 on R. However, lim fg(x)
(x)
= 2, while lim fg′ (x)
(x)
= 1.
x→0 x→0
Remark 1. It happens because the important condition lim f (x) =
x→c
lim g (x) = 0 in L’Hospital’s rule is missing here.
x→c
Remark 2. For an indeterminate form ∞ ∞ a similar false modification of
L’Hospital’s rule can be constructed and the same functions f (x) and g (x)
can be used for a counterexample.
Remark 3. For both indeterminate forms 00 and ∞ ∞ the point c can also
be infinite. For instance, for the latter form the following counterexample can
be given: if f (x) = 3 − x12 and g (x) = 1 − x1 on (0, +∞), then f ′ (x) = x23 ,
′
g ′ (x) = 1
x2 ̸= 0 and lim f (x) = 3 ̸= 0 = lim f ′ (x) . It happens because
x→+∞ g(x) x→+∞ g (x)
Differentiation 127
Example 22. “If f (x) and g (x) are differentiable in a deleted neighbor-
hood of a point c, g ′ (x) ̸= 0 in this neighborhood and lim f (x) = lim g (x) =
x→c x→c
′
0, then lim fg(x)
(x)
= lim fg′ (x)
(x)
.”
x→c x→c
Solution.
The functions f (x) = x2 cos x1 and g (x) = sinx are differentiable in R\ {0},
′
g (x) = cos x ̸= 0 in (−1, 1) and lim x2 cos x1 = lim sin x = 0 (for the first
x→0
x→0
limit we can apply the evaluation x2 cos x1 ≤ x2 ). Nevertheless, lim fg(x)
(x)
̸=
x→0
f ′ (x)
lim ′ In fact, since lim sinx x = 1 and lim x cos x1 = 0 (applying a similar
.
x→0 g (x) x→0 x→0
evaluation x cos x1 ≤ |x|), we can calculate the original limit just applying
the arithmetic rules:
f (x) x2 cos x1 x 1
lim = lim = lim · lim x cos = 1 · 0 = 0.
x→0 g (x) x→0 sinx x→0 sin x x→0 x
does not exist, because lim 2x cos x1 = 0 and lim cos x = 1, but the limit
x→0 x→0
lim sin x1 does not exist.
x→0
Remark 1. This statement is a wrongly “weakened” version of L’Hospital’s
rule for an indeterminate form 00 where the condition of the existence of
′
lim f ′ (x)
(finite or infinite) is omitted.
x→c g (x)
∞
Remark 2. For an indeterminate form ∞ a similar false modification of
L’Hospital’s rule can be constructed: “if f (x) and g (x) are differentiable in a
deleted neighborhood of a point c, g ′ (x) ̸= 0 in some neighborhood of c, and
′
lim f (x) = lim g (x) = ∞, then lim fg(x)(x)
= lim fg′ (x)
(x)
”. The corresponding
x→c x→c x→c x→c
counterexample can be given in the following form: for f (x) = 2x − sin x and
g (x) = 2x+sin x, the limits at infinity are infinite lim f (x) = lim g (x) =
x→+∞ x→+∞
′ f (x)
+∞, both functions are differentiable on R (with g (x) ̸= 0) and lim =
x→+∞ g(x)
′
1, but lim fg′ (x)
(x)
= lim 2−cos x does not exist, since partial limits are
x→+∞ x→+∞ 2+cos x
different
2 − cos x 1 1 2 − cos x
lim = lim = ̸= 3 = lim 3 = lim .
x→+∞,x=2nπ 2 + cos x n→+∞ 3 3 k→+∞ x→+∞,x=π+2kπ 2 + cos x
128 Counterexamples: From Calculus to the Beginnings of Analysis
Example 23. “If f (x) and g (x) are differentiable on R, lim f (x) =
x→+∞
′ ′
lim g (x) = +∞ and lim f ′ (x) exists, then lim f (x) = lim f ′ (x) .”
x→+∞ x→+∞ g (x) x→+∞ g(x) x→+∞ g (x)
Solution.
The functions f (x) = 2x + sin 2x and g (x) = (2x + sin2x) esin x are differ-
entiable on R and approaches infinity, because |sin 2x| ≤ 1 and esin x ≥ e−1 on
R, while 2x approaches infinity. The limit of the ratio of the derivatives exists
and can be calculated as follows:
f ′ (x) 2 + 2 cos 2x
lim = lim
x→+∞ g ′ (x) x→+∞ (2 + 2 cos 2x) esin x + (2x + sin 2x) cos xesin x
4 cos x
= lim =0
x→+∞ (4 cos x + 2x + sin 2x) esin x
Exercises
Indefinite integral
Basic properties: ∫
1) if f (x) is differentiable on S, then f ′ (x) dx = f (x) + C on S.
(∫ )′
2) if f (x) is integrable on S, then f (x) dx = f (x) on S.
3) if f (x) and g (x) are integrable on S, then f (x) + g (x) is also integrable
on S and ∫ ∫ ∫
f (x) + g (x) dx = f (x) dx + g (x) dx.
Change of variable.
If φ (t) is differentiable on T and f (x) is integrable on S = φ (T ), then the
133
134 Counterexamples: From Calculus to the Beginnings of Analysis
Integration by parts.
If f (x) and g (x) are differentiable on S, and f (x) g ′ (x) is integrable on
S, then f ′ (x) g (x) is also integrable on S and
∫ ∫
f (x) g (x) dx = f (x) g (x) − f (x) g ′ (x) dx.
′
∫b ∫b
Additionally, if a = b, then a f (x) dx = 0, and if a > b, then a f (x) dx =
∫a
− b f (x) dx .
Remark 1. If there is no confusion with an indefinite integral, the Riemann
integrable function can be also called an integrable function and the Riemann
integral just an integral. We will use these abbreviations in this section.
Remark 2. All results below are formulated for a < b.
Comparative Properties
1) If f (x) and g (x) are integrable on [a, b] and f (x) ≤ g (x) on [a, b] , then
∫ b ∫ b
f (x) dx ≤ g (x) dx.
a a
2) If f (x) is integrable on [a, b], finf = inf f (x), fsup = sup f (x), then
x∈[a,b] x∈[a,b]
∫ b
finf · (b − a) ≤ f (x) dx ≤ fsup · (b − a).
a
∫ b
fmin · (b − a) ≤ f (x) dx ≤ fmax · (b − a) .
a
3) If f (x) is integrable on [a, b], then |f (x)| is also integrable on [a, b] and
∫ ∫
b b
f (x) dx ≤ |f (x)| dx.
a a
136 Counterexamples: From Calculus to the Beginnings of Analysis
4) If f (x) and g (x) are integrable on [a, b], then f (x) g (x) is also integrable
on [a, b].
5) f (x) is integrable on [a, b], if and only if, f (x) is integrable on [a, c] and
[c, b], where c is some point in [a, b]. Furthermore,
∫ b ∫ c ∫ b
f (x) dx = f (x) dx + f (x) dx.
a a c
Change of variable.
The first formulation. If f (x) is integrable on [a, b], and φ (t) is contin-
uously differentiable and strictly increasing (decreasing) on [α, β] with image
[a, b], then
∫ b ∫ β ∫ a ∫ β
f (x) dx = f (φ (t)) φ′ (t) dt ( f (x) dx = f (φ (t)) φ′ (t) dt ).
a α b α
Integration by parts.
The first formulation. If f (x) and g (x) are differentiable on [a, b] and
f (x) g ′ (x) is integrable on [a, b], then f ′ (x) g (x) is also integrable on [a, b]
and
∫ b ∫ b
f ′ (x) g (x) dx = f (b) g (b) − f (a) g (a) − f (x) g ′ (x) dx.
a a
Improper integrals
In the same way one can define an improper integral of the first kind on
(−∞, b]:
∫ b ∫ b
f (x) dx = lim f (x) dx.
−∞ a→−∞ a
If the limit exists and is finite, then the improper integral is called convergent.
Otherwise it is called divergent.
Additionally, an improper integral of the first kind on (−∞, +∞) is defined
as follows: ∫ +∞ ∫ a ∫ +∞
f (x) dx = f (x) dx + f (x) dx
−∞ −∞ a
Change of variable.
Let f (x) be continuous on [a, +∞), and φ (t) be continuously differentiable
and strictly increasing on [α, +∞] with image [a, +∞). Then the improper
∫ +∞ ∫ +∞
integrals a f (x) dx and α f (φ (t)) φ′ (t) dt are both convergent or both
divergent and ∫ ∫+∞ +∞
f (x) dx = f (φ (t)) φ′ (t) dt.
a α
Integration by parts.
Let f (x) and g (x) be continuously differentiable on [a, +∞), and
∫ +∞
lim f (x) g (x) = B. Then the improper integrals a f (x) g ′ (x) dx and
x→+∞
∫ +∞ ′
a
f (x) g (x) dx are both convergent or both divergent and
∫ +∞ ∫ +∞
′
f (x) g (x) dx = B − f (a) g (a) − f (x) g ′ (x) dx.
a a
Improper integral of the second kind. Let f (x) be defined on [a, b),
where a and b are finite points, integrable on every interval [a, c], where c
is arbitrary between a and b, a < c < b, and unbounded in any left-hand
neighborhood of b (that is b is a singular point of f (x)). The following limit
is called an improper integral of the second kind at b:
∫ b ∫ c
f (x) dx = lim f (x) dx.
a c→b− a
In the same way one can define another improper integral of the second
kind at a singular point a:
∫ b ∫ b
f (x) dx = lim f (x) dx.
a c→a+ c
If the limit exists and is finite, then the improper integral is called convergent.
Otherwise it is called divergent.
Additionally, if d ∈ (a, b) is an internal singular point, then an improper
integral of the second kind is defined as follows:
∫ b ∫ d ∫ b
f (x) dx = f (x) dx + f (x) dx, a < d < b,
a a d
where the integrals in the right-hand side are the improper integrals at d. If
both integrals in the right-hand side are convergent, then the integral in the
left-hand side is called convergent.
Remark 1. We do not consider here the principal value of the last integral.
Integrals 139
Applications
of [a, b] and an arbitrary choice of points ci ∈ [xi−1 , xi ] one can define the sum
of the areas of approximating rectangles as follows:
∑
n
A (f, g, P ) = |f (ci ) − g (ci )| · (xi − xi−1 ) .
i=1
If there exists a finite limit of these sums as the partition diameter ∆ ap-
proaches 0, and this limit does not depend on a choice of partitions and
points ci , then it is called the area of the considered plane figure: A (f, g) =
lim A (f, g, P ). In this case the plane figure is called quadrable or squarable.
∆→0
Remark . Actually, this is a simplified definition of a quadrable plane
figure. The complete definition is much more complex, involving sets of in-
scribed/circumscribed polygons and the concepts of infimum/supremum, and
it is out of scope of this text.
140 Counterexamples: From Calculus to the Beginnings of Analysis
Theorem. If f (x) and g (x) are continuous on [a, b], then the correspond-
ing plane figure is quadrable and its area can be calculated by the formula
∫b
A (f, g) = a |f (x) − g (x)| dx.
respectively.
Remark . Variants of these formulas in the cases when a plane figure is
defined by two curvilinear boundaries or when the axis of rotation is differ-
ent of the x-axis, etc., can be easily deduced from these basic formulas (or
consulted in textbooks).
Example 3. “If f (x) and g (x) are not integrable, then f (x) + g (x) is
not integrable too.”
Solution.
The functions f (x) = x − sgn x and g (x) = sgn x are not integrable on
any interval containing the origin, because they have jump discontinuities at
zero, but their sum f (x) + g (x) = x is integrable on R.
Remark . Similar false statements can be formulated for other arithmetic
operations. For instance, the statement for the product: “if f (x) and g (x)
are not integrable, then f (x) · g (x) is not integrable too”.
{ It can be disproved
x − 1, x < 0
by the counterexample with the functions f (x) = and
{ x + 1, x ≥ 0
−1 , x < 0
g (x) = . They have no antiderivative on (−1, 1), but their
1, x ≥ 0
product f (x)·g (x) = 1+|x| is integrable on R, with one of the antiderivatives
being x + 21 x |x|.
Example 1. “If f (x) is bounded on [a, b], then f (x) is Riemann integrable
on [a, b].”
Solution. {
1, x ∈ Q
Dirichlet’s function D (x) = is bounded but not Riemann
0, x ∈ I
integrable on any interval [a, b]. Indeed, for an arbitrary partition
of [a, b] in each of subintervals [xi−1 , xi ] there are both rational and irrational
Integrals 145
Therefore, the limits for these sums, as the partition diameter ∆ = max ∆xi
1≤i≤n
approaches 0, are different
lim Srat (f ) = b − a ̸= 0 = lim Sirr (f ) ,
∆→0 ∆→0
Example 2. “If f (x) is Riemann integrable on [a, b], then f (x) is contin-
uous on [a, b].”
Solution.
The function f (x) = sgn x is Riemann integrable but non-continuous on
[0, 1]. In fact, f (x) has a removable discontinuity at 0 (as the function is
considered on [0, 1]). Let us show that f (x) is Riemann integrable by the
definition. For an arbitrary partition of [0, 1] and an arbitrary choice of the
points ci ∈ [xi−1 , xi ], the following evaluation of the Riemann sums S (f )
holds:
∑
n ∑
n ∑
n
1 − ∆x1 = 0 · ∆x1 + 1 · ∆xi ≤ S (f ) = f (ci ) · ∆xi ≤ 1 · ∆xi = 1.
i=2 i=1 i=1
146 Counterexamples: From Calculus to the Beginnings of Analysis
Since ∆x1 → 0 when ∆ → 0, it follows that the limit of the Riemann sums,
as ∆ approaches 0, exists and does ∫ 1 not depend on the choice of partition and
points ci : lim S (f ) = 1, that is 0 sgn xdx = 1.
∆→0
Remark 1. For those who use to apply the upper and lower Riemann
integrals, the proof can be done as follows. For an arbitrary partition of [0, 1]
the upper Riemann sum is
∑
n ∑
n
S̄ (f ) = sup f (x) · ∆xi = 1 · ∆xi = 1,
i=1 x∈[xi−1 ,xi ] i=1
Solution. {
2x sin x12 − x2 cos x12 , x ̸= 0
The function f (x) = is integrable and
0, x = 0
unbounded on [−1, 1] (see Example 1, section 5.2 for details). So it is not
Riemann integrable on this interval.
Example 5. “If |f (x)| is Riemann integrable on [a, b], then f (x) is also
Riemann integrable on [a, b].”
Solution. {
1, x ∈ Q
The modified Dirichlet function D̃ (x) = is not Riemann
−1 , x ∈ I
integrable on any interval (it can be shown like in Example 1), but D̃ (x) = 1
is Riemann integrable on any interval.
Remark 1. The converse is true.
Remark 2. The corresponding statement for the square of a function is
also false: “if f 2 (x) is Riemann integrable on [a, b], then f (x) is also Rie-
mann integrable on [a, b]”. The same modified Dirichlet function D̃ (x) gives
a counterexample. Again the converse is true.
Example 6. “If f (x) · g (x) is Riemann integrable on [a, b], then f (x) and
g (x) are Riemann integrable on [a, b].”
Solution.
If f (x) = g (x), then the problem is reduced to Remark 2 of the previous
Example 5.
{ Of course, the functions may be { different. For example, if f (x) =
tan x , x ∈ (0, π/2) cot x , x ∈ (0, π/2)
and g (x) = , both functions
1 , x = 0,[ x =] π/2 1 , x = 0, x = π/2 [ ]
defined on 0, π2 , then f (x) and g (x) are unbounded on 0, π2 , and conse-
quently, are not Riemann [ integrable.
] However, h (x) = f (x) · g (x) = 1 is
Riemann integrable on 0, π2 .
Remark. The converse is true.
∫b
Example 7. “If f (x) is Riemann integrable on [a, b] and a f (x) dx = 0,
then f (x) ≡ 0 on [a, b].”
Solution.
Consider non-zero function f (x) = x on [−1, 1]. Evidently f (x) is Rie-
∫1
2 1
mann integrable and −1 xdx = x2 = 0.
−1
148 Counterexamples: From Calculus to the Beginnings of Analysis
∫b ∫b
false): “if a f (x) dx ≥ a g (x) dx, then f (x) ≥ g (x) on [a, b] ”. The corre-
sponding counterexample can be provided with the functions f (x) = x2 and
g (x) = 1 on [0, 2]. Again, the converse is true.
Example 11. “If f (x) + g (x) is Riemann integrable on [a, b], then both
f (x) and g (x) are Riemann integrable on [a, b].”
Solution.
f (x) = D (x) and g (x) = 1 − D (x) is a simple counterexample for this
case.
Remark. Similar statements for other arithmetic operations are also false.
For example, for the ratio the corresponding counterexample can be provided
using the modified Dirichlet function: f (x) = g (x) = D̃ (x).
Example 15. “If f (x) is Riemann integrable on [a, b], then there exists
∫b
c ∈ [a, b] such that a f (x) dx = f (c) · (b − a).”
Solution. {
0, x < 0
The Heaviside function H (x) = is Riemann integrable (see
1, x ≥ 0
∫1
Remark 2 to Example 2) on [−1, 1] and −1 H (x) dx = 1, but there is no point
where H (x) is equal to 12 .
Remark. The additional condition of the continuity of f (x) on [a, b] will
turn this false statement in one of the versions of the Mean Value Theorem
for integrals.
Example 16. “If f (x) is continuous on [a, b], and φ (t) is continuously
∫β ∫b
differentiable on [α, β], then α f (φ (t)) φ′ (t) dt = a f (x) dx, where a =
φ (α) and b = φ (β).”
Solution.
Let us consider the following calculations
2 applying this “rule”. First, cal-
∫2 2 ∫2 2 t3
culate −1 t dt directly: −1 t dt = 3 = 3. Next, consider the change of
−1
the variable using the continuously differentiable function x = φ (t) = t2 with
φ′ (t) = 2t. The lower limit α = −1 corresponds to a = φ (−1) = 1 and the
upper β = 2 to b = φ (2) = 4. Now expressing all elements in the terms of
∫4 √
variable x we get the right-hand side integral in the form 1 12 xdx with the
√
integrand f (x) = 12 x continuous on [1, 4]. Calculating the last integral we
Integrals 151
∫4 √ 4
obtain: 1 12 xdx = 31 x3/2 1 = 73 . Notice, that the conditions of the statement
hold, but two results are different.
Remark. The correct formulation of the change of variable rule is: if f (x) is
continuous on [a, b], and φ (t) is continuously differentiable on [α, β] with image
∫β ∫b
[a, b] and φ (α) = a, φ (β) = b, then α f (φ (t)) φ′ (t) dt = a f (x) dx. In the
false statement of this Example, the condition of the connection between the
domain of f (x) and the image of φ (t) was omitted, and it gives a wrong result
illustrated by the presented counterexample, where the image of φ (t) = t2
when t ∈ [−1, 2] is [0, 4], while the interval [φ (−1) , φ (2)] = [1, 4] is only a
part of the image. Of course, the correct rule provides sufficient conditions,
and in some cases when these conditions are not satisfied the formula may
still be true, but it may also happen that the formula will not work, as in the
counterexample above.
Example 17. “If f (x) and g (x) are continuous on [a, b] and con-
∫b
tinuously differentiable on (a, b), then a f (x) g ′ (x) dx = f (x) g (x)|a −
b
∫b ′
a
f (x) g (x) dx.”
Solution. √
The functions f (x) = x and g (x) = − cos x are continuous on [0, 1]
and continuously differentiable on (0, 1) (with the derivatives f ′ (x) = 2√1
x
,
′
g (x) = sin x), but the formula
∫ 1 ∫
√ √ 1 1 1 cos x
x sin xdx = − x cos x 0 + √ dx
0 2 0 x
is not valid, because the integral in the right-hand side does not exist (the
function cos√ x is not bounded on [0, 1], and so it is not Riemann integrable).
x
Remark 1. One of the correct statements of the integration by parts rule
is the following: if f (x) and g (x) are continuously differentiable on [a, b], then
∫ b ∫ b
′
f ′ (x) g (x) dx.
b
f (x) g (x) dx = f (x) g (x)|a −
a a
While these are the sufficient conditions, we can see that a weak violation
of them at one of the endpoints can lead to a wrong result. Of course, since
the conditions of the rule are sufficient, it may happen that they are violated,
√
but the rule is still working. For instance, using the same f (x) = x and
changing the second function to g (x) = sin x, we keep the same properties of
two functions on [0, 1], but the formula of the integration by parts holds in
this case: ∫ 1 ∫
√ √ 1 1 1 sin x
x cos xdx = x sin x0 − √ dx.
0 2 0 x
sin
√x
Although x
is not defined at 0, but it is Riemann integrable, because this
sin
√x
function is continuous on (0, 1] and lim x
= 0, which indicates just a re-
x→0
movable discontinuity at 0.
152 Counterexamples: From Calculus to the Beginnings of Analysis
∫1
Remark 2. The integral 0 cos √ x dx still exists if it is considered as an
x
improper integral. In this generalized context of the integrability, the formula
∫ 1 ∫ 1
√ √ 1 cos x
x sin xdx = − x cos x0 + √ dx
0 0 2 x
Example 18. “If f (x) is Riemann integrable on [a, b], then the value of
the Riemann integral does not change if one alters the values of f (x) at a
countable number of points.”
Solution. {
1, x ∈ Q
The functions f (x) ≡ 0 and D (x) = differ only at rational
0, x ∈ I
points, that is on a countable set, however f (x) is Riemann integrable on any
[a, b] and D (x) is not.
Remark. The statement becomes true if both functions are Riemann in-
tegrable.
Example 19. “If f (x) is continuous on [a, b] except at only one point,
then f (x) is Riemann integrable on [a, b].”
Solution.
The function f (x) = tan x has the only discontinuity point x = π2 on [0, π],
but f (x) is not Riemann integrable because it is not bounded on [0, π].
Remark. The statement becomes true if f (x) is additionally bounded on
[a, b].
and
lim f (xn ) = lim cos (2nπ + π) = −1.
xn →+∞ n→+∞
Integrals 153
∫ +∞
Therefore, lim f (x) does not exist. However, 1
f (x) dx converges. In-
x→+∞
deed, representing
( )′
2 sin x2 sin x2
f (x) = cos x = + ,
2x 2x2
follows lim f (xk ) = lim 4 2kπ cos 2kπ = +∞, that is, f (x) = x cos x4
xk →+∞ k→+∞
is unbounded at infinity.
Remark 2. The readers familiar with infinite series can note the contrast
between this statement and the known fact that a general term of a convergent
infinite series must tend to zero. (Infinite series will be considered in section
6.3.)
∫ +∞
Remark 3. The converse statement: “if lim f (x) = 0, then a f (x) dx
x→+∞
converges”, is also false. This is a more elementary result and
∫ +∞a 1simple
counterexample is f (x) = x1 on [1, +∞): lim x1 = 0, but 1 x dx =
x→+∞
lim ln b = +∞ diverges.
b→+∞
Remark 4. The related correct result states that if lim f (x) = A ̸= 0,
x→+∞
∫ +∞
then a f (x) dx diverges.
gn = − (x − n − εn ) · εnn , x ∈ [n, n + εn ] ,
0, x ∈
/ An
that is gn has the form of a tooth of a saw, with the support An and height n,
located above the x-axis. It is easy to evaluate the area of this tooth (triangle):
∫ ∫ n+εn
gn (x) dx = gn (x) dx = εn n.
An n−εn
1
In particular, if we choose εn = n·10 n , that is, the support radius fast decrease
∫ n+εn
along the x-axis, then n−εn gn (x) dx = 101n . Now we construct the function
{
gn , x ∈ An , ∀n ∈ N ∞
defined on [0, +∞): f (x) = , where A = ∪ An . Evi-
0, x ∈/A n=1
dently, f (x) is non-negative, continuous (as gluing together the line segments)
and unbounded at infinity (since f (n) = n). However, the improper integral
∫ +∞
0
f (x) dx converges. In fact, due to the evaluation of the tooth areas we
have: ∫ +∞ ∑∞
1 1
f (x) dx = n
=
0 n=1
10 9
(the sum of the infinite geometric progression), that is, the improper integral
converges.
Remark 1. If the conditions of the statement are weakened, then of course
the statement will remain false and the constructed counterexample will work,
but at the same time a simpler counterexample can arise. For instance, for
the false statement: “if f (x) is a positive and unbounded at infinity, then
∫ +∞
a
f (x) dx diverges” (the condition
{ of continuity is dropped here), there is
e−x , x ∈/N
a simpler counterexample: f (x) = .
n, x ∈ N
Remark 2. It is not difficult to construct a counterexample to a strength-
ened (but still false) version of the above statement: “if f (x) is positive,
∫ +∞
continuous and unbounded at infinity, then a f (x) dx diverges”. For ex-
ample, taking the advantage of the{constructed counterexample, we can sum
gn , x ∈ An , ∀n ∈ N
the constructed function f (x) = with any positive
0, x ∈/ A = ∪n∈N An
function, say g (x) = x21+1 , continuous on [0, +∞) and whose improper inte-
gral
∫ +∞converges. According to the arithmetic properties of improper integrals,
0
h (x) dx, h (x) = f (x) + g (x), is also convergent and h (x) is a positive,
continuous and unbounded at infinity function.
156 Counterexamples: From Calculus to the Beginnings of Analysis
∫ +∞
Example 5. “If a f (x) dx converges and g (x) is bounded on [a, +∞),
∫ +∞
then a f (x) g (x) dx also converges.”
Solution.
We can reduce this case to that of Example 4 by choosing g (x) in such
a way that it will mimic the action of the absolute value. Let f (x) = sinx x
[ ) ∫ +∞
on π4 , +∞ . It was already shown in Example 4 that π/4 sinx x dx converges.
Integrals 159
Choose now
{
1, x ∈ [2kπ, π + 2kπ) , k ∈ N
g (x) = .
−1, x ∈ [π + 2kπ, 2π + 2kπ) , k ∈ N
∫ +∞
Then f (x) g (x) = sinx x and it was shown above that π/4 sinx x dx diverges.
∫ +∞
Remark. If additionally a |f (x)| dx converges, then the statement will
be true.
∫ +∞ ∫ +∞
Example 6. “If both a f (x) dx and a g (x) dx converge, then
∫ +∞
a
f (x) g (x) dx also converges.”
Solution.
The counterexample is: f (x) = cos √ x and g (x) = cos√
3 x
x
on [1, +∞). Fol-
x
∫ +∞ cos x
lowing the reasoning of Example 4, it can be shown that 1 √ dx and
∫ +∞ cos x ∫ +∞ cos x cos x x
1
√
3 x dx are convergent. At the same time, 1
√
x
· √3 x dx is divergent
2
due to the following considerations: cos x
= 2x15/6 + cos 2x
, and the integral
∫ +∞ 1 ∫ +∞ cos 2xx5/6 2x5/6
dx diverges, while 1 dx converges.
1 2x5/6 2x5/6 ∫ +∞
Remark. The following statement is also false: “if a f (x) dx converges,
∫ +∞ 2
then a f (x) dx also converges”. The corresponding counterexample can
be given with the function f (x) = cos
√ x considered on [1, +∞).
x
∫ +∞
Example 7. “If a f (x) dx diverges and g (x) is unbounded on [a, +∞),
∫ +∞
then a f (x) g (x) dx also diverges.”
Solution. √ ∫ +∞ 1
Let us consider f √(x) = x1 and g (x) = x sin x on [1, +∞). 1 x dx
diverges and g (x) = x sin x is unbounded on [1, +∞), since for xn = π2 +
√π
2nπ, n ∈ N it follows that lim g (xn ) = lim 2 + 2nπ = +∞. So the
xn →+∞ n→+∞
conditions of the statement are satisfied. Now, let us evaluate the improper
integral of the product:
∫ +∞ ∫ +∞ +∞ ∫
sin x cos x 1 +∞ cos x
f (x) g (x) dx = √ dx = − √ − dx.
1 1 x x 1 2 1 x3/2
∫ +∞ cos x cos x
√ x √1 ≤ 3/2
Since lim cos √ x = 0 ( cos
x x ≤ x ) and 1 x 3/2 dx converges ( x3/2 x
1
x→+∞
∫ +∞ 1 ∫ +∞ 1 √
and 1 x3/2
dx converges), we can conclude that 1 x x sin xdx converges.
∫ +∞ ∫ +∞
Example 8. “If a f (x) + g (x) dx converges, then a f (x) dx and
∫ +∞
a
g (x) dx also converge.”
Solution.
∫ +∞ 1 ∫ +∞ −1 ∫ +∞ 1 −1 ∫ +∞
Both 1 x dx and 1 x dx diverge, while 1 x + x dx = 1 0dx =
0 converges.
Remark. Similar examples can be given for other arithmetic operations.
160 Counterexamples: From Calculus to the Beginnings of Analysis
∫ +∞ 1 −1
For instance, for the product the same functions can be used: 1
∫ +∞ 1 x · x dx =
− 1 x2 dx is a convergent integral.
Remark. We have focused here on improper integrals of the first kind, that
is the integrals considered on infinite intervals on the x-axis (the integrand do-
main is unbounded). Another kind (the second) of improper integrals is related
to infinite intervals on the y-axis (the integrand image is unbounded), while the
domain is bounded. Since two kinds of improper integrals are intimately con-
nected (there is a simple change of variable that transforms the second kind of
improper integrals to the first kind and vice-versa), we do not repeat here sim-
ilar counterexamples, which can be constructed for improper integrals of the
second kind as well. To take the advantage of the counterexamples constructed
for integrals of the first kind, just recall the formulas that connect two kinds of
integrals: if f (x) is continuous on [a, +∞) (without a loss of generality we can
assume that a > 0), then by changing the variable t = x1 , an improper integral
∫ +∞
of the first kind a f (x) dx can be reduced to the improper integral of the
∫ b (1) 1
second kind 0 f t t2 dt , b = a1 , where the lower limit is a singular point
(that is the integrand is unbounded in any right-hand neighborhood of 0, but it
is bounded on any interval [c, b], 0 < c < b). Moreover, both integrals converge
∫ +∞ ∫b ( )
(or diverge) simultaneously and are equal: a f (x) dx = 0 f 1t t12 dt . Us-
ing these formulas, some of the presented examples can be easily reformulated
for improper integrals of the second kind. For instance, Example 1 can be re-
∫b
formulated as follows: “if 0 g (t) dt converges, then lim g (t)·t2 = 0”, with the
t→0+
corresponding counterexample g (t) = t12 cos t12 defined on (0, 1]. At the same
time, some examples assume simpler form when solved directly for improper
integrals of the second kind. For instance, Example 6 can be reformulated in
∫b ∫b ∫b
the form: “if both 0 f (t) dt and 0 g (t) dt converge, then 0 f (t) g (t) dt also
1
converges”. However, the counterexample with the functions f (t) = t3/2 cos 1t
1
and g (t) = t5/3 cos 1t , obtained by transformation of the functions in Example
6, is somewhat involved. A much simpler counterexample for this statement
can be provided with the functions f (t) = √1t and g (t) = √ 1
3 2 on (0, 1].
t
5.5 Applications
according to the arithmetic and chain rules, and the derivative f ′ (x) =
sin x1 − x1 cos x1 is continuous on (0, 1), according to the arithmetic and com-
position rules. The function is also continuous at the endpoints of [0, 1] :
at 1 by the arithmetic and composition rules and at 0 by the definition -
lim x sin x1 = 0 = f (0). Hence, f (x) satisfies the conditions of the statement
x→0+
on [0, 1]. However, the graph of f (x) is not a rectifiable curve. Indeed, the
graph represents infinitely many oscillations with decreasing heights toward
to 0, accumulating near the y-axis. The locations of the crests of these os-
cillations are given by the formula xn = π+4nπ2
, n ∈ N and their heights are
hn = xn , n ∈ N. It is obvious that the length of one oscillation Ln (the length
of the part of the curve between two crests) is greater than the corresponding
wave height hn . So the sum of the lengths of the first N oscillations can be
evaluated as follows:
∑
N ∑
N ∑
N
2 2 ∑1
N
Ln > hn = > .
n=1 n=1 n=1
π (1 + 4n) 5π n=1 n
∑N
1 1 1
SN = = 1 + + ... + k
n=1
n 2 2
( ) ( )
1 1 1 1 1 1 1
=1+ + + + + + + + ...
2 3 4 5 6 7 8
( )
1 1 1
+ + + . . . +
2k−1 + 1 2k−1 + 2 2k
1 1 1 1 1
>1+ + 2 · + 4 · + . . . + 2k−1 · k = 1 + k → +∞.
2 4 8 2 2 k→∞
Therefore, the chosen subsequence of the sums SN∑ , N = 2k , is divergent, that
N 2
implies the divergence of the sequence SN . Since n=1 Ln > 5π SN , it follows
∑N
that n=1 Ln → +∞, that is the length of the graph is infinite and the
N →∞
curve is not rectifiable. (The sums SN are the partial sums of the harmonic
series; see more about numerical series in section 6.3).
{ 2Remark 1. Another interesting counterexample is the function g (x) =
x sin x12 , x ∈ (0, 1]
, which is even smoother than f (x) above, because it
0, x = 0
is differentiable on [0, 1] { and continuously differentiable on (0, 1). However
′ 2x sin x12 − x2 cos x12 , x ∈ (0, 1]
the derivative g (x) = is unbounded near
0, x = 0
0, that opens the possibility for the curve to be non-rectifiable, and really
the curve has an infinite length, that can be shown by applying the same
arguments as for f (x).
Remark 2. This statement is a wrongly “weakened” version of one of the
162 Counterexamples: From Calculus to the Beginnings of Analysis
where hn is the height, [xn , xn−1 ] is the base (xn−1 − xn being the width),
and xn−1/2 is the centerpoint (note that xn−1 > xn ). The entire func-
tion is defined as follows: consider an infinite partition of the interval [0, 1]
Integrals 163
in the form 1 = x0 > x1 > . . . > xn > xn+1 > . . . > 0, with the
only limit point 0 ( lim xn = 0); define the saw function in the form
{ n→∞
fn , x ∈ [xn , xn−1 ] , n ∈ N
f (x) = . By construction, f (x) is continuously
0, x = 0 ( ) ( )
differentiable on every interval xn , xn−1/2 and xn−1/2 , xn−1 , ∀n ∈ N, but
it is not differentiable at the points xn−1/2 and xn , ∀n ∈ N. Moreover, if
a sequence of the heights hn is chosen in such a way that hn → 0, then
n→∞
f (x) is continuous on [0, 1]. To specify the saw function we choose xn−1 = n1 ,
xn−1/2 = xn−12+xn , and hn = 2(n+1) 1
2 , ∀n ∈ N. Let us show that the graph
√ ( )
1 + e−2x , x = − 12 ln t2 − 1 , dx = − t2tdt
−1 ). However, the area of the fig-
ure below the graph of f (x) (above the x-axis and at the left of the y-axis) is
finite: ∫ +∞
( )+∞
A= e−x dx = −e−x 0
= 1.
0
More interesting, albeit a bit more involved example, is related to a
bounded figure, defined by a bounded function on a finite interval [a, b]. Let
us consider the saw function of the previous Example 2 with the following
specification of the heights and widths of teeth: xn−1 = n1 , xn−1/2 = xn−12+xn ,
and hn = 2n1
, ∀n ∈ N. Like in Example 2, f ((x) is continuous
) (on [0, 1] and )is
continuously differentiable on every interval xn , xn−1/2 and xn−1/2 , xn−1 ,
∀n ∈ N, but it is not differentiable at the points xn−1/2 and xn , ∀n ∈ N. Let us
show that the graph of f (x) is a non-rectifiable curve. Indeed, for the length
of each tooth we have: Ln ≥ 2hn = n1 , and consequently for the sum of the
∑N ∑N
lengths of the first N teeth we obtain: n=1 Ln ≥ n=1 n1 . Using the eval-
∑N
uation made in Example 1 for the sequence SN = n=1 n1 we conclude that
this sequence diverges lim SN = +∞. Hence, the constructed saw curve is
N →∞
non-rectifiable. At the same time, continuity and non-negativity of the func-
tion f (x) guarantee that the area between the graph of f (x) and the x-axis
(with the lateral sides x = 0 and x = 1) exists and can be expressed in the
∫1
form of the Riemann integral A = 0 f (x) dx.
Integrals 165
Remark 1. For those familiar with infinite series or willing to consult the
required results in the theory of series, the last integral can be ( easily calcu-
)
∫1 ∑∞
lated: A = 0 f (x) dx = n=1 An , where An = 21 2∆n · hn = 14 n12 − n(n+1) 1
∑∞ 2 ∑∞
is the area of the n-th tooth. Since n=1 n12 = π6 and n=1 n(n+1) 1
= 1, we
∑∞ ( 2
)
get A = n=1 An = 4 6 − 1 . (Infinite series will be considered in section
1 π
6.3.)
Remark 2. Another interesting
{ example is a slight modification of the func-
x sin2 x1 , x ∈ (0, 1]
tion in Example 1: f (x) = . Just like in Example 1, it
0, x = 0
can be readily shown that this function is continuous on [0, 1] and differentiable
on (0, 1]. Also the graph of f (x) has the crests located at xn = π+2nπ 2
,n∈N
and heights hn = xn , n ∈ N. So the same evaluation for the sum of the lengths
of the first N oscillations can be used:
∑
N ∑
N ∑
N
2 2 ∑1
N
Ln > hn = > .
n=1 n=1 n=1
π (1 + 2n) 3π n=1 n
∑N
Recalling that SN = n=1 n1 → +∞, we conclude that the graph of this
n→∞
function is a non-rectifiable curve. On the other hand, the area bounded by
the graph of f (x) and the x-axis (with the lateral sides x = 0 and x = 1)
∫1
exists and is equal to A = 0 f (x) dx, because the function f (x) is continuous
and non-negative on [0, 1]. It is easy to see that this area is less then 1/2, since
the figure is contained within the triangle with the vertices (0, 0), (1, 0) and
(1, 1).
Remark 3. According to the topics of this section we confine ourselves
to the cases when a plane figure is defined by a real function of one variable
f (x). However, there is a variety of other examples related to the definition of
plane curves in another form (parametric, geometric, etc.). For example, the
Koch snowflake, T-Square, Dragon curve and many other fractals have these
properties, some of them (for example, the Sierpinski gasket) even have a zero
area along with infinite boundary length.
Example 4. “If f (x) is continuous on [a, b], then the area between the
graph of f (x) and the x-axis (and the lateral walls x = a and x = b) can be
∫b
found by the formula A = a f (x) dx.”
Solution.
A simple counterexample is f (x) = x on [−1, 1]. In this case the area of
the figure is the sum of the areas of two equal triangles: A = 2 · 21 = 1, but
∫1
the Riemann formula gives −1 xdx = 0.
Remark. The condition of non-negativity of f (x) is missing in the
statement conditions, or without non-negativity the correct formula is A =
∫b
a
|f (x)| dx.
166 Counterexamples: From Calculus to the Beginnings of Analysis
Example 5. “If a plane figure has a finite area, then the corresponding
solid of revolution has a finite surface area.”
Solution.
Let us consider the plane figure between the graph of the function f (x) =
− ln x considered on (0, 1], the segment [0, 1] of the x-axis and the y-axis. This
unbounded figure has a finite area:
∫ 1 ∫ 1
1
A= − ln xdx = −x ln x|0 + dx
0 0
ln x 1/x
= 1 + lim x ln x = 1 + lim = 1 + lim / =1
x→0+ x→0+ 1/x x→0+ −1 x2
(the integration by parts was applied to the first integral and L’Hospital’s rule
was applied to calculate an indeterminate form). At the same time, the solid
of revolution, obtained by rotating this plane figure about the x-axis, has an
infinite surface area:
∫ 1 √ ∫ 1
1 ln x
S = 2π (− ln x) 1 + 2 dx > −2π dx
0 x 0 x
1
= −π ln2 x0 = π lim ln2 x = +∞.
x→0+
(the integration by parts was applied twice to find the integral, and then
L’Hospital’s rule was used twice to calculate an indeterminate form).
Remark 2. It is easy to see that the length of the corresponding curve is
infinite:
∫ 1√ ∫ 1 ∫ 1 ∫ 1
1 x2 + 1 x dx
L= 1 + 2 dx = √ dx = √ dx + √
0 x 2
0 x x +1 0
2
x +1 0 x x +1
2
√ 1 ∫ +∞ √ ( √ )+∞
dt
= x + 1 +
2 √ = 2 − 1 + ln t + t2 + 1
0 2
t +1 1
1
√ ( √ ) ( √ )
= 2 − 1 − ln 1 + 2 + lim ln t + t2 + 1 = +∞
t→+∞
168 Counterexamples: From Calculus to the Beginnings of Analysis
Example 6. “If a solid of revolution has a finite volume, then the plane
figure, which gave rise to this solid, is quadrable.”
Solution.
Let us consider f (x) = x1 on [1, +∞). For any b > 1, the curve on the
∫b√
subinterval [1, b] has the length L (b) = 1 1 + x14 dx, and the area of the
∫b
region between the graph and the x-axis is A (b) = 1 x1 dx = ln b. For the same
subinterval [1, b], the surface area and the volume of the solid of revolution
(obtained by rotating this region around the x-axis) are, respectively:
∫ b √
1 1
S (b) = 2π 1 + 4 dx > 2π ln b
1 x x
and ∫ ( )
b
1 1
V (b) = π dx = π 1 − .
1 x2 b
Letting b → +∞, we obtain the infinite plane region (with an infinite length of
two boundaries) with an infinite area A = lim A (b) = +∞, which generates
b→+∞
the solid of revolution with an infinite surface area S = lim S (b) = +∞,
b→+∞
Integrals 169
but with the finite volume V = lim V (b) = π. (This solid of revolution is
b→+∞
called Gabriel’s horn or Torricelli’s trumpet).
Remark 1. The integral of the surface area can be calculated directly:
∫ +∞ √ ∫
1 1 π 1 1√
S = 2π 1 + 4 dx = 1 + tdt
1 x x 2 0 t
∫ √ ( )√2
2
u2 1 u − 1
=π du = π u + ln
1 u2 − 1 2 u + 1 1
√
(√ ) π 2 − 1 π u − 1
= +∞.
=π 2 − 1 + ln √ − lim ln
2 2 + 1 2 u→1+ u + 1
Here, in the first integral we have applied the change of the variable t = x14 ,
dx = − 14 t−5/4 dt and in the second integral one more change of the variable
√
u = 1 + t, t = u2 − 1, dt = 2udu.
Remark 2. Similar
( ] results can be obtained for the family of functions
f (x) = x1α , α ∈ 12 , 1 on [1, +∞).
Exercises
It can be shown that φ(t) is continuous, differentiable and increasing on [0, 1],
however f (φ(t))φ′ (t) = φ′ (t) is not integrable since it is not bounded on [0, 1].)
9. It is well-known that for a continuous on [a, b] function f (x) the integral
Integrals 171
∫x
with the variable upper limit F (x) = a f (t)dt is a differentiable function on
[a, b] and F ′ (x) = f (x). Show that if the condition of continuity is relaxed to
integrability on [a, b], then the statement is not true anymore. On the other
hand, if f (x) is not continuous at c ∈ [a, b], it still may happen that F (x) is
differentiable at c. Formulate both results as counterexamples. (Hint: use the
Heaviside function
{ on [−1, 1] and show that F (x) is not differentiable at 0;
0, x = 0
use f (x) = on [−1, 1] and show that F (x) is differentiable at
cos x1 , x ̸= 0
0 .)
10. Use sgn x on a corresponding interval as another counterexample to
the statement in Example 15, section 5.3.
11. The generalized Mean Value theorem states that if f (x) is continuous
and g(x) is integrable and sign-preserving on [a, b], then there exists c ∈ [a, b]
∫b ∫b
such that a f (x)g(x)dx = f (c) a g(x)dx. Show that the condition of conti-
nuity of f (x) cannot be relaxed and the condition of sign-preserving cannot
be omitted even for continuous g(x). Formulate these results in the form of
counterexamples. (Hint: for continuous but not sign-preserving function use
g(x) = sin x, f (x) = x on [−π, π].)
12. It is well-known that for a Riemann integrable on [a, b] function f (x)
∫c ∫b
there is a point c ∈ [a, b] such that a f (x)dx = c f (x)dx. Use an example
to show that it is not always possible to choose c ∈ (a, b). (Hint: consider
f (x) = sin x on [0, 2π].)
( ) ∫b
13. If f (x) is a convex function on [a, b] then f a+b
2 (b − a) ≤ a f (x)dx ≤
f (a)+f (b)
(b − a). Show that the converse is not true.
2 ∫ +∞
14. Show that the statement “if a f (x) dx diverges, then lim f (x) =
x→+∞
A ̸= 0 ” is not correct.
15. Suppose f (x) is continuous and monotone on [a, +∞). Show that the
∫ +∞
condition lim xf (x) = 0 does not imply the convergence of a f (x) dx.
x→+∞
(Notice that the converse is true.)
16. Suppose f (x) is continuous and monotone on (0, b] and 0 is a singular
point of f (x). Show that the condition lim xf (x) = 0 does not imply the
x→0+
∫b
convergence of 0 f (x) dx. (Notice that the converse is true.) Compare with
the previous exercise.
17. Provide a counterexample to the following statement: “if f (x) ≤ g(x)
∫ +∞ ∫ +∞
on [a, +∞) and a g(x)dx converges, then a f (x)dx also converges”.
What if the condition f (x) ≤ g(x) is substituted by |f (x)| ≤ |g(x)| on
[a, +∞)? Compare with the General Comparison theorem. (Hint: for the first
case choose f (x) = −x and g(x) = x12 on [1, +∞); and for the second try
f (x) = | sin
2x
x|
and g(x) = sinx x on [1, +∞).)
18. Provide a counterexample to the following statement: “if f (x) and
∫b
g(x) are integrable on any [c, b] ⊂ (a, b] , f (x) ≤ g(x) on (a, b] and a g(x)dx
∫b
converges, then a f (x)dx also converges”. What if the condition f (x) ≤ g(x)
172 Counterexamples: From Calculus to the Beginnings of Analysis
and {
gn (x), x ∈ [xn+1/2 − δn , xn+1/2 + δn ]
g(x) = ,
0, otherwise
1 1 xn +xn+1
where xn = n, δn = 8n2 , xn+1/2 = 2 ,
π
fn (x) = 2nπ cos( (x − xn )) · H(x − xn + δn )H(xn + δn − x),
2δn
π
gn (x) = 2nπ cos( (x − xn+1/2 )) · H(x − xn+1/2 + δn )H(xn+1/2 + δn − x),
2δn
∀n ∈ N, and H(x) is the Heaviside function.)
∫ +∞
25. By definition, the principal value of the improper integral −∞ f (x)dx
∫a ∫ +∞
is lim −a f (x)dx . It is evident, that the convergence of −∞ f (x)dx imply
a→+∞
the convergence of its principal value. Show by example that the converse is
not true. Construct a similar definition for the principal value of the improper
integral of the second type and give a corresponding counterexample.
Integrals 173
26. Elaborate technical details of the proof for the counterexample in Ex-
ample 1, section 5.5. {
x cos x1 , x ∈ (0, 1]
27. Show that the graph of the function f (x) = on
0, x = 0
[0, 1] has an infinite length, but the area of the corresponding plane figure
between the graph and x-axis is finite. Thus, this is one more counterexample
to the statement in Example 3, section 5.5.
28. Show that the plane region between the graph of f (x) = √1x and x-axis
on the interval (0, 1] has the finite area, but the corresponding solid formed
by revolving this region around x-axis has an infinite volume. Formulate this
result as a counterexample. Show that this solid of revolution has an infinite
surface area. Therefore, it also provides a counterexample to the statement in
Example 5, section 5.5 (although in Example 5 the volume is finite).
29. Show that the graph of f (x) = x2x+1 considered on [0, +∞) generates
the plane figure (between the graph and x-axis) with infinite area and corre-
sponding solid of revolution (rotating around x-axis) with infinite surface area,
but finite volume. Thus, this is one more counterexample to the statement in
Example 6, section 5.5.
Chapter 6
Sequences and series
Numerical sequences
175
176 Counterexamples: From Calculus to the Beginnings of Analysis
∑
Convergence of geometric series. A geometric series q n (q = const)
is convergent if |q| < 1 and divergent if |q| ≥
∑1.1
Convergence of p-series. A p-series np (p = const) is convergent if
p > 1 and divergent if p ≤ 1.
∑ 1
The Cauchy (root) test. Let an be a positive series and lim ann =
n→∞
C. Then: ∑
1) if C < 1, then ∑ an converges;
2) if C > 1, then an diverges;
3) if C = 1 or the limit does not exist, then the test is inconclusive.
∑
The D’Alembert (ratio) test. Let an be a positive series and
lim aan+1
n
= D. Then:
n→∞ ∑
1) if D > 1, then ∑ an is convergent;
2) if D < 1, then an is divergent;
3) if D = 1 or the limit does not exist, then the test is inconclusive.
∑
The( Raabe )test. Consider a series an , an > 0 and suppose that
lim n · an+1 − 1 = R. Then:
an
n→∞ ∑
1) if R > 1, then ∑ an is convergent;
2) if R < 1, then an is divergent;
3) if R = 1 or the limit does not exist, then the test is inconclusive.
∑
The Bertrand
( ( test.
) Consider
) a positive series an and assume that
lim ln n · n · aan+1
n
− 1 − 1 = B. Then:
n→∞ ∑
1) if B > 1, then ∑ an converges;
2) if B < 1, then an diverges;
3) if B = 1 or the limit does not exist, then the test is inconclusive.
Remark 1. All the tests for positive series can also be used for checking
the absolute convergence of arbitrary series.
Remark 2. In all convergence results, the properties required to be satisfied
for all indices, can be actually satisfied for all indices starting from some index
N.
Power series
∑∞ n
Power series. The series n=0 cn (x − a) , where cn , n ∈ N ∪ {0} and
a are real numbers, is called a power series centered at a (or simply a power
series). The numbers cn are called the coefficients and a the centerpoint of the
series.
∑∞ n
Convergence theorem. For a given power series n=0 cn (x − a) there
are only three options:
1) the series converges only when x = a,
Sequences and series 179
∞
∑
f ′ (x) =
n−1
ncn (x − a) ,
n=1
∫ ∞
∑ n+1
(x − a)
f (x) dx = cn + C.
n=0
n+1
The last two formulas show that the power series can be differentiated
and integrated term by term within the interval of convergence. The radius
of convergence of the last two series is R. The immediate consequence of
this result is that f (x) represented by a convergent power series is infinitely
differentiable inside the interval of convergence.
∑+∞ ∑+∞
n n
Theorem. If two power series n=0 cn (x − a) and n=0 bn (x − a)
are convergent on the same interval and the set of the points of this interval,
on which they take the same values, has a finite limit point contained within
the interval of convergence, then an = bn , ∀n.
Theorem. A function can have only one expansion in a power series
centered at the chosen point. ∑+∞ ∑+∞
Theorem. If the radii of convergence of n=0 an xn and n=0 bn xn are
∑+∞
Ra and Rb , respectively, then the radius of convergence of n=0 (an + bn ) xn
is
1) Rc = min {Ra , Rb } if Ra ̸= Rb ;
2) Rc ≥ min {Ra , Rb } if Ra = Rb .
∑∞ n
Taylor coefficients. If f (x) = n=0 cn (x − a) is convergent for
(n)
f (a)
|x − a| < R, R > 0, then cn = n! , ∀n ∈ N ∪ {0}.
∑∞ f (n)(a) n
Taylor series. The power series representation f (x) = n=0 n ! (x−a)
is called the Taylor series of f (x) (centered at a).
180 Counterexamples: From Calculus to the Beginnings of Analysis
Example 3. “If both sequences an and bn are divergent, then the sequence
an + bn is also divergent.”
(see Example 1, section 2.3 for comparison)
Solution.
Sequences and series 181
n n+1
Let us choose an = (−1) and bn = (−1) . Then both sequences diverge
(see Example 1 for details), but the sequence cn = an + bn = 0 is convergent
to zero.
Remark 1. Analogous constructions can be made for other arithmetic
operations. In particular, the product of the same divergent sequences is the
n n+1
convergent sequence dn = (−1) · (−1) = −1.
Remark 2. Under the conditions of the statement, the opposite conclusion
n
is also false. For instance, if an = bn = (−1) , then the sequence cn = an +bn =
n
2 · (−1) is also divergent.
1 1
a2k = 1 +
+ ... + k
2 2
( ) ( )
1 1 1 1 1 1 1
=1+ + + + + + + + ...
2 3 4 5 6 7 8
( )
1 1 1
+ + + ... + k
2k−1 + 1 2k−1 + 2 2
1 1 1 1 1
>1+ + 2 · + 4 · + . . . + 2k−1 · k = 1 + k → +∞.
2 4 8 2 2 k→∞
Therefore, the chosen subsequence is divergent, that implies the divergence
of the original sequence. At the same time, the condition of the statement is
satisfied:
( )
1 1 1
lim (an+p − an ) = lim + + ... + =0
n→∞ n→∞ n + 1 n+2 n+p
Example 10. “If lim an = 0 and lim bn = +∞, then lim an bn = 0.”
n→∞ n→∞ n→∞
(see Examples 2 and 5, section 2.3 for comparison)
Solution.
Let an = n1 and bn = n. Then lim an = 0 and lim bn = +∞, but
n→∞ n→∞
lim an bn = lim n1 n = 1.
n→∞ n→∞
Remark 1. This is a false extension of the product rule for limits.
Remark 2. This Example is similar to Example 2, section 2.3, and an
indeterminate form 0 · ∞ treated here is one of seven indeterminate forms
mentioned in Remark 3 to that Example. Let us see that the situation is really
undefined, that is the limit of the product strongly depends on a specification
of the sequences an and bn :
1) if an = nc (c = const) and bn = n, then lim an = 0, lim bn = +∞ and
n→∞ n→∞
lim an bn = lim c = c.
n→∞ n→∞
2) if an = n1 and bn = n2 , then lim an = 0, lim bn = +∞ and lim an bn =
n→∞ n→∞ n→∞
lim n = +∞.
n→∞
3) if an = − n1 and bn = n2 , then lim an = 0, lim bn = +∞ and lim an bn =
n→∞ n→∞ n→∞
lim (−n) = −∞.
n→∞
(−1)n
4) if an = n and bn = n, then lim an = 0, lim bn = +∞ and
n→∞ n→∞
n
lim an bn = lim (−1) does not exist.
n→∞ n→∞
So, just like in Example 2, section 2.3, an indeterminate form 0 · ∞ can
result in an arbitrary constant (including zero), infinity or even non-existence
of the limit.
Sequences and series 185
∑
Example 3. “If lim nan = 0, then an converges.”
n→∞
Solution.
1
Consider an = n ln lim nan = lim ln1n = 0, but
n , n > 2. Evidently, n→∞
∑ 1 n→∞
1
the series n ln n is divergent according to the integral test: f (x) = x ln x is
positive and decreasing on [3, +∞) and the improper integral
∫ +∞ ∫ +∞
1 +∞
f (x) dx = dx = ln (ln x)|3 = +∞
3 3 x ln x
is divergent.
∑
Example 4. “If an converges , then lim nan = 0.”
n→∞
Solution. ∑ n 1
The alternating series (−1) √n is convergent (both conditions of the
n√
Leibniz test are satisfied), but lim nan = lim (−1) n = ∞ (the limit does
n→∞ n→∞
not exist if one considers the specific infinity - positive or negative).
Remark 1. The statement is still false if the condition of the positivity
of an is added. In this case the counterexample is provided by the sequence
Sequences and series 187
{
/ 2 n = k , k ∈ N . Indeed, lim nan does not exist, since for n =
2
1/n,
an =
1 n , otherwise n→∞
k , k ∈ N, we have lim nan = lim k k2 = 1, while for n = k 2 + 1, k ∈ N,
2 2 1
n→∞( )k→∞1
we get lim nan = lim k 2 + 1 (k2 +1) 2 = 0. At the same time, the following
n→∞ k→∞
evaluation for partial sums holds:
1 1 1 1 1 1
Sk 2 = 1 + + 2 + + ... + ( )2 + . . . + 2 +
22 3 4 2
(k − 1) + 1 (k 2 − 1) k2
∑k 2
∑
k ∑∞
1 1 1 π2
< + < 2 = 2 .
n=1
n2 n=1 n2 n=1
n2 6
2
Since the series is positive, it follows that Sk < π3 , ∀k ∈ N, that implies
convergence of the series.
Remark 2. The statement becomes true if an is a non-negative decreasing
sequence.
∑ ∑ ∑
Example 5. “If an and bn are convergent, then an bn is also con-
vergent.”
Solution.
n n 1
If an = (−1) √1n and bn = (−1) √ 3 n , then the alternating series
∑ n 1 ∑ n 1
(−1) √n and (−1) √ 3 n are convergent since both conditions of the
not
∑∞ work for series in the same way as for finite sums. However, if series
n=1 an is positive, then the statement is true.
Remark 2. The converse is true.
∑ ∑
∑ Example 11. “If an and bn diverge, and an ≤ cn ≤ bn , ∀n ∈ N, then
cn also diverges.”
Solution. ∑ ∑
If an = − n1 and bn = 1, then the series an and bn diverge. Choosing
cn = n12 the last
∑ 1condition of the statement is also satisfied: − n1 ≤ n12 ≤ 1,
but the series n2 is convergent.
Remark 1. Under the given conditions, the statement with the opposite
∑ an = − n and bn = 1,
1
conclusion is also false. For instant, keeping the same
√1
but choosing cn = n , all the conditions holds, but cn diverges.
Remark 2. This statement ∑ is a wrong
∑ “negative” reformulation of the
following correct
∑ property: if a n and b n converge, and an ≤ cn ≤ bn ,
∀n ∈ N, then cn also converges.
1 1 ∑
k
1
=1+ + ... + = = Hk → +∞.
2 k n=1 n k→∞
Remark. This is a weakened false version of the convergence test for al-
ternating series (the Leibniz test) where the condition an+1 < an , ∀n ∈ N is
missing.
∑ n+1
Example 4. “Let (−1) an , an > 0 be an alternating series. If
an+1 < an , ∀n ∈ N, then the series converges.”
Solution.
Consider the alternating series with an = 1+ n1 , n ∈ N. Although 1+ n+1
1
<
1 + n , ∀n ∈ N, but the series is divergent, because
1
( the
) necessary condition of
convergence is not satisfied: lim an = lim 1 + n1 = 1 ̸= 0.
n→∞ n→∞
Sequences and series 191
Remark. This is a weakened false version of the convergence test for al-
ternating series (the Leibniz test) where the condition lim an = 0 is missing.
n→∞
∑ n
Example
∑ 5. “If (−1) an is convergent and 0 ≤ bn ≤ an for all n ∈ N,
n
then (−1) bn is also convergent.”
Solution. ∑
∞ (−1)n
The series √ converges according to the Leibniz test: an =
n=1 n
√1
→
n n→∞
0 and a n+1 = √ 1
n+1
≤ an = √1n for each n ∈ N. Also, 0 ≤ bn =
∑∞ (−1)n
√ 1
2 n+(−1)n
≤ √1n = an , for all n ∈ N. Nevertheless, the series n=1 2√n+(−1) n
diverges due to the following arguments: first rewrite this series in the form
∞
∑ n ∑∞ ( n )
(−1) 1 (−1) 1
√ n = √ −√ √ n ,
n=1
2 n + (−1) n=1
2 n n (2 n + (−1))
∑∞ (−1)n ∑∞ 1 √
and next note that √ converges, while
n=1 n n=1 2n+(−1)n n diverges
according to the comparison test for positive series, 1 √
because 2n+(−1) n
n
≥ 3n
1
for all n ∈ N.
Remark. This is a wrong extension of the comparison test (valid for posi-
tive series) onto the case of alternating series.
∑
Example 9. “Let an be a positive series. If the D’Alembert (ratio) test
is not applicable, then the Cauchy (root) test does not work as well.”
Solution. ∑+∞
Let us consider the series n=1 2(−1) −n . The ratio test does not work,
n
an+1
because the limit in the test lim an does not exist: two partial se-
n→∞
a2n 21−2n a2n+1
quences provide different results - a2n−1 = 2−1−2n+1 = 2 > 1 and a2n =
2−1−2n−1 √
21−2n = 18 < 1. At the same time, the root test is applicable: lim n an =
n→∞
lim 2((−1) −n)/n = 12
n
< 1, that is the series converges.
n→∞
∑+∞ n−(−1)n
Another example can be given for the divergent series n=1 2 .
Again the D’Alembert test is not applicable, because lim aan+1
n
does not exist:
n→∞
a2n 22n−1 1 a2n+1 22n+1+1
a = 22n−1+1 = 2 < 1 and a2n = 22n−1 = 8 > 1. However, the Cauchy
2n−1
√ n
test shows divergence of the series: lim n an = lim 2(n−(−1) )/n = 2 > 1.
n→∞ n→∞
Remark. The converse is true: if the Cauchy test is not conclusive, then
neither is the D’Alembert test. This is because the existence of lim aan+1 =a
√ n→∞ n
∑
Example 10. “Let an be a positive series. If the ratio and root tests
are not conclusive, then neither is any other test.”
194 Counterexamples: From Calculus to the Beginnings of Analysis
Solution. ∑+∞
Let us consider the convergent p-series (p = 2) n=1 n12 . The limits of
n2
the ratio and root tests are equal to 1: lim aan+1 = lim (n+1)2 = 1 and
√ n→∞ n n→∞
√
lim n an = lim n n12 = 1. So both tests are inconclusive. However, con-
n→∞ n→∞
vergence can be established by applying the integral test with the positive
decreasing function f (x) = x12 , x ∈ [1, +∞), whose improper integral is con-
vergent: +∞
∫ +∞ ∫ +∞
1 1
f (x) dx = dx = − = 1.
1 1 x2 x 1
Or one can use the Raabe test, which also reveals convergence:
( ) ( ) ( )
an (n + 1)2 2 1
lim n − 1 = lim n − 1 = lim n + = 2 > 1.
n→∞ an+1 n→∞ n2 n→∞ n n2
Remark. Similar example
∑+∞can be provided for divergent series: divergence
of the p-series (p = 1/2) n=1 √1n can be shown by applying the integral test
with f (x) = √1x , x ∈ [1, +∞) or the Raabe test
( ) (√ ) √
an n+1 n 1
lim n − 1 = lim n √ − 1 = lim √ √ = < 1,
n→∞ an+1 n→∞ n n→∞ n+1+ n 2
an+1 √
but both the ratio and root tests do not work: lim an = lim n an = 1.
n→∞ n→∞
∑
Example 11. “Let an be a positive series. If the Cauchy, D’Alembert,
Raabe and Integral tests are not conclusive, then neither is any other test.”
Solution.
Let us consider an = e−(1+ 2 +...+ n−1 ) and the corresponding series
1 1
e−(1+ 2 +...+ n )
1 1
an+1
= lim e− n = 1,
1
lim = lim
n→∞ an n→∞ −(1+ 12 +...+ n−1
1
) n→∞
e
that is the D’Alembert test is inconclusive. Since this limit exists, so does
√
the limit of the Cauchy test and the former and latter coincide lim n an =
n→∞
lim an+1 = 1, which means that the Cauchy test is also inconclusive. More-
n→∞ an
over, the Raabe test also fails:
( ) ( 1 )
an ex − 1
lim n · − 1 = lim n e n − 1 = lim+ = lim+ ex = 1.
n→+∞ an+1 n→+∞ x→0 x x→0
Finally, the Integral test is not applicable for this series (one cannot generate
an integrable function f (x) such that f (n) = an ). Nevertheless, the Bertrand
test shows that the series diverges:
( ( ) ) ( 1 )
an
lim ln n · n · − 1 − 1 = lim ln n ne n − (n + 1)
n→+∞ an+1 n→+∞
Sequences and series 195
( )
1 x 1 ex − 1 − x
= lim+ (− ln x) e − − 1 = − lim+
x→0 x x x→0 x(ln x)−1
ex − 1 1 ex − 1
= − lim+ −1
· lim+ −1
= − lim+
x→0 (ln x) x→0 1 − (ln x) x→0 (ln x)−1
) (
1 ∑ 1
+∞
1 1 π2 π2 1
= + 2
= + −1 = − .
4 n=2 2n 4 2 6 12 4
∑∞ ∑∞
However, the corresponding series is divergent: n=1 f (n) = n=1 1.
Remark 1. The function in the statement can even be made positive: for
the positive continuous function g (x) = f (x) + x12 the improper integral
∫ +∞ ∫ +∞ ∫ +∞
1
g (x) dx = f (x) dx + dx
1 1 1 x2
converges
∑∞ as the
∑∞sum ( of 1two
) convergent integrals, but the series diverges
n=1 g (n) = n=1 1 + n , since the general term does not approach 0.
2
Example 6. “If two power series, convergent on the same interval, have
different coefficients, then they assume different values at least at one point.”
Solution. ∑+∞ xn ∑+∞ (x−1)n
Two power series n=0 n ! and n=0 e n ! converge on R and have
different coefficients, but they take the same values at every x ∈ R (they are
the Taylor series expansions for ex centered at 0 and 1, respectively).
Remark. The correct statement asserts that a function can have only one
representation as a power series centered at the same point.
∑+∞ ∑+∞
Example 7. “If two power series n=0 an xn and n=0 bn xn have the
∑+∞
same radius of convergence, then the series n=0 (an + bn ) xn also has this
radius of convergence.”
Solution. ∑ ∑+∞
+∞ n n+1 n
The series n=0 (−1) xn and n=0 (−1) x have the radius
of conver-
an bn
gence equal to 1: Ra = lim an+1 = 1 and Rb = lim bn+1 = 1. However,
∑+∞ n→∞
∑+∞ n→∞
the series n=0 (an + bn ) xn = n=0 0·xn is convergent on R, that is Rc = ∞.
Remark 1. Of course, the resulting series can ∑+∞ be different (from zero.
) nFor
n+1
example, choosing the second series in the form n=0 (−1) 1 − 3
1
n x we
bn 1−1/3n
keep the same radius of convergence Rb = lim bn+1 = lim 1−1 3n+1 = 1,
n→∞ n→∞ /
∑+∞ ∑+∞ (−1)n n
n + bn ) x = n=0 3n ·x has a different radius
n
but the third series n=0 (a
cn
of convergence Rc = lim cn+1 = 3.
n→∞
Remark
∑+∞ 2. The corresponding
∑+∞ correct result is as follows: if power se-
n n
ries a x and b x have the radii of convergence Ra and Rb ,
n=0 n n=0 n ∑+∞
respectively, then the radius of convergence of the series n=0 (an + bn ) xn
satisfies the inequality Rc ≥ min {Ra , Rb }. If additionally Ra ̸= Rb , then
Rc = min {Ra , Rb }.
202 Counterexamples: From Calculus to the Beginnings of Analysis
Exercises
1. Show that the following condition: “there exists ε > 0 such that ∀n ∈ N
it holds |an − A| < ε” does not define A as a limit of an . What property of
an is defined by this condition?
2. Provide a counterexample to the statement: “any subsequence of an
unbounded sequence is also unbounded”. (Recall that any subsequence of a
bounded sequence is bounded.)
3. Give an example of a divergent sequence an such that |an | and a2n
converges. Formulate as a counterexample.
4. Show that lim an = +∞ does not imply lim (an+1 −an ) = +∞ neiher
n→∞ n→∞
lim an+1 = +∞. State in the form of counterexamples.
n→∞ an )
5. Give a counterexample to the statement “if both sequences an and bn
are divergent, then the sequence abnn is also divergent”. Compare with Example
3 in section 6.2.
6. Give a counterexample to the statement “if sequences an is convergent
and bn is divergent, then the sequence abnn is divergent”.
7. Illustrate the indeterminate form ∞ − ∞ with different examples of
sequences, that is, show that when lim an = +∞ and lim bn = +∞, then
n→∞ n→∞
any statement about existence/non-existence or (in the case of the existence)
about a specific value of lim (an − bn ) is not true.
n→∞
8. Consider the sequence of arithmetic means yn = x1 +...+x n
n
of the first
n terms of a sequence xn . Show that the statement “if yn converges then xn
converges also” is false. (Notice, that the converse is true: if xn converges then
yn converges to the same limit.)
√
9. Consider the sequence of geometric means zn = n x1 · . . . · xn of the first
n terms of a positive sequence xn . Provide a counterexample to the statement
“if zn converges then xn converges also”. (Notice, that the converse is true: if
xn converges then zn converges to the same limit.)
10. Let xn be a positive sequence. What can be said about the relation
between
{ convergence of arithmetic and geometric means? (Hint: consider xn =
(n+1)2 , n − impar .)
1
n2 , n − par
What about simultaneous convergence of arithmetic and geometric means?
Does it guarantee the convergence of the original sequence? (Hint: consider
xn = 2 + (−1)n .) ∑
11. Show that the∑ following statement is false: “if an converges and
bn ≤ an , ∀n, then bn also converges”. Does the statement become true
if the condition bn ≤ an is substituted by |bn | ≤ |an |, ∀n? Compare with
Examples 1 and 2 in section 6.4.
Sequences and series 203
∑ ∑√
12. Give an example of a divergent series an such that an an+1 is
convergent. ∑ ∑
∑√ 13. Give an example of divergent positive series an and bn such that
a{n bn is convergent. Compare{with the previous exercise. (Hint: consider
n , n − impar and b = n , n − par
1 1
an = .)
n3 , n − par n3 , n − impar
1 n 1
(
∑ 1 )
(−1)n
14. Show that the series √ − is another counterexample to
n n
the statement in Example 3, section 6.4.
15. Provide∑ a counterexample
∑ to the following statement: ∑ “if both posi-
tive series an and bn are divergent, then the series min(an , bn ) also
diverges”.
∑+∞ (2n)!!
16. Show that the divergence of the series n=1 (2n+1)!! cannot be estab-
lished by the root, ratio and Integral tests, but it can be proved by the Raabe
test. Compare this result with Examples 10 and∑ 11 in section 6.4.
+∞ 1
17. Show that the convergence of the series n=2 (n−√n) log2 n
cannot be
established by the root, ratio and Raabe tests, but it can be proved by the
Integral or Bertrand tests. Compare this result with Examples 10 and 11 in
section 6.4.
∑+∞ 18. Show that the root, ratio, Raabe and Bertrand tests fail for the series
(−1)n −n
n=1 2 . However, the simple application of the Comparison test gives
the result. The last three exercises illustrates the conclusion in Remark to
Example 11,∑section 6.4.
19. Let an be an arbitrary series with partial sums Sn . Consider the
sequence of arithmetic means of the∑partial sums Cn = S1 +...+S n
n
. If the last
sequence converges then the series an is called convergent by Cesàro. It is
well-known that the convergence of the original series implies the convergence
by Cesàro. Show that the converse is not true. ∑
20. Give a counterexample to the statement “if an is positive and
the
{ 1 sequence na n is unbounded, then the series diverges”. (Hint: try an =
√ , n = k4
n , k ∈ N ) (Notice, that the following statement is true: if
2 , n ̸= k
1 4
∑ n
an is positive and lim nan = A , 0 < A ≤ +∞, then the series diverges.)
n→∞ ∑ √
21. Show that the statement “if an is positive and lim nan = 0 , then
n→∞
the series is convergent” is false. ∑
22. Show that the statement “if an is positive and lim n log nan = 0 ,
n→∞
1
then the series is convergent” is false. (Hint: consider an = n log n log log n .)
23. Provide counterexamples mentioned in Remark 3 to Example 12, sec-
tion 6.4.
24. Provide a counterexample mentioned in Remark 2 to Example 13,
section 6.4. ∑+∞
25. Suppose f (x) can be developed in the series n=0 an xn on (−1, 1).
204 Counterexamples: From Calculus to the Beginnings of Analysis
Show by example that the following statement is false: “if lim f (x) = A, then
x→1−
∑+∞ 1
the numerical series n=0 an converges to A”. (Hint: consider f (x) = 1+x .)
Part II
205
This page intentionally left blank
Chapter 7
Limits and continuity
General Remark. Part II (chapters 7-9) contains the topics of the func-
tions of two variables, which are quite representative for the most topics of
the multivariable functions. The counterexamples presented in this part of
the work are separated into two groups. The first one includes those examples
that have intimate connections with counterexamples of one-variable functions
considered in Part I. They show how the ideas applied in the one-dimensional
case can be generalized/extended to many variables. Accordingly, the exam-
ples of this group are placed in the sections titled “one-dimensional links” in
each of chapters 7-9. The examples of the second group have a weak or no
connection with one-dimensional case, highlighting a specificity of concepts
and results for multivariable functions. Some of them illustrate the situations
that are feasible for two-variable functions but cannot happen in the case of
one-variable functions. In each chapter, all the examples of the second group
are collected in sections titled “multidimensional essentials”.
Limits. Concepts
207
208 Counterexamples: From Calculus to the Beginnings of Analysis
Comparative properties
If lim f (x, y) = A, lim g (x, y) = B then
(x,y)→(a,b) (x,y)→(a,b)
1) if f (x, y) ≤ g (x, y) for all (x, y) ∈ X in a deleted neighborhood of (a, b),
then A ≤ B.
2) if A < B, then f (x, y) < g (x, y) for all (x, y) ∈ X in a deleted neighborhood
of (a, b).
Continuity. Concepts
Discontinuity point. Let (a, b) be a limit point of the domain of f (x, y).
If f (x, y) is not continuous at (a, b), then (a, b) is a point of discontinuity of
f (x, y) (or equivalently, f (x, y) has a discontinuity at (a, b)).
Remark 1. Sometimes it is required that (a, b) should be a point of the
domain of f (x, y). We will not impose this restriction.
Remark 2. Classification of discontinuities is usually not considered for
functions of several variables.
Limits and continuity 211
Comparative properties
If f (x, y) and g (x, y) are continuous at (a, b) then
1) if f (x) ≤ g (x) for all (x, y) ∈ X in a deleted neighborhood of (a, b), then
f (a, b) ≤ g (a, b).
2) if f (a, b) < g (a, b), then f (x, y) < g (x, y) for all (x, y) ∈ X in a neighbor-
hood of (a, b).
General Remark. In this section, we gather the examples that have di-
rect connections with those considered in chapters 2 and 3 for functions of
one variable. It means that both the formulation of examples and their solu-
tions can be found as a straightforward generalization of the corresponding
one-dimensional cases. The aim is to show interconnection between the func-
tions of one and two variables, and illustrate different ways of how the one-
dimensional constructions and results can be extended to multidimensional
case. Each example in this section has the references to the corresponding
one-dimensional counterpart.
Limits and continuity 213
Example 1. “If lim f (x, y) does not exist, then lim |f (x, y)|
(x,y)→(a,b) (x,y)→(a,b)
does not exist as well.”
(compare with Example 2, section 2.2)
Solution.
Consider the √ two-dimensional modified Dirichlet’s function f (x, y) =
{
1, √ x2 + y 2 ∈ Q
D̃ (x, y) = . The restriction of this function to x-axis
−1 , x2 + y 2 ∈ I
gives the one-dimensional modified Dirichlet’s function, which does not have a
limit at any point in R (see Example 2 in section 2.2). By the same arguments
as in one-dimensional case, the function
D̃
(x, y) does not have a limit at any
point in R . On the other hand, D̃ (x, y) = 1 and this function has the limit
2
1 at any point in R2 .
Remark 1. The Remarks to Example 2 in section 2.2 adjusted to the case
of R2 are applicable here also.
Remark 2. There are many other two-dimensional modifications of Dirich-
let’s function
{ suitable for this counterexample.
{ For instance, the functions
1, x ∈ Q 1 , |x| + |y| ∈ Q
D̄ (x, y) = and D̂ (x, y) = can be used.
−1 , x ∈ I −1 , |x| + |y| ∈ I
Example 3. “If both limits lim f (x, y) and lim g (x, y) exist
(x,y)→(a,b) (x,y)→(a,b)
f (x,y)
and the former equals zero, then lim = 0.”
(x,y)→(a,b) g(x,y)
(compare with Example 2, section 2.3)
Solution.
Limits and continuity 215
√
Let f (x) = g (x) = x2 + y 2 and (a, b) = (0, 0). Then lim f (x, y) =
(x,y)→(0,0)
f (x,y)
lim g (x, y) = 0, but lim = 1.
(x,y)→(0,0) (x,y)→(0,0) g(x,y)
Remark. All Remarks to Example 2 of section 2.3 are applicable here with
corresponding adjustments to the case of R2 . In particular, for an indetermi-
nate form 00 , one can construct specific functions f (x, y) and g (x, y) such that
the limit of their ratio will be an arbitrary chosen a priory constant (including
zero) or infinity, or this limit will not exist.
The use of these points along the chosen path, leads to the following result:
(π ) (π )
lim |f (xn , yn )| = lim + nπ cos + nπ = lim 0 = 0,
(xn ,yn )→(0,0) n→+∞ 2 2 n→+∞
Example 6. “If f (x, y)√is continuous at the origin and f (0, 0) = 0, then
the inequality |f (x, y)| ≤ x2 + y 2 holds at least in some neighborhood of
the origin.”
(compare with Example 6, section 3.2)
Solution. √
If f (x, y) = 3 x2 + y 2 then √ f (x, y) is continuous at the origin
√ (since
lim f (x, y) = lim 3
x + y = 0 = f (0, 0)), however x + y 2 >
2 2 3 2
√
(x,y)→(0,0) (x,y)→(0,0)
x2 + y 2 for any (x, y) in any neighborhood of the origin of the radius less
than 1.
Remark. The converse is true.
Limits and continuity 217
|x| + |y| ∈ I. Hence, using the former points, one gets the partial limit
lim f (x, y) = lim |x| + |y| = |x0 | + |y0 | ,
(x,y)→(x0 ,y0 ) (x,y)→(x0 ,y0 )
The two results are different for any (x0 , y0 ) ̸= (0, 0), that means that the
general limit does not exist (and the function is not continuous) at any point
different from the origin. If (x0 , y0 ) = (0, 0), then any partial limit gives the
same value zero, which coincide with f (0, 0). This means that the function is
continuous at the origin.
Remark 1. The function d˜(x, y) = |x| + |y| represents another kind of a
distance from the origin (norm) in R2 . For this distance, the points equidistant
from the origin are located on the sides of a square centered at the origin and
parallel to the bisectrices of the coordinate quadrants. In these terms, the
function f (x, y) equals to the distance from the origin, when this distance is
a rational number, and to the minus distance, otherwise.
Remark 2. The statement is also false for an arbitrary domain.
We can use almost the same { function as in Example 6, section 3.3. Let us
x , (x, y) ∈ B̄1 (0, 0)
consider the function f (x, y) = , where B̄1 (0, 0)
x + 1 , (x, y) ∈ B1 (2, 0)
and B1 (2, 0) are the closed and open unit balls, centered at (0, 0) and (2, 0),
respectively. This function is continuous on S = B̄1 (0, 0) and P = B1 (2, 0),
but it is not continuous on S ∪ P , since at the point (1, 0) there are two partial
limits, approaching (1, 0) along x-axis at the left and at the right, which give
two different values 1 and 2, respectively.
Remark. The statement will be true if S ∩ P ̸= ∅.
Example 12. “If f (x) is continuous on an open set S, then its image is
also an open set.”
(compare with Example 1, section 3.4)
Solution.
The application of the counterexample in Example 1, Section 3.4 is
straightforward: the function f (x, y) = x2 + y 2 is continuous on (−1, 1) ×
(−1, 1), but its image is the half-open interval [0, 2).
Another simple counterexample is the function f (x, y) = sin (x + y): it is
continuous on the open set (0, 2π) × (0, 2π), but its image on this set is the
closed interval [−1, 1].
Remark. The Remarks to Example 1 of section 3.4 are applicable here
with corresponding adjustments to the case of R2 .
Example 13. “If f (x, y) attains its global minimum and maximum on a
compact S, then it is continuous on S.”
Limits and continuity 221
( )
N, n > 1 and (x̃n , 0) = 1+4n2
, 0 , ∀n ∈ N we have the property that the
distance between the corresponding points of the two sets tends to zero
√
1 2
2 2
(xn − x̃n ) + (0 − 0) = |xn − x̃n | = − → 0,
n 1 + 4n n→+∞
but
|f (xn , 0) − f (x̃n , 0)| = |0 − 1| = 1, ∀n ∈ N, n > 1.
Therefore, f (x, y) is not uniformly continuous on S.
Remark. The statement will be correct if S would be compact (according
to the Cantor theorem).
tween the corresponding points of the two sets gets as close as we wish for
sufficiently large n: |xn − x̃n | = n1 → 0, but
n→+∞
2
f (xn ) − f 2 (x̃n ) = 2 + 1 > 2, ∀n ∈ N.
n2
Limits and continuity 223
FIGURE 7.3.2: Example 1, the function on some paths through the origin
origin along any straight line passing through the origin, then its limit is zero
at the origin.”
Solution. {
x2 y
x4 +y 2 , x + y ̸= 0
2 2
The function f (x, y) = 2 2
satisfies the conditions
0, x + y = 0
of the statement. Indeed, for any straight line y = kx, k ∈ R, we have
kx3 kx
lim f (x, kx) = lim x4 +k 2 x2 = lim x2 +k 2 = 0, and for the straight line x = 0
x→0 x→0 x→0
the limit is also zero: lim f (0, y) = lim y02 = 0. However, along the parabola
y→0 y→0
( ) 4
y = x2 the result is different: lim f x, x2 = lim x4x+x4 = 12 .
x→0 x→0
Remark. Analogous false statement for the continuity is: “if a function is
continuous along any straight line passing through a chosen point, then it is
continuous at this point”. The same function provides counterexample.
FIGURE 7.3.4: Example 2, the function on some paths through the origin
226 Counterexamples: From Calculus to the Beginnings of Analysis
since
tm/n m tm/n−1 m tm/n−2
lim 2 = lim 2 = lim 2 = ... = 0
t→∞ et t→∞ n 2tet t→∞ n 2et
( ) e−1/x · e−1/x
2 2
1
lim f x, e−1/x = lim −2/x2
2
−2/x 2 = .
x→0 x→0 e +e 2
Remark 1. Of course, the family of paths(curves) that assures the same
value for the partial limits can be even broader(wider) than the set of algebraic
curves, but still the general limit may not exist.
Remark 2. For the continuity, a similar false statement is: “if a function is
continuous along any algebraic curve passing through a chosen point, then it
is continuous at this point”. The same function provides the counterexample.
other α we have
t2 cos2 α
lim f (t cos α, t sin α) = lim 2 2
t→+∞ t→+∞ et cos α−t sin α
Example 6. “If iterated limits of f (x, y) exist, then the general (double)
limit also exists.”
Solution.
For the function f (x, y) = x−y
x+y both iterated limits exist at the point
(0, 0):
x−y x x−y −y
lim lim = lim = lim 1 = 1, lim lim = lim = lim (−1) = −1.
x→0 y→0 x + y x→0 x x→0 y→0 x→0 x + y x→0 y x→0
228 Counterexamples: From Calculus to the Beginnings of Analysis
x−y
However, the general limit lim does not exist, because two partial
(x,y)→(0,0) x+y
x−x
limits are different: the partial limit along the straight line y = x is lim =
x→0 x+x
0, while the partial limit along the straight line y = 2x is lim x+2x = − 3 .
x−2x 1
{x→0
x2 −y 2
, x2 +y 2 ̸= 0
Another counterexample of the same kind is f (x, y) = x2 +y22 2 .
0, x +y = 0
At the point (0, 0) both iterated limits exist:
x2 − y 2 x2 x2 − y 2 −y 2
lim lim 2 2
= lim 2 = 1, lim lim 2 2
= lim 2 = −1,
x→0 y→0 x + y x→0 x y→0 x→0 x + y x→0 y
but the general limit does not exist since the partial limit along the straight
line y = x, lim xx2 −x
2 2
x→0 +x2 = 0, is different from the partial limit along the straight
x2 −4x2
line y = 2x, lim 2 2 = − 35 .
x→0 x +4x
Remark. Both functions are also counterexamples to the following false
statement: “if iterated limits exist, then they are equal”.
Example 7. “If both iterated limits exist and are equal, then the general
(double) limit also exists.”
Solution. { xy
x2 +y 2 , x + y ̸= 0
2 2
The function of the Example 1, f (x, y) = 2 2 has
0, x + y = 0
Limits and continuity 229
x4
but the general limit does not exist, since for y = x one obtains lim 4 = 1,
x→0 x
while for y = 0 the result is different lim 02 = 0.
x→0 x
Example 8. “If the general limit of f (x, y) exists, then iterated limits
also exist.”
Solution. { 1
(x + y) sin xy , xy ̸= 0
The function f (x, y) = has the general limit
0, xy =
0
1
at the origin. In fact, the inequality (x + y) sin xy ≤ |x| + |y| leads to the
evaluation |f (x, y)| ≤ |x| + |y| for an arbitrary point (x, y). Therefore, due
to the squeeze theorem, the fact that lim (|x| + |y|) = 0 implies that
(x,y)→(0,0)
1
lim f (x, y) = 0. At the same time, lim (x + y) sin xy does not exist
(x,y)→(0,0) y→0
for any x ̸= 0, because for any given x0 ̸= 0 there is a sequence of the points
yn = 2nπ1 x0 → 0 such that lim (x0 + yn ) sin x01yn = 0 and another sequence
n→∞ yn →0
yk = 1
→ 0 such that lim (x0 + yk ) sin x01yk = x0 . It means, that
(2kπ+ 2 )x0 k→∞
π
yk →0
the iterated limit lim lim f (x, y) does not exist. Due to the same reasons, the
x→0 y→0
second iterated limit lim lim f (x, y) does not exist either.
y→0 x→0
Example 9. “If the general limit of f (x, y) exists and one of the iterated
limits also exists, then the second iterated limit exists as well.”
Solution. {
y + x sin y1 , y ̸= 0
The function f (x, y) = has the zero limit at the ori-
0, y = 0
gin, because |f (x, y)| ≤ |x| + |y| → 0. Besides, for any fixed y ̸= 0 we
( ) (x,y)→(0,0)
Example 10. “If the general limit and one of the iterated limits of f (x, y)
do not exist, then the second iterated limit also does not exist.”
Solution. { xy
x2 +y 2 + x sin y , y ̸= 0 does not have a general
1
The function f (x, y) =
0, y = 0
limit, because two
( 2partial limits
) give different results: along the line y = x
one obtains lim 2x2 + x sin x = 2 (since x sin x1 ≤ |x| → 0), while along
x 1 1
x→0 ( ) x→0
2x2 1 2
the line y = 2x one has lim x2 +4x2 + x sin 2x = 5 . Moreover, the limit
x→0
lim lim f (x, y) also does not exist, because lim f (x, y) is not defined for
x→0 y→0
(
y→0
)
any fixed x ̸= 0: if yn = nπ → 0 then lim x2xy
1 n
+y 2 + x sin 1
yn = 0, but
yn →0
n→∞
( ) n
)π → 0 then lim
2 xyk
if yk = (4k+1 x2 +y 2
+ x sin y1k = x. Nevertheless, the
k→∞ yk →0 k
{ xy
x2 +y 2 + y sin x , x ̸= 0 provides the
1
Remark. The function f˜ (x, y) =
0, x = 0
counterexample with the interchanged variables.
Exercises
x2 +y 2
but the general limit lim 1+(x−y) 4 does not exist. Formulate as a coun-
(x,y)→∞
terexample. Compare with Example{ 7, section 7.3.
1
(2x2 + y 2 ) cos xy , xy ̸= 0
5. Prove that f (x, y) = is another coun-
0, xy = 0
terexample to Example 8, section { 7.3.
x2 y 2
4 +y 4 + x cos y 2 , y ̸= 0
2 1
6. Prove that f (x, y) = x is another coun-
0, y = 0
terexample to Example 10, section 7.3.
7. Give an example of a function f (x, y) discontinuous at every point of the
square [0, 1] × [0, 1], but continuous with respect to x for any fixed y ∈ [0, 1].
Formulate as a counterexample. (Hint: use f (x, y) = D(y).)
8. Show that the continuity of a function does not imply that
small increments of function values produce small increments of inde-
pendent
{ variables. Formulate as a counterexample. (Hint: try f (x, y) =
0, x2 + y 2 ≤ 1
)
x2 + y 2 − 1, x2 + y 2 > 1
9. Show that the condition that small increments of function val-
ues lead to small increments of independent variables does not guarantee
the continuity. Formulate as a counterexample. (Hint: consider f (x, y) =
{
x2 + y 2 , x ≥ 0
and notice that both small and large increments the
x2 + y 2 − 1, x < 0
independent variables correspond to small increments of the function values.)
Limits and continuity 235
Concepts
237
238 Counterexamples: From Calculus to the Beginnings of Analysis
then this partial derivative is called the (m + 1)-th partial derivative of the
original function f (x) with respect to x, ..., x. The standard notations are:
m+1
fxm+1 ≡ fx...x ≡ ∂1...1 f ≡ ∂∂xm+1f . In the same way can be defined all others
2m+1 − 1 partial derivative of the (m + 1)-th order.
Clairaut’s Theorem. If the mixed derivatives fxy and fyx are continuous
at (x0 , y0 ), then they are equal at (x0 , y0 ).
Remark. A similar result holds for the mixed m-th partial derivatives:
if the two mixed corresponding m-th partial derivatives are continuous at a
point (x0 , y0 ), then they are equal at (x0 , y0 ).
Gradient. The vector of the first partial derivatives (fx , fy ) is called the
gradient. The common notations are ∇f and gradf .
Remark. According to the last theorem and the gradient definition, the
definition of the differentiation can be rewritten using the dot product in the
form ∆f = ∇f · ∆r + (α, β) · ∆r, where ∆r = (∆x, ∆y) and α, β satisfy the
required for differentiation properties. Sometimes the last formula is used as a
Differentiability 239
In the case when the mixed partial derivatives are equal, the second differential
can be simplified to the form
Basic properties
level curves of f (x, y), that is, ∇f is the normal vector to the tangent lines
of the level curves.
Applications
1) if d2 f (x0 , y0 ) maintains the same sign for small increments ∆x, ∆y, then
(x0 , y0 ) is a strict local extremum; more specifically, if d2 f (x0 , y0 ) > 0, then
(x0 , y0 ) is a strict local minimum, and if d2 f (x0 , y0 ) < 0, then (x0 , y0 ) is a
strict local maximum;
2) if d2 f (x0 , y0 ) changes its sign for small increments ∆x, ∆y, then (x0 , y0 ) is
not a local extremum.
General Remark. Like in section 7.2, the examples in this section are mod-
ified versions of some examples for one-variable functions presented in Part I
and, correspondingly, the majority of the provided below counterexamples use
the functions of the chapter 4 adapted to the case of R2 . Each example in this
section has the reference to the corresponding one-dimensional counterpart.
Example 1. “If f (x, y) is not differentiable at a point (a, b), then it is not
continuous at this point.”
(compare with Example 1, section 4.2)
Solution. √
The function f (x, y) = x2 + y 2 is continuous at the origin, since
lim f (x, y) = 0 = f (0, 0). However, the restriction of f (x, y) to x-
(x,y)→(0,0)
axis is the absolute value function f (x, 0) = |x|, which is not differentiable at
Differentiability 243
0. Therefore, f (x, y) does not possess the partial derivative in x at the origin,
that implies that f (x, y) is not differentiable at the origin.
Remark. The Remarks to Example 1 in Section 4.2 are applicable here
with corresponding adjustments to the case of R2 .
differentiable at (0, 0) (see Example 1), but their sum h (x, y) = f (x, y) +
g (x, y) ≡ 0 is differentiable on R2 .
Remark. The Remarks to Example 1 in section 4.3 are applicable here
with corresponding adjustments to the case of R2 .
lim −2 2kπ cos 2kπ = −∞, that is, fx (x, y) is unbounded in any neigh-
k→+∞
borhood of( the origin.
) In a similar way, approaching the origin by the points
(0, yn ) = 0, 2nπ , n ∈ N, it can be shown that fy (x, y) is also unbounded
√ 1
(and consequently not differentiable) at any point (x, y) ̸= (0, 0). However,
at the origin, both partial derivatives exist fx (0, 0) = 0 and fy (0, 0) = 0,
Differentiability 247
Solution. {
1 , (x, y) ∈ B1 (0, 0)
Consider f (x, y) = with the set S = B1 (0, 0) ∪
2 , (x, y) ∈ B1 (2, 0)
B1 (2, 0), where B1 (0, 0) and B1 (2, 0) are the open unit balls, centered at
(0, 0) and (2, 0), respectively. This function is differentiable at each point of S
and df (x, y) = 0 on S, but the function is not a constant.
Remark 1. The statement will be correct if the set S is connected.
Remark 2. A generalization of this Example can be found in Example 17,
section 8.3.
Example 11. “If df (x0 , y0 ) = 0, then the point (x0 , y0 ) is a local ex-
tremum of the function f (x, y).”
(compare with Example 7, section 4.5)
Solution.
The function f (x, y) = x3 is differentiable on R2 and df (0, 0) = 0, but
(0, 0) is not a local extremum, since in any neighborhood of the origin f (x, y)
assumes both negative (for x < 0) and positive (for x > 0) values.
Another counterexample, classical for two-variable functions, is the exam-
ple of the hyperbolic paraboloid f (x, y) = x2 − y 2 that has a saddle point at
the origin. Again, f (x, y) is differentiable on R2 and df (0, 0) = 0, but (0, 0)
is not a local extremum, since in any neighborhood of the origin f (x, y) as-
sumes both negative (on y-axis) and positive (on x-axis) values. Furthermore,
f (x, 0) = x2 is upward parabola with the minimum point at (0, 0), while
f (0, y) = −y 2 is downward parabola with the maximum point at (0, 0). Such
points are called saddle points.
Example 12. “If f (x, y) has a strict local extremum at (x0 , y0 ), then
fx (x0 , y0 ) = fy (x0 , y0 ) = 0.”
(compare with Example 8, section 4.5)
Differentiability 249
Solution.
The function f (x, y) = |x| + |y| has a strict local (and global) minimum
at the origin, since for any (x, y) ̸= (0, 0) it holds f (x, y) = |x| + |y| >
0 = f (0, 0). But the partial derivatives does not exist at the origin, because
lim f (x,0)−f
x−0
(0,0)
= lim xx = 1 while lim f (x,0)−f
x−0
(0,0)
= lim −xx = −1;
x→0+ x→0+ x→0− x→0−
and the same considerations are true for the derivative in y. √
Another similar counterexample is the function f (x, y) = x2 + y 2 ,
which has a strict local (and global)√ minimum at the origin, since for any
(x, y) ̸= (0, 0) it holds f (x, y) = x2 + y 2 > 0 = f (0, 0). However, √the par-
tial derivatives does not exist at the origin: lim f (x,0)−f (0,0) 2
x−0 = lim xx = 1,
x→0+ x→0+
√
f (x,0)−f (0,0)
while lim x−0 = lim x2
x = −1; and the same considerations are
x→0− x→0−
true for the derivative in y.
Remark. This is a wrong modification of the necessary condition for a
local extremum: if f (x, y) is differentiable at a point (x0 , y0 ) and this point is
a local extremum, then fx (x0 , y0 ) = fy (x0 , y0 ) = 0.
f (x, 0) − f (0, 0) x6 x
fx (0, 0) = lim = lim 4 = lim =0
x→0 x−0 x→0 (x + x6 ) x x→0 1 + x2
Differentiability 253
and
f (0, y) − f (0, 0) 0
fy (0, 0) = lim = lim = 0.
y→0 y−0 y→0 y
α 6 t3
= lim 2 =0
t→0+ (β − α2 t) + α6 t4
in any direction u = (α, β). Nevertheless, f (x, y) is not continuous at the
origin, because along the path y = x2 one gets
( ) x6
f x, x2 = = 1 ̸→ 0 = f (0, 0) .
0 + x6 x→0
and √
f (x, 0) − f (0, 0)
3
x3
fx (0, 0) = lim = lim = 1,
x→0 x−0 x→0 x
√
f (0, y) − f (0, 0) 3
y3
fy (0, 0) = lim = lim = 1.
y→0 y−0 x→0 x
Solution. {
√ xy , x2 + y 2 ̸= 0
The function f (x, y) = x +y 2
2
is continuous at any
0, x + y 2 = 0
2
point (x, y) ̸= (0, 0) due to arithmetic rules, and at the origin we should
appeal to the definition:
|xy| 2 |xy| 1 √ 2 2 1√ 2
|f (x, y)−f (0, 0)| = √ = 2 2· x +y ≤ x + y2 → 0.
2
x +y 2 x +y 2 2 (x,y)→(0,0)
In the same way, the partial derivatives can be calculated at any point (x, y) ̸=
(0, 0) according to the arithmetic rules:
y3 x3
fx (x, y) = 3/2
, fy (x, y) = 3/2
(x2 + y2 ) (x2 + y 2 )
and at the origin by using the definition:
f (x, 0) − f (0, 0) 0−0
fx (0, 0) = lim = lim = 0,
x→0 x−0 x→0 x
f (0, y) − f (0, 0) 0−0
fy (0, 0) = lim = lim = 0.
y→0 y−0 y→0 y
Additionally, the partial derivatives are bounded on R2 :
3
y y2 |y|
|fx (x, y)| = 3/2
= 2 + y2
· 1/2
≤ 1,
2
(x + y )2 x (x + y 2 )
2
256 Counterexamples: From Calculus to the Beginnings of Analysis
and similarly |fy (x, y)| ≤ 1. Nevertheless, the function is not differentiable at
the origin. In fact, the difference between the function and its linear approxi-
mation is
xy
α (x, y) = f (x, y) − (f (0, 0) + fx (0, 0) · x + fy (0, 0) · y) = √ .
x2 + y 2
α(x,x) x2 1
Therefore, along the path y = x one has lim = lim 2 = 2, which
x→0 ρ(x,x) x→0 2x
contradicts to the definition of differentiability.
Remark. The partial derivatives of the function are continuous at each
point different from the origin, which implies that the function is differentiable
at each point different from the origin.
by definition that
√
f (αt, βt) − f (0, 0) |αβ| t2 − 0 √
Du f (0, 0) = lim = lim = |αβ|.
t→0+ t−0 t→0+ t
{ One can show that a similar example is provided by the function f (x, y) =
√ xy , x2 + y 2 ̸= 0
x2 +y 2 from Example 4.
0, x2 + y 2 = 0
Example 6. “If f (x, y) is continuous and has bounded partial deriva-
tives on R2 , and for any differentiable curve x (t) , y (t) passing through
the origin and such that (x′ (0)) + (y ′ (0)) > 0 the composite function
2 2
so lim f (x, y) = 0 = f (0, 0). Then the partial derivatives can be calcu-
(x,y)→(0,0)
lated at any point but the origin by applying the arithmetic rules:
( )
x2 x2 + 3y 2 −2x3 y
fx (x, y) = 2 , fy (x, y) = 2.
(x2 + y 2 ) (x2 + y 2 )
At the origin we apply the definition:
f (x, 0) − f (0, 0) x
fx (0, 0) = lim = lim = 1,
x→0 x−0 x→0 x
and
2 x3 y x2 2 |xy|
|fy (x, y)| = 2 = · ≤ 1 · 1 = 1.
(x2 + y2 ) (x2 + y 2 ) (x2 + y 2 )
Let us prove the additional condition of this example. Since the given
258 Counterexamples: From Calculus to the Beginnings of Analysis
curve x (t) , y (t) is differentiable and the partial derivatives of f (x, y) exist,
the composite function g (t) = f (x (t) , y (t)) can be differentiated by applying
the chain rule: for any t ̸= 0 we obtain
x4 + 3x2 y 2 2x3 y
g ′ (t) = fx (x, y)·x′ (t)+fy (x, y)·y ′ (t) = 2 ·x′ (t)− 2 ·y
′
(t) ,
(x2 + y2 ) (x2 + y 2 )
Hence, all the conditions of the statement hold. Nevertheless, f (x, y) is not
differentiable at the origin. Indeed, the difference between the function and
its linear approximation in a neighborhood of the origin is as follows:
x3 xy 2
α (x, y) = f (x, y)−(f (0, 0)+fx (0, 0)·x+fy (0, 0)·y) = − x=− .
x2 +y 2 x2 +y 2
α (x, x) −x3 −1
lim = lim √ = lim √ sgn x ̸= 0.
x→0 ρ (x, x) x→0 2 2 |x| x2 x→0 2 2
Remark to Examples 1-6. These examples show that when the partial
derivatives are discontinuous at some point, then the function may be non-
differentiable at this point. Continuity of the partial derivatives guarantees
the differentiability, but this is a sufficient condition as it is shown in the next
Example 7.
2 2
fx (xn , yn ) = 2xn sin 2nπ − cos 2nπ = − → −∞,
xn xn n→∞
which means that fx (x, y) is discontinuous (and even unbounded) at the
origin. Similarly for (xk , yk ), xk = 0 → 0, yk = √2kπ
1
→ 0, one gets
k→∞ k→∞
fy (xk , yk ) → −∞, that is, fy (x, y) is also discontinuous and unbounded
k→∞
at the origin.
Another counterexample is provided by the function
x2 sin x1 + y 2 sin y1 , xy ̸= 0
x2 sin x1 , x ̸= 0 , y = 0
f (x, y) =
y 2 sin y1 , x = 0 , y ̸= 0
0, x = y = 0
consequently,
( )2
α (x, y) 4x6 y 2 2x2 y |x|
= √ = ·√ · |x| ≤ |x| → 0.
ρ (x, y) (x4 +y 2 )2 x2 +y 2 x4 +y 2 x2 +y 2 (x,y)→(0,0)
Therefore, f (x, y) is differentiable at the origin. Notice that due to the arith-
metic rules of continuity both partial derivatives are continuous at each point
different from the origin. It guarantees differentiability of f (x, y) on R2 . Fi-
nally, the continuity of fx (x, y) at the origin follows from the evaluation:
24x5 y 4 − 8x9 y 2
|fx (x, y) − fx (0, 0)| = 3
(x4 + y 2 )
( )2 ( )2
2x2 y y2 2x2 y x4
≤6 · 4 · |x| + 2 · · |x|
x4 + y 2 x + y2 x4 + y 2 x4 + y 2
Hence, all the conditions of the statement hold. However, fy (x, y) is not con-
tinuous at the origin, because along the path y = 2x2 we obtain
( ) 16x12 − 64x12 48
lim fy x, 2x2 = lim 3 =− ̸= 0 = fy (0, 0) .
x→0 x→0 4
(5x ) 125
Differentiability 261
Since both partial derivatives are continuous on R2 \ (0, y), f (x, y) is dif-
ferentiable on R2 \ (0, y). Let us verify differentiability of f (x, y) on the y-
axis. At the{origin the remainder of the linear approximation is α (x, y) =
x2 sin x1 + y 2 , x ̸= 0
f (x, y) = . For the points of the y-axis we have
y2 , x = 0
2
α(0,y)
ρ(0,y) =
√y 2 = |y| → 0 and for the points outside of the y-axis we
y (x,y)→(0,0)
obtain
α (x, y) x2 sin 1/x + y 2 x2 + y 2 √
ρ (x, y) = √x2 + y 2 ≤ √x2 + y 2 = x + y (x,y)→(0,0)
→
2 2 0.
2 √
x2 + (y − y0 ) 2
≤√ = x2 + (y − y0 ) → 0.
2 (x,y)→(0,y0 )
x2 + (y − y0 )
It implies that f (x, y) is differentiable at any point (0, y0 ) , y0 ̸= 0. Summa-
rizing, f (x, y) is differentiable on R2 . Notice that the formulas found for the
partial derivative in y can be rewritten in the form fy (x, y) = 2y on R2 , so
this derivative is continuous on R2 . Hence, all the conditions of the statement
hold. However, fx (x, y) is discontinuous at each point of the y-axis, because
1
approaching a point (0, y) by the sequence of the points (xn , y), xn = 2nπ ,
∀n ∈ Z\ {0}, we obtain
( )
1
lim fx (xn , y) = lim sin 2nπ − cos 2nπ = −1 ̸= 0 = fx (0, y) .
xn →0 n→∞ nπ
Remark. Notice that both functions are also counterexamples to the fol-
lowing version of the false statement: “if f (x, y) is differentiable on R2 and one
of its partial derivatives is continuous on R2 , then another partial derivative
is also continuous on R2 ”.
Example 9. “If f (x, y) has partial derivatives at some point, then f (x, y)
has all the directional derivatives at the same point.”
Solution. { xy
2 , x +y ̸= 0
2 2
2
It was shown in Example 1 that the function f (x, y) = x +y 2 2
0, x + y = 0
has zero partial derivatives at the origin (notice that its partial derivatives
exist at every point in R2 ). However, f (x, y) has no directional derivative at
the origin, except for the directions along the coordinate axes. In fact, let
u = (α, β) be an arbitrary unitary direction vector not parallel to coordinate
axes, that is, αβ ̸= 0. Then evaluating the directional derivative by definition
one obtains
αβt2
f (αt, βt) − f (0, 0) (α2 +β 2 )t2 −0 αβ
Du f (0, 0) = lim = lim = lim = ∞,
t→0+ t−0 t→0+ t t→0+ t
that is, these derivatives do not exist.
Example 10. “If f (x, y) is continuous and possesses all the directional
derivatives at some point, then there exist a partial derivative of f (x, y) at
this point.”
Solution.
Differentiability 263
However, both partial derivatives do not exist at the origin, since on the
coordinates axis x and y the function assumes the form f (x, 0) = |x| and
f (0, y) = |y|, respectively.
Remark. Consequently, this function is not differentiable at the origin.
+y 2 , x + y ̸= 0 . Apply-
2 2
Let us consider the function f (x, y) =
0, x2 + y 2 = 0
ing arithmetic rules for partial derivative calculation and simple algebra for
Differentiability 265
fx (0, y) − fx (0, 0) −y − 0
fxy (0, 0) = lim = lim = −1,
y→0 y−0 y→0 y
Hence, the first-order derivatives are defined on R2 , including the origin, but
excluding the two lines y = x and y = −x (without the origin). Since both
partial derivatives are defined at the origin, and the last is a limit point for
their domains, we can consider the second-order partial derivatives at the
origin. In particular, for the mixed derivatives we obtain:
fx (0, y) − fx (0, 0) −y − 0
fxy (0, 0) = lim = lim = −1,
y→0 y−0 y→0 y
fy (x, 0) − fy (0, 0) x−0
fyx (0, 0) = lim = lim = 1.
x→0 x−0 x→0 x
Therefore, the mixed derivatives are different at the origin.
Remark 1. The condition that guarantees the equality of the mixed deriva-
tives is their continuity. So in this Example the mixed derivatives are discon-
tinuous at the origin. Let us show this explicitly for the first function. Applying
arithmetic rules for derivatives and simple algebra we can obtain the following
results for any (x, y) ̸= (0, 0):
that is, the mixed derivatives are continuous and coincide on R2 \ (0, 0). How-
ever, at the origin these derivatives are discontinuous. Indeed, approaching
the origin along the line y = x we obtain:
lim fxy (x, x) = 0 ̸= −1 = fxy (0, 0) and lim fyx (x, x) = 0 ̸= 1 = fyx (0, 0) .
x→0 x→0
Example 12. “If f (x, y) possesses first- and second-order partial deriva-
tives at some point (or on R2 ) and the mixed derivatives coincide, then f (x, y)
is continuous at this point (or on R2 ).”
Solution. { 2 2
x4 +y 4 , x + y ̸= 0 . Its first-
x y 2 2
Let us consider the function f (x, y) = 2 2
0, x + y = 0
order derivatives exist on R and can be found by using arithmetic rules at
2
Example 13. “If f (x, y) possesses partial derivatives of all orders at some
point (or on R2 ) and the mixed derivatives do not depend on the order of
differentiation, then f (x, y) is continuous at this point (or on R2 ).”
Solution. { ( 2 2
)
exp − xy2 − xy 2 , xy ̸= 0
Let us consider the function f (x, y) = and
0, xy = 0
show that it is discontinuous at the origin. Indeed, along the line x = y one
gets ( 2 )
x x2
lim f (x, x) = lim exp − 2 − 2 = e−2 ̸= 0 = f (0, 0) .
x→0 x→0 x x
Even being discontinuous this function possesses all partial derivatives. We
start with an arbitrary point out of the coordinate axes. In this case, applying
the arithmetic and chain rules we readily obtain
( 2 ) ( )
x y2 2x 2y 2
fx (x, y) = exp − 2 − 2 · − 2 + 3 ,
y x y x
( 2 ) ( )
x y2 2y 2x2
fy (x, y) = exp − 2 − 2 · − 2 + 3 .
y x x y
Apart from the form of these derivatives, we can see that any derivative has
the form ( 2 )
x y2
fxm yn (x, y) = exp − 2 − 2 · P (x, y) ,
y x
268 Counterexamples: From Calculus to the Beginnings of Analysis
( 2 ) ( )
x y2 2x i j 2y 2 i j
hx (x, y) = exp − 2 − 2 · − 2 x y + 3 x y + ix y
i−1 j
y x y x
and
( 2 ) ( )
x y2 2y i j 2x2 i j
hy (x, y) = exp − 2 − 2 · − 2 x y + 3 x y + jx y
i j−1
.
y x x y
So their sum will give again the conjectured form. Notice also that all these
derivatives are continuous when xy ̸= 0 and it implies that the corresponding
mixed derivatives are equal.
Now let us consider the remaining points for which xy = 0. Using the
method of mathematical induction we will prove that at each of these point
the partial derivative of any order is zero. First, we check this for the first-order
derivatives. For fx we obtain the following results at the origin:
f (x, 0) − f (0, 0) 0−0
fx (0, 0) = lim = lim = 0,
x→0 x−0 x→0 x
at the points (x0 , 0), x0 ̸= 0 :
f (x, 0) − f (x0 , 0) 0−0
fx (x0 , 0) = lim = lim = 0,
x→x0 x − x0 x→x 0 x − x0
such term tends to zero ( as 2x) → 0. If i = 0, then such term is constant, but
y
it is multiplied by exp − x02 inside the limit, and the last function tends to
zero as x → 0. Finally, for i < 0 we can apply the following calculations:
( 2)
( 2) exp
y
− x02
y0 t−i
lim x exp − 2 = lim
i
= lim
x→0 x x→0 x−i t→∞ exp (y 2 t2 )
0
−i · t−i−1 −i · t−i−2
= lim = lim = . . . = 0.
t→∞ 2ty 2 exp (y 2 t2 ) t→∞ 2y 2 exp (y 2 t2 )
0 0 0 0
Example 14. “If f (x, y) is continuous and possesses first- and second-
order partial derivatives on R2 , and the mixed derivatives coincide on R2 ,
then f (x, y) is differentiable on R2 .”
270 Counterexamples: From Calculus to the Beginnings of Analysis
Solution. {
x3 y 2
, x2 + y 2 ̸= 0
x4 +y 4
Let us consider the function f (x, y) = . First, the
0, x + y 2 = 0
2
continuity of f (x, y) at any (x, y) ̸= (0, 0) follows directly from the arithmetic
rules for continuous functions and at the origin it can be shown by the following
evaluation:
3 2
x y 2 2
|f (x, y) − f (0, 0)| = 4 = |x| x y ≤ 1 |x| → 0.
x + y4 x4 + y 4 2 (x,y)→(0,0)
Second, the first-order derivatives can be found by using the arithmetic rules
at any point (x, y) ̸= (0, 0):
Hence, the conditions of the statement hold. Nevertheless, the function is not
differentiable at the origin. In fact, the difference between the function and
its linear approximation at the origin has the form:
x3 y 2
α (x, y) = f (x, y) − (f (0, 0) + fx (0, 0) · x + fy (0, 0) · y) = .
x4 + y4
α(x,y) x3√ y2
Along the path y = x, x > 0 the ratio ρ(x,y) = does not
(x4 +y 4 ) x2 +y 2
approach zero:
α (x, x) x5 1
lim = lim √ = √ ̸= 0.
x→0 ρ (x, x) x→0 2 2x5 2 2
Differentiability 271
Example 15. “If f (x, y) is differentiable at some point, then its partial
derivatives exist in a neighborhood of this point.”
Solution. { 2
x + y 2 , x, y ∈ Q
Let us consider the function f (x, y) = . First, we
0, otherwise
show that f (x, y) is continuous at the origin. Approaching the origin by the
points with rational coordinates, we obtain
( 2 )
lim f (x, y) = lim x + y 2 = 0 = f (0, 0) .
(x,y)→(0,0) (x,y)→(0,0)
x,y∈Q
Since the points used in these two partial limits cover all the points in a neigh-
borhood of the origin, it follows that lim f (x, y) = f (0, 0), i.e., f (x, y)
(x,y)→(0,0)
is continuous at the origin. Second, let us consider the partial derivatives at
the origin. If x ∈ Q, then
f (x, 0) − f (0, 0) x2 − 0
lim = lim = 0,
x→0, x∈Q x−0 x→0 x
and for x ∈ I we obtain the same result:
f (x, 0) − f (0, 0) 0−0
lim = lim = 0.
x→0, x∈I x−0 x→0 x
Since the union of the rational and irrational points is equal to all the real
points, it follows that fx (0, 0) = lim f (x,0)−f
x−0
(0,0)
= 0. For any point (x0 , y0 ) ̸=
x→0
(0, 0) with y0 ∈ I, fx also exists:
On the other hand, for (x0 , y0 ) ̸= (0, 0) with y0 ∈ Q, the derivative fx does
not exist:
272 Counterexamples: From Calculus to the Beginnings of Analysis
α (x, y) 0
lim = lim √ = 0.
(x,y)→(0,0) ρ (x, y) (x,y)→(0,0) x + y2
2
α(x,y)
Therefore, the general limit exists and is equal to zero: lim = 0,
(x,y)→(0,0) ρ(x,y)
which means that the function is differentiable at the origin.
Differentiability 273
that is, f (x, y) is not continuous at such points. If y0 ∈ I, then we choose for
approximation the points (x, y) with x, y ∈ Q, and obtain
( 2 )
lim f (x, y) = lim x + y 2 = y02 ̸= 0 = f (0, y0 ) ,
(x,y)→(0,y0 ) (x,y)→(0,y0 )
x,y∈Q
that is, f (x, y) is not continuous at these points. Therefore, f (x, y) is discon-
tinuous at all points (0, y0 ), y0 ̸= 0.
Using the same reasoning we can show that f (x, y) is also discontinuous
274 Counterexamples: From Calculus to the Beginnings of Analysis
at all points (x0 , 0), x0 ̸= 0. In a similar way we can show that f (x, y) is not
continuous at an arbitrary point (x0 , y0 ), x0 ̸= 0, y0 ̸= 0 either. In fact, if
x0 , y0 ∈ Q, then approaching the chosen point by the points (x, y) with x ∈ I,
we obtain
lim f (x, y) = lim 0 = 0 ̸= x20 + y02 = f (x0 , y0 ) ,
(x,y)→(x0 ,y0 ) (x,y)→(x0 ,y0 )
x∈I
Example 18. “If ∇f exists and does not vanish at (x0 , y0 ), then the
maximum rate of change of f (x, y) occurs in the direction of ∇f .”
Solution. {
x2 y
x4 +y 2 + y , x + y ̸= 0
2 2
Let us consider the function f (x, y) = 2 2
. In
0, x + y = 0
Example 2, section 7.3, it was shown that a similar function is not continuous
at the origin. Using the same arguments, we can arrive to the same conclusion
regarding the above function: the path limits along y = 0 and y = x2 give
different results -
( ) x4 1
lim f (x, 0) = lim 0 = 0, while lim f x, x2 = lim + x2 = .
x→0 x→0 x→0 x→0 x4 + x4 2
At the same time, both partial derivatives exist at the origin:
f (x, 0) − f (0, 0)
fx (0, 0) = lim = 0,
x→0 x−0
f (0, y) − f (0, 0) y
fy (0, 0) = lim = lim = 1,
y→0 y−0 y→0 y
and ∇f (0, 0) = (0, 1) ̸= (0, 0). Since the function is not differentiable at the
origin, we appeal to the definition of the directional derivative: choosing an
arbitrary unitary direction vector u = (α, β), we get
Thus, the directional derivative exists in any direction. However, for any
u = (α, β), α ̸= 0, β ̸= 0, the following inequality holds: |Du f (0, 0)| = |β|
1
>
|∇f (0, 0)|, that is, almost in any direction the rate of change is greater than
1
in the direction of the gradient. Moreover, since lim |β| = +∞ there is no
β→0
direction of the maximum rate of change.
Differentiability 277
Example 20. “If f (x, y) is differentiable on R2 and has two or more local
maxima, then it has also a local minimum.”
Solution.
Let us show that the infinitely differentiable on R2 function f (x, y) =
(1 + ey ) cos x−yey has infinitely many local maxima and none local minimum.
First, solving the system for critical points
{
fx (x, y) = − sin x (1 + ey ) = 0
,
fy (x, y) = ey (cos x − 1 − y) = 0
which has the strict local minimum at the origin. The restriction to the y-axis,
Differentiability 279
f (0, y) = y 2 , also possesses the strict local minimum at the origin. Finally, the
restriction to an arbitrary line y = kx, k = const ̸= 0, results in the function
g (x) = f (x, kx) = k 2 x2 − 4kx3 + 3x4 . The critical points of the last function,
obtained as solutions √
of the equation g ′ (x) = 2k 2 x − 12kx2 + 12x3 = 0, are
3± 3
x1 = 0, x2,3 = 6 k. We are interested in only the first point, because our
analysis is for the origin. Since the second derivative g ′′ (x) = 2k 2 −24kx+36x2
is positive at x1 = 0, we conclude that x1 = 0 is the local minimum of f (x, kx).
Hence, f (x, y) satisfies the statement conditions. However, it does not have
local extrema at the origin, since in any neighborhood of the origin f (x, y)
assumes both positive and negative values:
( )
f (x, 0) = 3x4 > 0 = f (0, 0) , f x, 2x2 = −x4 < 0 = f (0, 0) .
has the strict local minimum at the origin. The restriction to the y-axis,
f (0, y) = y 4 , also possesses the strict local minimum at the origin. Finally, the
restriction to an arbitrary line y = kx, k = const ̸= 0, gives g (x) = f (x, kx) =
k 4 x4 − 3k 2 x3 + 2x2 . Solving the equation g ′ (x) √= 4k 4 x3 − 9k 2 x2 + 4x = 0,
we find the critical points: x1 = 0, x2,3 = 9±8k217 . The only point of our
concern is x1 = 0, which is the strict local minimum of f (x, kx), because
g ′′ (x) = 12k 4 x2 − 18k 2 x + 4 is positive there. Hence, f (x, y) satisfies the
statement conditions. However, it does not have local extrema at the origin,
since in any neighborhood of the origin f (x, y) assumes both positive and
negative values:
( )
2 2 1
f (x, 0) = 2x2 > 0 = f (0, 0) , f y , y = − y 4 < 0 = f (0, 0) .
3 9
f (x, y) = .
y2 , x = 0
For the restriction to the x-axis we have f (x, 0) = 3e−2/x > 0 = f (0, 0),
2
that is, x = 0 is the strict local minimum. For the restriction to the y-axis,
f (0, y) = y 2 , y = 0 is the strict local minimum. Finally, the restriction to
280 Counterexamples: From Calculus to the Beginnings of Analysis
where
h (x) = c2 − 4ce−1/x · x−m/n + 3e−2/x · x−2m/n .
2 2
x→0 x→0 2
It means, that there exists a neighborhood (−δ, δ) of x = 0 such that for
2
∀x ∈ (−δ, δ) we have h (x) > c2 . Notice that x2m/n > 0 for ∀x ̸= 0. Therefore,
∪
g (x) = x2m/n · h (x) > 0 for ∀x ∈ (−δ, 0) (0, δ). Since g (0) = 0, this means
that x = 0 is the strict local minimum of g (x). Hence, f (x, y) satisfies the
statement conditions. At the same time, in any neighborhood of the origin,
Differentiability 281
f (x, y) assumes
( both
) positive and negative values: f (0, y) = y 2 > 0 = f (0, 0),
−1/x2 −2/x2
while f x, 2e = −e < 0 = f (0, 0). Therefore, it does not have
local extrema at the origin.
Remark. Example 12 in section 7.3 and the last two Examples 21 and 22
represent a chain of refined, but still insufficient, conditions for a local maxi-
mum/minimum in terms of extremum properties of the function restrictions.
Example 23. “If f (x, y) is differentiable on R2 and has only one critical
point c, which is a local maximum, then this point is a global maximum of
f (x, y).”
Solution.
Let us consider the infinitely differentiable on R2 function f (x, y) = 5xey −
x − e5y . The
5
{ only critical point is found by solving the system of necessary
fx = 5ey − 5x4 = 0
conditions: , which has the only solution x = 1, y =
fy = 5xey − 5e5y = 0
0. Therefore, the only critical point is c = (1, 0). The second-order derivatives
fxx = −20x3 , fxy = 5ey , fyy = 5xey − 25e5y give the positive determinant of
the Hessian matrix at the point c = (1, 0):
( ) ( )
fxx fxy −20 5
det (c) = det = 375 > 0,
fxy fyy 5 −20
282 Counterexamples: From Calculus to the Beginnings of Analysis
which means that the critical point is a local extremum. Since fxx (1, 0) =
−20 < 0, one concludes that c = (1, 0) is a local maximum of f (x, y). However,
the point c = (1, 0) is not a global maximum, because f (1, 0) = 3, while
f (−2, 0) = 21.
The function f (x, y) = 3xey − x3 − e3y provides a similar counterexample.
Remark. Similar statement for one-variable functions is true.
Example 24. “If f (x, y) is differentiable on R2 , has only one local mini-
mum and is unbounded below, then f (x, y) achieves a local maximum some-
where.”
Solution.
Let us consider the infinitely differentiable on R2 function f (x, y) =
3
x2 + y 2 (1 + x) . The system of necessary conditions for critical points
{ 2
fx = 2x + 3y 2 (1 + x) = 0
3 has the only solution x = 0, y = 0. The
fy = 2y (1 + x) = 0
second-order derivatives
2 3
fxx = 2 + 6y 2 (1 + x) , fxy = 6y (1 + x) , fyy = 2 (1 + x)
give the positive determinant of the Hessian matrix at the critical point c =
Differentiability 283
(0, 0): ( ) ( )
fxx fxy 2 0
det (c) = det = 4 > 0,
fxy fyy 0 2
which means that the critical point is a local extremum. Since fxx (0, 0) = 2 >
0, it follows that c = (0, 0) is a local minimum. Besides, f (x, y) is unbounded
below since for x = −2 one has f (−2, y) = 4 − y 2 → −∞. (It is also un-
y→∞
bounded above, since for x = 0 one has f (0, y) = y 2 → +∞. ) However,
y→∞
f (x, y) has no local maximum, because c = (0, 0) is the only critical point.
The function f (x, y) = −3xey +x3 +e3y provides another counterexample.
Remark. Similar statement for one-variable functions is true.
Remark to Examples 20-24. The same statements are false for any type
of a local extremum, either minimum or maximum.
284 Counterexamples: From Calculus to the Beginnings of Analysis
Exercises
1. Let f (x, y) be differentiable at (a, b). Show by example that the assertion
that “in this case the remainder satisfies the inequality |γ| = |∆f − df | ≤ Cρ2 ,
where C is a non-negative constant and ρ2 = ∆x2 + ∆y 2 ” is not true.
2. If a function f (x, y) has partial derivatives in a neighborhood of (a, b)
it does not guarantee that f (x, y) is differentiable or (at least) continuous at
(a, b). Provide an example to this statement. Formulate this result in the form
of a counterexample. Compare with Examples 1 and 2 in section 8.3.
3. If a function f (x, y) has bounded partial derivatives in a neighborhood
of (a, b) it does guarantee the continuity of f (x, y) in the same neighborhood,
but it is not yet sufficient for differentiability even at (a, b). Provide an example
to the last part of this statement. Formulate in the form of a counterexample.
Compare with Examples 3 and 4 in section 8.3.
4. Give an example of a function f (x, y) that has continuous mixed deriva-
tive fyx , but does not have the first derivative fx . Formulate as a counterex-
ample.
5. Give an example of a function f (x, y) that is not differentiable at a point
(a, b), but |f (x, y)| is differentiable. What about a function differentiable (a, b)
with the absolute value |f (x, y)| not differentiable? Formulate these results in
the form of counterexamples.
6. Show that the differentiability of h(x, y) = f (x, y) · g(x, y) at (a, b) does
not imply the differentiability of f (x, y) and g(x, y). Compare with Examples
3 and 4 in section 8.2.
7. Show that each of the functions f (x, y) = D(x − y), g(x, y) = D(x + y)
and h(u, v) = D(u + v), where D(t) is Dirichlet’s function, is not differentiable
anywhere, but the composed function h(f (x, y), g(x, y)) is differentiable ev-
erywhere.
8. Construct a counterexample to the following statement: “if there exists
a tangent plane to the graph of f (x, y) at (a, b), then f (x, y) is differentiable
at (a, b)”.
9. Construct a counterexample to the following statement: “if f (x, y) is
differentiable and unbounded on a set S, then at least one of the partial
derivatives fx (x, y) or fy (x, y) is unbounded on S”.
10. Construct a counterexample to the following statement: “if
f (x, y) is differentiable and both partial derivatives are unbounded on a
bounded set S, then f (x, y) is unbounded on S”. (Hint: use f (x, y) =
{ 1
(x2 + y 2 ) cos x2 +y 2
2, x + y
2
̸= 0
2 2 on S = x2 + y 2 ≤ 1 .)
0, x + y = 0
11. Give a counterexample to the statement: “if f (x, y) is continuous in a
neighborhood of (a, b) and a tangent plane does not exist at (a, b), then f (x, y)
does not have a local extremum at (a, b)”.
Differentiability 285
D(x2 + y 2 )).)
16. Show that f (x, y) = sin x + y 2 is a counterexample to the following
statement similar to that in Example 20, section 8.3: “if f (x, y) is differentiable
on R2 and has two or more local minima, then it has also a local maxima”.
Use the functions in Example 20 to obtain other counterexamples to the last
statement.
17. Show that f (x, y) = (x3 − y)(y − 3x3 ) is a counterexample to the
following statement similar to that in Example 21, section 8.3: “if f (x, y) is
differentiable on R2 and its restriction to an arbitrary straight line passing
through the origin has a strict local maximum at the origin, then f (x, y) has
a local maximum at the origin”. Use the functions in Example 21 to obtain
other counterexamples to the last statement.
18. Provide a counterexample to the following statement: “if d2 f (a, b) ≥ 0
at a critical point (a, b), then f (x, y) has a local minimum at (a, b)”. (Hint:
try f (x, y) = x2 + y 3 at the {
origin.)
xy xx4−2y
4 4
+y 4 , x + y ̸= 0 is another counterex-
2 2
19. Show that f (x, y) =
0, x2 + y 2 = 0
ample to Example 11, section 8.3.
20. Give a counterexample to the following statement: “if f (x, y) is con-
tinuously differentiable on R2 and fx (x, y) → 0, fy (x, y) → 0, then
(x,y)→∞
√ (x,y)→∞
f (x, y) → const ”. (Hint: consider f (x, y) = cos x + y .)
3 2 2
(x,y)→∞
21. Give a counterexample to the following statement: “if f (x, y) is contin-
uously differentiable on R2 and f (x, y) → 0, then fx (x, y) → 0 and
{
(x,y)→∞ (x,y)→∞
2 3
1
sin (x +y ) , x2 +y 2 ̸= 0
2
fy (x, y) → 0 ”. (Hint: try f (x, y) = x2 +y22 .)
(x,y)→∞ 0, x + y 2 = 0
{ 3
|x |, y ≥ 0
22. Show that f (x, y) = considered on D = {y ∈ [0, 1], x ∈
x3 , y < 0
[−y, 1]} ∪ {y ∈ [−1, 0], x ∈ [y, 1]} is another counterexample to Example 17 in
section 8.3.
23. Is the continuity of fxx and fyy is sufficient for the twice differentia-
bility of f (x, y)? If not, provide a counterexample. (Hint: consider f (x, y) =
xy ln(− ln(x2 + y 2 )) in a neighborhood of the origin.)
24. The implicit function theorem (one of its versions) states that if F (x, y)
286 Counterexamples: From Calculus to the Beginnings of Analysis
and
Py = {yj : c = y0 < y1 < . . . < ym−1 < ym = d}
of the intervals [a, b] and [c, d], respectively. The corresponding increments are
denoted ∆xi = xi −x √ i−1 and ∆yj = yj −yj−1 , the length of a diagonal of Rij is
denoted by ∆ij = ∆x2i + ∆yj2 and the partition diameter by ∆ = max ∆ij .
i,j
The (double) Riemann sum of f (x, y) corresponding to the ∑nspecific
∑m partition P
and the specific choice of points (ξi , ηj ) ∈ Rij is S (f ) = i=1 j=1 f (ξi , ηj ) ·
∆xi ∆yj . If there exists a finite limit of the Riemann sums of f (x, y), as ∆
approaches 0, which does not depend on a choice of partitions and points
(ξi , ηj ), then this limit is called the double
∫∫ (Riemann) integral∫∫ of f (x, y) over
R, is denoted as follows: lim S (f ) = R f dA or lim S (f ) = R f dxdy, and
∆→0 ∆→0
the function f (x, y) is called (Riemann) integrable over R.
2. Integrability over a general set. Let f (x, y) be defined on a bounded
287
288 Counterexamples: From Calculus to the Beginnings of Analysis
closed set D ⊂ R2 whose boundary ∂D has zero area. (The last means that
for any ε > 0 the boundary ∂D can be covered by a set of rectangles with the
total area less than ε. Those familiar with the measure theory will immediately
recognize the definition of the plane Lebesgue measure zero. In particular,
any rectifiable curve has zero area.) Consider an arbitrary rectangle R =
[a, b] × [c, d]
{ containing the set D and define the following function on R:
f (x, y) , (x, y) ∈ D
F (x, y) = . If F (x, y) is integrable over R, then f (x, y)
0, otherwise ∫∫ ∫∫
is integrable over D and D f dA = R F dA.
Remark. Hereinafter in this chapter we will consider integrability over sets
D that represent the closures of bounded connected open sets with zero area
boundary.
Comparative properties
1) If f (x, y) and g (x, y) are integrable over D and f (x, y) ≤ g (x, y) on D,
then ∫∫ ∫∫
f dA ≤ gdA.
D D
where finf = inf f (x, y), fsup = sup f (x, y) and A (D) is the area of
(x,y)∈D (x,y)∈D
D. In particular, if f (x, y) is continuous on D, then
∫∫
fmin · A (D) ≤ f dA ≤ fmax · A (D) ,
D
3) If f (x, y) is integrable over D, then |f (x, y)| is also integrable over D and
∫ ∫ ∫∫
f dA ≤ |f | dA.
D D
4) If f (x, y) and g (x, y) are integrable over D, then f (x, y) g (x, y) is also
integrable over D.
5) f (x, y) is integrable over D, if and only if, f (x, y) is integrable over D1
and D2 , where D1 ∪ D2 = D and D1 ∩ D2 is a zero area curve. Furthermore,
∫∫ ∫∫ ∫∫
f dA + f dA = f dA.
D1 D2 D
Iterated Integrals
Line Integrals
of coordinates and length of the line segment joining two successive points
(xi−1 , yi−1 ) and (xi , yi ):
√
2 2
∆xi = xi − xi−1 , ∆yi = yi − yi−1 , ∆li = (xi − xi−1 ) + (yi − yi−1 ) .
∑
n
Sl (f ) = f (x (τi ) , y (τi )) · ∆li ,
i=1
∑
n ∑
n
Sx (f ) = f (x (τi ) , y (τi )) · ∆xi , Sy (f ) = f (x (τi ) , y (τi )) · ∆yi .
i=1 i=1
then the line integrals of f (x, y) along C exist and can be calculated by the
following formulas:
∫ ∫ b √
2 2
f (x, y) dl = f (φ (t) , ψ (t)) (φ′ (t)) + (ψ ′ (t)) dt,
C a
∫ ∫ b
f (x, y) dx = f (φ (t) , ψ (t)) φ′ (t) dt,
C a
∫ ∫ b
f (x, y) dy = f (φ (t) , ψ (t)) ψ ′ (t) dt,
C a
where the integrals in the right-hand sides are the Riemann integrals.
Remark. The theorem is true also for a piecewise smooth curve, that is,
for a continuous curve represented as a union of a finite number of smooth
curves.
The line integrals have the same comparative and arithmetic properties as
the double (and “ordinary”) Riemann integral.
∫
Path Independence.
∫ The
∫ line integral C f dx + gdy is path independent
in a set D if C1 f dx + gdy = C2 f dx + gdy for any two smooth curves (paths)
in D that have the same initial and final points.
Theorem. If f (x, y) and g (x, y) are continuous and have continuous
partial derivatives fy and gx on an open simply-connected set D, then the
following four conditions
∫ are equivalent:
1) the line integral ∫ C f dx + gdy is path independent in a set D
2) the line integral C f dx + gdy = 0 for every closed path in D (that is, for
every path whose initial and final points coincide)
3) the expression f dx + gdy represents the differential of a function η (x, y) on
D
4) fy = gx on D.
Remark 1. The conditions 1) and 2) are equivalent for any line integrable
(for example, continuous) on D functions f and g.
Remark 2. The conditions 1) and 3) are equivalent for any continuous
functions f (x, y) and g (x, y) on an open connected set D.
Remark 3. The condition 4) follows from 1) (or 2), or 3)) for any open
connected set D.
Remark 4. The condition 3) can be rewritten in the following form: there
exists a function η (x, y) such that ∇η = (f, g) in D. In this case the vector
field F = (f, g) is called conservative (or potential) on D and the function η
is called a potential function of F .
General Remark. Like in sections 7.2 and 8.2, the examples in this section
have direct connections with some examples for one-variable functions given in
Part I and, correspondingly, the majority of the provided below counterexam-
ples are adapted to R2 versions of the functions introduced in chapter 5. Each
example in this section has the reference to the corresponding one-dimensional
counterpart.
On the other hand, for an arbitrary choice of partition and points (ξi , ηj ) ∈
Rij , the following evaluation of the Riemann sums for f (x, y) is true:
∑
n ∑
m
1 − ∆x1 = 1 · ∆xi ∆yj ≤ S (f )
i=2 j=1
∑
n ∑
m ∑
n ∑
m
= f (ξi , ηj ) · ∆xi ∆yj ≤ 1 · ∆xi ∆yj = 1.
i=1 j=1 i=1 j=1
Since ∆x1 → 0 when ∆ → 0, it follows that the limit of the Riemann sums,
as ∆ approaches 0, exists and ∫∫ does not depend on the choice of partition and
points (ξi , ηj ): lim S (f ) = D sgn xdA = 1, that is, f (x, y) is integrable over
∆→0
D.
Example 3. “If |f (x, y)| is integrable over D, then f (x, y) is also inte-
grable over D.”
(compare with Example 5, section 5.3)
Solution.
{ √
The two-dimensional modified Dirichlet’s function
1, √ x2 + y 2 ∈ Q
D̃ (x, y) = is not integrable over any set D, in partic-
−1 , x2 + y 2 ∈ I
ular, it is not integrable over a rectangle
R = [a, b] × [c, d] (it can be shown
like in Example 1), but D̃ (x, y) = 1 is integrable over any set D.
Remark 1. The Remarks to Example 5 of section 5.3 are applicable here
with corresponding adjustments to the case of R2 .
Remark 2. The graph of this function is shown in Example 1, section 7.2.
Integrability 295
∫∫
Example 4. “If f (x, y) is integrable over D and D f 2 dA = 0, then
f (x, y) = 0 on D.”
(compare with Example 9, section 5.3)
Solution.
According to the arithmetic rules for integrals, the function f (x, y) =
1 − sgn x is integrable on D = [0, 1] × [0, 1] as a difference of two integrable
functions (see Example 2 for integrability of sgn x) and
∫∫ ∫∫ ∫∫ ∫∫
f 2 dA = 1 − sgn xdA = 1dA − sgn x dA = 1 − 1 = 0.
D D D D
Example 6. “If double integral and both iterated integrals of f (x, y) exist
and are equal, then these integrals can be calculated using antiderivtives of
f (x, y) with respect to x (when y is fixed) or with respect to y (when x is
fixed).”
(compare with Example 14, section 5.3)
Solution.
The function f (x, y) = sgn(xy) is integrable on [0, 1]×[0, 1] and its iterative
integrals also exist (to show this one can use the arguments similar to those
∫1 ∫1
applied in Example 2). However, the first iterated integral 0 dx 0 sgn(xy)dy
∫1
requires first the evaluation of 0 sgn(x0 y)dy for every fixed x0 ∈ [0, 1], that is
∫1
possible to make obtaining the result 0 sgn(x0 y)dy = sgn x0 , but not through
antiderivatives because there is no antiderivative for sgn(x0 y) for any x0 ̸= 0.
∫1
Additionally, for the same reason, the subsequent calculation of 0 sgn xdx is
also not possible through antiderivative. Due to the function symmetry, the
same considerations are true for the second iterative integral.
Example 7. “If ∫∫
f (x, y) is integrable over D, then there exists a point
(a, b) ∈ D such that D f dA = f (a, b) · A (D).”
(compare with Example 15, section 5.3)
Solution. {
0, x < 0
The Heaviside function H (x, y) = is integrable over D =
1, x ≥ 0
296 Counterexamples: From Calculus to the Beginnings of Analysis
(here D(x) and D(y) are one-dimensional Dirichlet’s functions) differ only at
Integrability 297
that is, keep the entire interval in x-axis. Then lim S (f ) depends on the choice
r→0
of points (ξi , ηj ): if one use the points (0, ηj ), then f (0, ηj ) = 0 and
∑
1 ∑
m
S (f ) = f (0, ηj ) · ∆xi ∆yj = 0,
i=1 j=1
∑
1 ∑
m
S (f ) = f (1, ηj ) · ∆xi ∆yj = 1.
i=1 j=1
∑
m ∑
n ∑
n
= ∆yj · xi · ∆xi = xi · (xi − xi−1 )
j=1 i=1 i=1
1∑ 1∑
n n
= (xi + xi−1 )(xi − xi−1 ) + (xi − xi−1 )(xi − xi−1 )
2 i=1 2 i=1
1∑ 2 1∑ ∑
n n n
1 1
= (xi − x2i−1 ) + ∆x2i ≤ (x2n − x20 ) + max ∆xi · ∆xi
2 i=1 2 i=1 2 2 i i=1
1 2 1 1 1
≤ (x − x20 ) + ∆ = + ∆
2 n 2 2 2
and
∑
n ∑
m ∑
n ∑
m
S (f ) = f (ξi , ηj ) · ∆xi ∆yj ≥ xi−1 · ∆xi ∆yj
i=1 j=1 i=1 j=1
∑
m ∑
n ∑
n
= ∆yj · xi−1 · ∆xi = xi−1 · (xi − xi−1 )
j=1 i=1 i=1
1∑ 1∑
n n
= (xi + xi−1 )(xi − xi−1 ) − (xi − xi−1 )(xi − xi−1 )
2 i=1 2 i=1
300 Counterexamples: From Calculus to the Beginnings of Analysis
1 2 1 ∑n
1 1
≥ (xn − x20 ) − max ∆xi · ∆xi ≥ − ∆.
2 2 i i=1
2 2
Thus, for every partition and an arbitrary choice of the points (ξi , ηj ) it holds
1 1 1 1
− ∆ ≤ S(f ) ≤ + ∆
2 2 2 2
and, consequently, ∫∫
1
lim S (f ) = f dA =
.
∆→0 R 2
Remark. The problem with the use of the maximum area r of elementary
rectangles as a parameter for the limit of the Riemann sums is that approach-
ing r to 0 does not necessarily require a refinement of partitions in both
directions. For instance, in the above counterexample, when r approaches 0
for the chosen set R1j = [0, 1] × [yj−1 , yj ], j = 1, . . . , m, the refinement oc-
curs only in y-direction, while in x-direction always is used the entire interval
[0, 1]. It should be noted that the same situation can not occur with the par-
tition diameter ∆. Indeed, for the partitions provided in the counterexample
the diameter cannot approach 0, because ∆ > 1 for each of the above par-
titions (∆ approaches 1 when r approaches √ 0). In a general case, according
to its definition ∆ = max ∆ij , ∆ij = ∆x2i + ∆yj2 , the condition that ∆
i,j
approaches 0 means that the maximum diagonal of the elementary rectangles
should approach 0, which in its turn implies that the maximum length of each
side of elementary rectangles should approach 0, that is, the refinement is
compulsorily in both directions.
On the other hand, choosing the points (ξi , ηj ) to be in E each time when
Rij contains at least one point of E, we get upper estimation for any integral
sum:
∑
n ∑m
S (f ) = f (ξi , ηj ) · ∆xi ∆yj
i=1 j=1
∑ ∑
≤ S1 + S2 = 0 · ∆xi ∆yj + 1 · ∆xi ∆yj ,
i,j i,j
where the first sum corresponds to all Rij that have no common point with E
and the second - to the rectangles containing points of E. Notice that S1 = 0
and each term in S2 equals to the area of the corresponding rectangle Rij .
Therefore, we should now evaluate the area of all the rectangles containing
the points of E.
Choose an arbitrary ϵ > 0 and find a corresponding K such that 21K <
4 ≤ 2K−1 (such K exists, because 2k → 0). Then 2k < 4 for ∀k ≥ K, which
ϵ 1 1 1 ϵ
k→∞
means that all segments Ek , k ≥ K lie in the strip 0 < x < 4ϵ , 0 ≤ y ≤ 1 and
only K −1 segments Ek , k = 1, . . . , K −1 lie out of this strip. Consider now an
ϵ
arbitrary partition P with the diameter ∆ < 4K and choose the smallest group
of the leftmost rectangles Rij , i = 1, . . . , I, which contain all the segments
Ek , k ≥ K. Evidently, all these rectangles, except probably for those in the
rightmost column, belong to the the strip [0, 4ϵ ] × [0, 1]. However, the area
of the last column is easily estimated in terms of ϵ: 1 · ∆xI < 1 · ∆ < 4K ϵ
.
Therefore, the overall area of these rectangles can be evaluated as follows:
ϵ ϵ ϵ
A1 < + ≤ .
4K 4 2
It remains to estimate the area of those Rij , which contain all the points of
Ek , k = 1, . . . , K−1. Notice that each of these Ek lie inside a strip [xik −1 , xik ]×
[0, 1] of the width ∆xik = xik − xik −1 or belongs to a border x = xik , y ∈ [0, 1]
between two subsequent strips. Therefore, the overall area of these rectangles
satisfies the following evaluation:
∑
K−1
ϵ
A2 ≤ (∆xik + ∆xik +1 ) < 2∆ · (K − 1) < .
2
k=1
ϵ
Summarizing, for an arbitrary partition with the diameter ∆ < 4K , the
overall area of the elementary rectangles Rij , which contain all the segments
Ek , ∀k ∈ N, has the following evaluation:
ϵ ϵ
A = A1 + A2 < + = ϵ.
2 2
Since S2 ≤ A < ϵ, it follows from the above estimates of the integral sums
that 0 ≤ S(f ) ≤ S2 < ϵ. The last inequality implies that lim S(f ) = 0, that
∫∫ ∆→0
is, f (x, y) is integrable over R and R f dA = 0.
302 Counterexamples: From Calculus to the Beginnings of Analysis
1
lim f (x, y) = 0, lim f (x, y) = y0 − ̸= 0;
(x,y)→(x0 ,y0 ) (x,y)→(x0 ,y0 ) 2
x∈Q, y=y0 x=x0
∫1 ∫1
Nevertheless, the iterated integral 0 dx 0 f (x, y) dy exists. In fact, for
∫1 ∫1
any fixed xrac ∈ Q one has 0 f (xrac , y) dy = 0 0dy = 0. Further, for
any fixed xirr ∈ I the function f (xirr , y) is continuous with respect to y
on [0, 1] except at the only point y = 21 where f (xirr , y) has a remov-
able discontinuity, that is, f (xirr , y) is Riemann integrable on [0, 1] and
∫1 ∫1 ∫1
0
f (x, y) dy = 0 y − 21 dy = 0. Therefore, g (x) = 0 f (x, y) dy = 0 for
every fixed x ∈ [0, 1]. Consequently, the iterated integral is defined and
∫1 ∫1 ∫1
dx 0 f (x, y) dy = 0 g (x) dx = 0.
0 ∫1 ∫1
Remark 1. Notice that the second iterated integral 0 dy 0 f (x, y) dx
∫1
does not exist, since 0 f (x, y) dx does not exist: for any fixed y, the function
f (x, y) represents a Dirichlet’s like function, which is not Riemann integrable.
Remark 2. Evidently, f (x, y) is not integrable in the sense of double
integral, because the number of its discontinuities is not of the measure 0.
Notice, that each point of the segment [−1, 1] on y-axis is the limit point of
the curve h(x).
Consider first the “positive” saw g(x) located in the rectangle [0, 1]×[−2, 2].
Since each tooth gn (x) has the length greater than 2 and the number of these
teeth is infinite, the curve g(x) has an infinite length. Since the “negative”
saw −g(−x) is symmetric to g(x) with respect to the origin, its length is also
infinite. Nevertheless, the plane (Lebesgue) measure of the curve h(x) is zero.
In fact, one can show that this curve can be covered by a finite set of rectangles
whose overall area is less than a given positive number. To this end, consider
an arbitrary ϵ > 0 and choose the number N such that 21N < 24 ϵ
≤ 2N1−1
(such number always exists, because 2N → 0). Construct now the rectangle
1
N →∞
Rϵ = [− 24 ϵ ϵ
, 24 ] × [− 32 , 23 ] of the area Aϵ = 24
2ϵ
· 3 = 4ϵ , which contains all
the teeth of the saw h(x) with n ≥ N (both of the left negative and right
positive parts) and also all the points of the segment [−1, 1] on y-axis. The
remaining N − 1 teeth of the “positive” saw g(x) represent a rectifiable curve
and, consequently, have the plain measure zero, that is, this part of saw can
be covered by a finite set of rectangles with the overall area less than 4ϵ . The
same is true for the remaining N − 1 teeth of the “negative” saw −g(−x).
Therefore, all the saw h(x) can be covered by a finite number of rectangles
with the overall area A < 4ϵ + 4ϵ + 4ϵ < ϵ, which means that the curve h(x)
has zero area. Since the applied splitting of D is such that D1 ∪ D2 = D
and D1 ∩ D2 is the zero area curve h(x), all the conditions of the arithmetic
property 5) in section 9.1 are satisfied and for any integrable on D function
f (x, y) it holds ∫∫ ∫∫ ∫∫
f dA + f dA = f dA.
D1 D2 D
For instance, if f (x, y) ≡ 1, then one obtains the area of D at the right-hand
side of the last formula
∫∫ ∫ 1 ∫ 2
f dA = dx dy = 8
D −1 −2
(due to the symmetry of D1 and D2 and the symmetry of f (x, y) each area is
just a half of the area of D).
Example 5. “If both iterated integrals exist, then they are equal.”
Solution. {
x−y
(x+y)3
, (x, y) ̸= (0, 0)
Let us consider the function f (x, y) = defined
0, (x, y) = (0, 0)
on the unit square S = [0, 1] × [0, 1]. For any x ̸= 0 we have
∫ ∫ ( )1
1
x−y 1
−x − y
2x 1 x
I1 (x) = 3 dy = + 3 dy = −
0 (x + y) 0 (x + y)
3
(x + y) x + y (x + y)2
0
( )
1 1 1 1 1
= − −x 2 − = 2.
x+1 x (x + 1) x2 (x + 1)
Since the last function is continuous (and consequently integrable) on [0, 1]
and the value of the definite integral does
∫ 1not ∫depend on the function definition
1
in a single point, the iterated integral 0 dx 0 f (x, y) dy exists and is equal
∫ ∫ ∫ 1
1 1 1
1 1 1
dx f (x, y) dy = 2 dx = − x + 1 0
= .
2
0 0 0 (x + 1)
306 Counterexamples: From Calculus to the Beginnings of Analysis
tegrals exist, but they are different. Note that this result is caused by un-
boundedness (and therefore discontinuity) of the function at the origin. This
violates the conditions of Fubini’s theorem and may lead to inequality between
the iterated integrals as this counterexample shows.
Remark 1. Another interesting counterexample is the function f (x, y) =
y −2 , 0 < x < y < 1
−x−2 , 0 < y < x < 1 considered on the unit square S = [0, 1] × [0, 1].
0, otherwise
Remark 2. For the above functions, the double integral does not exist.
∫b ∫d ∫d ∫b
Example 6. “If a dx c f (x, y) dy = c dy a f (x, y) dx, then f (x, y) is
continuous on [a, b] × [c, d].”
Solution.
The function
−1
y , (x, y) ∈ D1 : 0 < x < y < 1
f (x, y) = x−1 , (x, y) ∈ D2 : 0 < y < x < 1
0, otherwise
defined on the unit square S = [0, 1] × [0, 1] has discontinuities on the square
Integrability 307
boundary and also on the line y = x. In fact, on the boundary points (x0 , y0 )
we have the following cases:
1) if y0 = 0, 0 < x0 ≤ 1, then (x, y) ∈ D2 and
1 1
lim f (x, y) = lim = ̸= 0 = f (x0 , 0) ;
(x,y)→(x0 ,0) x→x0 x x0
Hence, all the boundary points are the discontinuity points. Besides, for the
points (x0 , x0 ), 0 < x0 < 1, the partial limit when (x, y) ∈ D1 is
1 1
lim f (x, y) = lim = ̸= 0 = f (x0 , x0 ) .
(x,y)→(x0 ,x0 ) y→x0 y x0
Therefore, all the points on the line y = x are also discontinuity ones.
Nevertheless, the iterated integrals exist and are equal:
∫ 1 ∫ 1 ∫ 1 (∫ x ∫ 1 )
1 1
dx f (x, y) dy = dy + dy dx
0 0 0 0 x x y
∫ 1 ( y x ) ∫ 1
1 1
= + ln y|x dx = (1 − ln x) dx = (2x − x ln x)|0 = 2;
0 x 0 0
∫ 1 ∫ 1 ∫ 1 (∫ y ∫ 1 )
1 1
dy f (x, y) dx = dx + dx dy
0 0 0 0 y y x
308 Counterexamples: From Calculus to the Beginnings of Analysis
∫ 1 ( y ) ∫ 1
x 1 1
= + ln x| dy = (1 − ln y) dy = (2y − y ln y)|0 = 2.
0 y 0 y
0
Remark 1. This shows that the conditions in Fubini’s theorem are sufficient
and even if they are not satisfied, the iterated integrals may exist and be equal.
Remark 2. The double integral in the above counterexample does not
exist, because the function is unbounded on S.
Remark 3. A similar counterexample can be given with the function
−1
y , 0<x<y<1
g (x, y) = −x−1 , 0 < y < x < 1
0, otherwise
defined on the unit square S = [0, 1] × [0, 1]. The principal difference between
f (x, y) and g (x, y) is that along the line y = x the former has removable
discontinuity (just redefine the function as f (x, x) = x1 for 0 < x < 1), while
the latter has a “wilder” discontinuity of the jump type.
Example 7. “If both iterated integrals exist and have the same value,
then the double integral also exists.”
Solution.
Let us consider the function f (x,{ y) defined on the unit square S =
1 , (x, y) ∈ T
[0, 1] × [0, 1] as follows: f (x, y) = , where T consists of
0, (x, y) ∈/T
Integrability 309
( )
the points of S such that (x, y) = m p , p , m, n, p ∈ N, where both fractions
n
are in lowest terms (note that the denominator is the same). First, let us show
∫1 ∫1
that the iterated integral 0 dy 0 f (x, y) dx exists. In fact, if we choose any
∫1
irrational y0 , then f (x, y0 ) = 0 and 0 f (x, y0 ) dx = 0. On the other hand,
for a rational y0 = np (with the fraction in lowest terms), f (x, y0 ) is different
from zero only in the finite number of the points, because for a given natural
p there are at most p numbers of the form x = m p , m ∈ N, in [0, 1]. Therefore,
∫1
again 0 f (x, y0 ) dx = 0. Since the inner integral is zero for any y0 , the iter-
∫1 ∫1
ated integral exists and 0 dy 0 f (x, y) dx = 0. Due to the symmetry of the
function and domain with respect to interchange
∫ 1 ∫ 1 of variables, the same result
is true for the second iterated integral: 0 dx∫∫0 f (x, y) dy = 0.
Now let us prove that the double integral S f (x, y) dA does not exist. To
this end, let us consider the special uniform partitions obtained by division
of each side of S in p equal parts, where p is a prime number. Note that
the diameter of such partitions approaches 0 as p approaches infinity. Each
elementary square
except for the elementary squares of the upper row (j = p) and the right
column (i = p), for which we choose
( )
i p−1
(ci , dp ) = , , i = 1, . . . , p − 1,
p p
( )
p−1 j
(cp , dj ) = , , j = 1, . . . , p − 1,
p p
and ( )
p−1 p−1
(cp , dp ) = , .
p p
The corresponding double Riemann sums
p ∑
∑ p
S (f ; P ) = f (ci , dj ) · ∆xi ∆yj
j=1 i=1
terms (i.e., m and n are relatively prime integers). It can be shown that this
function is discontinuous at every point in (0, 1] × [0, 1] with both rational co-
ordinates and continuous at all remaining points. Indeed, in any neighborhood
of a rational point (x0 , y0 ), x0 , y0 ∈ Q, x0 ̸= 0, there are points with irrational
coordinates, and the partial limit along these points lim f (x, y) = 0
(x,y)→(x0 ,y0 )
(m ) x∈I or y∈I
is different from f (x0 , y0 ) = f n , y0 = n1 . It means that f (x, y) is dis-
continuous at every point with rational coordinates in (0, 1] × [0, 1]. For an
arbitrary point (x0 , y0 ) such that x0 ∈ I ∪ {0} or y0 ∈ I (or both), we split all
the paths of approaching (x0 , y0 ) into two groups. First, if a path consists of
Integrability 311
points (x, y) such that x ∈ I ∪ {0} or y ∈ I (or both), then we readily obtain
lim f (x, y) = 0 = f (x0 , y0 ). In the second group we place all paths
(x,y)→(x0 ,y0 )
x∈I or y∈I
containing only rational points with x ̸= 0. For any path of the second group,
since rational abscissas x = mn approach x0 , it implies that the denominator n
should approach infinity, because if it would not be so, that is, if the denomina-
tor n would be bounded, say n ≤ n0 , then it will be only finitely many numbers
of the form x = m n , n ≤ n0 in a neighborhood of the point x0 . However it will
contradict to the well-known fact that in any neighborhood of an arbitrary
real point there are infinitely many rational points. Since n → ∞ when x = m n
approach x0 , it follows that lim f (x, y) = lim n1 = 0 = f (x0 , y0 ).
(x,y)→(x0 ,y0 ) n→∞
x∈Q and y∈Q
The two considered groups of paths involve all the points in S, and therefore
lim f (x, y) = 0 = f (x0 , y0 ), i.e., f (x, y) is continuous at every point
(x,y)→(x0 ,y0 )
(x0 , y0 ), x0 ∈ I ∪ {0} or y0 ∈ I (or both).
Now let us show that f (x, y) is integrable on S (the boundedness of the
function is evident). Recall that a countable union of countable sets is again
a countable set. For any fixed rational y the number of points with rational
abscissas is countable. Since the number of rational ordinates y is countable
too, the set of points with both rational coordinates is countable (it is true both
for S and R2 ). Therefore it has the two-dimensional Lebesgue measure zero
and, according to the Lebesgue criterion, f (x, y) is integrable on S. Further,
we can find the value of the integral by noting that all the lower Riemann
sums are equal to 0:
∑
n ∑
m ∑
n
S (f ) = inf f (x, y) · ∆xi ∆yj = 0 · ∆xi ∆yj = 0
Rij
j=1 i=1 i=1
the arithmetic and composition rules. Since the conditions of Fubini’s theorem
are satisfied for any bounded set S in R2 , the double integral and both iterated
integrals exist and are equal. However, if we choose the square S = [−a, a] ×
[−b, b], then it is very simple to calculate the double integral using one of the
iterated integrals
∫∫ ∫ a ∫ b ( ) ∫ a
x2 y −x2 y
f (x, y) dA = dx y e +e dy = 0dx = 0
S −a −b −a
(since f (x, y) is odd with respect to y), but )it cannot be done by using another
∫b ∫ a ( x2 y
+ e−x y dx, because the original function
2
iterated integral −b dy −a y e
does not have any helpful symmetry with respect to x and does not have an
antiderivative in the class of elementary functions. The last integral still can
be calculated by expending the function in power series, but it will result
(after integration) in a numerical series whose sum usually cannot be found
exactly.
Integrability 313
∫ ∫
2π 1
1 − δu2
= dv udu = (2π − δv ) .
δv δu 2
Since this result is true for any small δu , δv > 0, applying the limit, as δu , δv
approaches 0, to the both sides of the formula, one obtains:
∫∫ ∫∫ ∫ 2π ∫ 1
∂ (φ, ψ)
1dxdy = dudv = dv udu = π.
D D̃ ∂ (u, v) 0 0
general, if the two required conditions are not satisfied at a finite number of
points or on a finite number of simple rectifiable curves, then the theorem
on the change of variables is still applicable, with justification similar to the
presented above.
Remark 2. The next example shows that when one of the conditions
is violated on a large part of a set, then the change of variables may be
unjustifiable.
However, the alternative evaluation of the area of figure D through the Rie-
mann integral gives a different result:
∫ 2( ) ( 2 )
y2 y 16
1− − − 1 dy = .
−2 4 4 3
The problem with the change of variables in this case is that the used trans-
formation is not one-to-one mapping between D̃ and D. It happens that a
right “half” of D̃, D̃r = [0, 1] × [−1, 1] already covers all the image D, and
the correspondence between D̃r and D is one-to-one with the only excep-
tion on the boundary points u = 0 , v ∈ [−1, 1], which cover twice the
segment y = 0 , x ∈ [−1, 0] in D. The same is true for the left “half”
D̃l = [−1, 0] × [−1, 1]. In this way, the transformation from D̃ to D cov-
ers the image twice, violating the condition of one-to-one correspondence on
the entire domain. This is the cause of the wrong use of the change of vari-
ables above. The correct mode is to select one of the “halves” of D̃, say D̃r ,
and then to apply (justifiably) the change of variables, obtaining the correct
result:
∫∫ ∫∫ ∫ 1 ∫ 1
∂ (φ, ψ) ( ) 16
1dxdy = 4 u2 + v 2 du =
∂ (u, v) dudv = dv
3
D D̃r −1 0
Integrability 315
(the use of D̃l gives the same result and this is why the wrong result obtained
for D̃ is twice as much as the correct one).
Example 12. “If P (x, y) and Q (x, y) are ∫continuously differentiable, and
Py = Qx in a domain D, then the line integral C P dx+Qdy along any smooth
closed curve C lying in D is equal zero.”
Remark. In all the line integrals along a closed curve, we use the convention
that a curve is traversed once in the positive (counterclockwise) direction.
Solution.
Consider the functions P (x, y) = − x2 +y y x
2 and Q (x, y) = x2 +y 2 on do-
main D = R \ (0, 0). According to the arithmetic rules, both functions are
2
2xy y 2 − x2 y 2 − x2 2xy
Px = 2 , Py = 2 , Q x = 2 , Qy = − 2
(x2 + y 2 ) 2 2
(x + y ) 2
(x + y )2 (x + y 2 )
2
1
lim Py (0, y) = lim Qx (0, y) = lim = ∞,
y→0 y→0 y→0 y2
and this causes violation of the integral formula in the statement for any
curve
{ 2 C2 going} around the origin. For instance, if C is the unit circumference
x + y = 1 , then using the polar coordinates r, θ and θ as the integration
parameter, we obtain:
∫ ∫ 2π
P dx + Qdy = P (θ) xθ dθ + Q (θ) yθ dθ
C 0
∫ 2π ∫ 2π
= (− sin θ) (− sin θ) dθ + cos θ cos θdθ = dθ = 2π ̸= 0.
0 0
Remark 1. The integral does not vanish because one of the conditions of
the corresponding theorem on the line integral is not satisfied: the domain
D should be simply-connected in order to guarantee that the line integral
vanishes. If we add the origin to the domain D, then the new domain will be
simply connected, but the functions P , Q, Py and Qx will not be continuous
in the new domain, because they are not continuous at the origin.
Remark 2. If we choose a simply connected domain D, which does not
contain the origin, then the statement will be true.
Remark 3. Notice, that the condition of continuity of P , Q, Py and Qx
is only sufficient in the referred theorem, but not necessary as shown in the
next example.
Integrability 317
2
= ∞.
lim Py (x, 0) = lim Qx (x, 0) = lim
x→0 x→0 x3 x→0
Now let us choose a smooth closed curve C that does not pass through the
origin. If the point (0, 0) lies outside the domain enclosed by C, it is always
possible to construct an auxiliary simply connected domain, which contains
C and does not contain (0, 0).∫ Therefore, for such domain the conditions of
the theorem are satisfied and C P dx + Qdy = 0. If the point (0, 0) lies inside
the domain D̃ enclosed by C, then the { 2 situation is
} more complex. Let us
2 2
introduce
∫ a small circumference
∫ C a = x + y = a inside D̃ and note that
C
P dx + Qdy = Ca
P dx + Qdy, since P dx + Qdy is an exact differential in
R2 \ (0, 0) (i.e. P dx + Qdy = df ). Calculating the last integral in the polar
coordinates r, θ, with θ being the integration parameter, we obtain:
∫ ∫ 2π
P dx + Qdy = P (θ) xθ dθ + Q (θ) yθ dθ
Ca 0
∫ ( )
2π
2a2 cos θ sin θ a2 sin2 θ − cos2 θ
= a · (− sin θ) + a · cos θdθ
0 a4 a4
∫
1 2π
=− cos θdθ = 0.
a 0
Therefore, the line integral along any smooth closed curve C lying in D and
not passing through the origin is zero.
Example 4, section 3.3 it was shown that R(x) is continuous at every irrational
point and discontinuous at every rational point. Therefore, the function f (x, y)
is discontinuous at each point of the segments y ∈ [0, 1], ∀x ∈ Q∩[0, 1] and the
function g(x, y) is discontinuous at each point of the segments x ∈ [0, 1], ∀y ∈
Q∩[0, 1]. Let us denote the sets of discontinuity points of the functions f (x, y)
and g(x, y) by Ef and Eg , respectively. Evidently, both sets are dense in D,
that is, Ēf = D and Ēg = D. Nevertheless, Green’s formula
∫∫ ∫
(gx − fy ) dA = f dx + gdy
D ∂D
is satisfied. To show this, let us evaluate the left- and right-hand sides
of the formula. First, gx = 2x = fy for ∀(x, y) ∈ D, and consequently
∫∫
D
(gx − fy ) dA = 0. The line integral along ∂D can be divided in the four
line integrals along the sides of the square D:
∫ ∫ ∫ ∫ ∫
f dx + gdy = f dx + gdy + f dx + gdy + f dx + gdy + f dx + gdy,
∂D AB BC CK KA
where
(Integrability of the Riemann function and the fact that its definite integral
is zero was shown in Remark 3 to Example 2, section 5.3.) Joining all the
calculations, we get
∫
2 1
f dx + gdy = 0 − 1 + + = 0,
∂D 3 3
Exercises
1. Show by example that the following statement is false: “if f∫∫ (x, y) is
bounded on a rectangle R = [a, b] × [c, d], then the double integral R f dA
can be defined by partitioning R in elementary rectangles Rij of the same size
and choosing the points (ξi , ηj ) in the Riemann sum to be the centerpoints of
Rij ”. What if f (x, y) is integrable on R?
2. Give an example that shows that the condition of independence of the
limit on the choice of points (ξi , ηj ) is important in the definition of the dou-
ble integral.{ (Hint: use the two-dimensional version of Dirichlet’s function
1, x, y ∈ Q
D̂(x, y) = and apply two different rules for the choice of
0, otherwise
the points (ξi , ηj ): choose the points with rational coordinates and then with
irrational coordinates in each Rij . )
3. Show that the partition diameter ∆ in the double integral definition
cannot be substituted by any combination of the numbers of intervals n and
m in x- and y-direction. In particular, construct a counterexample to the
following false definition of the double integral of f (x, y) over a rectangle R:
“if there exists a finite limit of the Riemann sums, as n and m approach ∞,
which does not depend on a choice of points (ξi , ηj ), then this limit is called
the double integral of f (x, y) over R”. (Hint: divide each side [a, b] and [c, d]
of the rectangle R = [a, b] × [c, d] in two equal parts and then apply refinement
only two one of the obtained halves of each interval.)
Show that the limits lim S (f ) and lim S (f ) are equal if one uses the
∆→0 m,n→∞
uniform partitions in x- and y-directions.
4. Show by example that the converse to the comparative property 1) in
section 9.1 is not true, that is, the∫∫
following statement
∫∫ is false: “if f (x, y) and
g (x, y) are integrable over D and D f dA ≤ D gdA, then f (x, y) ≤ g (x, y)
on D”. {
1, x, y ∈ Q
5. Show that D̂(x, y) = is another counterexample to
0, otherwise
the statement in Example 1,{section 9.2.
1, x, y ∈ Q
6. Show that D̃(x, y) = is another counterexample to
−1, otherwise
the statement in Example 3, section 9.2.
7. Provide a counterexample to the following statement: “if f (x, y) is
discontinuous at a countable set of points in a set D, then it is not inte-
grable over D”. Compare this result with Example 2, section 9.3. (Hint: con-
sider D = [0, 1] × [0, 1], E = ∪+∞
{ n=1 en , en = (1/n, 1/n), ∀n ∈ N, f (x, y) =
1, (x, y) ∈ E
)
0, (x, y) ∈ D\E
8. Show that another counterexample to the statement in Example 4, sec-
320 Counterexamples: From Calculus to the Beginnings of Analysis
tion 9.3. can be composed{as follows: the region D = [−1, 1] × [−2, 2] and the
sin πx , x ∈ [−1, 0) ∪ (0, 1]
dividing curve is h(x) = . Use the reasoning of
0, x = 0
Example 4 to show that h(x) is a zero area curve.
1
y2 , 0 < x < y < 1
9. Show that f (x, y) = − 1 , 0 < y < x < 1 considered on [0, 1] × [0, 1]
x2
0, otherwise
is another counterexample for Example 5 in section 9.3.
10. Show that f (x, y) = D(x) · R(y), where D(x) and R(y) are one-
dimensional Dirichlet’s and Riemann’s functions, is another counterexample
for Example 8 in section 9.3.
2
−v 2
11. Verify that the transformation x = (uu2 +v 2 )2 , y = − (u2 +v 2 )2 has contin-
2uv
uous partial derivatives and positive Jacobian on the set D̃ located between
the circles u2 + v 2 = 12 and u2 + v 2 = 1 and bounded by the segments
2 ≤ u ≤ 1, v = 0 and −1 ≤ v ≤ − 2 , u = 0 (this is three-quarters of the ring
1 1
without the part located in u > 0, v < 0 ), but the theorem on the change of
variables does not hold even for f (x, y) ≡ 1. Find out what is the problem
with this transformation and formulate the result as a counterexample.
12. Provide a counterexample to the statement: “if a transformation
x = φ (u, v), y = ψ (u, v) between sets D̃ and D has zero Jacobian on a
subset D̃1 ⊂ D̃ of non-zero area, then the corresponding change of variables
in the double integral is not applicable”. Compare this result with Exam-
ple
{ 10. 2(Hint: consider f (x, y) ≡ 1 and the transformation x = φ (u, v) =
0, u + v 2 < 1
, y = ψ (u, v) = u · v on the set D̃ enclosed
(u2 + v 2 − 1)2 , u2 + v 2 ≥ 1
by the rays u = v, u = −v for u > 0 and by the arc of the circumference
u2 + v 2 = 2 .)
13. Show that P (x, y) = − (5x+2y)2+(3x+2y)
y x
2 and Q(x, y) = (5x+2y)2+(3x+2y)2
9.3.
14. Prove that Green’s formula does not hold for the functions of Exam-
ple 12, section 9.3, P (x, y) = − x2 +y y x
2 and Q(x, y) = x2 +y 2 considered on
main containing the origin. Notice that in both cases the conditions of Green’s
formula are satisfied at all points except only for the origin. Compare results
and formulate them as counterexamples.
2 and Q(x, y) = x2 +y 2 considered on D = R
x y 2
15. Show that P (x, y) = x2 +y
give another counterexample for Example 13, section 9.3.
16. Provide a counterexample to the following statement: “if∫∫ f (x, y) has
the∫ set of discontinuity points dense in D, then Green’s formula D fy dA =
− ∂D f dx does not hold”. Compare this result with Example 14 in section
9.3. (Hint: consider f (x, y) = x2 + y 2 + R(x), where R(x) is the Riemann
Integrability 321
[8] B.M. Makarov, M.G. Goluzina, A.A. Lodkin, and A.N. Podkorytov. Se-
lected Problems in Real Analysis. AMS, Providence, RI, 1992.
323
This page intentionally left blank
Symbol Description
325
326 Symbol Description
∫
f dx integral, indefinite integral lim lim f iterated limit of function of
∫b x→a y→b
a
f dx definite (Riemann) integral, two variables
improper integral of the sec- fx ,∂x f partial derivative in x
ond kind ∂f
∂x partial derivative in x
S(f ; P, c),S(f ) Riemann sum fxx ,∂xx f second-order partial deriva-
∆ partition diameter tive in x, x
∫ +∞ ∫b ∂2f
f dx, −∞f dx improper integral of ∂x2 second-order partial deriva-
a
the first kind tive in x, x
∫ +∞ fxm ,fx...x m-th order partial deriva-
−∞
f dx improper integral of the first
kind tive in x, . . . , x
∂mf
∞
{an }n=1 ,an numerical sequence ∂xm m-th order partial derivative
in x, . . . , x
lim an limit of sequence an
∑
n→∞ ∇f ,gradf gradient
an sum of sequence an , numer- Dv f directional derivative
ical series H(f ) Hessian matrix
∑+∞ ∫∫
∑∞ n=1 an numerical series ∫∫D f dA double integral over D
n f dxdy double integral over D
n=0 cn (x−a) power series
∫ bD ∫ d
lim f limit of function of two a
dx c f dy iterated integral
(x,y)→(a,b) ∂(φ,ψ)
variables Jacobian
(
∂(u,v) )
f → limit of function of two φu φv
(x,y)→(a,b) det Jacobian
∫ ψu ψv
variables
f dl line integral in arc length
lim lim f iterated limit of function of ∫C f dx line integral in x
y→b x→a ∫C
two variables C
f dy line integral in y
Mathematics
CounterExamples
CounterExamples
This book provides a one-semester undergraduate introduction to
counterexamples in calculus and analysis. It helps engineering, natu-
ral sciences, and mathematics students tackle commonly made er- From Elementary Calculus to
roneous conjectures. The book encourages students to think criti-
cally and analytically, and helps to reveal common errors in many the Beginnings of Analysis
examples.
In this book, the authors present an overview of important concepts
and results in calculus and real analysis by considering false state-
ments, which may appear to be true at first glance. The book cov-
ers topics concerning the functions of real variables, starting with
elementary properties, moving to limits and continuity, and then to
differentiation and integration. The first part of the book describes
single-variable functions, while the second part covers the functions
of two variables.
The many examples presented throughout the book typically start
at a very basic level and become more complex during the develop-
ment of exposition. At the end of each chapter, supplementary exer-
cises of different levels of complexity are provided, the most difficult
of them with a hint to the solution.
This book is intended for students who are interested in develop-
ing a deeper understanding of the topics of calculus. The gathered
Bourchtein
Bourchtein
counterexamples may also be used by calculus instructors in their
classes.
Andrei Bourchtein
K23601
Ludmila Bourchtein