1 First partial derivatives

1.1 The x partial derivative

For a function of a single variable, y = f ( x ) , changing the independent variable x leads to a corresponding change in the dependent variable y . The rate of change of y with respect to x is given by the derivative , written d f d x . A similar situation occurs with functions of more than one variable. For clarity we shall concentrate on functions of just two variables.

In the relation z = f ( x , y ) the independent variables are x and y and the dependent variable z . We have seen in Section 18.1 that as x and y vary the z -value traces out a surface. Now both of the variables x and y may change simultaneously inducing a change in z . However, rather than consider this general situation, to begin with we shall hold one of the independent variables fixed . This is equivalent to moving along a curve obtained by intersecting the surface by one of the coordinate planes.

Consider f ( x , y ) = x 3 + 2 x 2 y + y 2 + 2 x + 1.

Suppose we keep y constant and vary x ; then what is the rate of change of the function f ?

Suppose we hold y at the value 3 then

f ( x , 3 ) = x 3 + 6 x 2 + 9 + 2 x + 1 = x 3 + 6 x 2 + 2 x + 10

In effect, we now have a function of x only. If we differentiate it with respect to x we obtain the expression:

3 x 2 + 12 x + 2.

We say that f has been partially differentiated with respect to x . We denote the partial derivative of f with respect to x by f x (to be read as ‘partial dee f by dee x ’ ). In this example, when y = 3 :

f x = 3 x 2 + 12 x + 2.

In the same way if y is held at the value 4 then f ( x , 4 ) = x 3 + 8 x 2 + 16 + 2 x + 1 = x 3 + 8 x 2 + 2 x + 17 and so, for this value of y

f x = 3 x 2 + 16 x + 2.

Now if we return to the original formulation

f ( x , y ) = x 3 + 2 x 2 y + y 2 + 2 x + 1

and treat y as a constant then the process of partial differentiation with respect to x gives

f x = 3 x 2 + 4 x y + 0 + 2 + 0 = 3 x 2 + 4 x y + 2.
Key Point 1

The Partial Derivative of f with respect to x

For a function of two variables z = f ( x , y ) the partial derivative of f with respect to x is denoted by    f x   and is obtained by differentiating f ( x , y ) with respect to x in the usual way but treating the y -variable as if it were a constant.

Alternative notations for f x are f x ( x , y ) or f x or z x .

Example 2

Find f x for

  1. f ( x , y ) = x 3 + x + y 2 + y ,
  2. f ( x , y ) = x 2 y + x y 3 .
Solution
  1. f x = 3 x 2 + 1 + 0 + 0 = 3 x 2 + 1
  2. f x = 2 x × y + 1 × y 3 = 2 x y + y 3

1.2 The y partial derivative

For functions of two variables f ( x , y ) the x and y variables are on the same footing, so what we have done for the x -variable we can do for the y -variable. We can thus imagine keeping the x -variable fixed and determining the rate of change of f as y changes. This rate of change is denoted by f y .

Key Point 2

The Partial Derivative of f with respect to y

For a function of two variables z = f ( x , y ) the partial derivative of f with respect to y is denoted by f y   and is obtained by differentiating f ( x , y ) with respect to y in the usual way but treating the x -variable as if it were a constant.

Alternative notations for f y are f y ( x , y ) or f y or z y .

Returning to f ( x , y ) = x 3 + 2 x 2 y + y 2 + 2 x + 1 once again, we therefore obtain:

f y = 0 + 2 x 2 × 1 + 2 y + 0 + 0 = 2 x 2 + 2 y .

Example 3

Find f y for

  1. f ( x , y ) = x 3 + x + y 2 + y
  2. f ( x , y ) = x 2 y + x y 3
Solution
  1. f y = 0 + 0 + 2 y + 1 = 2 y + 1
  2. f y = x 2 × 1 + x × 3 y 2 = x 2 + 3 x y 2

We can calculate the partial derivative of f with respect to x and the value of f x at a specific point e.g. x = 1 , y = 2 .

Example 4

Find f x ( 1 , 2 ) and f y ( 3 , 2 ) for f ( x , y ) = x 2 + y 3 + 2 x y .

[Remember f x means f x and f y means f y .]

Solution

f x ( x , y ) = 2 x + 2 y , so f x ( 1 , 2 ) = 2 4 = 2 ; f y ( x , y ) = 3 y 2 + 2 x , so f y ( 3 , 2 ) = 12 6 = 6

Task!

Given f ( x , y ) = 3 x 2 + 2 y 2 + x y 3 find f x ( 1 , 2 ) and f y ( 1 , 1 ) .

First find expressions for f x and f y :

f x = 6 x + y 3 , f y = 4 y + 3 x y 2 Now calculate f x ( 1 , 2 ) and f y ( 1 , 1 ) :

f x ( 1 , 2 ) = 6 × 1 + ( 2 ) 3 = 2 ; f y ( 1 , 1 ) = 4 × ( 1 ) + 3 ( 1 ) × 1 = 7

1.3 Functions of several variables

As we have seen, a function of two variables f ( x , y ) has two partial derivatives, f x and f y . In an exactly analogous way a function of three variables f ( x , y , u ) has three partial derivatives f x , f y and f u , and so on for functions of more than three variables. Each partial derivative is obtained in the same way as stated in Key Point 3:

Key Point 3

The Partial Derivatives of f ( x , y , u , v , w , )

For a function of several variables z = f ( x , y , u , v , w , ) the partial derivative of f with respect to v (say) is denoted by    f v   and is obtained by differentiating f ( x , y , u , v , w , ) with respect to v in the usual way but treating all the other variables as if they were constants.

Alternative notations for f v when z = f ( x , y , u , v , w , ) are f v ( x , y , u , v , w ) and f v and z v .

Task!

Find f x and f u for f ( x , y , u , v ) = x 2 + x y 2 + y 2 u 3 7 u v 4

f x = 2 x + y 2 + 0 + 0 = 2 x + y 2 ; f u = 0 + 0 + y 2 × 3 u 2 7 v 4 = 3 y 2 u 2 7 v 4 .

Task!

The pressure, P , for one mole of an ideal gas is related to its absolute temperature, T , and specific volume, v , by the equation

P v = R T

where R is the gas constant.

Obtain simple expressions for

  1. the coefficient of thermal expansion, α , defined by:

    α = 1 v v T P

  2. the isothermal compressibility, κ T , defined by:

    κ T = 1 v v P T

v = R T P v T P = R P

so α = 1 v v T P = R P v = 1 T

v = R T P v P T = R T P 2

so κ T = 1 v v P T = R T v P 2 = 1 P

Exercises
  1. For the following functions find f x and f y
    1. f ( x , y ) = x + 2 y + 3
    2. f ( x , y ) = x 2 + y 2
    3. f ( x , y ) = x 3 + x y + y 3
    4. f ( x , y ) = x 4 + x y 3 + 2 x 3 y 2
    5. f ( x , y , z ) = x y + y z
  2. For the functions of Exercise 1 (a) to (d) find f x ( 1 , 1 ) , f x ( 1 , 1 ) , f y ( 1 , 2 ) , f y ( 2 , 1 ) .
    1. f x = 1 , f y = 2
    2. f x = 2 x , f y = 2 y
    3. f x = 3 x 2 + y , f y = x + 3 y 2
    4. f x = 4 x 3 + y 3 + 6 x 2 y 2 , f y = 3 x y 2 + 4 x 3 y
    5. f x = y , f y = x + z

f x ( 1 , 1 ) f x ( 1 , 1 ) f y ( 1 , 2 ) f y ( 2 , 1 )
(a) 1 1 2 2
(b) 2 2 4 2
(c) 4 2 13 5
(d) 11 1 20 38