Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Math1120 - Mathematics II

Calculus (IV): Partial Differentiation


§1 Partial Differentiation

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.

Example 1: Consider the function f ( x, y)  x 2  y 2 . The graph of this function is


shown below. At  x, y    0,0  , f  0 . As we can see by looking at the graph, as we
move away from the origin along the positive x-axis the value of f is increasing, i.e. the
rate of change of the function will be positive. However, if we move away from the
origin along the positive y-axis the value of f is decreasing, i.e. the rate of change of the
function will be negative.

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.

Consider the function of two variables, f ( x, y) .

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 

Example 3: Using the definition, calculate the partial derivatives of


x2  y 2
f ( x, y)  5  at the point  2,1 .
2

Firstly, calculate the partial derivative of f with respect to x at  2,1 .

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

Next, calculate the partial derivative of f with respect to y at  2,1 .

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

If we calculate the partial derivatives of a function at the general point  x, y  (as


opposed to some specific point  x0 , y0  ) we will obtain (instead of two specific values) two
new functions of two variables.

Example 4: Using the definition, calculate the partial derivatives of f ( x, y)  xy 1 .

Calculating the partial derivative with respect to x:

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

Now, calculating the partial derivative with respect to y:

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

Example 6: Find f x and f y when f ( x, y)  x 2 y .

To find f x ( x, y) , think of y as a constant. Thus,


f x  x, y   2 xy .

To find f y ( x, y) , think of x as a constant. Again,


f y  x, y   x 2

x
Example 7: Find f x and f y when f ( x, y )  sin 1    5 x 2 .
 y

To find f x ( x, y) , think of y as a constant. Thus, using the chain rule:


1 1
f x  x, y   .  10 x
2 y
x
1  
 y .
1
  10 x
y  x2
2

To find f y ( x, y) , think of x as a constant. Again, using the chain rule:

   xy 2   0
1
f y  x, y  
2
x
1  
 y
x

y y 2  x2

Example 8: The equation xz  y 2 z 3  2 can be thought of as implicitly defining z as a


function of x and y. Find z x and z y .

To find z x differentiate both sides of the defining equation with respect to x,


remembering that z is some unknown function of x. Also, remember to treat y as a
constant. Then, using the product rule and the chain rule

 
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

Similarly, differentiating both sides of the defining equation with respect to y

 
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 .

Write the function as


f  x, y, z   2 xe xz  3 ye xz  z 2e xz .
To find f x treat y and z as constants and think of f as a function of x only. Thus
f x  x, y, z   (2 xze xz  2e xz )  3 yze xz  z 3e xz
 e xz (2 xz  3 yz  z 3  2)
To find f y treat x and z as constants and think of f as a function of y only. Thus
f y  x, y, z   0  3e xz  0
 3e xz
Finally, to find f z treat x and y as constants and think of f as a function of z only. Thus
f z  x, y, z   2 x 2e xz  3xye xz  ( xz 2e xz  2 ze xz )
 e xz (2 x 2  3xy  xz 2  2 z )

Example Tasks

ET 1: Find both partial derivatives of the function f ( x, y)  4  xy  y 2 at the point


 3, 2  .
f f
ET 2: Find and when f ( x, y)  ln( x2  4 xy3 ) .
x y
e xy
ET 3: If L( x, y )  , find Lx (2,3) .
(1  x)(1  y )

ET 4:* Find f x ( x, y) and f y ( x, y) when f ( x, y)  x y

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.

§2 Higher Partial Derivatives

The partial derivatives of the function z  f  x, y  are themselves functions of two


variables. Thus they can be differentiated further, giving the second partial derivatives, the
third partial derivatives etc. Common notations for the second partial derivatives include:

  f   2 f
    f x  x  f xx
x  x  x 2
  f   2 f
    f x  y  f xy
y  x  yx
  f   2 f
    f y   f yx
x  y  xy 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) .

Begin by finding the first partial derivatives. Here

f x  x, y   cos( x) cos( y) and f y  x, y    sin( x)sin( y) .

Now differentiate f x  x, y  firstly with respect to x to find f xx  x, y  and then with


respect to y to find f xy  x, y  . Thus

f xx  x, y    sin( x) cos( y) , and


f xy  x, y    cos( x)sin( y) .

Next differentiate f y  x, y  with respect to x to find f yx  x, y  and then with respect to y


to find f yy  x, y  . Thus

f yx  x, y    cos( x)sin( y) , and


f yy  x, y    sin( x) cos( y) .

Notice that for this function f xy ( x, y)  f yx ( x, y) .

y
Example 11: Calculate g xxy , g xyx and g yxx when g  x, y   xy 2  .
x2

Begin by writing the function in the form


g ( x, y)  xy 2  yx 2 .
Then the first partial derivatives are

g x  y 2  2 yx 3 and g y  2 xy  x 2

and hence the second partial derivatives are

g xx  6 yx 4 , g xy  2 y  2 x 3 , g yx  2 y  2 x 3 , g yy  2 x .

Differentiating g xx with respect to y, g xy with respect to x and g yx with respect to x


gives
g xxy  6 x 4 , g xyx  6 x 4 , g yxx  6 x 4 .

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  .

Clairaut’s Theorem can be extended to higher partial derivatives and to functions of


more than two variables.

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

ET 1: Find the second partial derivatives for the function z  xye y .

y
ET 2: Calculate g xx , g xy and g xyy for g ( x, y ) 
1  x2
 x
ET 3: Let u ( x, t )  et 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

You might also like