M1120 Calculus (IV) Lecture
M1120 Calculus (IV) Lecture
Firstly, let’s recall some of the important things that we know about the derivative of
the function of one variable, f ( x) .
i. At any given point x0 , f x0 gives the slope of the tangent to the graph of the
function at that point.
ii. At any given point x0 , f x0 gives the instantaneous rate of change of the
function at that point.
iii. The derivative f ( x) is itself a function of one variable, when it exists.
For a function of two variables, f ( x, y) , the rate at which the function is changing at
any point as we vary the independent variables depends upon the direction in which we vary
those variables.
Figure 1 ☼
Page 33
Calculus (IV) - Lecture Notes
As a first step to analyzing more formally how a function of two variables can change
with respect to its independent variables we will first consider the cases where we vary only
one variable at a time.
x2 y 2
Example 2: Consider the function f ( x, y) 5 at the point 2,1 .
2
Firstly, let’s look at the instantaneous rate of change of f in the direction of the
positive x-axis, As shown in the diagram below, if we hold y constant at y 1 and vary
x we are actually moving along the curve
9 1
z x2 .
2 2
Figure 2
dz dz
Along this curve x and at x 2 we have 2 . Thus, the instantaneous rate
dx dx
of change of f in the direction of the positive x-axis at the point 2,1 is 2 .
Now consider the instantaneous rate of change of f in the direction of the positive
y-axis. As shown in the diagram below, if we hold x constant at x 2 and vary y we
are actually moving along the curve
1
z 3 y2 .
2
dz dz
Along this curve y and at y 1 we have 1 . Thus, the instantaneous rate
dy dy
of change of f in the direction of the positive y-axis at the point 2,1 is 1 .
Page 34
Math1120 - Mathematics II
Figure 3 ☼
The above example provided an illustration of calculating what are called partial
derivatives. Formally partial derivatives are defined as follows.
The partial derivative of f with respect to x at the point x0 , y0 is given by the limit (if
it exists)
f f x0 h, y0 f x0 , y0
x0 , y0 lim
x h 0
h
The partial derivative of f with respect to y at the point x0 , y0 is given by the limit (if
it exists)
f f x0 , y0 h f x0 , y0
x0 , y0 lim
y h 0
h
Page 35
Calculus (IV) - Lecture Notes
f f 2 h,1 f 2,1
2,1 lim
x h 0
h
1 (2 h) 2 12 22 12
lim 5 5
h 0 h
2 2
1 1
lim 4 4h h 2 1 4 1
1
2
h 0 h 2
1 1
lim 2h h 2
h 0 h 2
2
f f 2,1 h f 2,1
2,1 lim
y h 0
h
1 22 (1 h) 2 22 12
lim 5
5
h 0 h
2 2
1 1
lim 4 1 2h h 2 4 1
1
2
h 0 h 2
1 1
lim h h 2
h 0 h 2
1
☼
f f x h, y f x , y
x, y lim
x h 0
h
(( x h) y 1) ( xy 1)
lim
h 0
h
hy
lim
h 0
h
y
Page 36
Math1120 - Mathematics II
f f x, y h f x , y
x, y lim
y h 0
h
( x( y h) 1) ( xy 1)
lim
h 0
h
hx
lim
h 0
h
x
☼
As can be seen in the above example, to calculate the partial derivative of f with respect
to x at the general point x, y all we have to do is treat y as a constant and differentiate
f x, y with respect to x (using all of the familiar rules of differentiation for functions of one
variable). Similarly, to calculate the partial derivative of f with respect to y at the general
point x, y treat x as a constant and differentiate f x, y with respect to y.
x2 y 2
Example 5: Find the partial derivatives of the function f ( x, y) 5 at the point
2
2,1 using the above method.
This function can be written as
1 1
f ( x, y ) 5 x 2 y 2 .
2 2
Now, thinking of y as a constant (so that 12 y 2 is also constant) and treating the function
as a function of x only,
f 1
0 2 x 0 x
x 2
Thus
f
2,1 2 .
y
Next, think of x as a constant (so that 12 x 2 is also constant) and treating the function as
a function of y only
f 1
0 0 2 y y .
y 2
Thus
f
2,1 1 .
y
☼
A shorter notation for the partial derivative of f with respect to x is f x . Similarly the
partial derivative with respect to y is written as f y .
Page 37
Calculus (IV) - Lecture Notes
xy 2 0
1
f y x, y
2
x
1
y
x
y y 2 x2
☼
x
xz y 2 z 3 2
x
xz x z 3 y z z x 0
2 2
zx ( x 3 y 2 z 2 ) z
z
zx
x 3y2 z2
Page 38
Math1120 - Mathematics II
y
xz y 2 z 3 2
y
xz y 2 yz 3 3 y 2 z 2 z y 0
z y ( x 3 y 2 z 2 ) 2 yz 3
2 yz 3
zy
x 3y2 z2
☼
Partial derivatives can be found for functions of more than two variables.
Example 9: Find the partial derivatives for the function of three variables
f x, y, z (2 x 3 y z 2 )e xz .
Example Tasks
Page 39
Calculus (IV) - Lecture Notes
ET 5:* In the following contour plot the contours are for evenly spaced values of k from
2 at the point X to 2 at the point Y. Find the sign of f x ( x, y) and f y x, y at the
points A, B and C given the following contour plot for the function f x, y . Explain
your thinking.
f 2 f
f x x f xx
x x x 2
f 2 f
f x y f xy
y x yx
f 2 f
f y f yx
x y xy x
f 2 f
f y f yy
y y y 2 y
Page 40
Math1120 - Mathematics II
Example 10: Find the second partial derivatives for the function
f x, y sin( x) cos( y) .
y
Example 11: Calculate g xxy , g xyx and g yxx when g x, y xy 2 .
x2
g x y 2 2 yx 3 and g y 2 xy x 2
g xx 6 yx 4 , g xy 2 y 2 x 3 , g yx 2 y 2 x 3 , g yy 2 x .
The above examples have provided examples of the following general result.
Page 41
Calculus (IV) - Lecture Notes
Clairaut’s Theorem
If for the function f x, y both f xy and f yx are continuous on some domain D, then on
that domain
f xy x, y f yx x, y .
Example 12: Calculate all first and second order partial derivatives for the function
x2 3 y 2
g x, y, z .
1 2z
g is a function of 3 variables but Clairaut’s theorem still holds. Thus there will be
only 6 distinct second partial derivatives, i.e. g xx , g xy , g xz , g yy , g yz , g zz .
Now
2x 6y 2( x 2 3 y 2 )
gx , gy , gz
1 2z 1 2z (1 2 z )2
and so
2 4 x
g xx , g xy 0 , g xz
1 2z (1 2 z ) 2
12 y 6 8( x 2 3 y 2 )
g yz , g yy , g zz
(1 2 z ) 2 1 2z (1 2 z )3
☼
Example Tasks
y
ET 2: Calculate g xx , g xy and g xyy for g ( x, y )
1 x2
x
ET 3: Let u ( x, t ) et sin where c is a constant and c 0 . Determine if u satisfies
c
u 2 u
2
c .
t x 2
Aside: Computer algebra systems can find partial derivatives. For example, here are
some examples of a queries to Wolfram Alpha that will work.
Page 42
Math1120 - Mathematics II
Page 43