Professional Documents
Culture Documents
2 March 2021
z = f ( x) = f ( x1 , x2 ,..., xn )
where x1 , x2 ,..., xn are the independent variables and z is the dependent variable.
It is possible to visualize a function of two variable (a surface in 3-D space) by drawing its graph.
Example 1. f ( x, y) = x 2 + y 2
Example 2. f ( x, y) = x 2 − y 2
1
II. Partial Differentiation
Recall that for a function f ( x) of one variable
df f ( x0 + h) − f ( x0 )
f ' ( x0 ) = ( x0 ) = lim
dx h →0 h
Now consider the function of two variables f ( x, y ) . If y is held constant, say y = y 0 , then
f ( x, y0 ) becomes a function of one variable, x, and we may define its derivative at x 0 , the partial
derivative of f with respect to x at the point ( x0 , y0 ) as
f f ( x0 + h, y0 ) − f ( x0 , y0 )
( x0 , y0 ) = lim
x h →0 h
Similarly, if x is held constant, say x = x0 , the partial derivative of f with respect to y at the
point ( x0 , y0 ) is
f f ( x0 , y0 + h) − f ( x0 , y0 )
( x0 , y0 ) = lim
y h →0 h
Note:
(a) A partial derivative is just an ordinary derivative with respect to the variable which is not held
constant.
(b) For z = f ( x, y ) , alternative notations are:
f
(x, y ) = f x (x, y ) = z (x, y ) = z x (x, y )
x x
f
Similarly for ( x, y ) = f y ( x, y ) etc.
y
(c) The definition of a partial derivative only requires the idea of a limit of a function of one
variable.
Example 3. For each of the functions below, find all first derivatives.
(a) f ( x, y) = x 2 y + y 3 sin x
(b) f ( x, y, z ) = e 2 z cos xy
Solution:
f f
(a) = 2 xy + y 3 cos x = x 2 + 3 y 2 sin x
x y
f f f
(b) = −e 2 z y sin xy = −e 2 z x sin xy = 2e 2 z cos xy
x y z
2
We may differentiate the first partial derivatives of a function again to obtain the second partial
derivatives.
2 f f
f xx = 2 =
x x x
2 f f
f yy = =
y 2
y y
2 f f
f yx = =
xy x y
2 f f
f xy = =
yx y x
1
Example 4. Obtain all first and second derivatives of f ( x, y ) = ln ( x + y 2
)
2 2
.
( )
1
Solution: f ( x, y ) = log x 2 + y 2 2
f x f y
fx = = 2 fy = = 2
x x + y 2 y x + y 2
2 f x 1 2x 2 y2 − x2
f xx = = = − =
x 2 x x 2 + y 2 x 2 + y 2 x2 + y2 ( )
2
(x 2
+ y2 )
2
2 f x − 2 xy
f xy = = 2 =
2
yx y x + y x 2 + y 2 ( ) 2
x2 − y2 − 2 xy
f yy = f yx =
(x 2
+y )
2 2
(x 2
+ y2 )
2
Note that in the above example f xy = f yx , which is the case for most functions that are useful in
engineering and science. However, it is not true for all functions.
3
III. The Chain Rule
1 t +1 dy
Example 5. y = and x = , find .
x t −1 dt
By chain rule:
dy df dx 1 ( t − 1) − ( t + 1) ( t − 1) −2
2
2
= = − 2 = − 2 2
=
dt dx dt x ( t − 1) 2
( t + 1) ( t − 1) ( t + 1)
2
f f
1
Example 6. If f = ln u and u = ( x 2 + y 2 ) 2 , find and .
x y
By direct differentiation:
1
1
f ( x, y ) = ln u = ln( x + y ) = ln( x 2 + y 2 ) , then
2 2 2
2
f 1 x f 1 y
= 2x = 2 and = 2y = 2
x 2( x + y )
2 2
(x + y )
2
y 2( x + y )
2 2
(x + y2 )
By chain rule:
f 1 1 2 1
f 1 1 2 1
= ( x + y2 ) 2 2x = 2 ( )
− x 2 −2 y
and = x + y 2y = 2
x u 2 x +y 2
y u 2 x + y2
Theorem 2.
dz f dx f dy
If z = f ( x, y ) and x = x(t), y = y(t) then = +
dt x dt y dt
Example 7.
dz
Let z = f ( x, y ) = x 2 + 2 xy , where x = sin t and y = cos t . Find .
dt
By direct differentiation:
4
dz
= 2sin t cos t + 2cos 2t
dt
By Theorem 2:
dz f dx f dy
= +
dt x dt y dt
= ( 2 x + 2 y ) cos t + 2 x ( − sin t )
= 2sin t cos t + 2 cos 2 t − 2sin 2 t
= 2sin t cos t + 2 cos 2t
2
d z
Example 8. Let z = f ( x, y), x = t 2 , y = t. Evaluate 2
for t = 1 , if
dt
f f f
2
f
2
f
2
f
2
(1,1) = (1,1) = (1,1) = (1,1) = e, (1,1) = (1,1) = 2e
x y x2 y2 xy yx
Solution:
dz f dx f dy
= +
dt x dt y dt
d z d dz d f dx f dy
2
= = +
dt
2
dt dt dt x dt y dt
f d 2 x dx d f f d 2 y dy d f
= + + +
x dt 2 dt dt x y dt 2 dt dt y
f f f f
f d x dx x dx
2
x dy f d y dy y dx
2
y dy
= 2 + + + 2 + +
x dt dt x dt y dt y dt dt x dt y dt
f d 2 x 2 f dx 2 f dy dx f d 2 y 2 f dx dy 2 f dy
2 2
= + + + + +
x dt 2 x 2 dt y x dt dt y dt 2 x y dt dt y 2 dt
dx d 2x dy d2y
x = t2 = 2t , 2 = 2 , y = t = 1, 2 = 0 .
dt dt dt dt
If t = 1 , then x = 1, y = 1 . Therefore,
f 2 f 2 f
2
d z
2
d 2x dx dy dx
t =1 = (1,1) t =1 + (1,1) t =1 + (1,1) t =1 t =1
dt
2
x dt 2 x 2
dt y x dt dt
f 2 f 2 f
2
d2y dx dy dy
+ (1,1) 2 t =1 + (1,1) t =1 t =1 + (1,1) t =1
y dt x y dt dt y 2
dt
= e 2 + e 4 + 2e 1 2 + e 0 + 2e 2 1 + e 1 = 15e
5
Theorem 3. (Change of Variable)
If z = f ( x, y ) , where x = x( s, t ) and y = y(s, t ) , then
z f x f y
= +
s x s y s
z f x f y
= +
t x t y t
z
Example 9. It is given that z = f ( x, y) = e2 xy , where x = r cos and y = r sin . Find and
r
z
.
z f x f y
= +
z f x f y r x r y r
Solution: = +
r x r y r = 2 ye 2 xy cos + 2 xe 2 xy sin
z f x f y z f 2x f y
= + = + = r sin 2+
= sin 2ex y
2 xy 2 xy
r x r y r z f x f y 2 ye cos 2 xe sin 2 r
= +r 2 sin 2
= 2 ye 2 xy cos + 2=xe22rxysinx 2e y
sin = 2 ye 2 xy (− r sin ) + 2 xe 2 xy r cos
z f x r 2fsin2y
= 2r sin 2+e = 2 ye 2 xy (− r sin ) + 2 xe 2 xy r cos = 2r 2 cos 2e r sin 2
2
=
x y
r 2 sin 2
2 xy =
= 2 ye (− r sin ) + 2 xe r cos
2 r 2
cos
2 xy 2 e
Example 10. It is given that z = f ( x, y) , where x = r cos and y = r sin .
r 2 sin 2
= 2 r 2
cos 2
Let f (r , ) = f ( x(r , ), y(r , ) = f (r cos , r sin ) . Assume appropriate differentiability properties
e
of f . Show that
f (r , ) = cos f ( x, y ) + sin f ( x, y )
r x y
2 2 2 2
f ( r , ) = cos 2
f ( x , y ) + 2 sin cos f ( x , y ) + sin 2
f ( x, y )
r 2 x 2 xy y 2
Solution:
f
f ( r , ) = f ( x, y ) x(r , ) + ( x, y ) y (r , ) = cos f ( x, y ) + sin f ( x, y )
r x r y r x y
2
f (r , ) = f (r , ) = cos f ( x, y ) + sin f ( x, y )
r 2
r r r x r y
2
2
= cos 2 f ( x, y ) x(r , ) + f ( x, y ) y (r , )
x r y x r
2 2
+ sin f ( x , y ) x ( r , ) + 2 f ( x, y ) y (r , )
x y r y r
2
2
2
= cos 2 2 f ( x, y ) + 2sin cos f ( x, y ) + sin 2 2 f ( x, y )
x x y y
6
IV. Taylor’s Series
f '( x0 ) f ''( x0 )
f ( x) = f ( x0 ) + ( x − x0 ) + ( x − x0 ) 2 + ...
1! 2!
1 f f
f ( x, y ) = f ( x0 , y0 ) + ( x0 , y0 ) ( x − x0 ) + ( x0 , y0 ) ( y − y0 )
1! x y
1 2 f 2 f 2 f
+ (
2 0 0 x , y ) ( x − x ) 2
+ 2 ( x , y ) ( x − x )( y − y ) + 2 ( 0
x , y0 ) ( y − y0 ) 2 + ...
2! x x y y
0 0 0 0 0
Example 11. Find the tangent plane and quadratic surface approximations given by Taylor’s
Theorem for:
1
a. f ( x, y ) = ( x 2 + y 2 ) 2 at the point (1,0), hence estimate f (0.9, 0.1).
b. z ( x, y) = cos( x + y) − cos x cos y at the point (0,0).
Solution:
a.
x y
fx = , fy =
(x ) (x )
1 1
2
+y 2 2 2
+ y2 2
y2 − xy x2
f xx = , f xy = , f yy =
(x ) (x ) (x )
3 3 3
2
+y 2 2 2
+y 2 2 2
+y 2 2
All above partial derivatives exist everywhere except at the origin (0,0).
7
p 2 ( x, y ) = f (1,0 ) + ( x − 1) f x (1,0 ) + ( y − 0 ) f y (1,0 )
+
1
2!
(x − 1)2 f xx (1,0) + 2(x − 1)( y − 0) f xy (1,0) + ( y − 0)2 f yy (1,0)
1
2!
= 1 + ( x − 1) + y 0 + ( x − 1) 0 + 2( x − 1) y 0 + y 2 1
2
p 2 ( x, y ) = x + y 2
1
2
1
And, using quadratic surface: f (0.9, 0.1) p2 (0.9, 0.1) = 0.9 + (0.1) 2 = 0.905
2
z Quadratic surface
approzimation
x=1
y=0
Tangent
plane
x
Linear and quadratic approximations to the cone
1
z = ( x + y ) near ( x, y) = (1,0)
2 2 2
8
b.
z
z = cos( x + y ) − cos x cos y = − sin( x + y ) + sin x cos y
x
z 2 z
= − sin( x + y ) + cos x sin y, = − cos( x + y ) + cos x cos y
y x2
2 z 2 z
= − cos( x + y ) − sin x sin y, = − cos( x + y ) + cos x cos y
x y y2
Then,
z z 2 z 2 z 2 z
z (0, 0) = 0, ( 0, 0 ) = 0, ( 0, 0 ) = 0, 2 ( 0, 0 ) = 0, ( 0, 0 ) = −1, 2 ( 0, 0 ) = 0
x y x x y y
z z
q1 ( x, y ) = z (0, 0) + ( 0, 0 ) ( x − 0) + ( 0, 0 ) ( y − 0) = 0
x y
z z 1 2 z 2 z 2 z
q2 ( x, y ) = z (0, 0) + ( 0, 0 ) x + ( 0, 0 ) y + 2 ( 0, 0 ) x + 2
2
( 0, 0 ) xy + 2 ( 0, 0 ) y 2 = − xy
x y 2 x x y y
V. Maxima ad Minima
A function f has a local maximum at a point ( x0 , y0 ) if for all points ( x, y ) that are
sufficiently close to ( x0 , y0 ) , we have f ( x, y ) f ( x0 , y0 ) .
A function f has a local minimum at a point ( x0 , y0 ) if for all points ( x, y ) that are
sufficiently close to ( x0 , y0 ) , we have f ( x, y ) f ( x0 , y0 ) .
A function f has a global (absolute) maximum (minimum) at a point ( x0 , y0 ) if for all points
( x, y ) :
f ( x0 , y0 ) f ( x, y ) [ in the case global maximum ]
9
Local maximum Local minimum
Local maximum
Saddle point
(
z = f ( x, y ) = x 2 + 3 y 2 e1− x) 2
− y2
Stationary Point
f f
( x0 , y0 ) is a stationary point if ( x0 , y0 ) = ( x0 , y0 ) = 0 .
x y
Saddle Point
However, it is possible to have a stationary point ( x0 , y0 ) which is neither a local maximum nor a
local minimum. If along one path through ( x0 , y0 ) the point is a local minimum, whilst along a
different path it is a local maximum, we say that ( x0 , y0 ) is a saddle point.
Theorem 5.
Assume appropriate differentiability properties of f and f x ( x0 , y0 ) = f y ( x0 , y0 ) = 0 .
Let D ( x0 , y0 ) = f xx ( x0 , y0 ) f yy ( x0 , y0 ) − f xy ( x0 , y0 )
2
iv. It is inconclusive if D ( x0 , y0 ) = 0
10
Example 12. Find all the local extremum of the following functions:
(a) f ( x, y ) = x 2 + 2 y 2
(b) f ( x, y ) = 2 x − x 2 − 2 y 2
(c) f ( x, y ) = x 2 − 2 y 2
Solution:
(a)
f x ( x, y ) = 2 x, f y ( x, y ) = 4 y
f x ( x, y ) = 2 x = 0 & f y ( x, y ) = 4 y = 0 ( x, y ) = (0,0) is the only stationary point.
f xx (x, y ) = 2, f yy (x, y ) = 4, f xy ( x, y ) = 0 and f xx (0,0) = 2 0
D ( 0, 0 ) = 8 0
f (0,0) = 0 is a local minimum and clearly f ( x, y) 0 for all ( x, y ) , hence this is a global
minimum.
f ( x, y) = x 2 + 2 y 2
(b)
f x ( x, y ) = 2 − 2 x, f y ( x, y ) = −4 y
f x ( x, y ) = 2 − 2 x = 0 & f y ( x, y ) = −4 y = 0 ( x, y ) = (1,0) is the only stationary point.
f xx (x, y ) = −2, f yy (x, y ) = −4, f xy ( x, y ) = 0 and f xx (1,0) = −2 0
D (1, 0 ) = 8 0
f (1,0) = 1 is a local maximum.
11
f ( x, y) = 2 x − x 2 − 2 y 2
(c)
f x ( x, y ) = 2 x, f y ( x, y ) = −4 y
f x ( x, y ) = 2 x = 0 & f y ( x, y ) = −4 y = 0 ( x, y ) = (0,0) is the only stationary point.
f xx (x, y ) = 2, f yy (x, y ) = −4, f xy ( x, y ) = 0
Since D ( 0, 0 ) = −8 0 , so (0,0) is a saddle point.
f ( x, y) = x 2 − 2 y 2
y y
f<0
f 0 f>0
x
f<0
Solution:
f x = 3x 2 + 6 y f y = 6x + 6 y
f x = 3x 2 + 6 y = 0 x 2 + 2 y = 0 ( − y )2 + 2 y = 0 y ( y + 2 ) = 0
f y = 6 x + 6 y = 0 x = − y
x = − y x = − y
y = 0 y = −2
or
x = 0 x = 2
(0, 0) and (2, − 2) are the stationary points.
12
f xx = 6 x , f yy = 6 , f xy = 6 = f yx
D ( x, y ) = f xx f yy − f xy = 36 x − 36
2
f xx (2, − 2) = 12 0 and D ( 2, − 2 ) = 36 0
Example 14. Determine the nature of the stationary points of f (x, y ) = x 3 + y 3 − 3(x + y ) .
Solution:
f f
= 3x 2 − 3 and = 3y 2 − 3
x y
f f
= = 0 x = 1 and y = 1
x y
2 f 2 f 2 f
= 6 x , = 6 y and =0
x 2 y 2 xy
13