Professional Documents
Culture Documents
Chap 1
Chap 1
Wang Fei
matwf@nus.edu.sg
Department of Mathematics
Office: S17-06-16
Tel: 6516-2937
1
Chapter 2:
Derivatives with Applications 2 / 101
y ∆y
Q mP Q =
• (a + h)2 ∆x
Q
• (a + h)2 − a2
=
Q h
•
Q
•
P
b
a2
O a x
a+h
3 / 101
Definition of Derivative
• The derivative of a function f at a number a is
f (a + h) − f (a)
f ′ (a) := lim .
h→0 h
◦ f is differentiable at a if f ′ (a) exists.
◦ f ′ (a) is the slope of y = f (x) at x = a.
• Let x = a + h. Then h = x − a, and h → 0 ⇔ x → a. We may use an equivalent definition:
f (x) − f (a)
f ′ (a) := lim .
x→a x−a
• The tangent line to y = f (x) at (a, f (a)) is the line passing through (a, f (a)) with slope f ′ (a):
4 / 101
2
Examples of Derivatives
• Let f (x) = x2 − 8x + 9. Find f ′ (3).
f (3 + h) − f (3)
f ′ (3) = lim
h→0 h
[(3 + h)2 − 8(3 + h) + 9] − (32 − 8 · 3 + 9)
= lim
h→0 h
2
(−6 − 2h + h ) − (−6)
= lim
h→0 h
2
−2h + h
= lim = lim (−2 + h) = −2.
h→0 h h→0
That is, 2x + y = 0.
5 / 101
Examples of Derivatives
x sin x1 , if x 6= 0,
2
• Let f (x) = Find f ′ (0).
0, if x = 0.
f (h + 0) − f (0)
f ′ (0) = lim
h→0 h
h2 sin h1 − 0
= lim
h→0
h
1
= lim h sin
h→0 h
= 0.
6 / 101
3
Velocity
• Let s = s(t) be the position function of a particle.
◦ instantaneous velocity at time t = a: s′ (a);
◦ speed at time t = a: |s′ (a)|.
• Example. A ball is dropped from a tower 450m above the ground. Find its velocity after 5
seconds.
Example
1
• Let f (x) = . Find f ′ (a) at each a ∈ R\{0}.
x
f (a + h) − f (a)
f ′ (a) = lim
h→0 h
1 1
−
= lim a+h a
h→0 h
−h
(a+h)a
= lim
h→0 h
−1
= lim
h→0 (a + h)a
1
= − 2.
a
◦ f ′ is therefore a function defined on R\{0}.
8 / 101
4
Derivative as a Function
• The derivative of f at point x = a:
f (a + h) − f (a)
f ′ (a) = lim .
h→0 h
• The derivative of f as a function:
f (x + h) − f (x)
f ′ (x) = lim .
h→0 h
dy df d
◦ f ′ (x) = y ′ = = = f (x) = Dx f (x) = · · ·
dx dx dx
dy ∆y
◦ := lim (Leibniz, 1646–1716, German)
dx ∆x→0 ∆x
dy
◦ f (a) =
′
.
dx x=a
1 1
• Example. If f (x) = , then f ′ (x) = − 2 .
x x
9 / 101
Examples
1−x
• Let f (x) = .
2+x
f (x + h) − f (x)
f ′ (x) = lim
h→0 h
1−(x+h)
2+(x+h)
− 1−x
2+x
= lim
h→0 h
−3h
= lim
h→0 h(2 + (x + h))(2 + x)
−3
= lim
h→0 (2 + (x + h))(2 + x)
−3
= .
(2 + x)2
◦ Domain of f : R\{−2}; Domain of f ′ : R\{−2}.
10 / 101
5
Examples
√
• Let f (x) = x, (x ≥ 0). Find f ′ .
f (x + h) − f (x)
f ′ (x) = lim
h→0
√ h
√
x+h− x
= lim
√ h
h→0
√ √ √
( x + h − x)( x + h + x)
= lim √ √
h→0 h( x + h + x)
h
= lim √ √
h→0 h( x + h + x)
1 1
= lim √ √ = √ (x > 0).
h→0 x+h+ x 2 x
11 / 101
Differentiable Functions
• Definition. (We only consider the differentiability at a point or on open intervals)
◦ f is differentiable at a if
f (a + h) − f (a)
f ′ (a) := lim exists.
h→0 h
12 / 101
6
Differentiability Implies Continuity
• Theorem. If f is differentiable at a, then f is continuous at a.
Therefore, f is continuous at a.
13 / 101
Differentiation Formulas
• Let c be a constant.
(c)′ = 0.
d c−c
◦ (c) = lim = lim 0 = 0.
dx h→0 h h→0
cf (x + h) − cf (x)
(cf )′(x) = lim
h→0
h
f (x + h) − f (x)
= lim c
h→0 h
f (x + h) − f (x)
= c lim
h→0 h
= cf ′ (x).
∴ (cf )′ = cf ′ .
14 / 101
7
Differentiation Formulas
• Let f and g be differentiable functions.
(f + g)(x + h) − (f + g)(x)
(f + g)′(x) = lim
h→0 h
[f (x + h) + g(x + h)] − [f (x) + g(x)]
= lim
h→0 h
[f (x + h) − f (x)] + [g(x + h) − g(x)]
= lim
h→0 h
f (x + h) − f (x) g(x + h) − g(x)
= lim + lim
h→0 h h→0 h
′ ′
= f (x) + g (x).
∴ (f + g)′ = f ′ + g ′ .
(f − g)′ = [f + (−g)]′ = f ′ + (−g)′ = f ′ + (−g ′ )
= f ′ − g ′.
15 / 101
Differentiation Formulas
• Let f and g be differentiable functions. What is (f g)′ ?
d [f (x + h)]2 − [f (x)]2
[f (x)]2 = lim
dx h→0 h
[f (x + h) − f (x)] · [f (x + h) + f (x)]
= lim
h→0 h
f (x + h) − f (x)
= lim · lim [f (x + h) + f (x)]
h→0 h h→0
′
= f (x) · [f (x) + f (x)] (∵ f is continuous)
= 2f ′(x)f (x).
8
Differentiation Formulas
• Let f and g be differentiable functions. What is (f /g)′ ?
Suppose g(x) 6= 0.
1 1
′
1 g
(x + h) − g
(x)
(x) = lim
g h→0 h
1 1 g(x)−g(x+h)
g(x+h)
− g(x) g(x)g(x+h)
= lim = lim
h→0
h h→0 h
g(x + h) − g(x) −1
= lim ·
h→0 h g(x)g(x + h)
g(x + h) − g(x) −1
= lim · lim
h→0 h h→0 g(x)g(x + h)
′
−1 g
= g ′ (x) · 2
= − 2 (x).
[g(x)] g
17 / 101
Differentiation Formulas
• Let f and g be differentiable functions. What is (f /g)′ ?
Suppose g(x) 6= 0.
′ ′ ′
f 1 ′ 1 1
= f· =f · +f ·
g g g g
f ′
f · (−g )
′
= +
g g2
f ′g − f g′
= .
g2
◦ (cf )′ = cf ′
◦ (f ± g)′ = f ′ ± g ′
◦ (f g)′ = f ′ g + f g ′
′
f f ′g − f g′
◦ = , if g(x) 6= 0.
g g2
18 / 101
9
The Chain Rule
√
• Let F (x) = x2 + 1. Find F ′ .
p √
′ (x + h)2 + 1 − x2 + 1
F (x) = lim
p
h→0 h
√ p √
( (x + h)2 + 1 − x2 + 1)( (x + h)2 + 1 + x2 + 1)
= lim p √
h→0 h( (x + h)2 + 1 + x2 + 1)
(x + h)2 + 1 − (x2 + 1)
= lim p √
h→0 h( (x + h)2 + 1 + x2 + 1)
2xh + h2
= lim p √
h→0 h( (x + h)2 + 1 + x2 + 1)
2x + h
= lim p √
h→0 (x + h)2 + 1 + x2 + 1
2x x
= √ =√ .
2
2 x +1 2
x +1
19 / 101
dz dz dy 2x
F ′ (x) = = = f ′ (g(x))g ′(x) = √ .
dx dy dx 2 x2 + 1
Question. Can we always differentiate the composite of differentiable functions using this
method?
20 / 101
10
The Chain Rule
• Theorem. Let f and g be differentiable functions.
Then F = f ◦ g is differentiable and
F ′ = (f ′ ◦ g)(g ′).
More precisely,
if g is differentiable at a and f is differentiable at b = g(a), then F = f ◦ g is differentiable at a and
dz dz dy dz dz dy
= , or in short = .
dx x=a dy y=b dx x=a dx dy dx
21 / 101
Formulas of Derivatives
d a
• x = axa−1 .
dx
d d
• sin x = cos x, cos x = − sin x;
dx dx
d d
tan x = sec2 x, cot x = − csc2 x;
dx dx
d d
sec x = sec x tan x, csc x = − csc x cot x.
dx dx
d 1 d 1
• sin−1 x = √ , cos−1 x = − √ .
dx 1 − x2 dx 1 − x2
d 1 d 1
tan−1 x = 2
, cot−1 x = − .
dx 1+x dx 1 + x2
d 1 d 1
sec−1 x = √ , csc−1 x = − √ .
dx x x − 1 dx
2 x x2 − 1
d x d 1
• e = ex , ln |x| =
dx dx x
22 / 101
11
Examples
√
d x+1
• ln 2x .
dx e cos4 5x
√
x+1 1
◦ ln 2x 4
= ln(x + 1) − 2x − 4 ln | cos 5x|.
e cos√ 5x 2
d x+1 1 4
◦ ln 2x 4
= −2− · (−5 sin 5x)
dx e cos 5x 2(x + 1) cos 5x
1
= − 2 + 20 tan 5x.
2(x + 1)
d −1 1
• x sin .
dx x
d −1 1 1 1
◦ x sin = 1 · sin−1 + x · q · (−x−2 )
dx x x 1 2
1 − (x)
1 1
= sin−1 − q .
x x 1− 1
x2
23 / 101
Implicit Differentiation
• How to find the slope of the tangent line to the unit circle x2 + y 2 = 1 at a point P (x0 , y0 ) on the
circle?
y
B
P (x0 , y0 )
b
1
x
O 1 A
◦ AB ⊥ OP ⇒ (slope of AB)(slope of OP ) = −1
y0 x0
y ′ P · = −1 ⇒ y ′P = − .
x0 y0
24 / 101
12
Implicit Differentiation
• How to find the slope of the tangent line to the unit circle x2 + y 2 = 1 at a point P (x0 , y0 ) on the
circle?
◦ Given that 1 = x2 + y 2 .
Differentiate both sides with respect to x.
d d 2
(1) = (x + y 2 ).
dx dx
That is,
d 2 d dy 2 dy
0= (x ) + (y 2) = 2x +
dx dx dy dx
dy
= 2x + 2y .
dx
dy 2x x dy x0
=− =− ⇒ =− .
dx 2y y dx P y0
25 / 101
Implicit Differentiation
• In general, we may not have a function y = f (x).
Instead, it may be an equation
f (x, y) = 0.
dy
We can still find y ′ = as follow:
dx
1). Differentiate f (x, y) with respect to x;
d dy
2). Solve the equation f (x, y) = 0 to express in terms of x and y .
dx dx
• The method introduced is called implicit differentiation.
dy
Remark. In other to use the method of implicit differentiation, we shall first assume that exists.
dx
26 / 101
13
Examples
dy
• Find if x3 + y 3 = 3xy .
dx
y ◦ Differentiate
x3 + y 3 = 3xy
O x with respect to x:
(x3 )′ = 3x2
(y 3 )′ = 3y 2 y ′
(xy)′ = x′ y + xy ′ = y + xy ′
3x2 + 3y 2y ′ = 3(y + xy ′ )
x2 − y √
3
√
3
◦ Solve y ′ : y ′ = 2
, (x, y) =
6 (0, 0), ( 4, 2).
x−y
27 / 101
• Recall that y = f (x) ⇔ f −1 (y) = x. We can thus apply the following procedure:
1. Write y = f (x).
2. Solve the equation for x in terms of y : x = f −1 (y).
3. Interchanging x and y to express f −1 as a function in variable x: y = f −1 (x).
• Interchanging x and y has the same effect as the reflection with respect to y = x.
◦ So the graphs of f and f −1 are symmetric with respect to the straight line y = x.
28 / 101
14
Examples
√
• Find inverse of f (x) = x3 + 2 and g(x) = −1 − x.
3
1. Let y = f (x) = x + 2.
√
2. Solve x in terms of y : x = 3
y − 2.
√
3
3. Interchange x and y : f −1 (x) = y = x − 2.
√
1. Let y = g(x) = −1 − x, (x ≤ −1).
2. Solve x in terms of y : x = −y 2 − 1, (y ≥ 0).
3. Interchange x and y : g −1 (x) = −x2 − 1, (x ≥ 0).
y y
y = f (x)
y = f −1 (x) O x
y = g(x)
O x
y = g −1 (x)
29 / 101
30 / 101
15
Calculus of Inverse Functions
• Theorem. Let f be a one to one continuous function defined on an interval.
◦ If f is differentiable at a, and f ′ (a) 6= 0,
◦ then f −1 is differentiable at b = f (a),
1
and (f −1 )′ (b) = .
f ′ (a)
y
y = f (x)
b (a, b)
y = f −1 (x)
(b, a)
b
O x
31 / 101
Example
• Let f (x) = x2 on [0, 2]. Find (f −1 )′ (1).
√ 1
◦ Method 1: (f −1 )(x) = x. Then (f −1 )′ (x) = √ .
2 x
1 1
• (f ) (1) = √
−1 ′
= .
2 x x=1 2
◦ Method 2: f (1) = 1, and f ′ (x) = 2x. Then
1 1
• (f ) (1) = ′ = .
−1 ′
f (1) 2
y
y = x2
√
y= x
O x
• The advantage of Method 2 is that we can find (f −1 )′ without knowing the explicit expression of
f −1 .
32 / 101
16
Derivative of Trigonometric Functions
• Recall the inverse sine function sin−1 x : [−1, 1] → [− π2 , π2 ]. What is (sin−1 x)′ ?
◦ Let y = sin−1 x ∈ [− π2 , π2 ]. Then sin y = x.
p √
cos y ≥ 0 ⇒ cos y = 1 − sin2 y = 1 − x2 .
1 1 1
∴ (sin−1 x)′ = = =√ , −1 < x < 1.
(sin y) ′ cos y 1 − x2
• The inverse cosine function cos−1 x : [−1, 1] → [0, π].
◦ Let y = cos−1 x ∈ [0, π]. Then cos y = x.
p √
sin y ≥ 0 ⇒ sin y = 1 − cos2 y = 1 − x2 .
1 −1 −1
∴ (cos−1 x)′ = = =√ , −1 < x < 1.
(cos y) ′ sin y 1 − x2
1
• Exercise. Prove that (tan x)′ = .
1 + x2
33 / 101
Second Derivative
• Let f be a function. We can differentiate it to get f ′ .
• f ′ is a function, we can differentiable it to get (f ′ )′ .
◦ f ′′ := (f ′ )′ , is called the second derivative of f .
◦ By Leibniz notation:
d2 y
′′ d dy
f (x) = = 2.
dx dx dx
◦ f ′ = D(f ) ⇒ f ′′ := D 2 (f ).
• Geometric meaning:
◦ f ′ measures the change of f ,
◦ f ′′ measures the change of f ′ .
34 / 101
17
Physical Meaning of Second Derivative
• Let s = s(t) be the position function of an object along a straight line.
◦ s′ (t) = v(t): the instantaneous velocity,
it determines the change of the position,
◦ s′′ (t) = v ′ (t) = a(t): the acceleration,
it determines the change of the velocity.
35 / 101
Higher Derivatives
• Let f be a function.
◦ Differentiate f to get f ′ , the first derivative.
◦ Differentiate f ′ to get f ′′ , the second derivative.
◦ Differentiate f ′′ to get f ′′′ , the third derivative.
◦ Differentiate f ′′′ to get f ′′′′ , the fourth derivative.
◦ ············
• In general, we define f (0) := f , and for positive integer n,
′
f (n) := f (n−1) ,
dn y
f (n) (x) = y (n) = n
= D n f (x).
dx
36 / 101
18
Examples
• Let f (x) = x cos x. Find f ′ , f ′′ and f ′′′ .
Parametric Equations
• Let x and y be functions of variable t.
◦ x = x(t) and y = y(t).
This is a parametric equation of x and y .
• Examples.
◦ x2 + y 2 = 1 can be parameterized as
• x = cos t and y = sin t, t ∈ R.
◦ y 2 = x3 + x2 can be parameterized as
• x = t2 − 1 and y = t3 − t, t ∈ R.
• Question. Given a parametric equation, x = x(t) and y = y(t), how to find the derivative of y
with respect to x?
38 / 101
19
Parametric Equations
• Suppose x = x(t) and y = y(t). Then
dy dy/dt dx
◦ = , provided that 6= 0.
dx dx/dt dt
dy
• Example. Find an expression for in terms of t if the curve is defined parametrically by
dx
◦ x = ln t and y = t2 − et .
Solution.
dx 1 dy
◦ = and = 2t − et .
dt t dt
dy dy/dt
◦ = = t(2t − et )
dx dx/dt
dx dx/dt 1
= = .
dy dy/dt t(2t − et )
39 / 101
Parametric Equations
• We can find the second derivative by chain rule:
d2 y
d dy dt d dy 1 d dy
◦ = = · = · .
dx2 dx dx dx dt dx dx/dt dt dx
Example. x = ln t and y = t2 − et .
dx 1 dy
◦ = and = 2t − et .
dt t dt !
d2 y 1 d dy dt
◦ = dx · dx
= t(4t − et − tet ).
dx2 dt
dt dt !
2 dx
dx 1 d dt 4t − et − tet
= dy
· dy
= − .
dy 2 dt
dt dt
t2 (2t − et )
dy dx d2 y d2 x
• Note. · = 1 but 2 · 2 6= 1.
dx dy dx dy
40 / 101
20
Logarithmic Differentiation
√
dy (x2 + 1) x + 3
• Find if y = , x > 1.
dx x−1
◦ Of course we can use product and quotient law to evaluate. But do we have a shortcut?
• This is a product of positive functions.
• Recall that ln ab = ln a + ln b for a > 0, b > 0.
1. Take logarithmic function both sides:
• ln y = ln(x2 + 1) + 12 ln(x + 3) − ln(x − 1).
2. Differentiate with respect to x:
1 dy 2x 1 1
• · = 2 + − .
y dx x + 1 2(x + 3) x − 1
2 √
dy 2x 1 1 (x + 1) x + 3
= 2 + − .
dx x + 1 2(x + 3) x − 1 x−1
41 / 101
Logarithmic Differentiation
• In general, if y = f1 (x)f2 (x) · · · fn (x) is a product of nonzero functions, we can find the derivative
as following:
1. Take logarithmic function both sides:
42 / 101
21
Logarithmic Differentiation
dy x cos x
• Example. Find if y = √ .
dx csc x
1
1. ln |y| = ln |x| + ln | cos x| − 2
ln | csc x|.
1 dy 1 − sin x 1 − csc x cot x
2. · = + − · .
y dx x cos x 2 csc x
dy 1 1 x cos x
3. = − tan x + cot x √ .
dx x 2 csc x
• Example. Find the derivative of y = f (x)g(x).
1. ln |y| = ln |f (x)| + ln |g(x)|.
1 dy f ′ (x) g ′ (x)
2. · = + .
y dx f (x) g(x)
′
dy f (x) g ′(x)
3. = + y = f ′ (x)g(x) + f (x)g ′ (x).
dx f (x) g(x)
43 / 101
Logarithmic Differentiation
d x d x x d x
• Evaluate x . Exercise: (x ) and x(x ) .
dx dx dx
d a d
◦ x = axa−1 . Is xx = x · xx−1 = xx ?
dx dx
d x x d x
◦ a = a ln a. Is x = xx ln x ?
dx dx
◦ Let y = xx . Then ln y = x ln x.
1 dy 1
• = 1 · ln x + x · = ln x + 1.
y dx x
dy
• = y(ln x + 1) = xx (ln x + 1).
dx
• In general, if y = f (x)g(x) , (f (x) > 0), then
1 dy d
◦ ln y = g(x) ln f (x) ⇒ = [g(x) ln f (x)].
y dx dx
44 / 101
22
Absolute Maximum and Minimum Values
• Definition. Let f be a function, and D be its domain.
◦ f has an global (or absolute) maximum at c ∈ D
⇐⇒ f (c) ≥ f (x) for all x ∈ D .
◦ f has an global (or absolute) minimum at c ∈ D
⇐⇒ f (c) ≤ f (x) for all x ∈ D .
◦ The absolute maximum and absolute minimum are called the (absolute) extreme values.
y
b
c2
O c1 x
45 / 101
Example
• Let f (x) = 3x4 − 16x3 + 18x2 on [−1, 3.5].
b y
b
3 3.5
b
−1 O 1 x
46 / 101
23
Local Maximum and Local Minimum
• Definition. Let f be a function with domain D .
◦ f has a local (or relative) maximum at c ∈ D
⇐⇒ f (c) ≥ f (x) for all x near c
(i.e., for all x in an open interval containing c)
◦ f has a local (or relative) minimum at c ∈ D
⇐⇒ f (c) ≤ f (x) for all x near c
b (i.e.,y for all x in an open interval containing c)
local max
b
3 3.5
b
−1 O 1 x
local min
b
47 / 101
• Note. Similarly as the “Intermediate Value Theorem”, the “Extreme Value Theorem” only
shows the existence of the extreme values.
We shall introduce a method to find out the exact value of extreme values.
48 / 101
24
Where are the Extreme Values?
• The extreme value may be obtained at the endpoints.
y
b
x
O
b
O x
b
49 / 101
50 / 101
25
Fermat’s Theorem
• Fermat’s Theorem.
◦ Suppose f has a local maximum or local minimum at c.
If f ′ (c) exists, then f ′ (c) = 0.
• Pierre de Fermat (1601–1665), French Lawyer.
◦ Fermat’s Last Theorem: xn + y n = z n has no nontrivial integer solution for n ≥ 3.
◦ He wrote: “I have discovered a truly remarkable proof which this margin is too small to contain.”
• Note. We CANNOT find the local maximum and local minimum by simply solving f ′ (x) = 0.
◦ Even if f ′ (c) = 0, f may not have a local maximum or local minimum at c.
◦ Even if f has a local maximum or a local minimum at c, f ′ (c) may not exist, and so f ′ (c) may
not be 0.
51 / 101
Examples
• “f ′ (c) = 0 ; f has local max or local min at c” .
◦ Let f (x) = x3 . Then f ′ (x) = 3x2 and f ′ (0) = 0.
But f has no local max or local min at 0.
• “f has local max or local min at c ; f ′ (c) = 0”.
◦ Let g(x) = |x|. Then f is a local minimum at 0.
But f ′ (0) does not exist.
y y
y = x3
O x
y = |x|
O x
52 / 101
26
Critical Number
• Consider the following diagram:
53 / 101
54 / 101
27
Examples
3
• Find the extreme values of f (x) = x 5 (4 − x) on [−1, 3].
y
b
b
−1
b
b
2) Critical numbers: 0,1.5.
3 3
f (x) = (x ) (4 − x) + x 5 (4 − x)′
′ 5
′
3 2 3 4(3 − 2x)
= x− 5 (4 − x) − x 5 = 2 .
5 5x 5
• f ′ (x) does not exist ⇒ x = 0,
• f ′ (x) = 0 ⇒ x = 1.5.
3) Comparing f (−1), f (3), f (0), f (1.5),
• Absolute maximum: f (1.5) ≈ 3.1886.
• Absolute minimum: f (−1) = −5.
55 / 101
Examples
√
3
• Let f (x) = x2 − x be defined on [−1, 2].
1 2x − 1
◦ f ′ (x) = (x2 − x)−2/3 (2x − 1) = .
3 3(x2 − x)2/3
• f (x) does not exist: x = 0, x = 1;
′
• f (x) = 0:
′
x = 12 .
y
b b
1
2 x
b b
−1 O 1 2
√
3
◦ Absolute maximum: f (−1) = f (2) = 2.
1
◦ Absolute minimum: f ( 12 ) = − √
3
.
4
56 / 101
28
Increasing/Decreasing Test
• Consider the following functions:
y y
y = −x3 + 2x2 − x + 1
y = x2 − 8x + 9
b
y = 2x − 8
x
O x O
b y = −3x2 + 4x − 1
f “turns” ⇔ f ′ = 0,
◦ It seems that f is increasing ⇔ f ′ > 0,
f is decreasing ⇔ f ′ < 0.
57 / 101
Increasing/Decreasing Test
• Theorem. Let f be a function such that
◦ It is continuous on [a, b], differentiable on (a, b).
Then
◦ f ′ (x) = 0 on (a, b) ⇔ f is constant on [a, b];
◦ f ′ (x) > 0 on (a, b) ⇒ f is increasing on [a, b];
◦ f ′ (x) < 0 on (a, b) ⇒ f is decreasing on [a, b].
• The converse of Increasing/Decreaing Test fails:
◦ f is increasing ; f ′ (x) > 0;
◦ f is decreasing ; f ′ (x) < 0.
Note that f is not necessarily differentiable.
Even if f is differentiable, f ′ may be zero at some points.
◦ Let f (x) = x3 . Then f is increasing on R.
• f ′ (x) = 3x2 ⇒ f ′ (0) = 0.
58 / 101
29
Example
• Let f (x) = 3x4 − 4x3 − 12x2 + 5.
◦ f ′ (x) = 12x3 − 12x2 − 24x = 12(x + 1)x(x − 2).
y
y = f (x)
10
−1 O 1 2 3 x
′ −10
y = f (x)
Intervalx+1 x x−2 f ′ (x) f (x)
(−∞, −1) − − − − ց −20
(−1, 0) + − − + ր
(0, 2) + + − − ց
(2, ∞) + + + + ր
59 / 101
no
no
min
O a b c d e f g x
f′ > 0 f′ > 0 f′ < 0 f′ > 0 f′ < 0 f′ < 0
60 / 101
30
First Derivative Test
• First Derivative Test.
Let f be continuous and c a critical number of f .
Suppose f is differentiable near c (except possibly at c).
◦ If f ′ changes from positive to negative at c,
then f has a local maximum at c.
◦ If f changes from negative to positive at c,
′
61 / 101
Examples
• f (x) = 3x4 − 4x3 − 12x2 + 5
◦ f ′ (x) = 12x3 − 12x2 − 24x = 12(x + 1)x(x − 2).
Interval (−∞, −1) (−1, 0) (0, 2) (2, ∞)
f (x)
′
− + − +
f (x) ց ր ց ր
◦ local maximum: x = 0;
◦ local minimum: x = −1, x = 2.
y
10
−1 O 1 2 3 x
−10
−20
62 / 101
31
Examples
• f (x) = x1/3 (x − 4). Find its local max and local min.
◦ Where are the critical numbers?
4 4 4x−1
f ′ (x) = (x4/3 − 4x1/3 )′ = x1/3 − x−2/3 = .
3 3 3 x2/3
• f (x) does not exists: x = 0;
′
• f (x) = 0: x = 1.
′
O 4 x
−3
63 / 101
Concavity
• Consider two graphs with the same end points:
y y
y = f (x)
y = g(x)
O a x O a x
b b
Concave Up Concave Down
64 / 101
32
Concavity
• Definition. Let f be differentiable on an open interval I .
◦ If the graph lies above all its tangent lines on I ,
then it is said to be concave up.
◦ If the graph lies below all its tangent lines on I ,
then it is said to be concave down.
y
O a b c d e p q x
65 / 101
Concavity Test
• Theorem. Let f be differentiable on open interval I .
◦ The graph is concave up ⇔ f ′ is increasing.
◦ The graph is concave down ⇔ f ′ is decreasing.
• Suppose f is twice differentiable on an open interval I .
◦ If f ′′ > 0 on I , by Increasing Test f ′ is increasing,
then the graph of f is concave up.
◦ If f < 0 on I , by Decreasing Test f ′ is decreasing,
′′
66 / 101
33
Graph f using f ′ and f ′′
• Sketch the graph of f (x) = x4 − 4x3 .
◦ f ′ (x) = 4x2 (x − 3).
Interval (−∞, 0) (0, 3) (3, ∞)
f (x)
′
− − +
f (x) ց ց ր
So f (x) has local minimum at x = 3.
67 / 101
−1 O 1 2 3 4 x
−10
−20
−30
decreasing decreasing increasing
up down up
68 / 101
34
Graph f using f ′ and f ′′
• Sketch the graph of f (x) = x2/3 (6 − x)1/3 .
4−x
◦ f ′ (x) = .
x1/3 (6
− x)2/3
Interval (−∞, 0) (0, 4) (4, 6) (6, ∞)
f (x)′
− + − −
f (x) ց ր ց ց
−8
◦ f ′′ (x) = .
x4/3 (6− x)5/3
Interval (−∞, 0) (0, 6) (6, ∞)
f ′′ (x) − − +
Concavity Down Down Up
69 / 101
−2 O 2 4 6 x
−2
−4
decreasing increasing decreasing decreasing
down down up
70 / 101
35
Some Inequalities
√ 1
• Show that for all positive x 6= 1, 2 x > 3 − .
x
√ √
1 1
◦ Let f (x) = 2 x − 3 − =2 x−3+ .
x x
1 1 1 √
• f (x) = √ −
′
2
= 2 x3 − 1 .
′ x x x
f (x) > 0, if x > 1,
•
f (x) < 0, if 0 < x < 1.
′
Some Inequalities
π
• We have seen that sin x < x for all 0 < x < .
2
2 π
Show that x < sin x when 0 < x < .
π 2
sin x π
◦ Let g(x) = on (0, ].
x 2
′
sin x cos x(x − tan x)
• g (x) = = < 0.
′
x x2
π
• By Increasing Test, g is decreasing on (0, ].
2
π π sin(π/2) 2
◦ For any 0 < x < , g(x) > g( ) = = .
2 2 π/2 π
That is,
2x
sin x > .
π
72 / 101
36
Some Inequalities
π
• Recall that sin x < x < tan x for all x ∈ (0, ).
2
π
tan x + sin x and 2x, which one is bigger on (0, )?
2
• Let f (x) = tan x + sin x − 2x.
◦ f ′ (x) = sec2 x + cos x − 2.
f ′′ (x) = 2 sec2 x tan x − sin x > 0
π
◦ f ′ is increasing on [0, ).
2
π
Then for any x ∈ (0, ), f ′ (x) > f ′ (0) = 0.
2
π
• f is increasing on [0, ).
2
π
Then for any x ∈ (0, ), f (x) > f (0).
2
73 / 101
Approximation
• Suppose f is continuous. Then x → a ⇒ f (x) → f (a).
74 / 101
37
Approximation
• Suppose f ′′ is continuous. Then
◦ x → a ⇒ f ′ (x) → f ′ (a) and f ′′ (x) → f ′′ (a).
◦ Approximate f by a quadratic function P :
• P (a) = f (a), P ′ (a) = f ′ (a), P ′′ (a) = f ′′ (a).
Let P (x) = p + q(x − a) + r(x − a)2 . Then
f ′′ (a)
∴ f (x) ≈ f (a) + f ′ (a)(x − a) + (x − a)2 .
2
75 / 101
Approximation
√ 1 1
• Let f (x) = x. f ′ (x) = x−1/2 , f ′′ (x) = − x−3/2 .
2 4
f (1)
′′
◦ f (x) ≈ f (1) + f ′ (1)(x − 1) + (x − 1)2 .
2
√ 1 1
◦ 1.1 ≈ 1 + × 0.1 − × 0.12 = 1.04875.
2 8
• In general, assume that f (n) is continuous, then f can be approximated by a polynomial P (x) of
degree n:
f ′′ (a) f ′′′ (a) f (n) (a)
◦ f (x) ≈ f (a) + f ′ (a)(x − a) + (x − a)2 + (x − a)3 + · · · + (x − a)n .
2! 3! n!
◦ P (a) = f (a), P ′ (a) = f ′ (a), . . . , P (n) (a) = f (n) (a).
76 / 101
38
Optimization Problems
• What is optimization problem?
◦ Finding extreme values in practical application.
• Maximize areas, volumes, profits, . . . ,
• Minimize distances, costs, times, . . . .
• How to optimize?
◦ Understand the problem.
◦ Draw a diagram.
◦ Introduce notations.
◦ Find relations among the variables.
◦ Express the problem as finding the absolute maximum
or minimum of a function f (x) on a specified domain.
◦ Find the absolute maximum and minimum.
• Closed Interval Method (on finite closed interval),
• Increasing/Decreasing Test (works for all cases).
77 / 101
Example 1
• Example. A farmer has 2400 ft of fencing and wants to fence off a rectangular field that borders a
straight river. He needs no fence along the river. What are the dimensions of the field that has the
largest area?
x A = Area x
78 / 101
39
Example 1
• Maximize A = xy , where 2x + y = 2400, x, y ≥ 0.
◦ 2x + y = 2400 ⇒ y = 2400 − 2x.
• y ≥ 0 ⇒ x ≤ 1200.
• It is equivalent to
Finding maximum of A(x) = x(2400 − 2x) on [0, 1200].
◦ Critical number:
• A′ (x) = 2400 − 4x.
• A′ (x) = 0 ⇒ x = 600. A(600) = 720 000.
◦ Endpoints: x = 0, 1200. A(0) = A(1200) = 0.
◦ A(x) has maximum value 720 000 when x = 600.
• Conclusion: the field has the largest area 720 000 ft2 ,
when it has width 600 ft, and length 1200 ft.
79 / 101
Example 2
• A cylindrical can is to be made to hold 1 liter of oil. Find the dimensions that will minimize the cost
of the metal to manufacture the can.
80 / 101
40
Example 2
• Minimize S = 2πr 2 + 2πrh, V = πr 2 h = 1, r, h > 0.
1 2πr 2
◦ h= 2
⇒ S = 2πr 2 + 2 = 2πr 2 + .
πr πr r
2
Find the minimum of S(r) = 2πr 2 + for r > 0.
r
2 2
◦ S ′ (r) = 4πr − 2 = 2 (2πr 3 − 1).
r r
1
◦ S (r) = 0 ⇒ r = √
′
3
= r0 .
2π
0 < r < r0 ⇒ S ′ (r) < 0; r > r0 ⇒ S ′ (r) > 0.
S(r) is decreasing on (0, r0 ], is increasing on [r0 , ∞).
∴ S(r) has the absolute minimum at r = r0 .
• The cost is minimized when we choose r
1 3 4
radius r = r0 = √ , and height h = .
3
2π π
81 / 101
Example 3
• Find the point on the parabola y 2 = 2x that is closest to the point (1, 4).
y (1, 4)
b
b (x, y)
b
y 2 = 2x
b
O b x
b
p
◦ Minimize d = (x − 1)2 + (y − 4)2 ,
• where y 2 = 2x.
82 / 101
41
Example 3
p
• Minimize d = (x − 1)2 + (y − 4)2 , with y 2 = 2x.
r
y2 2 y2
◦ d(y) = − 1 + (y − 4)2 , (x = ).
2 2
It is equivalent to minimizing
y2 2
◦ f (y) = (d(y))2 = −1 + (y − 4)2 on R.
2
• f ′ (y) = y 3 − 8. Then f ′ (y) = 0 ⇒ y = 2.
• If y < 2, f ′ (y) < 0; f is decreasing on (−∞, 2].
• If y > 2, f ′ (y) > 0; f is increasing on [2, ∞).
◦ So f (y) attains the absolute minimum at y = 2.
∴ d(y) attains the absolute minimum at y = 2. (x = 2)
◦ Therefore, the point on y 2 = 2x which is closest to (4, 1) is (2, 2). Moreover, the distance is
p √
d = (2 − 4)2 + (2 − 1)2 = 5.
83 / 101
Example 4
• A man launches his boat from point A on a bank of a straight river, 3km wide, and wants to reach
point B , 8km downstream on the opposite bank, as quick as possible. If he can row 6km/h and
run 8km/h, where should he land?
A
b
√
9 + x2 km
3km
b b
C D 8km B
xkm (8 − x)km
√
9 + x2 8 − x
◦ Minimize T (x) = + , 0 ≤ x ≤ 8.
6 8
84 / 101
42
Example 4
√
9 + x2 8 − x
• Minimize T (x) = + on [0, 8].
6 8
x 1
◦ T ′ (x) = √ − .
6 9 + x2 √8
T (x) = 0 ⇒ 8x = 6 9 + x2 ⇒ 16x2 = 81 + 9x2
′
9
⇒ 7x2 = 81 ⇒ x = √ (x > 0).
7
9
◦ Compare the values T (0), T (8) and T ( √ ):
7
73
• T (0) = 1.5, T (8) = ≈ 1.42, and
√ 6
9 7
T (√ ) = 1 + ≈ 1.33.
7 8
√
◦ Therefore, he should land at 9/ 7 km away downstream from the starting point.
85 / 101
θ1
a
θ1
C B′
b
A′ x d−x
θ2
b
θ2
b
B
86 / 101
43
Example 5: Fermat’s Principle and Snell’s Law
A b
d−x
a θ1 θ1
C B′
b
A′ x
θ2 b
θ2
b
B
√ p
a2 + x2 b2 + (d − x)2
• Minimize T (x) = + on [0, d].
v1 v2
x d−x sin θ1 sin θ2
T ′ (x) = √ − p = − .
v1 2
a +x2 2
v2 b + (d − x) 2 v1 v2
sin θ1 sin θ2
∴ T (x) attains the min if x = x0 , at which = .
v1 v2
87 / 101
A
b
√
9 + x2 km
θ
3km
θ
b b
C D 8km B
xkm (8 − x)km
sin θ sin π2
• By Snell’s Law, the time is minimized when = .
v1 v2
√
x/ 9 + x2 1 9
◦ = ⇒x= √ .
6 8 7
88 / 101
44
Limits of Indeterminate Forms
• How do we compute the following limits?
√
1 − cos x x − sin x 1 − x − 1 + x2
◦ lim , lim , lim .
x→0 x + x2 x→0 x3 x→0 x2
Both the numerator and denominator tend to 0 as x → 0.
They have the 0/0 Indeterminate Form.
• How to compute the following?
sec x x2 + 3x
◦ limπ , lim .
x→ 2 1 + tan x x→∞ 3x2 + 1
π
Both the numerator and denominator tend to ±∞ as x → 2
or x → ∞.
They have the ∞/∞ Indeterminate Form.
• Question. Can we evaluate the limits without using ǫ, δ -definition?
◦ We may use differentiation.
89 / 101
Example
1 − cos x
• lim .
x→0 x + x2
[f (x) − f (0)]/(x − 0)
= lim
x→0 [g(x) − g(0)]/(x − 0)
90 / 101
45
l’Hôpital’s Rule
• l’Hôpital’s Rule. Let f and g be functions such that
◦ lim f (x) = lim g(x) = 0, and
x→a x→a
◦ f and g are differentiable near a (except at a), and
◦ g ′ (x) 6= 0 near a (except at a).
f (x) f ′ (x)
Then lim = lim ′ , provided that the limit on the right hand side exists or equals ±∞.
x→a g(x) x→a g (x)
91 / 101
Examples
√
1 − x − 1 + x2
• Find lim .
x→0 x2
√ √ ′
1 − x − 1 + x2 1 − x − 1 + x2
lim = lim
x→0 x2 x→0 (x2 )′
′
−1 1 −1 1
√ + √ +
2 1−x 2 2 1−x 2
= lim = lim
x→0 2x x→0 (2x)′
−1 1
· p
2 2 (1 − x)3
= lim
x→0 2
1
=− .
8
92 / 101
46
Examples
x − sin x
• Find lim .
x→0 x3
x − sin x (x − sin x)′
lim = lim
x→0 x3 x→0 (x3 )′
1 − cos x
= lim
x→0 3x2
(1 − cos x)′
= lim
x→0 (3x2 )′
sin x
= lim
x→0 6x
(sin x)′
= lim
x→0 (6x)′
cos x 1
= lim = .
x→0 6 6
93 / 101
94 / 101
47
l’Hôpital’s Rule (∞/∞)
• l’Hôpital’s Rule. Suppose that
◦ lim |f (x)| = lim |g(x)| = ∞,
x→a x→a
◦ f and g are differentiable near a (except at a),
◦ g ′ (x) 6= 0 for all x near a (except at a).
f (x) f ′ (x)
Then lim = lim ′ , provided that the limit on the right side exists or equals ±∞.
x→a g(x) x→a g (x)
sec x
• Example. Find lim .
x→π/2 1 + tan x
95 / 101
Examples
x2 + 3x
• Find lim .
x→∞ 3x2 + 1
x2 + 3x (x2 + 3x)′ 2x + 3
lim = lim = lim
x→∞ 3x2 + 1 x→∞ (3x2 + 1)′ x→∞ 6x
(2x + 3) ′
2 1
= lim = = .
x→∞ (6x)′ 6 3
πx
• Find lim (1 − x2 ) tan .
x→1 2
πx 1 − x2 (1 − x2 )′
lim (1 − x2 ) tan = lim = lim
x→1 2 x→1 cot πx x→1 (cot πx )′
2 2
−2x −2 4
= lim π 2 πx = π = .
x→1 − csc −2 · 1 π
2 2
0 ∞
• Convert 0 · ∞ or ∞ − ∞ indeterminate forms to or indeterminate forms, then apply
0 ∞
l’Hôpital’s rule.
96 / 101
48
Correct or Wrong?
x2 + 1
• Evaluate lim .
x→1 2x + 1
x2 + 1 (x2 + 1)′ 2x
◦ lim = lim = lim = lim x = 1.
x→1 2x + 1 x→1 (2x + 1)′ x→1 2 x→1
◦ We cannot apply l’Hôpital’s rule unless the limits of numerator and denominator are both 0 or
both ±∞.
x + sin x
• Evaluate lim .
x→∞ x
x + sin x (x + sin x)′
◦ lim = lim
x→∞ x x→∞ x′
= lim (1 + cos x). So the limit does not exist.
x→∞
f ′ (x)
◦ l’Hôpital’s rule is inconclusive if lim 6= L, ±∞. We shall use squeeze theorem for this
x→a g ′ (x)
question.
97 / 101
Correct or Wrong?
x
• Evaluate lim √ .
x→∞ x2 + 1
x 1
lim √ = lim √
x→∞ x2 + 1 x→∞ x/ x2 + 1
√
x2 + 1
= lim
√x
x→∞
x/ x2 + 1
= lim
x→∞ 1
x
= lim √ = ··· .
x→∞ x2 + 1
f ′ (x)
The l’Hôpital’s rule is useful only when the evaluation of lim is simpler than the evaluation of
x→a g ′ (x)
f (x)
lim .
x→a g(x)
98 / 101
49
Properties of the Exponential Function
• We can compute the number e numerically as a limit.
• Theorem. e = lim (1 + x)1/x .
x→0
1/x 1
lim (1 + x) = lim exp ln(1 + x)
x→0 x→0 x
ln(1 + x)
= exp lim
x→0 x
(ln(1 + x))′
= exp lim
x→0 (x)′
1/(1 + x)
= exp lim
x→0 1
= exp(1) = e.
◦ Remark. Let y = 1/x. Then x → 0+ ⇔ y → ∞.
• e = lim (1 + 1/y)y = lim (1 + 1/n)n .
y→∞ n→∞
99 / 101
Example
• Evaluate lim xx .
x→0+
x x ln x
lim x = lim+ e = exp lim+ x ln x
x→0+ x→0 x→0
ln x 1/x
= exp lim+ = exp lim+
x→0 1/x x→0 −1/x2
= exp lim+ (−x) = exp(0) = 1.
x→0
100 / 101
50
Continuously Compounded Interest
• Initial deposit: A dollars; Interest rate (year): r .
◦ Suppose the interest is credited n times per year.
r n
• After one year, we have A 1 + n
dollars.
It seems that we will get more if n gets larger.
• Question. What will we get after one year if n → ∞, in other words, if the interest is
continuously compounded?
n x
◦ lim A 1 + nr = lim A 1 + xr
n→∞ x→∞
!
ln 1 + r
= A lim exp x ln 1 + r
x = A exp lim 1
x
x→∞ x→∞
x
r −1 r
!
1+ x −x2
= A exp lim
x→∞ − x12
−1
= A exp lim r 1 + xr = A exp(r) = Aer .
x→∞
101 / 101
51