1differentiation Ex Empty
1differentiation Ex Empty
Environment
1 Differentiation
Dr Bob He
1 / 93
Outline
2 / 93
§1 Limit and Continuity
Definition 1
Let c ∈ R and let f (x) be a function defined on an open interval
containing the point c, except possibly at c. If f (x) is arbitrarily
close to L for all x sufficiently close to c, f is said to approach the
limit L as x approaches c, denoted by
L
L
c x c x
y y
L
L
c x c x
About lim f (x): Upper Left: the limit exists; Upper Right, Lower
x→c
Left, and Lower Right: the limits do not exist.
4 / 93
y y y
L′
L L L
c x c x c x
Theorem 4
Constant functions are continuous.
Polynomials are continuous everywhere.
P(x)
Rational functions f (x) = Q(x) are continuous where
Q(x) ̸= 0.
sin x and cos x are continuous everywhere.
e x is continuous everywhere.
ln x is continuous on (0, ∞).
6 / 93
Theorem 5 (Limit Laws)
Let f and g be two functions so that
then
1. lim f (x) ± g (x) = A ± B;
x→c
2. lim kf (x) = kA, where k ∈ R is a constant;
x→c
3. lim [f (x)g (x)] = AB;
x→c
f (x) A
4. lim = , provided B ̸= 0;
g (x)
x→c B
5. lim f n (x) = An , n > 0;
x→c
6. if f is continuous at c, lim f (x) = f (c).
x→c
7 / 93
Limit of Polynomials
Example 6
Let
x 2 + 2, x ̸= 2,
f (x) =
8, x = 2.
8 / 93
Limit of Rational Functions
Example 7
x 2 − 3x + 5
Find lim .
x→−1 x −4
9 / 93
Eliminating Zero Denominators
Example 8
x2 − 4
Find lim .
x→2 x − 2
10 / 93
Example 9
x 3 + x 2 − 3x + 1
Find lim .
x→1 x −1
11 / 93
Example 10
1 4
Evaluate lim − .
x→2 x − 2 x2 − 4
12 / 93
Example 11
Given that the function
x 2 + 3x − 10
f (x) = , if x ̸= 2
p, x − 2
if x = 2
13 / 93
One-Sided Limits
Definition 12
lim f (x) = L: the left hand limit, meaning that when x
x→c −
approaches c from left, f (x) → L.
lim f (x) = L: the right hand limit, meaning that when x
x→c +
approaches c from right, f (x) → L.
Theorem 13
That is, the limit of f at c exists if and only if both the left and
the right limit of f at c exsit and they are both equal to L.
14 / 93
Example 14
x < π2 ,
sin x,
f (x) =
sin x + 1, x > π2 .
y
− π2
π x
2
15 / 93
Example 15
Let
x 2,
x < 0,
f (x) =
x + 1, x > 0.
16 / 93
Example 16
For
x 2 + 2x − 1
f (x) = , if x > 1,
3x +x +2
4 , if x < 1,
find lim+ f (x) and lim f (x).
x→1 x→1−
17 / 93
Example 17
Let
3x 2 − 1,
if x < 0
f (x) = cx + d, if 0 ⩽ x ⩽ 1
√
x + 8, if x > 1
Determine the constants c and d such that f is continuous
everywhere.
18 / 93
Infinity Limit
Example 18
1 1
Find lim 2 and lim .
x→0 x x→0 x
19 / 93
Limit with Square Root
Example 19
√
x2 + 9 − 3
Find lim .
x→0 x2
20 / 93
Example 20
√ √
x +3− 3
Evaluate lim .
x→0 x
21 / 93
Sandwich Principle
y
Theorem 21
Suppose f (x) ≤ g (x) ≤ h(x)
and
then
lim g (x) = L.
x→c x
22 / 93
Example 22
1
Find lim x sin .
x→0 x
23 / 93
Limits at Infinity
Theorem 23
1
For n > 0, lim x n = ∞ and lim = 0.
x→∞ x→∞ xn
Example 24
2x + 3 2x 2 + 3 2x 3 + 3
Find lim , lim , lim .
x→∞ x 2 + x + 2 x→∞ x 2 + x + 2 x→∞ x 2 + x + 2
24 / 93
Example 25
Find
p
lim ( x 2 + 1 − x).
x→∞
25 / 93
Example 26
Find
p
lim ( x 2 + x − x).
x→∞
26 / 93
§2 Derivative
Definition 27 (First Principle)
Let f be a function defined on (a, b). We say that f is
differentiable at x0 ∈ (a, b) if the limit
e
lin
t
an
sec
f (x0 + ∆x)
nt line
f (x0 ) tange
x
x0
x0 + ∆x
28 / 93
y
s
ne
t li
an
sec
nt line
tange
x
x0
Geometrically, f ′ (x0 ) is the slope of the tangent line to the graph
of f at (x0 , f (x0 )) if the tangent line exists and is not vertical.
29 / 93
Derivative Function
Definition 29
Let f be a function defined on (a, b). The derivative of f is the
function f ′ (or equivalently, dx
df
), such that
Dom(f ′ ) = {x : x ∈ (a, b), and f is differentiable at x},
f (x + ∆x) − f (x)
f ′ (x) = lim .
∆x→0 ∆x
Physical Interpretation
For t > 0, let f (t) denote the distance a car has traveled at time t.
During a time span [t, t + ∆t], the distance the car travels is
f (t + ∆t) − f (t).
f (t+∆t)−f (t)
average velocity of the car during [t, t + ∆t]: ∆t
the instantaneous velocity of the car at the instant t: f ′ (t).
30 / 93
Computing the Derivatives
1. Compute ∆y = f (x + ∆x) − f (x)
∆y
2. Form difference quotient
∆x
′ ∆y
3. Take limit f (x) = lim
∆x→0 ∆x
Example 30
Compute f ′ (x) for f (x) = ax + b.
31 / 93
Example 31
Compute f ′ (x) for f (x) = x 2 .
32 / 93
Example 32
Compute f ′ (x) for f (x) = 1/x.
33 / 93
Trigonometric Identities
35 / 93
Example 34
Compute f ′ (x) for f (x) = sin x ◦ .
36 / 93
One-Sided Derivative
Fact
f ′ (x0 ) exists if and only if f+′ (x0 ) and f−′ (x0 ) both exist and are
equal, in which case f ′ (x0 ) = f+′ (x0 ) = f−′ (x0 ).
37 / 93
Example 35
For f (x) = |x|, find f ′ (0).
38 / 93
Example 36
Let
4x 2 + 1,
if x ≤ 0,
f (x) =
ax + b, if x > 0.
39 / 93
Example 37
A function f is defined as follows:
2 sin x + 5, if x ⩽ 0
f (x) =
ax + b, if x > 0
40 / 93
§3 Rules of Differentiation
Theorem 38
let f and g be functions differentiable at a point x. Then the same is
f
true for the functions f ± g , fg , and (with g (x) ̸= 0). In particular, we
g
have:
[sum/difference]. (f ± g )′ (x) = f ′ (x) ± g ′ (x).
[product]. (fg )′ (x) = f (x)g ′ (x) + f ′ (x)g (x), in particular,
(cf )′ = cf ′ for any constant c.
′
f g (x)f ′ (x) − f (x)g ′ (x)
[quotient]. (x) = .
g (g (x))2
41 / 93
As an example, we prove (fg )′ (x) = f (x)g ′ (x) + f ′ (x)g (x) below.
42 / 93
Example 39
Find the derivatives of
f (x) = 4x 4 + 5x 2 − x + 1
6 2
g (x) = 3 −
x x
3x − 2
h(x) = 3
x +6
43 / 93
Some notations: if y = f (x) is a differentiable function of x, then
dy
f ′ (a) = = f ′ (x)|x=a .
dx x=a
Example 40
Suppose g is differentiable at x = 3, F (x) = (x 2 + 5)g (x). If
g (3) = 4 and g ′ (3) = −2, find F ′ (3).
44 / 93
Example 41
1
Let f (x) = . Find f ′ (1).
3x 2 + 2x − 1
Recall that
′
u ′ (x)v (x) − v ′ (x)u(x)
u(x)
=
v (x) v 2 (x)
45 / 93
Theorem 42
We have
d d d
sin x = cos x, cos x = − sin x, tan x = sec2 x,
dx dx dx
d d d
cot x = − csc2 x, csc x = − cot x csc x, sec x = sec x tan x.
dx dx dx
d
Recall we already proved dx sin x = cos x. The derivative
d
dx cos x = − sin x can be obtained in the similar way. Then we have
′
cos2 x + sin2 x
d tan x sin x
= = = sec2 x,
dx cos x cos2 x
d cot x cos x ′ − sin2 x − cos2 x
= = = − csc2 x,
dx sin x sin2 x
′
d csc x 1 − cos x
= = = − cot x csc x,
dx sin x sin2 x
′
d sec x 1 sin x
= = = tan x sec x
dx cos x cos2 x
46 / 93
Example 43
d
Find [cos x sin x] .
dx x= π2
47 / 93
The Chain Rule
48 / 93
Example 45
Find (sin(x 3 + 3x − 10))′ .
49 / 93
Example 46
Find ((x 3 + 1)1000 )′ .
50 / 93
Example 47
Find the derivative of g (x) = tan(4 − sin(2x)).
51 / 93
Example 48
Given f (4) = 2, f ′ (4) = 3, g (1) = 4, g ′ (1) = 5, and h(x) = f (g (x))
find h(1) and h′ (1).
52 / 93
§4 Logarithmic and Exponential Functions
Theorem 49
Let e = 2.71828 . . . be the base of the natural logarithm. Let
ln x = loge x. One has
d 1 d x
ln(x) = , and e = ex .
dx x dx
y
n( x)
y=l y
1 y = ex
y = (ln x)′ = 1
x
1 e x
(x)
y = ln
53 / 93
Example 50
Find the derivative of f (x) = ln(x 3 + 1).
54 / 93
Example 51
Find the derivative of f (x) = sin(ln x).
55 / 93
Example 52
dy
Let y = f (x)g (x) , find .
dx
56 / 93
Example 53
d 3x d e d x
Find the derivatives: (a) dx e , (b) dx x , (c) dx x (x > 0).
57 / 93
Example 54
Suppose x > 1, find the derivative of y = (ln x)ln x .
58 / 93
Example 55
Find the derivatives of (a) ax ; (b) loga x.
59 / 93
§5 Differentiation of Inverse function
60 / 93
Inverse Trigonometric Functions
y
π
2
y = f (x) = sin(x) is 1-1 on 1
− π2 ≤ x ≤ π2 .
− π2 −1 x
Therefore there exists an
π
inverse function 1 2
y = f −1 (x) : −1
h π πi
[−1, 1] → − , − π2
2 2
We denote this function by Figure: Graph of y = sin(x) (in red),
y = arcsin(x) = sin−1 (x). and y = arcsin(x) (in blue). We see
that the graph of arcsin(x) is obtained
by reflecting the graph of sin(x) on
[− π2 , π2 ] about the line y = x.
61 / 93
y
π
62 / 93
y
y = f (x)
= tan(x) is 1-1 on
π
2
π π
−2, 2 .
Therefore there exists an − π2 π
2
x
inverse function
- π2
−1
y =f
(x) :
π π
(−∞, ∞) → − ,
2 2
We denote this function by Figure: Graph of y = tan(x) (in red),
y = arctan(x) = tan−1 (x). and y = arctan(x) (in blue). We see
that the graph of arctan(x) is obtained
by reflecting the graph of tan(x) on
− π2 , π2 about the line y = x.
63 / 93
Theorem 58
Suppose f is a function differentiable on (a, b), and f ′ (x0 ) ̸= 0 for
some x0 ∈ (a, b) with y0 = f (x0 ). If f −1 exists, then
1
(f −1 )′ (y0 ) = .
f ′ (x 0)
64 / 93
Example 59
Find (arcsin x)′ .
65 / 93
Example 60
Find (arccos x)′ .
66 / 93
Example 61
Find (arctan x)′ .
67 / 93
Example 62
Let f (x) = 2x + cos x. Given the fact that f (x) is one-to-one, find
(f −1 )′ (1).
68 / 93
§6 L’Hospital’s Rule
Theorem 63 (L’Hospital’s Rule)
Suppose f and g are differentiable and g ′ (x) ̸= 0 on an open interval I
that contains a (except possibly at a). Suppose that
or that
0 ∞
(in other words, we have an indeterminate form of type 0 or ∞ ). Then
f (x) f ′ (x)
lim = lim ′ ,
x→a g (x) x→a g (x)
71 / 93
Example 64
Find
ln x ln x
(a) lim , (b) lim .
x→1 x − 1 x→2 x − 1
72 / 93
Example 65
Find
ex
lim .
x→∞ x 2
73 / 93
Example 66
Calculate
ln x
lim √ .
x→∞ 3 x
74 / 93
Example 67
Find the following limits
sin x sin x sin x
lim ; lim ; lim .
x→0 x x→0+ 1 − cos x x→π − 1 − cos x
75 / 93
Indeterminate Products
Example 68
Find the following limits.
lim x ln x
x→0+
76 / 93
Example 69
Find the limit
lim xe x
x→−∞
77 / 93
Indeterminate Differences
Example 70
Compute
1
lim − tan x .
x→(π/2)− cos x
78 / 93
Example 71
p
3
lim x 3 − 3x 2 − x
x→∞
79 / 93
Indeterminate Powers
80 / 93
Example 72
Compute lim+ x x .
x→0
1
y = xx
x
81 / 93
Example 73
1
Compute lim (1 − x) x .
x→0
82 / 93
Example 74 (Avoid Unnecessary Derivatives)
Find the following limit
83 / 93
§7 Monotonicity and Relative Extremum
Definition 75
Let I be an open interval.
A function y = f (x) is increasing (strictly increasing) on I
if y increases as x increases on I . That is, if x2 > x1 , then
f (x2 ) ⩾ f (x1 )(f (x2 ) > f (x1 )).
A function y = f (x) is decreasing (strictly decreasing) on I
if y decreases as x increases on I . That is, if x2 > x1 , then
f (x2 ) ⩽ f (x1 )(f (x2 ) < f (x1 )).
y y
y1
y2
y1 y2
O x1 x2 xO x1 x2 x
An increasing function. An decreasing function.
84 / 93
Increasing and decreasing functions
Theorem 76
Let f be differentiable on an interval I .
If f ′ (x) ⩾ 0 (or ⩽ 0) for every x ∈ I , then f is increasing (or
decreasing) on I .
If f ′ (x) > 0 (or < 0) for every x ∈ I , then f is strictly
increasing (or strictly decreasing) on I .
If f ′ (x) = 0 for every x ∈ I , then f is identically equal to a
constant on I .
85 / 93
Example 77
Prove that the following functions have inverses.
(a). f (x) = 2x + cos x;
(b). h(x) = x 5 + sin x on (− π2 , π2 ).
86 / 93
Relative Extremum
Definition 78
Consider a function y = f (x) and a point a in the domain of f .
f (a) is called a relative (or local) maximum if f (a) ⩾ f (x)
for all x in an open interval containing a (in other words, for
all x close enough to a).
The definition for a relative (or local) minimum if
f (a) ⩽ f (x) for all x in an open interval containing a.
We say f (x) has a relative extremum at a if it has either a
relative maximum or a relative minimum at a.
x1 x2 x3 x4 x
87 / 93
First Derivative Test
Definition 79 (Stationary Point)
Theorem 80
Assume f (x) is differentiable in an interval I containing a point a
and f ′ (a) = 0, namely a is a stationary point of the function f .
If f ′ (x) changes sign from + to − as x increases through
x = a, then f (x) has a relative maximum at a.
If f ′ (x) changes sign from − to + as x increases through
x = a, then f (x) has a relative minimum at a.
D D
y y
.0/
.C/
✹
. /
.C/
. / ✺
.0/
a x a x
(a) Local maximum at a. (b) Local minimum at a.
Slope changes sign from C to . Slope changes sign from to C. 88 / 93
Example 81
Find the relative extrema of y = x 3 − 9x 2 + 24x + 5.
89 / 93
§8 Higher Derivatives
Suppose y = f (x) is differentiable, then f ′ (x), the derivative, is
also a function. If f ′ (x) has a derivative of its own, we denote it by
f ′′ (x) and call it the second derivative of f (x).
Using the Leibniz notation, we have
d 2y
d dy
=
dx dx dx 2
Similarly, we write
d2 d 3y
′′′ ′′′ d
y = f (x) = y = .
dx dx 2 dx 3
The process can be continued. The fourth derivative f ′′′′ (x) is
usually denoted by f (4) (x). In general, the nth derivative of f (x) is
denoted by f (n) (x).
d ny
y (n) = f (n) (x) = .
dx n
90 / 93
Second Derivative
For t > 0, let f (t) denote the distance a car has traveled at time t.
Then f ′ (t) is the velocity of the car at the instant t and f ′′ (t) is
the acceleration of the car at the instant t.
91 / 93
Example 82
Let f (x) = x 3 − x. Find f ′ (x), f ′′ (x), f ′′′ (x), and f (4) (x).
92 / 93
Example 83
Let f (x) = cos x. Find f ′ (x), f ′′ (x), f ′′′ (x), and f (4) (x).
93 / 93