CMA6114 - Topic 04 Differentiation
CMA6114 - Topic 04 Differentiation
TOPIC 4: Differentiation
A. DERIVATIVES
1. DEFINITION OF DERIVATIVE
Definition:
If f (x) is a function defined on an open interval I = (a, b) that contains the point c , the
derivative of f at c , denoted by f ' (c) , is
f (c + h) − f (c )
f ' (c) = lim .........(*)
h→0 h
provided the limit exists.
Other notations
f (c + h ) − f (c )
Letting x = c + h in equation (*), which is f ' (c) = lim , then equation (*)
h→0 h
f ( x ) − f (c )
becomes f ' (c ) = lim .
h →0 x−c
1
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Different notations are used to represent the derivative of a function y = f (x) with f ' (x)
df dy d
being the most common. Some others are , y', , f ( x ), Df ( x ), and Dx f ( x ) .
dx dx dx
One interpretation of the derivative of a function at a point is the slope of the tangent
line at this point. The slope of the tangent line at the point (c, f (c)) on the graph of
y = f (x) is f ' (c) , the derivative of f at c. Another interpretation: f ' (c) is also the
dy
instantaneous rate of change of y with respect to x at x = c ; sometimes or
dx x =c
dy
is used to denote f ' (c) .
dx x = c
dy
The notation is referred to as the derivative of y with respect to x.
dx
Example:
Given the graph of the function f ( x) = 3 x 2 (which is a parabola), use the definition of the
derivative to obtain the slope of the tangent to the graph at the point (2, 12).
[How do yu know that (2, 12) lies on the graph?]
Solution:
To find f ' ( 2) .
f ( 2 + h ) − f ( 2)
f ' (2) = lim
h→0 h
f ( 2 + h) − f ( 2) 3( 2 + h) 2 − 12 3( 4 + 4h + h 2 ) − 12 12 h + 3h 2
= = = = 12 + 3h
h h h h
f ( 2 + h ) − f ( 2)
f ' (2) = lim = lim (12 + 3h ) = 12
h →0 h h→0
[Can you obtain an equation for the tangent to the graph at the point (2, 12)?]
[Reminder: Try doing it for another point on the graph, say, one with x = −1 .
Then try doing it for a general point (a, _?__ ) . ]
Example:
Use the definition for derivative to find the derivative of y = x for x > 0 .
Solution: Let f ( x) = x
f ( x + h) − f ( x )
=
x+h − x
=
(x + h ) − x = 1
h h (
h x+h + x ) x+h + x
1 1
f ' ( x) = lim =
h→0 x+h + x 2 x
f ( x + h) − f ( x ) 1 1
In short, f ' ( x) = lim = lim =
h →0 h h →0 x+h + x 2 x
2
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Example:
Is the function f ( x) = | x | differentiable at x = 0 ? Let’s see.
[We cannot take for granted that every function we see is differentiable everywhere.]
2. DERIVATIVE RULES
1 Derivative of d d
a Constant k =0 k =0
dx dx
Function
2 Power Rule d n d n
x = nx n −1 , n ∈ R x = nx n −1 , n ∈ R
dx dx
3 Constant d df d du
Multiple Rule (kf ) = k , (ku ) = k (ku )' = ku '
dx dx dx dx
where k is a constant.
4 Sum Rule d df dg d du dv (u + v)' = u '+v'
( f + g) = + (u + v) = +
dx dx dx dx dx dx
5 Product Rule d dg df d dv du (u ⋅ v)' = u ' v + uv'
( f ⋅ g) = f +g (u ⋅ v) = u +v
dx dx dx dx dx dx
6 Quotient Rule df dg du dv u vu '−uv'
g −f v −u ' =
d f d u v v2
= dx 2 dx =
dx
2
dx
dx g g dx v v
for x with g ( x) ≠ 0
[** If you have studied calculus before, you are probably more familiar with only one of the three columns
on the right.]
[** Some authors or teachers like to include the power rule and the root rule; these are not really necessary
after you master the chain rule.]
Example:
Find the derivatives of the following functions.
1 1 t 2 −1
a) y = x 4 + 12 x − 4 b) f ( x) = x 2 + c) g (t ) =
x x t2 +1
( x − 1)( x − 2 x)
2
1
d) y = e) y = 2
x 4
( x − 1)( x 2 + x + 1)
3
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Solution:
a) y = x 4 + 12 x − 4
dy d 4 d d
= x + 12 x + ( −4 )
dx dx dx dx
= 4 x + 12
3
1 1
b) f ( x) = x 2 +
x x
1 d 2 1 2 1 d 1
f '( x) = x + +x +
x dx x x dx x
d
= x −1 x 2 + x −1 + ( x 2 + x −1 ) x −1
d d
dx dx dx
= x −1 ( 2 x − x −2 ) + ( x 2 + x −1 )( − x −2 )
= 2 − x −3 − 1 − x −3
= 1 − 2 x −3
[The steps shown here are to illustrate the derivative rules; it would be easier if you
1
rewrite f (x) as x + 2 .]
x
( x − 1)( x − 2 x)
2
d) y =
x4
d d
x4 ( x − 1)( x 2 − 2 x) − ( x − 1)( x 2 − 2 x) x 4
dy
= dx dx
(x )
2
dx 4
d d d
x 4 ( x − 1) ( x 2 − 2 x) + ( x 2 − 2 x) ( x − 1) − ( x − 1)( x 2 − 2 x) x 4
=
dx dx dx
8
x
x ( x − 1)(2 x − 2) + ( x − 2 x)(1) − ( x − 1) x( x − 2) ( 4 x3 )
4 2
=
x8
( x − 1)(2 x − 2) + ( x 2 − 2 x) − ( x − 1)( x − 2) ( 4 )
=
x4
− x2 + 6 x − 6
=
x4
[Here, we apply he quotient rule and also the product rule. Is there a simpler way?]
4
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
(Note that these formulae are valid only when x is measured in radians.)
d d
sin x = cos x. (*) cot x = − csc 2 x.
dx dx
d d
cos x = − sin x. (*) sec x = sec x tan x.
dx dx
d d
tan x = sec 2 x. (*) csc x = − csc x cot x.
dx dx
d 1 d −1
sin −1 x = , x < 1. cot −1 x = .
dx 1− x 2 dx 1+ x2
d −1 d 1
cos −1 x = , x < 1. sec −1
x = , x > 1.
dx 1− x2 dx x x2 − 1
d 1 d −1
tan −1 x = 2 . csc −1 x = , x > 1.
dx 1+ x dx x x2 − 1
[** You are required to remember the three forms shaded; those marked with (*) can be
obtained by using differentiation rules. The others will be provided when required.]
d
[**Derivatives of sin and cos are obtained from definition using limits; tan x = sec 2 x.
dx
can be obtained using the quotient rule. Most people would take the trouble to memorize
this because it crops up quite often in problems.]
Example:
Find the derivatives of the following functions.
cos x
a) y = tan x b) y = x 2 sin x + 2 x cos x − 2 sin x c) y =
1 + sin x
sec x 1
d) y = e) y = sin x + 10 tan x f) y = x 2 cot x −
1 + tan x x2
Solution:
a) y = tan x
d d
cos x ( sin x ) − sin x ( cos x )
d d sin x
( tan x ) = =
dx dx
dx dx cos x cos 2 x
cos x cos x − sin x ( − sin x )
=
cos 2 x
cos 2 x + sin 2 x
=
cos 2 x
1
= 2
= sec2 x
cos x
5
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
[** These two items are just special cases of the chain rule; there is no real need to
memorize remember. Practise using the chain rule to derive these two formulas.]
For #1, we let f (u ) = ln u and u = g (x) ; for #2, we let f (u ) = e u and u = g (x) .
( )
Let y = x 2 + 1 , i.e., y = ( f g )(x )
5
or ( f g )' ( x) ?
dy
What is
dx
f ( x) = x 5 and g ( x ) = x 2 + 1 . Let u = x 2 + 1 and y = u 5 . [ u = g (x) , y = f (u ) ]
f ' ( x ) = 5 x and g ' ( x) = 2 x .
4
Then y = u = ( x + 1)
5 2 5
6
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Example:
Find the derivatives of the following functions.
4
x2 1
a) y = (2 x + 1) 5
b) y = + x − c) y = sin( x 2 + x)
8 4
d) y = ln( x 3 + 1) e) y = e 2 x − x
2
( )
f) y = e 2 x + e x ln 2 x
x
g) y = 10 x h) y = sin(cos(tan x)) i) y = j) y = x + x + x
2
x − 2x + 3
2
Solution:
a) y = (2 x + 1) 5
Let u = 2 x + 1 Then y = u 5 .
du dy
= 2 and = 5u 4 .
dx du
dy dy du
= ×
dx du dx
= 5u 4 ( 2 )
= 10 ( 2 x + 1)
4
(a) Obtain the derivatives of the following functions of x by using the chain rule, with all
the steps properly written.
sin 3 x , cos 3 x , tan 3 x , e3 x , ln(3 x)
(b) Obtain the derivatives of the following functions of x by using the chain rule, without
writing down detailed steps.
sin 3 x , cos 3 x , tan 3 x , e3 x , ln(3 x)
4. HIGHER DERIVATIVES
For a differentiable function f , the derivative f ' is also a function.
If f ' is also differentiable, its derivative is denoted by
( f ' )' = f ' '. .
It is called the second derivative of f .
d dy d 2 y
Using Leibniz's notation, the second derivative of y = f ( x ) is =
dx dx dx 2
There are several ways of writing the second derivative.
7
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Example:
Find y ' ' and y ' ' ' for
a) y = x 3 − 7 x 2 + 100 x + 1 b) y = x cos x
Solution:
a) y = x 3 − 7 x 2 + 100 x + 1
First Derivative: y ' = 3 x 2 − 14 x + 100
Second derivative: y '' = 6 x − 14
Third derivative: y ''' = 6
5. IMPLICIT DIFFERENTIATION
The function that we have looked at in the earlier sections can be described by expressing
one variable (the dependent variable) explicitly in terms of another variable (the
independent variable) .
An explicit function is given in the form y = f ( x ) , where y is the dependent variable and
x is the independent variable.
x2 if x < 2
Examples: y = x +3,
2
y = cos x , y =
4 x − 4 if x ≥ 2
Some functions are defined implicitly by a relation between x and y through an equation
involving x and y.
Example:
8
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Examples:
(S*)
An equation in x and y in the form F ( x, y ) = 0 (or equivalent) may implicitly define one
or more functions of x; but it is not always possible or easy to put in the form y = f ( x )
dy
and then to further obtain in the usual way.
dx
To find the derivative of y with respect to x, we do not need to solve for y as a function of
x. Instead, we use implicit differentiation. We treat y as a differentiable function of x and
dy
differentiate both sides of the equation with respect to x; then solve for in terms of x
dx
and y.
Example:
dy
(a) Given x 2 + y 2 = 1 , find .
dx
3 4
(b) Find an equation of the tangent to the circle at the point , .
5 5
Solution
(a) Differentiate both sides of the equation x 2 + y 2 = 1
d d
(x2 + y2 ) = (1)
dx dx
d d
(x2 ) + ( y2 ) = 0
dx dx
9
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
d d dy dy
[Using the chain rule, ( y2) = ( y2) ⋅ = 2y ]
dx dy dx dx
dy
2x + 2 y
=0
dx
dy x
=−
dx y
3 4 3 4
(b) At the point , , we have x = , y = .
5 5 5 5
dy 3
3 3 4
So, = − 54 = − ; this is the slope of the tangent at the point , .
dx 5 4 5 5
3 4
An equation of the tangent to the circle at the point , is given by
5 5
4 3 3
y − = − x − or 3 x + 4 y − 5 = 0
5 4 5
Example:
dy
Find for
dx
a) x 2 y − xy 2 + x 2 + y 2 = 0 b) y 2 = x 2 + sin xy c) y = x x .
Solution:
a) x 2 y − xy 2 + x 2 + y 2 = 0
d 2 d d d d
( x y ) − ( xy 2 ) + ( x 2 ) + ( y 2 ) = ( 0)
dx dx dx dx dx
d d d d d
x 2 ( y ) + y x 2 − x ( y 2 ) − y 2 ( x) + 2 x + ( y 2 ) = 0
dx dx dx dx dx
dy dy dy
x2 + y (2 x) − x 2 y − y 2 (1) + 2 x + 2 y =0
dx dx dx
dy y 2 − 2 xy − 2 x
(x 2
− 2 xy + 2 y ) dy
dx
=y 2
− 2 xy − 2 x ∴ =
dx x 2 − 2 xy + 2 y
b) y 2 = x 2 + sin xy
d 2 d d
( y ) = ( x 2 ) + (sin xy )
dx dx dx
dy d
2y = 2 x + cos xy ( xy )
dx dx
dy dy
2y = 2 x + (cos xy )( y + x )
dx dx
dy dy
2 y − (cos xy )( x ) = 2 x + (cos xy ) y
dx dx
dy
(2 y − x cos xy ) = 2 x + y cos xy
dx
dy 2 x + y cos xy
∴ =
dx 2 y − x cos xy
10
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
c) y = xx
Taking logarithms of both sides, ln y = ln x x
ln y = x ln x
d d d
ln y = x ln x + x ln x
dx dx dx
1 dy dy
= ln x + 1 ∴ = y (ln x + 1) = x x (ln x + 1)
y dx dx
Example:
(T*)
a) y = x 2 , x ∈(−∞, ∞) : no absolute maximum, absolute minimum of 0 at x = 0
b) y = x 2 , x ∈ [0,2] : absolute maximum of 4 at x = 2, absolute minimum of 0 at x =0
c) y = x 2 , (0,2] : absolute maximum of 4 at x = 2, no absolute minimum
d) y = x 2 , (0,2) : no absolute extremum.
11
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
(T*)
Example:
a) f ( x) = x 3 − 3 x has local maximum at x = −1 and local minimum at x = 1. In fact,
f ' ( x) = 3 x 2 − 3 is equal to zero at x = ±1.
The graph of y = x 3 − 3x
Remark.
The converse to Fermat's Theorem does not hold; that is, if f ' (c) = 0 it does not
necessarily follow that f has a local extremum at c. [Example?] Can you suggest?
For a differentiable function,
" f ' (c) = 0 " is a necessary condition, but NOT a sufficient condition for the existence of a
local extremum at c.
12
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Rolle’s Theorem
Let f be differentiable on (a,b) and continuous on [a,b]. If f (a ) = f (b), then there is at
least one number c ∈(a , b) such that f ' (c) = 0.
13
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
[For this course, we would not discuss problems that involve the direct use of the Mean
Value Theorem.]
Example:
Where is the function f ( x) = x 3 − 3 x increasing? Where is it decreasing?
Solution
f ( x) = x 3 − 3 x ; f ' ( x ) = 3 x 2 − 3 = 3( x 2 − 1) = 3( x − 1)( x + 1)
We wish to find where f ' ( x ) > 0 and where f ' ( x ) < 0 .
Interval ( x − 1) ( x + 1) f ' ( x) = 3x 2 − 3 f
x < −1 − − + Increasing on (−∞, − 1)
−1 < x < 1 − + − Decreasing on (−1, 1)
1< x + + + Increasing on (1, ∞)
14
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
(S*)
(T*)
Example
Find the local maximum and minimum values of the function f ( x) = x 3 − 3 x in the
interval [−2.5,2.5] . Then determine the absolute extrema of f on the interval [−2.5,2.5] .
Solution
Find the critical/stationary points: f ' ( x ) = 3 x 2 − 3 = 3( x 2 − 1) = 3( x − 1)( x + 1)
f ' ( x) = 0 when x = ±1
The stationary points: x = ±1
15
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Interval ( x − 1) ( x + 1) f ' ( x) = 3x 2 − 3 f
− 2 .5 < x < − 1 − − + Increasing on (−2.5, − 1)
−1 < x < 1 − + − Decreasing on (−1, 1)
1 < x < 2 .5 + + + Increasing on (1, 2.5)
At Value
Local minimum − 2.5, 1 f (−2.5) = ..., f (1) = ...
Local maximum − 1, 2.5 f (−1) = ..., f (2.5) = ...
From the local maxima and local minima, we see that for f on the interval [−2.5,2.5] , the
absolute maximum is _______ (occurring at _______ ) and the absolute minimum is
_______ (occurring at _______ ) .
Definition of Concavity
A function f is convex (or concave up) on an interval if the line segment connecting any
two points on the graph of the function lies above the graph between those two points.
A function f is concave (or concave down) on an interval if the line segment connecting
any two points on the graph of the function lies above the graph between those two
points.
16
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
2. Find the extrema of the following functions and the points where the extrema appear..
x
a) y = x 3 − 3 x 2 + 3 x − 2 b) y = 2
x +1
Solution:
1 a) y = x 5 − 5x + 3 [using 2nd derivative test]
dy
At the stationary point, = 0 . Therefore
dx
5x4 − 5 = 0
x = ±1
d2y
To determine whether the stationary point is a maximum or minimum, compute .
dx 2
d2y
= 20 x3
dx 2
d2y
At x = −1, < 0 , thus the critical point is a local maximum.
dx 2
When x = −1, y = ... = 7 . So y has a local maximum value of 7 at x = −1.
d2y
At x = 1, > 0 , thus the critical point is a local minimum.
dx 2
When x = 1, y = ... = −1 . So y has a local minimum value of −1 at x = 1.
(To Students: For comparison, try using the 1st derivative test to find the local extrema for
y = x 5 − 5x + 3 )
1 b)
2 a)
2 b)
17
TMA1101Calculus, Trimester1, 2017/2018 Topic 4: Differentiation
Suppose that lim f ( x) = lim g ( x) = 0 and that f and g are differentiable on an open
x→a x→a
Remark
f ( x) 0
When lim f ( x) = lim g ( x) = 0 , lim is said to have the indeterminate form .
x→a x→a x→ a g ( x) 0
∞
L’Hôpital’s rule also applies to quotients that lead to the indeterminate form
∞
If f(x) and g(x) both approach infinity as x → a , then
f ( x) f ' ( x)
lim = lim ,
x→a g ( x ) x →a g ' ( x )
provided the latter limit exists. The a here may itself be either finite or infinite.
[a denotes a real number, ∞ or − ∞ .]
Example:
Evaluate the following.
3x 2 − 3 x − sin x x − 2x 2 ln x
a) lim 2 b) lim c) lim d) lim 1 / 3
x →1 x − x x→0 x 3 x →∞ 3x + 5 x
2 x→∞ x
Solution:
3x 2 − 3
a) lim
x →1 x 2 − x
Let f ( x) = 3 x 2 − 3, g ( x) = x 2 − x
lim f ( x) = lim g ( x) = 0 and g ' ( x) = 2 x − 1 ≠ 0 for x near 1.
x→a x→a
3x − 3
2
6x 6
∴ lim = lim = =6
x →1 x − x
2 x →1 2 x − 1 1
x − sin x
b) lim
x→0 x3
x − sin x 1 − cos x
lim 3
= lim
x →0 x x →0 3x 2
sin x
= lim
x →0 6 x
cos x 1
= lim =
x →0 6 6
x − 2x 2
c) lim 2
x →∞ 3x + 5 x
x − 2 x2 1 − 4x
lim 2 = lim
x →∞ 3 x + 5 x x →∞ 6 x + 5
−4 2
= lim =−
x →∞ 6 3
(nby, Jun 2017)
18