Escolar Documentos
Profissional Documentos
Cultura Documentos
01
Primer on Differentiation
1.
2.
3.
4.
5.
6.
In this primer, we will review the concepts of differentiation you learned in calculus.
Mostly those concepts are reviewed that are applicable in learning about numerical methods.
These include the concepts of the secant line to learn about numerical differentiation of
functions, the slope of a tangent line as a background to solving nonlinear equations using the
Newton-Raphson method, finding maxima and minima of functions as a means of
optimization, the use of the Taylor series to approximate functions, etc.
Introduction
The derivative of a function represents the rate of change of a variable with respect to
another variable. For example, the velocity of a body is defined as the rate of change of the
location of the body with respect to time. The location is the dependent variable while time
is the independent variable. Now if we measure the rate of change of velocity with respect to
time, we get the acceleration of the body. In this case, the velocity is the dependent variable
while time is the independent variable.
Whenever differentiation is introduced to a student, two concepts of the secant line
and tangent line (Figure 1) are revisited.
02.01.1
02.01.2
Chapter 02.01
f(x)
secant line
Q
tangent
line
x
Figure 1 Function curve with tangent and secant lines.
Let P and Q be two points on the curve as shown in Figure 1. The secant line is the straight
line drawn through P and Q .
f (x)
P
a
Figure 2 Calculation of the secant line.
The slope of the secant line (Figure 2) is then given as
f ( a + h) f ( a )
m PQ ,secant =
( a + h) a
a+h
Primer on Differentiation
02.01.3
f ( a + h) f ( a )
h
As Q moves closer and closer to P , the limiting portion is called the tangent line. The slope
of the tangent line m PQ ,tangent then is the limiting value of mPQ ,secant as h 0 .
=
m PQ , tangent = lim
h 0
f ( a + h) f ( a )
h
Example 1
Find the slope of the secant line of the curve y = 4x 2 between points (3,36) and (5,100).
250
200
f(x)
150
100
(5,100)
(3,36)
50
0
-2
-1
02.01.4
Chapter 02.01
f (3 + h) f (3)
h 0
h
4(3 + h) 2 4(3) 2
= lim
h 0
h
2
4(9 + h + 6h) 36
= lim
h 0
h
2
36 + 4h + 24h 36
= lim
h 0
h
h(4h + 24)
= lim
h 0
h
= lim(4h + 24)
m = lim
h 0
= 24
70
60
50
f(x)
40
30
20
10
0
-2
-1
Primer on Differentiation
h(24 + 4h)
h 0
h
= lim(24 + 4h)
= lim
h 0
= 24
Derivative of a Function
Recall from calculus, the derivative of a function f (x) at x = a is defined as
f ( a + h) f ( a )
f (a ) = lim
h 0
h
Example 3
Find f (3) if f ( x) = 4 x 2 .
Solution
f (3 + h) f (3)
h
4(3 + h) 2 4(3) 2
= lim
h 0
h
2
4(9 + h + 6h) 36
= lim
h 0
h
2
36 + 4h + 24h 36
= lim
h 0
h
h(4h + 24)
= lim
h 0
h
= lim(4h + 24)
f (3) = lim
h 0
h 0
= 24
Example 4
Find f if f ( x) = sin(2 x)
4
Solution
f + h f
4
4
f = lim
0
h
h
4
sin 2 + h sin 2
4
4
= lim
h0
h
02.01.5
02.01.6
Chapter 02.01
sin + 2h sin
2
2
= lim
h 0
h
sin cos(2h) + cos sin(2h) sin
2
2
2
= lim
h 0
h
cos(2h) + 0 1
= lim
h 0
h
cos(2h) 1
= lim
h 0
h
=0
from knowing that
1 cos(h)
lim
=0
h 0
h
( x, f ( x)) P
f ( x) f (a)
(a, f (a ))
xa
Q
a
Primer on Differentiation
02.01.7
f ( x) f (a)
xa
xa
of the definition of a derivative.
Solution
f (a ) = lim
f ( x) f (3)
x 3
x3
2
4 x 4(3) 2
= lim
x 3
x3
2
4 x 36
= lim
x 3
x3
4( x 2 9)
= lim
x 3
x3
4( x 3)( x + 3)
= lim
x 3
x3
= lim 4( x + 3)
f (3) = lim
x 3
= 4(3 + 3)
= 24
02.01.8
Chapter 02.01
f(x)
0.01
0
-0.3
-0.2
-0.1
0.1
0.2
0.3
0.4
-0.01
-0.02
-0.03
y = mx + c
= 0.1575 x + 0.0001493
is the equation of the tangent line.
f ( x),
f
(
x
),
y
,
and
dx 2
dx 2
For the n th derivative, the notations are
0.5
Primer on Differentiation
(n)
02.01.9
n
dn
(n) d y
( x ),
f ( x ), y ,
dx n
dx n
Theorems of Differentiation
Several theorems of differentiation are given to show how one can find the derivative of
different functions.
Theorem 1
The derivative of a constant is zero. If f ( x) = k , where k is a constant, f ( x) = 0 .
Example 7
Find the derivative of f ( x) = 6 .
Solution
f ( x) = 6
f ( x) = 0
Theorem 2
The derivative of f ( x) = x n , where n 0 is f ( x) = nx n 1 .
Example 8
Find the derivative of f ( x) = x 6 .
Solution
f ( x) = x 6
f ( x) = 6 x 61
= 6x 5
Example 9
Find the derivative of f ( x) = x 6 .
Solution
f ( x) = x 6
f ( x ) = 6 x 61
= 6 x 7
6
= 7
x
Theorem 3
The derivative of f ( x) = kg ( x) , where k is a constant is f ( x) = kg ( x) .
02.01.10
Example 10
Find the derivative of f ( x) = 10 x 6 .
Solution
f ( x) = 10 x 6
d
(10 x 6 )
f ( x) =
dx
d
= 10 x 6
dx
= 10(6 x 5 )
= 60x 5
Theorem 4
The derivative of f ( x) = u ( x) v( x) is f ( x) = u ( x) v ( x) .
Example 11
Find the derivative of f ( x) = 3x 3 + 8 .
Solution
f ( x) = 3x 3 + 8
d
f ( x) =
(3 x 3 + 8)
dx
d
d
=
(3 x 3 ) + (8)
dx
dx
d
= 3 (x3 ) + 0
dx
= 3(3 x 2 )
= 9x 2
Theorem 5
The derivative of
f ( x ) = u ( x )v ( x )
is
d
d
f ( x) = u ( x) v( x) + v( x) u ( x) . (Product Rule)
dx
dx
Example 12
Find the derivative of f ( x) = (2 x 2 6)(3 x 3 + 8)
Chapter 02.01
Primer on Differentiation
Solution
Using the product rule as given by Theorem 5 where,
f ( x ) = u ( x )v ( x )
d
d
f ( x) = u ( x) v( x) + v( x) u ( x)
dx
dx
2
3
f ( x) = (2 x 6)(3 x + 8)
u ( x) = 2 x 2 6
v( x) = 3x 3 + 8
Taking the derivative of u (x) ,
du d
(2 x 2 6)
=
dx dx
d
d
(2 x 2 ) (6)
=
dx
dx
d 2
= 2 (x ) 0
dx
= 2(2 x)
= 4x
Taking the derivative of v(x) ,
dv d
=
(3 x 3 + 8)
dx dx
d
d
=
(3 x 3 ) + (8)
dx
dx
d 3
= 3 (x ) + 0
dx
= 3(3 x 2 )
= 9x 2
Using the formula for the product rule
d
d
f ( x) = u ( x) v( x) + v( x) u ( x)
dx
dx
2
2
= (2 x 6)(9 x ) + (3 x 3 + 8)(4 x)
= 18 x 4 54 x 2 + 12 x 4 + 32 x
= 30 x 4 54 x 2 + 32 x
Theorem 6
The derivative of
u ( x)
f ( x) =
v( x)
is
02.01.11
02.01.12
f ( x) =
v( x)
Chapter 02.01
d
d
u ( x) u ( x) v( x)
dx
dx
(Quotient Rule)
(v( x)) 2
Example 13
Find the derivative of f ( x) =
(2 x 2 6)
.
(3 x 3 + 8)
Solution
Use the quotient rule of Theorem 6, if
u ( x)
f ( x) =
v( x)
then
d
d
v( x) u ( x) u ( x) v( x)
dx
dx
f ( x) =
2
(v( x))
From
(2 x 2 6)
f ( x) =
(3 x 3 + 8)
we have
u ( x) = 2 x 2 6
v( x) = 3x 3 + 8
Taking the derivative of u (x) ,
du d
( 2 x 2 6)
=
dx dx
d
d
(2 x 2 ) (6)
=
dx
dx
d
= 2 (x 2 ) 0
dx
= 2(2 x)
= 4x
Taking the derivative of v(x) ,
dv d
=
(3 x 3 + 8)
dx dx
d
d
=
(3 x 3 ) + (8)
dx
dx
d 3
= 3 (x ) + 0
dx
= 3(3 x 2 )
Primer on Differentiation
02.01.13
= 9x 2
Using the formula for the quotient rule,
(3 x 3 + 8)(4 x) (2 x 2 6)(9 x 2 )
f ( x) =
(3 x 3 + 8) 2
12 x 4 + 32 x 18 x 4 + 54 x 2
9 x 6 + 48 x 3 + 64
6 x 4 + 54 x 2 + 32 x
=
9 x 6 + 48 x 3 + 64
Table of Derivatives
f (x)
f (x)
xn , n 0
nx n 1
kx n , n 0
knx n 1
sin(x)
cos(x)
cos(x)
sin(x)
tan(x)
sec 2 ( x)
sinh(x)
cosh(x)
cosh(x)
sinh(x)
tanh(x)
1 tanh 2 ( x)
sin 1 ( x)
cos 1 ( x)
tan 1 ( x)
1
1 x2
1
1 x2
1
1+ x2
csc(x)
csc( x)cot ( x)
sec(x)
sec( x)tan( x)
cot (x)
csc 2 ( x)
csch(x)
coth( x)csch( x)
sech(x)
tanh( x) sech( x)
02.01.14
Chapter 02.01
coth(x)
1 coth 2 ( x)
csc 1 ( x)
sec 1 ( x)
cot 1 ( x)
|x|
x
x2 1
|x|
x2 x2 1
1
1+ x2
ax
ln(a )a x
ln(x)
1
x
log a (x)
1
xln(a )
ex
ex
dy
if x 2 + y 2 = 2 xy
dx
Primer on Differentiation
02.01.15
Solution
x 2 + y 2 = 2 xy
d 2
d
(x + y 2 ) =
(2 xy )
dx
dx
d
d
d 2
(2 xy )
(x ) + ( y 2 ) =
dx
dx
dx
dy
dy
2x + 2 y
= 2x + 2 y
dx
dx
dy
dy
2x
= 2 y 2x
2y
dx
dx
dy
= 2 y 2x
(2 y 2 x)
dx
dy 2 y 2 x
=
dx 2 y 2 x
dy
=1
dx
Example 15
If x 2 xy + y 2 = 5 , find the value of y .
Solution
x 2 xy + y 2 = 5
d 2
d
( x xy + y 2 ) =
(5)
dx
dx
d 2
d
d
( x ) ( xy ) + ( y 2 ) = 0
dx
dx
dx
dy
dy
2x x y + 2 y
=0
dx
dx
dy
( x + 2 y ) = 2 x + y
dx
dy y 2 x
=
dx 2 y x
y 2x
y =
2y x
Higher order derivatives
So far, we have limited our discussion to calculating first derivative, f (x) of a function
f (x) . What if we are asked to calculate higher order derivatives of f (x) .
A simple example of this is finding acceleration of a body from a function that gives the
location of the body as a function of time. The derivative of the location with respect to time
02.01.16
Chapter 02.01
is the velocity of the body, followed by the derivative of velocity with respect to time being
the acceleration. Hence, the second derivative of the location function gives the acceleration
function of the body.
Example 16
Given f ( x ) = 3x 3 2 x 7 , find the second derivative, f (x) and the third derivative, f (x) .
Solution
Given
we have
f ( x) = 3x 3 2 x 7
f ( x) = 3(3 x 2 ) 2
= 9x 2 2
d
( f ( x))
f ( x) =
dx
d
=
(9 x 2 2)
dx
= 9(2 x)
= 18 x
d
( f ( x))
f ( x) =
dx
d
=
(18 x)
dx
= 18
Example 17
If x 2 xy + y 2 = 5 , find the value of y .
Solution
From Example 15 we obtain
y 2x
,
y =
2y x
(2 y x) y = y 2 x
d
d
((2 y x) y ) = ( y 2 x)
dx
dx
d
d
d
d
(2 y x) ( y ) + y (2 y x) = ( y ) (2 x)
dx
dx
dx
dx
y (2 y x) + y (2 y 1) = y 2
2 y 2 2 y2
y =
2y x
Primer on Differentiation
02.01.17
After substitution of y ,
y 2x
y 2x
2 2
2
2 y x
2y x
y =
2y x
6( y 2 xy + x 2 )
=
(2 y x) 3
Finding maximum and minimum of a function
The knowledge of first derivative and second derivative of a function is used to find
the minimum and maximum of a function. First, let us define what the maximum and
minimum of a function are. Let f (x) be a function in domain D , then
f (a ) is the maximum of the function if f (a ) f ( x) for all values of x in the domain D .
f (a ) is the minimum of the function if f (a ) f ( x) for all values of x in the domain D .
The minimum and maximum of a function are also the critical values of a function.
An extreme value can occur in the interval [c, d ] at
end points x = c, x = d .
a point in [c, d ] where f ( x) = 0 .
a point in [c, d ] where f (x) does not exist.
These critical points can be the local maximas and minimas of the function (See Figure 8).
Example 18
Find the minimum and maximum value of f ( x) = x 2 2 x 5 in the interval [0,5] .
maximum
Domain = [c,d]
minimum
c
d
x
Figure 7 Graph illustrating the concepts of maximum and minimum.
02.01.18
Chapter 02.01
f(x)
Absolute Maximum
Local Maximum
Local Maximum
(f(x) does not exist)
Local
Minimum
Local Minimum
Absolute Minimum
Primer on Differentiation
02.01.19
12
maximum
10
8
6
f(x)
4
2
0
-2
-4
-6
minimum
-8
f ( x) = 1 / x
x
Figure 10 Function that has no maximum or minimum.
Figure 11 shows the maximum of the function occurring at a singular point. The function
f (x) has a sharp corner at x = a .
02.01.20
f (x)
Chapter 02.01
f (a )
x=a
Primer on Differentiation
02.01.21
Solution
f ( x) = x 2 2 x 5
f ( x) = 2 x 2
f ( x) = 0 at x = 1
f ( x) = 2
f (1) = 2 > 0
So the f (1) is the local minimum of the function.
Applications of Derivatives
Below are some examples to show real-life applications of differentiation.
Example 21
A rain gutter cross-section is shown below.
A
E
3
3
B
What angle of would make the cross-sectional area of ABCD maximum? Note that
common sense or intuition may lead us to believe that = / 4 would maximize the crosssectional area of ABCD. Question your intuition.
Solution
Area =
1
( BC + AD) CE
2
CE = CDsin( )
= 3sin( )
BC = 3
AD = BC + CD cos( ) + AB cos ( )
AD = 3 + 3cos( ) + 3cos( )
AD = 3 + 6cos( )
1
Area = (3 + 3 + 6cos( ))(3sin( ))
2
02.01.22
Chapter 02.01
When is
dA
= 0?
d
9cos( ) + 9cos(2 ) = 0
3
The angle at which the area is maximum is = 60 .
9
Area = 9 sin + sin 2
3
3 2 3
3 9 3
+
= 9
2 2 2
27
=
3
4
For the interval of = [0, ] , the area at the end points is
Area(0) = 0
Area( ) = 0
Example 22
A classic example of the application of differentiation is to find the dimensions of a circular
cylinder for a specific volume but which uses the least amount of material. Do this classic
problem for a volume of 9m 3 .
Solution
The total surface area, A of the cylinder is
A = top surface + side surface + bottom surface
= r 2 + 2rh + r 2
= 2r 2 + 2rh
The volume, V of the cylinder is
V = r 2 h
since
V = 9m 3 .
We can write
Primer on Differentiation
02.01.23
9 = r 2 h
9
h= 2
r
This gives the surface area just in terms of r as
9
A = 2r 2 + 2r 2
r
18
= 2r 2 +
r
2
= 2r + 18r 1
V = 9 m3
h
r
Figure 13 Cylinder drawing for Example 20.
To find the minimum, take the first derivative of A with respect to r as
dA
= 4r + 18(1)r 2
dr
18
= 4r 2
r
Solving for
dA
= 0,
dr
18
4r 2 = 0
r
3
4r 18 = 0
18
r3 =
4
02.01.24
Chapter 02.01
18 3
r =
4
= 1.12725 m
Since
h=
9
,
r 2
9
(1.12725) 2
= 2.25450 m
But does this value of r correspond to a minimum?
d2A
= 4 18(2)r 3
2
dr
36
= 4 + 3
r
36
= 4 +
1.12725
= 44.5025
h=
d2A
> 0 for r = 1.12725 m . As per the second derivative test, r = 1.12725 m
dr 2
corresponds to a minimum.
This value
DIFFERENTIATION
Topic
Primer on Differentiation
Summary These are textbook notes of a primer on differentiation
Major
General Engineering
Authors
Autar Kaw, Luke Snyder
Date
July 17, 2008
Web Site http://numericalmethods.eng.usf.edu