Fundamentals of Analysis: Wwlchen
Fundamentals of Analysis: Wwlchen
Fundamentals of Analysis: Wwlchen
W W L CHEN
c
This chapter is available free to all individuals, on the understanding that it is not to be used for financial gain,
and may be downloaded and/or photocopied, with or without permission from the author.
However, this document may not be kept on any information storage and retrieval system without permission
from the author, unless such system is not accessible to any individuals other than its owners.
Chapter 5
DIFFERENTIATION
5.1. Introduction
We begin by recalling the familiar definition of differentiability.
Definition. We say that a function f (x) is differentiable at x = a if the limit
lim
xa
f (x) f (a)
xa
exists. In this case, the limit is denoted by f 0 (a) and called the derivative of f (x) at x = a.
Example 5.1.1. Consider the function f (x) = c, where c R is a constant. For every a R, we have
f (x) f (a)
=00
xa
as x a. It follows that f 0 (a) = 0 for every a R.
Example 5.1.2. Consider the function f (x) = x. For every a R, we have
f (x) f (a)
=11
xa
as x a. It follows that f 0 (a) = 1 for every a R.
Example 5.1.3. Consider the function f (x) = xn , where n 2 is an integer. For every a R, we have
f (x) f (a)
xn an
=
= xn1 + xn2 a + xn3 a2 + . . . + x2 an3 + xan2 + an1 nan1
xa
xa
as x a. It follows that f 0 (a) = nan1 for every a R.
Chapter 5 : Differentiation
page 1 of 16
Fundamentals of Analysis
x a
x a
1
1
=
=
xa
( x a)( x + a)
x+ a
2 a
a)
2
as x a. It follows that f 0 (a) = sin a for every a R.
Example 5.1.7. Consider the function f (x) = x1/3 . For every non-zero a R, we have
x1/3 a1/3
1
1
f (x) f (a)
=
= 2/3
2/3
1/3
1/3
2/3
xa
xa
x +x a +a
3a
as x a. It follows that f 0 (a) = 13 a2/3 for every non-zero a R. On the other hand, we note that
f (x) f (0)
x1/3
1
=
= 2/3
x0
x
x
does not tend to a limit as x 0, so that the function f (x) is not differentiable at x = 0.
Examples 5.1.3 and 5.1.7 above raise the question of determining derivatives of functions of the type
f (x) = xn , where n is a real number, not necessarily a positive integer. We state the following important
result.
THEOREM 5A. Suppose that n Q is a fixed rational number. Then for the function f (x) = xn , we
have f 0 (a) = nan1 for every a R, except for
(a) a = 0 and n < 1; or
(b) a 0 when n = p/q in lowest terms with p Z and even q N.
We shall leave the proof of this result until later in this section.
Example 5.1.8. Consider the function
f (x) =
x
0
if x Q,
if x R \ Q.
page 2 of 16
Fundamentals of Analysis
x
x
if x 0,
if x < 0.
1
1
if a > 0,
if a < 0,
so that f 0 (a) = 1 for every positive a R and f 0 (a) = 1 for every negative a R. On the other hand,
we note that
f (x) f (0)
x0
does not tend to a limit as x 0, so that the function f (x) is not differentiable at x = 0.
Suppose that a function f (x) is differentiable at x = a. Then
f (x) f (a)
f 0 (a)
xa
as x a. On the other hand, clearly the function x a 0 as x a. By the product rule of limits,
we have
f (x) f (a)
f (x) f (a) =
(x a) 0
xa
as x a. It follows that f (x) f (a) as x a. We have therefore established the following result.
THEOREM 5B. Suppose that a function f (x) is differentiable at x = a. Then f (x) is continuous at
x = a.
As is in the case of limits and continuity, we have the sum, product and quotient rules for derivatives.
We shall establish the following result.
THEOREM 5C. Suppose that the functions f (x) and g(x) are differentiable at x = a. Then
(a) f (x) + g(x) is differentiable at x = a;
(b) f (x)g(x) is differentiable at x = a; and
(c) if g(a) 6= 0, then f (x)/g(x) is differentiable at x = a.
Furthermore, we have
(a) (f + g)0 (a) = f 0 (a) + g 0 (a);
(b) (f g)0 (a) = f (a)g 0 (a) + f 0 (a)g(a); and
0
f
g(a)f 0 (a) f (a)g 0 (a)
(c)
(a) =
.
g
g 2 (a)
Proof. (a) Note that
(f (x) + g(x)) (f (a) + g(a))
f (x) f (a) g(x) g(a)
=
+
.
xa
xa
xa
It follows from Theorem 4C that
(f (x) + g(x)) (f (a) + g(a))
= f 0 (a) + g 0 (a).
xa
xa
lim
Chapter 5 : Differentiation
page 3 of 16
Fundamentals of Analysis
xa
f (x)g(x) f (a)g(a)
= f (a)g 0 (a) + g(a)f 0 (a).
xa
We now apply part (b) to f (x) and 1/g(x) to get the desired result.
Example 5.1.10. Consider the function f (x) = tan x. We know that
tan x =
sin x
.
cos x
It follows that for every a R such that cos a 6= 0, we have, by the quotient rule, that
f 0 (a) =
1
cos2 a + sin2 a
=
= sec2 a.
cos2 a
cos2 a
1
.
sin x
It follows that for every a R such that sin a 6= 0, we have, by the quotient rule, that
f 0 (a) =
0 cos a
= cot a csc a.
sin2 a
x3 sin x
.
x2 + 3
We can write f (x) = g(x)/h(x), where g(x) = x3 sin x and h(x) = x2 + 3. For every a R, we have
g 0 (a) = a3 cos a + 3a2 sin a and h0 (a) = 2a. It follows that
f 0 (a) =
Chapter 5 : Differentiation
Fundamentals of Analysis
From now on, we shall slightly abuse our notation, and simply refer to f 0 (x) as the derivative of the
function f (x). We shall further write
y = f (x)
and
dy
= f 0 (x).
dx
and
du
= 3x2 .
dx
Note that
dy du
= 6ux2 = 6x2 (x3 + 1).
du dx
We therefore have
dy
dy du
=
.
dx
du dx
THEOREM 5D. Suppose that y is a differentiable function of u, and that u is a differentiable function
of x. Then y is a differentiable function of x, and
dy
dy du
=
.
dx
du dx
Proof. Write y = g(u), u = f (x) and b = f (a). Then y = (g f )(x). Note that
(g f )(x) (g f )(a)
(g f )(x) (g f )(a) f (x) f (a)
g(u) g(b) f (x) f (a)
=
=
.
xa
f (x) f (a)
xa
ub
xa
Here it is tempting to deduce the conclusion immediately. However, it is possible that u b = 0. To
overcome this difficulty, let us introduce the function
g(u) g(b) if u 6= b,
G(u) =
ub
0
g (b)
if u = b.
Since g(u) is differentiable at u = b, we have G(u) g 0 (b) as u b. Furthermore, since G(b) = g 0 (b),
it follows that G(u) is continuous at u = b. On the other hand, as x a, we have u b, so that
G(u) g 0 (b). Hence
G(u) g 0 (b)
Chapter 5 : Differentiation
as x a.
page 5 of 16
Fundamentals of Analysis
xa
(g f )(x) (g f )(a)
= g 0 (b)f 0 (a) = g 0 (f (a))f 0 (a)
xa
as required.
Definitions.
(1) A function f (x) is said to be strictly increasing in the closed interval [A, B] if f (x1 ) < f (x2 )
whenever A x1 < x2 B.
(2) A function f (x) is said to be strictly decreasing in the closed interval [A, B] if f (x1 ) > f (x2 )
whenever A x1 < x2 B.
THEOREM 5E. Suppose that a function y = f (x) is continuous and strictly increasing in the closed
interval [A, B]. Suppose further that f (x) is differentiable at x = a for some a (A, B), with f (a) = b
and f 0 (a) 6= 0. Then the inverse function x = g(y) is differentiable at y = b, with
g 0 (b) =
1
f 0 (a)
Proof. The existence of the continuous and strictly increasing inverse function is a consequence of
Problem 5 for Chapter 4. Note next that
g(y) g(b)
xa
=
,
yb
f (x) f (a)
and that x a as y b, a consequence of the continuity of the inverse function.
Proof of Theorem 5A. The case when n is a positive integer has been studied in Examples 5.1.2 and
5.1.3. The case when n = 0 and a 6= 0 has been studied in Example 5.1.1. Suppose next that n is a
negative integer. Then n is a positive integer, and
f (x) f (a)
1
1
1
xn an
=
=
n
n
xa
xa x
a
(x a)xn an
xn1 + xn2 a + xn3 a2 + . . . + x2 an3 + xan2 + an1
=
xn an
n1
na
= nan1
a2n
as x a, provided that a 6= 0. Suppose now that n = p/q in lowest terms, where p Z and q N, and
where exceptions (a) and (b) do not hold. Then y = xn can be described by y = up and u = x1/q , so
that x = uq in particular. By Theorems 5D and 5E, we have
dy
dy du
dy dx
pup1
p
=
=
= q1 = upq = nxn1 .
dx
du dx
du du
qu
q
This completes the proof.
Example 5.1.14. Consider the function f (x) = cx , where c R is a fixed positive real number. Then
f (x) f (a)
cx ca
cxa 1
ch 1
=
= ca
ca lim
h0
xa
xa
xa
h
Chapter 5 : Differentiation
page 6 of 16
Fundamentals of Analysis
1
1
= .
g(b)
a
y = f (x)
Proof. Since f (x) is continuous in the closed interval [A, B], it follows from Theorem 4H that there
exist x1 , x2 [A, B] such that f (x1 ) f (x) f (x2 ) for every x [A, B].
Case 1. Suppose that both x1 and x2 are endpoints of the interval [A, B]. Since f (A) = f (B), it
follows that f (x) is constant in the interval [A, B], so that f 0 (c) = 0 for every c (A, B).
Case 2. Suppose that x1 (A, B). Then f (x) has a local minimum at x = x1 . We claim that
f 0 (x1 ) = 0. Suppose on the contrary that f 0 (x1 ) 6= 0. Without loss of generality, assume that
f 0 (x1 ) = lim
xx1
Chapter 5 : Differentiation
f (x) f (x1 )
> 0.
x x1
page 7 of 16
Fundamentals of Analysis
f
(x
)
1 < |f (x1 )|
x x1
2
so that
f (x) f (x1 )
>0
x x1
It follows that f (x) f (x1 ) < 0 if x1 < x < x1 , contradicting that f (x) has a local minimum at
x = x1 .
Case 3. Suppose that x2 (A, B). Then f (x) has a local maximum at x = x2 . A similar argument
as in Case 2 gives f 0 (x2 ) = 0.
Example 5.2.1. We can prove that between any two real roots of sin x = 0 must lie a real root of
cos x = 0. To do this, let f (x) = sin x, and let A < B be any two real roots of sin x = 0. Clearly
f (A) = f (B). Furthermore, all the other hypotheses of Rolles theorem are satisfied. It follows that
there exists c (A, B) such that f 0 (c) = 0. Note, however, that f 0 (x) = cos x.
Example 5.2.2. Consider the polynomial f (x) = x3 + 3x2 + 6x + 1. We can prove that the polynomial
equation f (x) = 0 has exactly one real root. Note that f (1) < 0 and f (1) > 0. Applying the
Intermediate value theorem to f (x) in the closed interval [1, 1], we know that there exists x0 (1, 1)
such that f (x0 ) = 0. It follows that the equation f (x) = 0 has at least one real root. Suppose that there
are more than one real root. Let A < B be two such roots. Then clearly f (A) = f (B). Applying Rolles
theorem with f (x) = x3 + 3x2 + 6x + 1 in the interval [A, B], we conclude that there exists c (A, B)
such that f 0 (c) = 0. Note, however, that f 0 (x) = 3x2 + 6x + 6 = 3(x2 + 2x + 1 + 1) = 3(x + 1)2 + 3 6= 0
for any x R.
The hypotheses of Rolles theorem are rather restrictive, in that we require the function to have equal
values at the two end-points of the interval in question. However, this restriction is only deceptive, as
we can use Rolles theorem to establish the following more general result.
THEOREM 5G. (MEAN VALUE THEOREM) Suppose that a function f (x) is continuous in the closed
interval [A, B], where A, B R with A < B. Suppose further that f 0 (a) exists for every a (A, B).
Then there exists c (A, B) such that f (B) f (A) = f 0 (c)(B A).
xxxxx
To understand the Mean value theorem, it is easiest to rewrite the conclusion as
f (B) f (A)
= f 0 (c).
BA
The left-hand side represents the slope of the line joining the points (A, f (A)) and (B, f (B)). It follows
that the theorem merely says that the tangent to the curve is sometimes parallel to this line.
y = f (x)
A
Chapter 5 : Differentiation
B
page 8 of 16
Fundamentals of Analysis
It is therefore clear that Rolles theorem is a special case of the Mean value theorem. We now show that
the Mean value theorem can be deduced fairly easily from Rolles theorem.
Proof of Theorem 5G. Consider the function
g(x) = f (x)
f (B) f (A)
(x A).
BA
Then clearly g(x) is continuous in the closed interval [A, B], g 0 (a) exists for every a (A, B) and
g(A) = g(B). It follows from Rolles theorem that there exists c (A, B) such that g 0 (c) = 0. Note now
that
g 0 (c) = f 0 (c)
f (B) f (A)
.
BA
= 0 in case (a),
f (x2 ) f (x1 ) = > 0 in case (b),
f (B) f (A)
.
g(B) g(A)
Here we observe that the denominator g(B) g(A) is non-zero, in view of Rolles theorem and the
assumption that g 0 (a) is non-zero for every a (A, B). Clearly h(x) is continuous in the closed interval
Chapter 5 : Differentiation
page 9 of 16
Fundamentals of Analysis
[A, B], h0 (a) exists for every a (A, B) and h(A) = h(B). It follows from Rolles theorem that there
exists c (A, B) such that h0 (c) = 0. Note now that
h0 (c)
f 0 (c)
f 0 (c) f (B) f (A)
=
k
=
.
g 0 (c)
g 0 (c)
g 0 (c)
g(B) g(A)
This completes the proof.
We are now in a position to establish the following important result.
Example 5.3.1. Consider the function f (x) = x2 . Since f 0 (x) = 2x for every x R, the only stationary
point is at x = 0. On the other hand, note that for every x 6= 0, we have f (x) = x2 > 0 = f (0). It
follows that there is a local minimum at x = 0.
Example 5.3.2. Consider the function f (x) = x3 . Since f 0 (x) = 3x2 for every x R, the only stationary
point is at x = 0. On the other hand, note that for every x < 0, we have f (x) = x3 < 0 = f (0), whereas
for every x > 0, we have f (x) = x3 > 0 = f (0). It follows that x = 0 does not represent a local minimum
or a local maximum.
To detect a local maximum or local minimum, we have the following result.
Chapter 5 : Differentiation
page 10 of 16
Fundamentals of Analysis
THEOREM 5L. Suppose that I is an open interval containing a. Suppose further that a function f (x)
is continuous in I, and differentiable at every x I, except possibly at x = a.
(a) If f 0 (x) > 0 for every x < a in I and f 0 (x) < 0 for every x > a in I, then the function f (x) has a
local maximum at x = a.
(b) If f 0 (x) < 0 for every x < a in I and f 0 (x) > 0 for every x > a in I, then the function f (x) has a
local minimum at x = a.
Proof. Suppose that x I and x 6= a. By the Mean value theorem, there exists a real number c in the
open interval with endpoints a and x such that f (x) f (a) = (x a)f 0 (c).
(a) Since f 0 (c) > 0 if x < a and f 0 (c) < 0 if x > a, we clearly have f (x) f (a) < 0. Hence f (x) has a
local maximum at x = a.
(b) Since f 0 (c) < 0 if x < a and f 0 (c) > 0 if x > a, we clearly have f (x) f (a) > 0. Hence f (x) has a
local minimum at x = a.
Example 5.3.3. Consider the function f (x) = 2x3 9x2 + 12x 5. Since
f 0 (x) = 6x2 18x + 12 = 6(x2 3x + 2) = 6(x 1)(x 2)
for every x R, it is clear that the only stationary points are at x = 1 and x = 2. To determine whether
either of these represents a local maximum or a local minimum, we study the function f 0 (x) more closely.
It is easy to see that
f 00 (a) = lim
f
(a)
2
xa
so that
f 0 (x) f 0 (a)
<0
xa
Now let I = (a , a + ). Then it is easy to see that f 0 (x) > 0 for every x < a in I and f 0 (x) < 0 for
every x > a in I. It now follows from Theorem 5L that f (x) has a local maximum at x = a.
Chapter 5 : Differentiation
page 11 of 16
Fundamentals of Analysis
Example 5.3.4. Consider the function f (x) = 2x3 9x2 + 12x 5, as discussed earlier in Example
5.3.3. Since
f 0 (x) = 6x2 18x + 12 = 6(x2 3x + 2) = 6(x 1)(x 2)
for every x R, it is clear that the only stationary points are at x = 1 and x = 2. On the other hand,
we have f 00 (x) = 12x 18 for every x R, so that f 00 (1) < 0 and f 00 (2) > 0. It follows that f (x) has a
local maximum at x = 1 and a local minimum at x = 2.
hn1 (n1)
hn (n)
h2 00
f (a) + . . . +
f
(a) +
f (a + h),
2!
(n 1)!
n!
tn
tn1 (n1)
f
(a) C,
(n 1)!
n!
(1)
page 12 of 16
Fundamentals of Analysis
where
Sn = f (a) + hf 0 (a) +
h2 00
hn1 (n1)
f (a) + . . . +
f
(a)
2!
(n 1)!
and
Rn =
hn (n)
f (a + h).
n!
(2)
X
hn (n)
f (a),
n!
n=0
X
xn (n)
f (0).
n!
n=0
(3)
Example 5.4.1. Consider the function f (x) = ex . Then f (x) has derivatives of all order, all equal to
ex . Note that f (n) (0) = 1 for every n N {0}. It follows that the Maclaurin series of the exponential
function is given by
ex =
X
xn
.
n!
n=0
(1)n1 (n 1)!
,
(1 + x)n
so that f (n) (0) = (1)n1 (n 1)!. Note also that f (0) = 0. It follows that the Maclaurin series for the
function is given by
log(1 + x) =
X
n=1
(1)n1
xn
.
n
page 13 of 16
Fundamentals of Analysis
so that
f (n) (0) = ( 1) . . . ( n + 1).
Note also that f (0) = 1. It follows that the Maclaurin series for the function is given by
(1 + x) =
X
( 1) . . . ( n + 1) n
x .
n!
n=1
n
X
n(n 1) . . . (n r + 1)
r=0
r!
xr .
Chapter 5 : Differentiation
page 14 of 16
Fundamentals of Analysis
x sin 1 if x 6= 0,
x
3. Let f (x) =
0
if x = 0.
a) Show that f (x) is continuous at x = 0.
b) Find the derivative of f (x) when x 6= 0.
c) Show that f (x) is not differentiable at x = 0.
x2 sin 1 if x 6= 0,
x
4. Let f (x) =
0
if x = 0.
a) Prove that f 0 (x) exists for every real number x.
b) Find f 0 (0).
c) Find f 0 (x) when x 6= 0.
d) Prove that f 0 (x) is not continuous at x = 0.
5. Construct a function g(x) for which g 0 (0) > 0, but there is no interval (A, A) in which g(x) is a
strictly increasing function.
[Hint: Try g(x) = f (x) + kx, where k is a suitable constant and f (x) is given in Problem 4.]
6. Consider the function f (x) = |x| 3.
a) Show that f (x) is differentiable at x = a for every non-zero a R.
b) Comment in view of Theorem 5L.
7. Suppose that the function f (x) satisfies f (0) = 0, f 0 (0) = 0 and f 00 (0) > 0.
f 0 (x) f 0 (0)
a) Explain why there exists > 0 such that
> 0 for every non-zero x (, ).
x0
b) Deduce that f 0 (x) > 0 for every x (0, ), and that f 0 (x) < 0 for every x (, 0).
c) Use Rolles theorem to show that f (x) 6= 0 for every non-zero x (, ).
d) Use the Mean value theorem to show that f (x) > 0 for every non-zero x (, ).
8. Consider the function f (x) = x2/3 in the closed interval [1, 1].
a) Show that f (1) = f (1).
b) Show that there is no number c (1, 1) such that f 0 (c) = 0.
c) Show that f (x) is not differentiable at x = 0.
d) Explain why the conclusion of Rolles theorem does not hold.
Chapter 5 : Differentiation
page 15 of 16
Fundamentals of Analysis
x
= 0 has exactly one real root.
2
12. Use the Mean Value Theorem to prove the inequality | sin A sin B| |A B| for all real numbers
A and B.
13. Let f (x) = tan x x. Find f (0) and use the derivative f 0 (x) to prove that tan x > x for every x
satisfying 0 < x < /2.
14. Suppose that p(x) is a polynomial, and that k R is a constant. Suppose further that A < B are
consecutive roots of the equation p(x) = 0.
a) Write p(x) = (x A)m (x B)n q(x), where q(A) 6= 0 and q(B) 6= 0. Prove that if we write
p0 (x) = (x A)m1 (x B)n1 r(x), then r(A) and r(B) have opposite signs.
b) Hence, or otherwise, prove that there is a root of the equation p0 (x) + kp(x) = 0 in the interval
[A, B].
15. Suppose that a function f (x) is differentiable at every x [A, B]. Prove that f 0 (x) takes every
value between f 0 (A) and f 0 (B).
16. Use LHopitals rule to find each of the following:
x sin x
b) lim+ x2x
a) lim
x0
x3
x0
c) lim
x0
tan x x
x3
17. Find the Maclaurin expansion of the functions sin x and cos x.
18. Find all the terms up to and including x3 in the Taylor expansion of each of the following functions:
a) f (x) = (x + 1) sin x
b) f (x) = ex cos x
c) f (x) = tan x
Chapter 5 : Differentiation
page 16 of 16