You are on page 1of 42

Chapter 5

Functions of several variables

Essential reading

(For full publication details, see Chapter 1.)

Binmore and Davies (2002) Sections 3.1–3.9.

Anthony and Biggs (1996) Chapters 11 and 12. 5


Further reading

Simon and Blume (1994) parts of 13.1–13.2, parts of 14.1–14.6 and 14.8, parts of
15.1–15.2.

Adams and Essex (2010) parts of Chapter 12.

Aims and objectives

The objectives of this chapter are as follows.

To understand that functions of two variables represent surfaces and see how to
visualise these surfaces using sections and contours.

To introduce partial derivatives and use them in various contexts.


Specific learning outcomes can be found near the end of this chapter.

5.1 Introduction
In Section 1.1, we saw that a function f : R → R was a ‘rule’ which takes an input,
x ∈ R, and gives us a unique output, f (x) ∈ R. We now turn our attention to functions
of two variables, i.e. functions where the input consists of a pair of numbers, (x, y) ∈ R2 ,
and whose output is a unique number f (x, y) ∈ R.1 In particular, we will mainly be
concerned with functions of two variables where the variables are independent, i.e. the
value of x can be chosen independently of the value of y and vice versa. As we shall see,
functions of two variables often occur in economics and other fields where we might
1
The theory we consider extends to the general case where the input consists of n numbers
(x1 , x2 , . . . , xn ). This extension to functions of n variables (with n ≥ 3) should be obvious and so we
do not spend much time on it here. However, although we will mainly be dealing with the two-variable
case, we will occasionally consider functions of more than two variables.

171
5. Functions of several variables

wish to apply mathematical techniques. Two important examples of such functions from
economics are:

The production function of a firm, q(k, l), gives the amount it produces when using
k units of capital and l units of labour.

The utility function of a consumer, u(x1 , x2 ), describes how much ‘utility’ a


consumer derives from a bundle (x1 , x2 ) of two goods. As such it enables us to
compare the preferences of the consumer when he is confronted with different
combinations of these two goods.
These applications will be discussed later because, before we consider what we may
want to use them for, we want to know how we can ‘visualise’ what is going on when we
have a function of two variables.

5
5.2 Surfaces
Let f : R2 → R be a function of the two independent variables x and y. We can think of
any input (a, b) as a point in the (x, y)-plane and the output will be the corresponding
value of f , i.e. f (a, b), which we can take to be the number c. That is, generally
speaking, each point (x, y) in the (x, y)-plane will have an output given by the
corresponding value of f , i.e. f (x, y), which we can take to be the value of another
variable z. As such, to visualise a function of two variables we need three axes, two to
represent the inputs, i.e. x and y, and one to represent the output, i.e. z. Drawing these
as in Figure 5.1, we take the (x, y)-plane of the inputs to correspond to points where
z = 0, i.e. the input (a, b) is represented on our axes by the point (a, b, 0), and then the
output of z = f (x, y) is represented on our axes by the point (a, b, c) which is a vertical
distance c above the point (a, b, 0) in the (x, y)-plane.

z
c

(a, b, c)

a x
O

b (a, b, 0)

y
Figure 5.1: Representing the point (a, b, c) using the x, y and z-axes in R3 .

172
5.2. Surfaces

If we do this for all possible inputs (x, y) ∈ R2 we obtain a surface in three-dimensional


space whose equation is given by z = f (x, y). For instance, the surfaces obtained from
three different functions of two variables, namely

f (x, y) = x2 + y 2 , g(x, y) = x2 − y 2 and h(x, y) = −x2 − y 2 ,

are illustrated in Figures 5.2(a), (b) and (c) respectively.

x y

x y

5
x y

(a) (b) (c)

Figure 5.2: Visualising the surfaces (a) z = f (x, y) = x2 + y 2 , (b) z = g(x, y) = x2 − y 2


and (c) z = h(x, y) = −x2 − y 2 in three-dimensions. In particular, observe how (c) is the
reflection of (a) in the (x, y)-plane as h(x, y) = −f (x, y).

Of course, it would be difficult for us to sketch such surfaces by hand and, indeed, it is
hard enough to even contemplate how and why they look like they do without a
computer. But, as we shall soon see, it is possible to get some feel for what these
surfaces look like by thinking about how we can represent them in a two-dimensional
way. However, before we do that, let’s take a moment to look at some far simpler
surfaces than the ones in Figure 5.2, namely those that can arise from linear functions
of two variables, as these turn out to be planes.

5.2.1 Planes
The simplest kind of two-variable function is one which is linear in x and y, i.e. where

z = f (x, y) = ax + by,

for some constants a and b. Such functions represent planes and, generally speaking,
any surface which has an equation of the form

ax + by + cz = d,

where at least one of the constants a, b and c is non-zero will represent a plane. For
what follows, the important kinds of plane are, basically, those that fall into the
following categories:

The (x, y), (y, z) and (x, z)-planes which have equations z = 0, x = 0 and y = 0
respectively. (These are the planes in the middle of the three planes illustrated in
Figures 5.3(a), (b) and (c) respectively.)

173
5. Functions of several variables

Planes parallel to the (x, y), (y, z) and (x, z)-planes which, for some constant c, will
have equations z = c, x = c and y = c respectively. (These are the other planes
illustrated in Figures 5.3(a), (b) and (c) respectively.)

z
z z

x x y
y
y
x

5 (a) (b) (c)

Figure 5.3: Planes parallel to the (x, y), (y, z) and (x, z)-planes: (a) From bottom, z =
−10, 0, 10; (b) From left x = −10, 0, 10 and (c) From right y = −10, 0, 10. (Note, in
particular, how the axes are labelled in these pictures.)

Planes which don’t fall into either of the above categories, i.e. those with equations of
the form
ax + by + cz = d,

for some constants a, b, c and d (where at least two of the constants a, b and c are
non-zero) will not overly concern us here.

5.2.2 Contours and sections

Although curve sketching (which is sketching the graph of a function of one variable) is
important in this course, you will not be asked to sketch surfaces (such as the ones
illustrated above in Figure 5.2) for functions of two variables. However, there are useful
ways of visualising such surfaces which do not involve sketching it in three dimensions.
One of these is to use planes, such as the ones we saw in Figure 5.3, to ‘carve up’ a
three-dimensional illustration of a surface into two-dimensional representations in terms
of contours and sections. In particular, these ideas may be familiar to you from your
experiences with maps (for contours) and other technical diagrams (for sections).

Horizontal planes and the contours of a surface

One way of visualising a surface is to look at its contours, which are the curves of
intersection that arise when we look at the points of intersection of a surface with
planes that are parallel to the (x, y)-plane. To find the contours, we take a plane
parallel to the (x, y)-plane, say the plane z = c, and find the curve of intersection
between it and the surface z = f (x, y), i.e. the curve with equation c = f (x, y). This
curve is the z = c contour, i.e. the set of points (x, y) which give z = c when we put
them into the equation z = f (x, y).

174
5.2. Surfaces

Example 5.1 Find the z = 2 contour of the surface z = x − y + 4. Repeat for z = 4


and z = 6.

To find the z = 2 contour of the surface z = x − y + 4 we need to find the curve of


intersection, which in this case, is given by

2 = x − y + 4.

Rearranging this gives the equation y = x + 2 which is the equation of a straight line.

Similarly, we find that:

For z = 4, the curve of intersection is given by 4 = x − y + 4 which gives us


y = x.

For z = 6, the curve of intersection is given by 6 = x − y + 4 which gives us 5


y = x − 2.
Thus, we see from these equations that these two contours are straight lines as well.
The surface and its contours are illustrated in Figure 5.4.

8 8 3

2
6 6

1
z
z
4
4 0
−5 −4 −3 −2 −1 0 1 2 3 4 5
2 x −1
2

−2
0 5.0
0 2.5 y
5.0 −5.0 0.0
2.5 −2.5 0.0 −2.5 −3
−5.0 0.0 2.5 5.0−5.0
−2.5 0.0 −2.5 y
2.5 x
5.0−5.0 y
x −4

−5

(a) (b) (c)

Figure 5.4: For Example 5.1. (a) The surface z = x − y + 4 and, from the bottom, the
planes z = 2, 4, 6. (b) The curves of intersection of the surface and the planes in (a)
with their corresponding values of z. (c) The contours: Each line represents a contour
(i.e. the points with coordinates (x, y) that map to a particular value of z) — in this
case, the further to the right the line is, the larger the corresponding value of z is, as we
have z = 2, 4, 6 as we move from left to right. Notice that, here, the contours are parallel
straight lines (i.e. they have the same gradient but different y-intercepts).

Activity 5.1 Find the equations of the z = −10, z = 0 and z = 10 contours of the
surface z = 4x + 2y − 2 and sketch these in the (x, y)-plane clearly labelling the
value of z which is associated with each contour.

Example 5.2 Find the z = 16 contour of the surface z = x2 + y 2 . What are the
z = c contours of the surface z = x2 + y 2 when (i) c > 0, (ii) c = 0 and (iii) c < 0?

175
5. Functions of several variables

To find the z = 16 contour of the surface z = x2 + y 2 we need to find the curve of


intersection which, in this case, is simply

x2 + y 2 = 16.

This is the equation of a circle, centred on the origin, with a radius of four.

To find the z = c contours in the three cases indicated we just need to find out what
the curve
x2 + y 2 = c,
looks like in the three cases. So, we have:

If c > 0, the contour is a circle, centred on the origin, with a radius of c.

If c = 0, the contour is the point (0, 0) as this is the only solution to the
5 equation x2 + y 2 = 0.

If c < 0, there are no contours as we know that x2 + y 2 ≥ 0 for all values of x


and y.
In particular, notice that z = 0 is the smallest value of z that arises from a point on
this surface. The surface and three of its contours for c > 0 are illustrated in
Figure 5.5.

4
70
3
60
2
50 70

60 1
40
50
0
30
40 −5 −4 −3 −2 −1 0 1 2 3 4 5
z
x −1
20 30

20 −2
10
−5.0 10 y
−2.5 −5.0 −3
0 0.0 y −2.5
0 0.0 y
2.5 2.5
5.0 2.5 5.0 5.0 2.5 5.0
0.0 0.0 −2.5
−4
−2.5 −5.0
−5.0 x
x
−5

(a) (b) (c)

Figure 5.5: For Example 5.2. (a) The surface z = x2 + y 2 , which we saw in Figure 5.2(a),
and the planes z = 4, 16, 25. (b) The curves of intersection of the surface and the planes
in (a) with their corresponding values of z. (c) The contours: Each circle represents a
contour (i.e. the points with coordinates (x, y) that map to a particular value of z) — in
this case, the larger the radius of the contour, the larger the corresponding value of z as
we have z = 4, 16, 25. Notice that, here, the contours are concentric circles (i.e. they have
the same centre but different radii).

Activity 5.2 Find the z = −25 contour of the surface z = −x2 − y 2 . What are the
z = c contours of this surface when (i) c > 0, (ii) c = 0 and (iii) c < 0?

176
5.2. Surfaces

Vertical planes and the sections of a surface

Another way of visualising a surface is to look at its sections, which are the curves of
intersection that arise when we look at the points of intersection of a surface with
planes that are perpendicular to the (x, y)-plane. To find the sections, we take a plane
perpendicular to the (x, y)-plane and find the curve of intersection between it and the
surface z = f (x, y). In particular, in this course, we shall only need to consider sections
that arise from planes that are parallel to the (x, z)-plane (i.e. y = c for some constant
c) or parallel to the (y, z)-plane (i.e. x = c for some constant c).
As such, the easiest sections to sketch are the ones we get when we consider the (x, z)
and (y, z)-planes which are both perpendicular to the (x, y)-plane. In particular, we find
that the section which we get from the:

(x, z)-plane, which has the equation y = 0, is the curve of intersection between it
and the surface z = f (x, y), i.e. the curve with equation z = f (x, 0). 5
(y, z)-plane, which has the equation x = 0, is the curve of intersection between it
and the surface z = f (x, y), i.e. the curve with equation z = f (0, y).
Let’s look at what these sections look like in the case of the two surfaces we considered
above when we were looking for contours.

Example 5.3 Find the (x, z) and (y, z)-sections of the surface z = x − y + 4.

To find these sections of the surface z = x − y + 4 we need to find the curves of


intersection, which in this case, are given by:

For the (x, z)-section, we have y = 0 and so the curve of intersection is given by
z = x + 4 and this is a straight line in the (x, z)-plane.

For the (y, z)-section, we have x = 0 and so the curve of intersection is given by
z = −y + 4 and this is a straight line in the (y, z)-plane.
The surface and these sections are illustrated in Figure 5.6.

Activity 5.3 Find the (x, z) and (y, z)-sections of the surface z = 4x + 2y − 2 and
sketch these in the appropriate planes.

Example 5.4 Find the (x, z) and (y, z)-sections of the surface z = x2 + y 2 .

To find these sections of the surface z = x2 + y 2 we need to find the curves of


intersection, which in this case, are given by:

For the (x, z)-section, we have y = 0 and so the curve of intersection is given by
z = x2 and this is a parabola in the (x, z)-plane.

For the (y, z)-section, we have x = 0 and so the curve of intersection is given by
z = y 2 and this is a parabola in the (y, z)-plane.
The surface and these sections are illustrated in Figure 5.7.

177
5. Functions of several variables

8.0 8.0

7.2 7.2

6.4 6.4

5.6 5.6

4.8 4.8
8
z 4.0 z 4.0
6
3.2 3.2
z
4 2.4 2.4

5.0 1.6 1.6


2
2.5 0.8 0.8
0 0.0
y 0.0 0.0
−5.0
−2.5 −2.5 −5 −4 −3 −2 −1 0 1 2 3 4 5 −5 −4 −3 −2 −1 0 1 2 3 4 5
0.0
x x y
2.5 −5.0
5.0

(a) (b) (c)

Figure 5.6: For Example 5.3. (a) The surface z = x − y + 4 and the planes x = 0 (which
goes diagonally from bottom left to top right) and y = 0 (which goes diagonally from top
left to bottom right). (b) The (x, z)-section is the line z = x + 4. (c) The (y, z)-section is
5 the line z = −y + 4.

8.0 8.0

7.2 7.2

6.4 6.4

5.6 5.6

4.8 4.8
8
z 4.0 z 4.0

6 3.2 3.2

z 2.4 2.4
4

1.6 1.6
4
2
2 0.8 0.8

0 0
y 0.0 0.0
−4
−2 −2 −5 −4 −3 −2 −1 0 1 2 3 4 5 −5 −4 −3 −2 −1 0 1 2 3 4 5
0 x y
2 −4
x
4

(a) (b) (c)

Figure 5.7: For Example 5.4. (a) The surface z = x2 + y 2 and the planes x = 0 (which
goes diagonally from bottom left to top right) and y = 0 (which goes diagonally from top
left to bottom right). (b) The (x, z)-section is the parabola z = x2 . (c) The (y, z)-section
is the parabola z = y 2 .

Activity 5.4 Find the (x, z) and (y, z)-sections of the surface z = −x2 − y 2 and
sketch these in the appropriate planes.

More generally, we may want to look at the sections we get when we consider planes
that are parallel to the (x, z) and (y, z)-planes which we considered above. In
particular, we find that the sections we get from the planes that are parallel to the:

(x, z)-plane, which have equations of the form y = c where c is a constant, are the
curves of intersection between it and the surface z = f (x, y), i.e. the curve with
equation z = f (x, c).

(y, z)-plane, which have equations of the form x = c where c is a constant, are the
curves of intersection between it and the surface z = f (x, y), i.e. the curve with
equation z = f (c, y).

178
5.2. Surfaces

Let’s see what these sections look like in the case of the two surfaces we considered
above.

Example 5.5 Find the y = 0, 2, 4 sections of the surface z = x − y + 4.

To find these sections of the surface z = x − y + 4 we need to find the curves of


intersection, which in this case, are given by:

For the y = 0 section, we have y = 0 and so the curve of intersection is given by


z = x + 4 and this is a straight line in the (x, z)-plane. Of course, this is just the
(x, z)-section we found in Example 5.3!

For the y = 2 section, we have y = 2 and so the curve of intersection is given by


z = x − 2 + 4 = x + 2 and this is a straight line.

For the y = 4 section, we have y = 4 and so the curve of intersection is given by 5


z = x − 4 + 4 = x and this is a straight line.
Observe that only the first of these sections ‘lives’ in the (x, z)-plane, but we can
sketch the other two in this plane to get a feel for how the surface is changing when
we look at the sections y = c for different values of c. The surface and these sections,
when drawn in the (x, z)-plane, are illustrated in Figure 5.8.

6
8

6 z
4

z
4

2
2 4
2
0 x
0
−2 0
5 4 −4 −3 −2 −1 0 1 2 3
3 2 1 0 −1 x
y

(a) (b)
Figure 5.8: For Example 5.5. (a) The surface z = x − y + 4 and the planes y = 0, y = 2
and y = 4 as we move from right to left. (b) The y = 0, y = 2 and y = 4 sections (as
we move from top to bottom) all drawn in the (x, z)-plane. Note that, the y = 0 section
is the (x, z)-section and, of the three sections illustrated, this is the only one that really
‘lives’ in the (x, z)-plane. Also notice that, as the value of c increases when we look at
the plane y = c, the value of the z-intercept decreases when we look at the section.

Activity 5.5 Find the x = 0, 2, 4 sections of the surface z = x − y + 4 and sketch


them in the (y, z)-plane. Of these three sections, which one have we found before
and what did we call it? Of these three sections, which is the only one that really
‘lives’ in the (y, z)-plane?

179
5. Functions of several variables

Activity 5.6 Consider the surface z = 4x + 2y − 2.

Find the y = −2, 0, 2 sections of this surface and sketch them in the (x, z)-plane.

Find the x = −2, 0, 2 sections of this surface and sketch them in the (y, z)-plane.

Example 5.6 Find the x = 0, 1, 2 sections of the surface z = x2 + y 2 .

To find these sections of the surface z = x2 + y 2 we need to find the curves of


intersection, which in this case, are given by:

For the x = 0 section, we have x = 0 and so the curve of intersection is given by


z = y 2 and this is a parabola in the (y, z)-plane. Of course, this is just the
(y, z)-section we found in Example 5.4!
5
For the x = 1 section, we have x = 1 and so the curve of intersection is given by
z = 1 + y 2 and this is a parabola.

For the x = 2 section, we have x = 2 and so the curve of intersection is given by


z = 4 + y 2 and this is a parabola.
Observe that only the first of these sections ‘lives’ in the (y, z)-plane, but we can
sketch the other two in this plane to get a feel for how the surface is changing when
we look at the sections x = c for different values of c. The surface and these sections,
when drawn in the (x, z)-plane, are illustrated in Figure 5.9.

6
z
4
z
4

2
2
4
2
0
0 0 y
−4 −2 0 2 4
−2
−3 y
−2 −1 −4
0 1 2 3
x

(a) (b)
Figure 5.9: For Example 5.6. (a) The surface z = x2 + y 2 and the planes x = 0, x = 1 and
x = 2 as we move from left to right. (b) The x = 0, x = 1 and x = 2 sections all drawn
in the (y, z)-plane. Note that, the x = 0 section is the (y, z)-section and, of the three
sections illustrated, this is the only one that really ‘lives’ in the (y, z)-plane. Notice that,
as the value of c increases when we look at the plane x = c, the value of the z-intercept
increases when we look at the section.

Activity 5.7 Find the y = 0, 1, 2 sections of the surface z = x2 + y 2 and sketch


them in the (x, z)-plane. Of these three sections, which one have we found before

180
5.3. Partial differentiation

and what did we call it? Of these three sections, which is the only one that really
‘lives’ in the (x, z)-plane?

Activity 5.8 Consider the surface z = −x2 − y 2 .

Find the y = 0, 1, 2 sections of this surface and sketch them in the (x, z)-plane.

Find the x = 0, 1, 2 sections of this surface and sketch them in the (y, z)-plane.

5.3 Partial differentiation


In Chapter 2, we saw how to differentiate functions of one variable. Unsurprisingly,
perhaps, we can also differentiate functions of two variables using partial differentiation 5
to yield partial derivatives.2 In some ways, this will be similar to what we saw when we
differentiated functions of one variable to get their derivatives, but as we now have two
variables to deal with, things get a little trickier.

5.3.1 Sections and partial derivatives


Consider f (x, y), a function of two independent variables. For a fixed value of y, say
y = y0 , we can look at the function g(x) = f (x, y0 ) which is now a function of x only.
Clearly, the rate of change of g(x) with respect to x is just the derivative of this
function with respect to x. But, what happens when we want to calculate the rate of
change of f (x, y) with respect to x for any fixed value of y? To do this we avoid
specifying a particular value of y by just assuming that y is a constant and
differentiating with respect to x. So, given a function f (x, y) we denote the operation of
differentiating f with respect to x whilst holding y constant by
∂f
or, more compactly, fx (x, y), (5.1)
∂x
and call this the partial derivative of f (x, y) with respect to x.3 In a similar manner, we
can define the partial derivative of f (x, y) with respect to y, denoted by
∂f
or, more compactly, fy (x, y), (5.2)
∂y
which is what we obtain from differentiating f (x, y) with respect to y whilst holding x
constant.
Clearly, the partial derivative of f (x, y) with respect to x, i.e. the result of
differentiating f (x, y) with respect to x whilst holding y constant, is going to be another
2
Most of the material in these notes can be generalised to functions with more than two variables.
But, in this course, almost without exception, we will be considering functions of two variables.
3
Note that we use the ‘curly-d’, i.e. ‘∂’, for partial derivatives rather than the normal ‘straight-d’, i.e.
‘d’, which one encounters in the notation dg/dx for the derivative of a function g(x) of one variable. We
shall see why it is important to keep these two notions of differentiation separate later.
Similarly, we use fx (x, y) as shorthand for the partial derivative of f (x, y) with respect to x rather
than the g 0 (x) which one encounters as the shorthand for the derivative of a function g(x) of one variable.

181
5. Functions of several variables

function of x and y. This function of x and y is what is denoted by the symbols in (5.1).
But, what does this partial derivative mean? In effect, what we have done when we
consider the function f (x, y) for some fixed value of y, say y0 , is to look at the section of
the curve z = f (x, y) we get when y = y0 , i.e. the section given by the equation
z = f (x, y0 ) which lies in a plane that has y = y0 and is parallel to the (x, z)-plane.
Then, when we differentiate f (x, y0 ) with respect to x, we are finding the gradient of
this section, i.e. it tells us how z = f (x, y0 ) is varying with x. Consequently, this partial
derivative is telling us something about the gradient of the surface when we are at the
point (x, y0 ) and we are ‘looking’ in the x-direction.

Activity 5.9 Describe what the partial derivative of f (x, y) with respect to y
evaluated at the point (x0 , y) tells us about the gradient of the surface at the point
(x0 , y).

5 5.3.2 Finding partial derivatives


Calculating the partial derivatives of f (x, y) is only slightly more difficult than finding
the derivative of a function of one variable. Recalling that the partial derivative of a
function f (x, y) with respect to x, i.e. fx (x, y), is just the derivative of f (x, y) with
respect to x whilst holding y constant, to calculate fx (x, y) we just treat any occurrence
of y in f (x, y) as if it were a constant and differentiate f (x, y) with respect to x. And, in
a similar way, we can find the partial derivative of a function f (x, y) with respect to y,
i.e. fy (x, y). Let’s look at an example.

Example 5.7 Given that f (x, y) = x2 y + 5xy 3 + y 2 , find fx (x, y) and fy (x, y).

Let’s do this ‘slowly’ so that we get the idea. To find fx (x, y), we treat y as if it were
a constant and let’s say that this constant is c. So, we have a function of one
variable given by
g(x) = f (x, c) = cx2 + 5c3 x + c2 ,
and differentiating this with respect to x gives
dg
= 2cx + 5c3 .
dx
But, c is the constant we’re using to represent y and so replacing all the ‘c’s with ‘y’s
we have
∂f
= 2xy + 5y 3 ,
∂x
which is the partial derivative of f (x, y) with respect to x.

Similarly, to find fy (x, y), we treat x as if it were a constant and (again) let’s say
that this constant is c. So, we have a function of one variable given by

g(y) = f (c, y) = c2 y + 5cy 3 + y 2 ,

and differentiating this with respect to y gives


dg
= c2 + 15cy 2 + 2y.
dy

182
5.3. Partial differentiation

But, c is the constant we’re using to represent x and so replacing all the ‘c’s with
‘x’s we have
∂f
= x2 + 15xy 2 + 2y,
∂y
which is the partial derivative of f (x, y) with respect to y.

Obviously, there is no need to go through all this detail whenever we calculate a partial
derivative — all you have to do is remember what you are keeping constant and then
differentiate whatever is left. Let’s look at another example.

Example 5.8 Given that f (x, y) = 3x3 + 7xy −1 + 2y 9 , find fx (x, y) and fy (x, y).

Let’s do this ‘quickly’. To find fx (x, y), we treat y as a constant and differentiate
with respect to x to get
∂f
5
= 9x2 + 7y −1 .
∂x
Similarly, to find fy (x, y), we treat x as a constant and differentiate with respect to y
to get
∂f
= −7xy −2 + 18y 8 .
∂y
And, we’re done!

Activity 5.10 Given that

x y3
f (x, y) = 2x + x3 y − + ,
y 2

find fx (x, y) and fy (x, y).

So far, we have calculated the partial derivatives of very simple functions of x and y.
But, sometimes, we will need to use the chain, product and quotient rules when
calculating partial derivatives. Let’s look at an example to see how this is done.

Example 5.9 Given that


2
f (x, y) = x ex+y ,
find fx (x, y) and fy (x, y).

We first note that we can write this function as


2
f (x, y) = (x ex ) ey ,
2
and so, to find fx (x, y), we treat ey as a constant and we differentiate the function
x ex using the product rule to get x ex +1 ex . This gives us
∂f 2 2
= ey (x ex + ex ) = (x + 1) ex+y .
∂x

183
5. Functions of several variables

2
To find fy (x, y), we treat x ex as a constant and we differentiate the function ey
2
using the chain rule to get 2y ey . This gives us
∂f 2 2
= x ex (2y ey ) = 2xy ex+y .
∂y

p
Activity 5.11 Given that f (x, y) = x2 + y 2 , find fx (x, y) and fy (x, y).

5.3.3 The chain rule


Sometimes a function of one variable is defined with reference to a function of two
variables. For instance, suppose that the production level, q, of a firm depends on the
5 amounts k of capital and l of labour used through the function q(k, l). Suppose also
that both k and l change over time in some known way so that we have formulas for
k(t) and l(t) where t is a parameter measuring time.4 How, we might ask, can we find
the rate of change of production with time?

Example 5.10 Given that we have the production function q(k, l) = kl where k
and l are functions of time, t, given by

k(t) = 3 + 2t and l(t) = 10 − 3t,

find the rate of change of production with time.

In this case, we can calculate the production as a function of time by explicitly


finding Q(t) = q(k(t), l(t)) which, in this case is

Q(t) = k(t)l(t) = (3 + 2t)(10 − 3t) = 30 + 11t − 6t2 .

And, in particular, we can now differentiate this to find the rate of change of
production with time, i.e. we have
dQ
= 11 − 12t,
dt
in this case.

More generally, suppose we are given a function f of two variables x and y, both of
which are themselves functions of t. We can think of this as defining a composite
function F (t) = f (x(t), y(t)). In the case of a single variable we have a rule, i.e. the
chain rule, which enables us to work out the derivative of a composite function.
Amazingly, perhaps, there is a similar rule for composite functions of two variables such
as the one we have here which is also known as the chain rule. It states that
dF ∂f dx ∂f dy
= + . (5.3)
dt ∂x dt ∂y dt
4
Notice that, since k and l both depend on t, we can only pick certain pairs of values, (k, l). That is,
in this case, the variables k and l are not independent.

184
5.3. Partial differentiation

Sometimes, in this context, we call F 0 (t) the total derivative of F (t) with respect to t
(in order to distinguish it from the partial derivatives of f with respect to x and y).
To see why the chain rule works, consider that if we change t by a small amount, ∆t,
the corresponding change in F (t) is given by
dF
∆F ' ∆t,
dt
but here, there are two ways in which F (t) = f (x(t), y(t)) can change with t.

Firstly, F can change with t because f changes with x and x changes with t, let’s
denote this change in F by ∆x F . In this case, we have
∂f
∆x F ' ∆x,
∂x
as we are holding y constant to see how F changes with x and this means that

∆x F '
∂f dx
∆t,
5
∂x dt
as the change in x, ∆x, is related to a change in t by ∆x ' x0 (t)∆t.
Secondly, F can change with t because f changes with y and y changes with t, let’s
denote this change in F by ∆y F . In this case, we have
∂f
∆y F ' ∆y,
∂y
as we are holding x constant to see how F changes with y and this means that
∂f dy
∆y F ' ∆t,
∂y dt
as the change in y, ∆y, is related to a change in t by ∆y ' y 0 (t)∆t.
Thus, as the total change in F due to these two changes is given by
∂f dx ∂f dy
∆F = ∆x F + ∆y F ' ∆t + ∆t,
∂x dt ∂y dt
we can now equate our two expressions for ∆F and divide through by ∆t to get the
chain rule which we saw above in (5.3). Let’s see how we could have used it to answer
the question we saw in Example 5.10.

Example 5.11 Consider the functions in Example 5.10. Use the chain rule to find
the rate of change of production with time.

Here q(k, l) = kl, k(t) = 3 + 2t and l(t) = 10 − 3t. In this case, if we again let
Q(t) = q(k(t), l(t)), the chain rule states that
dQ ∂q dk ∂q dl
= + .
dt ∂k dt ∂l dt
As such, using this, we can see that
dQ
= (l)(2) + (k)(−3) = 2(10 − 3t) − 3(3 + 2t) = 11 − 12t,
dt
which agrees with our earlier answer.

185
5. Functions of several variables

Activity 5.12 Suppose that f (x, y) = x2 y and that x(t) = 2 + 3t and y(t) = t2 + 1.
If F (t) = f (x(t), y(t)), use the chain rule to find the total derivative of F with
respect to t and check your answer by explicitly finding F (t) and differentiating it
with respect to t.

We now consider one of the many useful applications of the chain rule.

The derivative of an implicit function

An equation g(x, y) = c where c is a constant can, in some cases, be rearranged (or


solved) to give y as an explicit function of x. Once we have done this, we can then
differentiate our expression for y with respect to x to find its derivative, y 0 (x).

5 Example 5.12 Suppose that y is a function of x defined by the equation


x2 − y = 7. Find y as an explicit function of x and hence find y 0 (x).

As we have x2 − y = 7 we can easily rearrange this to get y = x2 − 7, i.e. we have

y(x) = x2 − 7,

if we want y as an explicit function of x. In particular, this means that


dy
= 2x,
dx
in this case.

In general, we say that an equation g(x, y) = c defines y implicitly as a function of x if


there is a function y(x) which satisfies the equation for a range of values of x. But, in
general, it may be difficult or impossible to solve the equation g(x, y) = c to find an
explicit formula for y(x) as we did in Example 5.12. However, we can [often] still find
the derivative y 0 (x), even if we don’t have an explicit expression for y in terms of x.
To see how we can do this, consider that if we knew the function, y(x), that satisfied
the equation g(x, y) = c, we could find a new function, G(x), of x only which would be
given by G(x) = g(x, y(x)). Then, using the chain rule, we would have
dG ∂g dx ∂g dy
= + .
dx ∂x dx ∂y dx
But, G(x) = c where c is a constant and so we also have
dG dx
=0 as well as = 1,
dx dx
which means that we are left with
∂g ∂g dy
0= + .
∂x ∂y dx
Rearranging this then gives us
dy ∂g/∂x
=− ,
dx ∂g/∂y

186
5.3. Partial differentiation

as long as gy (x, y) 6= 0, That is, y 0 (x) can easily be found by using the partial
derivatives of g. (But, don’t forget the minus sign!)

Example 5.13 In Example 5.12, y was a function of x defined implicitly by the


equation x2 − y = 7. Find y 0 (x) using the result above.

As we have the equation x2 − y = 7 we can write this as g(x, y) = c with


g(x, y) = x2 − y and c = 7. Using the above result we can then see that

∂g ∂g
= 2x and = −1,
∂x ∂y
which means that
dy ∂g/∂x 2x
=− =− = 2x,
dx ∂g/∂y −1
as before.
5

Example 5.14 Suppose that y is a function of x defined implicitly by the equation

x2 y 3 − 6x3 y 2 + 2xy = 1.

Verify that the point (x, y) = (1/2, 2) satisfies this equation and find the value of the
derivative, y 0 (x), at this point.

The point (x, y) = (1/2, 2) satisfies the equation since, putting x = 1/2 and y = 2
into the left-hand side, we get
 2  3  
1 3 1 2 1
(2) − 6 (2) + 2 (2) = 2 − 3 + 2 = 1,
2 2 2

which is what we have on the right-hand side of the equation. We then see that the
equation defining y implicitly as a function of x is of the form g(x, y) = 1 where
g(x, y) = x2 y 3 − 6x3 y 2 + 2xy. So, according to the formula given above, we have

dy ∂g/∂x
=− ,
dx ∂g/∂y

and so, since


∂g ∂g
= 2xy 3 − 18x2 y 2 + 2y and = 3x2 y 2 − 12x3 y + 2x,
∂x ∂y
we have
dy 2xy 3 − 18x2 y 2 + 2y
=− 2 2 ,
dx 3x y − 12x3 y + 2x
as long as 3x2 y 2 − 12x3 y + 2x 6= 0. Thus, given the point (1/2, 2), we can substitute
these values into our expression for y 0 (x) to see that the value of the derivative at
this point is 6.

187
5. Functions of several variables

Activity 5.13 Suppose that y is a function of x defined implicitly by the equation

x2 + 2xy = 6 − 3y 3 .

Verify that the point (x, y) = (1, 1) satisfies this equation and find the value of the
derivative, y 0 (x), at this point.

Extensions of the chain rule

What we seen above can be extended. Suppose, for instance, that g is is a function of
two variables x and y, both of which are themselves functions of two variables k and l.
We can think of this as defining a composite function G(k, l) = g(x(k, l), y(k, l)) and an
extension of the chain rule then assures us that
5 ∂G
=
∂g ∂x ∂g ∂y
+ and
∂G
=
∂g ∂x ∂g ∂y
+ .
∂k ∂x ∂k ∂y ∂k ∂l ∂x ∂l ∂y ∂l
To see why the first of these formulae works, consider that if we change k by a small
amount, ∆k, whilst holding l constant, the corresponding change in G(k, l) is given by

∂G
∆G ' ∆k,
∂k
but here, there are two ways in which G(k, l) = g(x(k, l), y(k, l)) can change with k.

Firstly, G can change with k because g changes with x and x changes with k, let’s
denote this change in G by ∆x G. In this case, we have
∂g
∆x G ' ∆x,
∂x
as we are holding y constant to see how F changes with x and this means that
∂g ∂x
∆x G ' ∆k,
∂x ∂k
as the change in x, ∆x, is related to a change in k with l held constant by
∆x ' xk (k, l)∆k.

Secondly, G can change with k because g changes with y and y changes with k,
let’s denote this change in G by ∆y G. In this case, we have

∂g
∆y G ' ∆y,
∂y
as we are holding x constant to see how F changes with y and this means that
∂g ∂y
∆y G ' ∆k,
∂y ∂k
as the change in y, ∆y, is related to a change in k with l held constant by
∆y ' yk (k, l)∆k.

188
5.3. Partial differentiation

Thus, as the total change in F due to these two changes is given by


∂g ∂x ∂g ∂y
∆G = ∆x G + ∆y G ' ∆k + ∆k,
∂x ∂k ∂y ∂k
we can now equate our two expressions for ∆G and divide through by ∆k to get the
chain rule for Gk (k, l) which we saw above.

Activity 5.14 Use a similar argument to the one above to explain why the chain
rule formula for Gl (k, l) works.

And, in a similar manner, if we suppose that g(x, y, z) = c defines z implicitly as a


function of x and y, we can use this form of the chain rule to derive the formulae
∂z ∂g/∂x ∂z ∂g/∂y
=− and =− ,
∂x ∂g/∂z ∂y ∂g/∂z 5
which will allow us to calculate the partial derivatives of z with respect to x and y.
Indeed, to see why the first of these formulae works, we consider that if we knew the
function, z(x, y), that satisfied the equation g(x, y, z) = c, we could find a new function,
G(x, y), of x and y only which is given by G(x, y) = g(x, y, z(x, y)). Then using the
chain rule, we have
∂G ∂g dx ∂g ∂z
= + .
∂x ∂x dx ∂z ∂x
But, G(x, y) = c where c is a constant and so we also have
∂G dx
=0 as well as = 1,
∂x dx
which means that we are left with
∂g ∂g ∂z
0= + .
∂x ∂z ∂x
Rearranging this then gives us
∂z ∂g/∂x
=− ,
∂x ∂g/∂z
as long as gz (x, y, z) 6= 0. That is, zx (x, y) can easily be found by using the partial
derivatives of g. (But, don’t forget the minus sign!)

Activity 5.15 Use a similar argument to the one above to explain why the formula
for zy (x, y) works.

Activity 5.16 Suppose that q is a function of k and l defined implicitly by the


equation
q 3 k + k 3 l + qk 2 l = 3.
Find the partial derivatives qk (k, l) and ql (k, l). What are the values of these partial
derivatives at the point where k = 1 and l = 1?

[Hint: The identity q 3 + q − 2 = (q − 1)(q 2 + q + 2) will be useful.]

189
5. Functions of several variables

5.3.4 An application: Homogeneous functions


Homogeneous functions are important in economics since they allow us to capture the
idea of ‘returns to scale’. In this section we will see what it means for a function to be
homogeneous and consider an important theorem about homogeneous functions. The
former will enable us to give an economic interpretation of homogeneous production
functions in terms of ‘returns to scale’ and the latter will enable us to consider the
economic significance of the marginal products that can be derived from such
production functions.

Homogeneity and returns to scale

We say that a function, f (x, y), is homogeneous of degree r if

5 f (λx, λy) = λr f (x, y),

for any λ ∈ R. Let’s start by looking at some examples of homogeneous functions.

Example 5.15 Show that the function f (x, y) = x1/2 y 1/2 is homogeneous of degree
one.

Replacing x and y in f (x, y) with λx and λy we get

f (λx, λy) = (λx)1/2 (λy)1/2 = (λ1/2 x1/2 )(λ1/2 y 1/2 ) = λ1 x1/2 y 1/2 = λ1 f (x, y).

Comparing this with the definition of homogeneity, i.e.

f (λx, λy) = λr f (x, y),

we see that r = 1 and so this function is homogeneous of degree one.

√ √
Example 5.16 Show that the function f (x, y) = x+ y is homogeneous. What
is its degree of homogeneity?

Replacing x and y in f (x, y) with λx and λy we get


√ p √ √ √ √ √ √ √ √
f (λx, λy) = λx + λy = λ x + λ y = λ( x + y) = λf (x, y).

As λ = λ1/2 , comparing this with the definition of homogeneity, i.e.

f (λx, λy) = λr f (x, y),

we see that r = 1/2 and so this function is homogeneous of degree one half.

Example 5.17 Show that the function f (x, y) = x + y 2 is not homogeneous.

Replacing x and y in f (x, y) with λx and λy we get

f (λx, λy) = (λx) + (λy)2 = λx + λ2 y 2 .

190
5.3. Partial differentiation

Comparing this with the definition of homogeneity, i.e.

f (λx, λy) = λr f (x, y),

we see that there is no way of writing λx + λ2 y 2 in the form λr (x + y 2 ) for any r and
so this function is not homogeneous.

In particular, this means that not all functions are homogeneous.


Economically, we can think of homogeneous functions as telling us about how outputs
change if we ‘scale up’ our inputs. To see why, consider what happens if we scale up our
inputs by a factor of λ, i.e. if we increase our bundle of inputs, (x, y), by a factor of
λ > 1 we get the new bundle of inputs (λx, λy). Now if our outputs are determined by a
homogeneous function, f (x, y), of degree r we can see that the output from our new
bundle, (λx, λy), is given by
f (λx, λy) = λr f (x, y), 5
i.e. we will get λr times as much as we did from our old bundle, (x, y). That is, scaling
inputs by λ leads to a scaling of output by λr if our output is determined by a function
which is homogeneous of degree r.
In particular, given a function which is homogeneous of degree one, we can see that
scaling our inputs by λ > 1 — i.e. going from the bundle of inputs (x, y) to the bundle
of inputs (λx, λy) — will scale our output by λ — i.e. going from an output of f (x, y) to
an output of λf (x, y). That is, we get constant returns to scale, a proportional increase
in inputs leads to the same proportional increase in output. Clearly, given functions of
degree r > 0, this idea can be extended to cover functions with degrees r 6= 1 as follows:

If r > 1, we get increasing returns to scale as λ > 1 implies that λr > λ.5
If r = 1, we get constant returns to scale as we saw above.
If r < 1, we get decreasing returns to scale as λ > 1 implies that λr < λ.6
To see how this works, consider the following example.

Example 5.18 A firm invests an amount of capital, k, and labour, l, in its


production process and this yields a production level of q(k, l). What will be the
effect on the level of production of quadrupling the amount of capital and labour
invested if the production function is homogeneous of degree (a) 1/2, (b) 1 and (c)
3/2?

Quadrupling the amount of capital and labour invested means increasing the
investment bundle from (k, l) to (4k, 4l). So, if the production function is
homogeneous of degree r, the production level will go from q(k, l) to
q(4k, 4l) = 4r q(k, l), i.e. the production level will change by a factor of 4r . In
particular, this means that if the production function is homogeneous of degree

(a) 1/2, the change will be by a factor of 41/2 = 2 (i.e. quadrupling inputs doubles
production),
5
That is, a proportional increase in inputs leads to a larger proportional increase in output.
6
That is, a proportional increase in inputs leads to a smaller proportional increase in output.

191
5. Functions of several variables

(b) 1, the change will be by a factor of 41 = 4, (i.e. quadrupling inputs quadruples


production),

(c) 3/2 the change will be by a factor of 43/2 = 8, (i.e. quadrupling inputs octuples
production),
yielding decreasing, constant and increasing returns to scale respectively.

We now turn to a useful result about homogeneous functions.

Euler’s theorem and marginal products

Euler’s theorem states that if f (x, y) is an homogeneous function of degree r, then


∂f ∂f
x +y = rf (x, y).
5 ∂x ∂y
This follows from a simple application of the chain rule since, using the definition of a
function that is homogeneous of degree r, we have
f (λx, λy) = λr f (x, y),
for any λ ∈ R. As such, differentiating both sides with respect to λ and using the chain
rule from (5.3) on the left-hand side, we have
∂f du ∂f dv
+ = rλr−1 f (x, y),
∂u dλ ∂v dλ
if we think of f (λx, λy) as f (u, v) with u = λx and v = λy. This then gives us
∂f ∂f
x
+y = rλr−1 f (x, y).
∂u ∂v
and, if we now set λ = 1, we get the desired result as we have u = x, v = y and λr−1 = 1.
In this course, a question may involve verifying that Euler’s theorem holds for some
given homogeneous function. As an example, let’s verify that it is true for the two
homogeneous functions we considered in Examples 5.15 and 5.16.

Example 5.19 In Example 5.15, we saw that the function f (x, y) = x1/2 y 1/2 is
homogeneous of degree one. Verify that Euler’s theorem holds for this function.

In this case we can see that


∂f 1 ∂f 1
= x−1/2 y 1/2 and = x1/2 y −1/2 .
∂x 2 ∂y 2
As such, we can see that the left-hand-side of Euler’s theorem gives us
   
∂f ∂f 1 −1/2 1/2 1 1/2 −1/2 1 1
x +y =x x y +y x y = x1/2 y 1/2 + x1/2 y 1/2
∂x ∂y 2 2 2 2
= x1/2 y 1/2 = f (x, y),

and since the degree of homogeneity of this function is one, we have f (x, y) on the
right-hand-side of Euler’s theorem. Thus, as these two expressions are the same,
Euler’s theorem holds.

192
5.3. Partial differentiation

√ √
Example 5.20 In Example 5.16, we saw that the function f (x, y) = x + y is
homogeneous of degree 1/2. Verify that Euler’s theorem holds for this function.

In this case we can see that f (x, y) can be written as f (x, y) = x1/2 + y 1/2 and so,

∂f 1 ∂f 1
= x−1/2 and = y −1/2 .
∂x 2 ∂y 2
As such, we can see that the left-hand-side of Euler’s theorem gives us
   
∂f ∂f 1 −1/2 1 −1/2 1 1 1 1/2  1
x +y =x x +y y = x1/2 + y 1/2 = x + y 1/2 = f (x, y),
∂x ∂y 2 2 2 2 2 2

and since the degree of homogeneity of this function is a half, we have 21 f (x, y) on
the right-hand-side of Euler’s theorem. Thus, as these two expressions are the same,
Euler’s theorem holds. 5
We now turn to the economic significance of Euler’s theorem. Consider a firm that
invests an amount of capital, k, and labour, l, in its production process and this yields a
production level of q(k, l). Further, assume that this production function is
homogeneous of degree one, i.e. that we have constant returns to scale. Euler’s theorem
then asserts that
∂q ∂q
k +l = q.
∂k ∂l
Now, ql gives us the marginal product of labour, i.e. it measures the change in
production if we change the amount of labour. In particular, if we invest one more unit
of labour, say by employing one more worker, ql tells us the resulting change in
production.7 As such, it makes sense to say that this extra worker is responsible for this
change in production and so, if we assume that we reward workers by giving them
goods equal to the quantity they produce, it makes sense to reward this worker with a
quantity of goods given by ql . Thus, if all workers produce the same amount, i.e. ql , and
there are l (i.e. the amount of labour invested) workers, it makes sense that they should
all be rewarded with a quantity of goods equal to ql . As such, the quantity lql represents
the total quantity of goods that should be given as rewards to the workers (i.e. the
labour). A similar argument applies to the quantity kqk , i.e. this should be the total
quantity of goods that should be given as rewards to the providers of the capital.
Consequently, Euler’s theorem tells us that these rewards should add up to the total
quantity of goods produced, i.e. all the goods being produced should be distributed
amongst the suppliers of capital and the providers of labour. In summary, this says:

7
But, strictly, this is only approximate since if ∆q is the change in production and ∆l is the change
in labour, the relationship
∂q ∆q ∂q
' or ∆q ' ∆l,
∂l ∆l ∂l
is only an approximation. As such, taking on one more worker (i.e. changing the amount of labour by
one) gives ∆l = 1 and hence the change in production, ∆q, is given [approximately] by ∆q = ql . However,
the argument given in these notes can be made precise if we consider the change in production due to
an ‘arbitrarily small’ change in the amount of labour instead of, say, the intuitively more obvious change
of ‘one worker’.

193
5. Functions of several variables

In a firm with constant returns to scale, if we reward each factor of production


(e.g. capital and labour) at a level equal to its marginal product, then the total
reward to the factors of production will be the amount produced.

5.3.5 Second-order partial derivatives


If we have a function f (x, y), we can use partial differentiation to find the new functions
fx (x, y) and fy (x, y). These new functions are called the first-order partial derivatives of
f . However, it is also possible to partially differentiate these new functions with respect
to x and y to get the second-order partial derivatives of f . Obviously, for a function of
two variables, there are four second-order partial derivatives, i.e. those that are
‘unmixed’:    
∂ 2f ∂ ∂f ∂ 2f ∂ ∂f
= and = ,
∂x2 ∂x ∂x ∂y 2 ∂y ∂y
5 and those that are ‘mixed’:
   
∂ 2f ∂ ∂f ∂ 2f ∂ ∂f
= and = .
∂y∂x ∂y ∂x ∂x∂y ∂x ∂y

Or, alternatively, in our more compact notation we have

fxx = (fx )x , fyy = (fy )y , fxy = (fx )y and fyx = (fy )x ,

respectively. In this course, we will find that the order of partial differentiation in the
mixed second-order partial derivatives is unimportant since we will always have
fxy = fyx . In particular, this fact can serve as a useful ‘check’ when we are working out
second-order partial derivatives.

Example 5.21 In Example 5.7, we found the first-order partial derivatives of

f (x, y) = x2 y + 5xy 3 + y 2 ,

were given by

fx (x, y) = 2xy + 5y 3 and fy (x, y) = x2 + 15xy 2 + 2y.

Find the second-order partial derivatives of f .

Partially differentiating fx (x, y) = 2xy + 5y 3 with respect to x and y respectively, we


can see that
fxx (x, y) = 2y and fxy (x, y) = 2x + 15y 2 ,
whereas, partially differentiating fy (x, y) = x2 + 15xy 2 + 2y with respect to x and y
respectively, we can see that

fyx (x, y) = 2x + 15y 2 and fyy (x, y) = 30xy + 2.

Notice that fxy = fyx as we should expect in this course.

194
5.3. Partial differentiation

Example 5.22 In Example 5.8, we found the first-order partial derivatives of

f (x, y) = 3x3 + 7xy −1 + 2y 9 ,

were given by

fx (x, y) = 9x2 + 7y −1 and fy (x, y) = −7xy −2 + 18y 8 .

Find the second-order partial derivatives of f .

Partially differentiating fx (x, y) = 9x2 + 7y −1 with respect to x and y respectively,


we can see that

fxx (x, y) = 18x and fxy (x, y) = −7y −2 ,

whereas, partially differentiating fy (x, y) = −7xy −2 + 18y 8 with respect to x and y 5


respectively, we can see that

fyx (x, y) = −7y −2 and fyy (x, y) = 14xy −3 + 144y 7 .

Notice that fxy = fyx as we should expect in this course.

Activity 5.17 Find the second-order partial derivatives of the function in


Activity 5.10.

Activity 5.18 Find the first and second-order partial derivatives of


f (x, y) = x3/4 y 1/4 .

And, of course, when finding second-order partial derivatives we may need to use the
chain, product and quotient rules.

Example 5.23 In Example 5.9, we found the first-order partial derivatives of


2
f (x, y) = x ex+y ,

were given by
2 2
fx (x, y) = (x + 1) ex+y and fy (x, y) = 2xy ex+y .

Find the second-order partial derivatives of f .

To find the second-order derivatives that arise from fx (x, y), we first note that we
can write it as
∂f 2
= [(x + 1) ex ] ey .
∂x
2
So, to find fxx (x, y), we treat ey as a constant and we differentiate the function
(x + 1) ex using the product rule to get (x + 1) ex +1 ex . This gives us

∂ 2f 2 2

2
= ey [(x + 1) ex + ex ] = (x + 2) ex+y .
∂x

195
5. Functions of several variables

To find fxy (x, y), we treat (x + 1) ex as a constant and we differentiate the function
2 2
ey using the chain rule to get 2y ey . This gives us

∂ 2f 2 2
= (x + 1) ex (2y ey ) = 2(x + 1)y ex+y .
∂y∂x

To find the second-order derivatives that arise from fy (x, y), we first note that we
can write it as
∂f 2
= 2(x ex )(y ey ).
∂y
2
So, to find fyx (x, y), we treat 2y ey as a constant and we differentiate the function
x ex using the product rule to get x ex +1 ex . This gives us

∂ 2f 2 2
= 2y ey (x ex + ex ) = 2(x + 1)y ex+y .
∂x∂y
5
2
To find fyy (x, y), we treat 2x ex as a constant and we differentiate the function y ey
2 2
using the chain and product rules to get y(2y ey ) + ey . This gives us

∂ 2f 2 2 2

2
= 2x ex (2y 2 ey + ey ) = 2x(2y 2 + 1) ex+y .
∂y
Notice that fxy = fyx as we should expect in this course.

Activity 5.19 Find the second-order partial derivatives of the function in


Activity 5.11.

Of course, we could go on and discuss higher-order partial derivatives, but we won’t as


they will not be used in this course.

Learning outcomes
At the end of this chapter and having completed the relevant reading and activities, you
should be able to:

visualise a surface by using sections and contours;


find partial derivatives;
use the chain rule to find derivatives of various kinds;
show that a function is homogeneous and verify Euler’s theorem;
solve problems from economics-based subjects that involve partial derivatives.

Solutions to activities
Solution to activity 5.1

196
5.3. Solutions to activities

To find the contours of the surface z = 4x + 2y − 2 when we have the given values of z,
we note that:

For z = −10, the curve of intersection is given by −10 = 4x + 2y − 2 which gives us


y = −2x − 4.

For z = 0, the curve of intersection is given by 0 = 4x + 2y − 2 which gives us


y = −2x + 1.

For z = 10, the curve of intersection is given by 10 = 4x + 2y − 2 which gives us


y = −2x + 6.
Thus, we see from these equations that all three of the contours are straight lines. The
sketch of these contours in the (x, y)-plane is illustrated in Figure 5.10.

5
z
=
10

y
z
=

6
0
z
=

10

1
−2 O 1 3 x
2

−4

Figure 5.10: A sketch of the z = −10, z = 0 and z = 10 contours of the surface z =


4x + 2y − 2 in the (x, y)-plane for Activity 5.1.

Solution to activity 5.2


To find the z = −25 contour of the surface z = −x2 − y 2 we need to find the curve of
intersection which, in this case, is simply

−x2 − y 2 = −25 =⇒ x2 + y 2 = 25.

This is the equation of a circle, centred on the origin, with a radius of five.

To find the z = c contours in the three cases indicated we just need to find out what the
curve
−x2 − y 2 = c =⇒ x2 + y 2 = −c,
looks like in the three cases. So, we have:

If c > 0, there are no contours as we have −c < 0 and we know that x2 + y 2 ≥ 0 for
all values of x and y.

If c = 0, the contour is the point (0, 0) as this is the only solution to the equation
x2 + y 2 = 0.

197
5. Functions of several variables


If c < 0, the contour is a circle, centred on the origin, with a radius of −c as we
have −c > 0.
In particular, notice that z = 0 is the smallest value of z that arises from a point on this
surface.

Solution to activity 5.3


To find these sections of the surface z = 4x + 2y − 2 we need to find the curves of
intersection, which in this case, are given by:

For the (x, z)-section, we have y = 0 and so the curve of intersection is given by
z = 4x − 2 and this is a straight line in the (x, z)-plane.

For the (y, z)-section, we have x = 0 and so the curve of intersection is given by
z = 2y − 2 and this is a straight line in the (y, z)-plane.
5 These sections are illustrated in Figure 5.11.

z z

z = 4x − 2 z = 2y − 2
O 1 O
2
x 1 y
−2 −2

(a) (b)
Figure 5.11: A sketch of the (a) (x, z)-section and (b) the (y, z)-section of the surface
z = 4x + 2y − 2 for Activity 5.3.

Solution to activity 5.4


To find these sections of the surface z = −x2 − y 2 we need to find the curves of
intersection, which in this case, are given by:

For the (x, z)-section, we have y = 0 and so the curve of intersection is given by
z = −x2 and this is a parabola in the (x, z)-plane.

For the (y, z)-section, we have x = 0 and so the curve of intersection is given by
z = −y 2 and this is a parabola in the (y, z)-plane.
These sections are illustrated in Figure 5.12.

198
5.3. Solutions to activities

z z
O O
x y
z= −x2 z= −y 2

(a) (b)
Figure 5.12: A sketch of (a) the (x, z)-section and (b) the (y, z)-section of the surface
z = −x2 − y 2 for Activity 5.4.

Solution to activity 5.5


To find these sections of the surface z = x − y + 4 we need to find the curves of
5
intersection, which in this case, are given by:

For the x = 0 section, we have x = 0 and so the curve of intersection is given by


z = −y + 4 and this is a straight line in the (y, z)-plane. Of course, this is just the
(y, z)-section we found in Example 5.3!

For the x = 2 section, we have x = 2 and so the curve of intersection is given by


z = 2 − y + 4 = −y + 6 and this is a straight line.

For the x = 4 section, we have x = 4 and so the curve of intersection is given by


z = 4 − y + 4 = −y + 8 and this is a straight line.
Observe that only the first of these sections ‘lives’ in the (y, z)-plane but, as illustrated
in Figure 5.13, we can also sketch the other two in this plane to get a feel for how the
surface is changing when we look at the sections x = c for different values of c.

z
8
6
4
x = 0
= 2
x =

4
x

O
4 6 8 y

Figure 5.13: The x = 0, x = 2 and x = 4 sections of the surface z = 4x + 2y − 2 for


Activity 5.5.

199
5. Functions of several variables

Solution to activity 5.6


To find the y = −2, 0, 2 sections of the surface z = 4x + 2y − 2 we need to find the
curves of intersection, which in this case, are given by:

For the y = −2 section, we have y = −2 and so the curve of intersection is given by


z = 4x − 4 − 2 = 4x − 6 and this is a straight line.

For the y = 0 section, we have y = 0 and so the curve of intersection is given by


z = 4x − 2 and this is a straight line in the (y, z)-plane. Of course, this is just the
(x, z)-section we found in Activity 5.3 and it is the only one that ‘lives’ in the
(x, z)-plane!

For the y = 2 section, we have y = 2 and so the curve of intersection is given by


z = 4x + 4 − 2 = 4x + 2 and this is a straight line.
5 These sections are illustrated in Figure 5.14(a).

Similarly, to find the x = −2, 0, 2 sections of the surface z = 4x + 2y − 2 we need to find


the curves of intersection, which in this case, are given by:

For the x = −2 section, we have x = −2 and so the curve of intersection is given by


z = −8 + 2y − 2 = 2y − 10 and this is a straight line.

For the x = 0 section, we have x = 0 and so the curve of intersection is given by


z = 2y − 2 and this is a straight line in the (y, z)-plane. Of course, this is just the
(y, z)-section we found in Activity 5.3 and it is the only one that ‘lives’ in the
(y, z)-plane!

For the x = 2 section, we have x = 2 and so the curve of intersection is given by


z = 8 + 2y − 2 = 2y + 6 and this is a straight line.
These sections are illustrated in Figure 5.14(b).

z z
2
2


y=2
y=−
y=0

6
0
x

2
x

=
x

O −3 O 1 5
− 12 12 3
2
x −2 y
−2

−10
−6

(a) (b)
Figure 5.14: A sketch of (a) the y = −2, 0, 2 sections and (b) the x = −2, 0, 2 sections of
the surface z = 4x + 2y − 2 for Activity 5.6.

200
5.3. Solutions to activities

Solution to activity 5.7


To find these sections of the surface z = x2 + y 2 we need to find the curves of
intersection, which in this case, are given by:

For the y = 0 section, we have y = 0 and so the curve of intersection is given by


z = x2 and this is a parabola in the (x, z)-plane. Of course, this is just the
(x, z)-section we found in Example 5.4!

For the y = 1 section, we have y = 1 and so the curve of intersection is given by


z = x2 + 1 and this is a parabola.

For the y = 2 section, we have y = 2 and so the curve of intersection is given by


z = x2 + 4 and this is a parabola.
Observe that only the first of these sections ‘lives’ in the (x, z)-plane but, as illustrated
in Figure 5.9, we can also sketch the other two in this plane to get a feel for how the
5
surface is changing when we look at the sections y = c for different values of c.

z y=2

4
y=1

1 y=0
O
x

Figure 5.15: The y = 0, y = 1 and y = 2 sections of the surface z = x2 +y 2 for Activity 5.7.

Solution to activity 5.8


To find the y = 0, 1, 2 sections of the surface z = −x2 − y 2 we need to find the curves of
intersection, which in this case, are given by:

For the y = 0 section, we have y = 0 and so the curve of intersection is given by


z = −x2 and this is a parabola in the (y, z)-plane. Of course, this is just the
(x, z)-section we found in Activity 5.4 and it is the only one that ‘lives’ in the
(x, z)-plane!

For the y = 1 section, we have y = 1 and so the curve of intersection is given by


z = −x2 − 1 and this is a parabola.

For the y = 2 section, we have y = 2 and so the curve of intersection is given by


z = −x2 − 4 and this is a parabola.
These sections are illustrated in Figure 5.16(a).

Similarly, to find the x = 0, 1, 2 sections of the surface z = −x2 − y 2 we need to find the
curves of intersection, which in this case, are given by:

201
5. Functions of several variables

For the x = 0 section, we have x = 0 and so the curve of intersection is given by


z = −y 2 and this is a parabola in the (y, z)-plane. Of course, this is just the
(y, z)-section we found in Activity 5.4 and it is the only one that ‘lives’ in the
(y, z)-plane!

For the x = 1 section, we have x = 1 and so the curve of intersection is given by


z = −1 − y 2 and this is a parabola.

For the x = 2 section, we have x = 2 and so the curve of intersection is given by


z = −4 − y 2 and this is a parabola.
These sections are illustrated in Figure 5.16(b).

z z
O O
x y
5 −1 y=0 −1 x=0

y=1 x=1
−4 −4

y=2 x=2
(a) (b)
Figure 5.16: A sketch of (a) the y = 0, 1, 2 sections and (b) the x = 0, 1, 2 sections of the
surface z = −x2 − y 2 for Activity 5.8.

Solution to activity 5.9


The partial derivative of f (x, y) with respect to y, i.e. the result of differentiating
f (x, y) with respect to y whilst holding x constant, is going to be another function of x
and y. This function of x and y is what is denoted by the symbols in (5.2). What does
this partial derivative mean? In effect, what we have done when we consider the
function f (x, y) for some fixed value of x, say x0 , is to look at the section of the curve
z = f (x, y) we get when x = x0 , i.e. the section given by the equation z = f (x0 , y)
which lies in a plane that has x = x0 and is parallel to the (y, z)-plane. Then, when we
differentiate f (x0 , y) with respect to y, we are finding the gradient of this section, i.e. it
tells us how z = f (x0 , y) is varying with y. Consequently, this partial derivative is
telling us something about the gradient of the surface when we are at the point (x0 , y)
and we are ‘looking’ in the y-direction.

Solution to activity 5.10


Given the function
x y3 y3
f (x, y) = 2x + x3 y − + = 2x + x3 y − xy −1 + ,
y 2 2
we hold y constant and differentiate with respect to x, to see that
∂f 1
= 2 + 3x2 y − y −1 = 2 + 3x2 y − ,
∂x y

202
5.3. Solutions to activities

and we hold x constant and differentiate with respect to y, to see that


∂f 3 x 3
= x3 + xy −2 + y 2 = x3 + 2 + y 2 .
∂y 2 y 2

These are the sought after partial derivatives fx (x, y) and fy (x, y) respectively.

Solution to activity 5.11


Given the function p
f (x, y) = x2 + y 2 = (x2 + y 2 )1/2 ,
we hold y constant and differentiate with respect to x using the chain rule to get
∂f 1 x
= (x2 + y 2 )−1/2 (2x) = p ,
∂x 2 x2 + y 2

and we hold x constant and differentiate with respect to y using the chain rule to get
5
∂f 1 y
= (x2 + y 2 )−1/2 (2y) = p .
∂y 2 x2 + y 2

These are the sought after partial derivatives fx (x, y) and fy (x, y) respectively.

Solution to activity 5.12


Here f (x, y) = x2 y, x(t) = 2 + 3t and y(t) = t2 + 1. In this case, if we again let
F (t) = f (x(t), y(t)), the chain rule states that

dF ∂f dx ∂f dy
= + .
dt ∂x dt ∂y dt
As such, using this, we can see that
dF
= (2xy)(3) + (x2 )(2t) = 2x(3y + xt),
dt
and so, substituting our expressions for x(t) and y(t), we get

dF
= 2(2 + 3t)[3(t2 + 1) + (2 + 3t)t] = 2(2 + 3t)(6t2 + 2t + 3).
dt
To check this, we note that

F (t) = f (x(t), y(t)) = (2 + 3t)2 (t2 + 1),

which, using the product and chain rules, gives us


dF
= [2(2 + 3t)(3)](t2 + 1) + (2 + 3t)2 (2t) = 2(2 + 3t)[3(t2 + 1) + t(2 + 3t)],
dt
and this agrees with our earlier answer.

203
5. Functions of several variables

Solution to activity 5.13


We have a function, y(x), which is defined implicitly by the equation

x2 + 2xy + 3y 3 = 6,

and we notice that, at the point (x, y) = (1, 1) we have

(1)2 + 2(1)(1) + 3(1)3 = 6,

and so this point does indeed satisfy the equation. To find its derivative at this point we
note that we have g(x, y) = c where

g(x, y) = x2 + 2xy + 3y 3 and c = 6,

and we use the fact that 


5 dy
=−
∂g ∂g
,
dx ∂x ∂y
to get
dy 2x + 2y 2(x + y)
=− 2
=− ,
dx 2x + 9y 2x + 9y 2
as long as 2x + 9y 2 6= 0. And, clearly, at the point (1, 1), this gives us

dy 2(1 + 1) 4
=− =− ,
dx (1,1) 2+9 11

as the value of the derivative.

Solution to activity 5.14


We have G(k, l) = g(x(k, l), y(k, l)) and we want to explain why the chain rule formula
for Gl (k, l) works. To do this, consider that if we change l by a small amount, ∆l, whilst
holding k constant, the corresponding change in G(k, l) is given by

∂G
∆G ' ∆l,
∂l
but here, there are two ways in which G(k, l) = g(x(k, l), y(k, l)) can change with l.

Firstly, G can change with l because g changes with x and x changes with l, let’s
denote this change in G by ∆x G. In this case, we have

∂g
∆x G ' ∆x,
∂x
as we are holding y constant to see how F changes with x and this means that

∂g ∂x
∆x G ' ∆l,
∂x ∂l
as the change in x, ∆x, is related to a change in l with k held constant by
∆x ' xl (k, l)∆l.

204
5.3. Solutions to activities

Secondly, G can change with l because g changes with y and y changes with l, let’s
denote this change in G by ∆y G. In this case, we have
∂g
∆y G ' ∆y,
∂y
as we are holding x constant to see how F changes with y and this means that
∂g ∂y
∆y G ' ∆l,
∂y ∂l
as the change in y, ∆y, is related to a change in l with k held constant by
∆y ' yl (k, l)∆l.
Thus, as the total change in F due to these two changes is given by
∂g ∂x ∂g ∂y
∆G = ∆x G + ∆y G ' ∆l + ∆l,
∂x ∂l ∂y ∂l 5
we can now equate our two expressions for ∆G and divide through by ∆l to get the
chain rule for Gl (k, l) which we wanted.

Solution to activity 5.15


To see why the formula for zy (x, y) works, we consider that if we knew the function,
z(x, y), that satisfied the equation g(x, y, z) = c, we could find a new function, G(x, y),
of x and y only which is given by G(x, y) = g(x, y, z(x, y)). Then using the chain rule,
we have
∂G ∂g dy ∂g ∂z
= + .
∂y ∂y dy ∂z ∂y
But, G(x, y) = c where c is a constant and so we also have
∂G dy
=0 as well as = 1,
∂x dy
which means that we are left with
∂g ∂g ∂z
0= + .
∂y ∂z ∂y
Rearranging this then gives us the formula we require that, i.e.
∂z ∂g/∂y
=− ,
∂y ∂g/∂z
as long as gz (x, y, z) 6= 0.

Solution to activity 5.16


We have a function, q(k, l), which is defined implicitly by the equation

q 3 k + k 3 l + qk 2 l = 3,

and we want to find its partial derivatives with respect to k and l. To do this, we
rewrite the equation as g(q, k, l) = c so that we have, say,

g(q, k, l) = q 3 k + k 3 l + qk 2 l and c = 3,

205
5. Functions of several variables

and use the formulas


 
∂q ∂g ∂g ∂q ∂g ∂g
=− and =− ,
∂k ∂k ∂q ∂l ∂l ∂q
to see that the partial derivatives are
∂q q 3 + 3k 2 l + 2qkl ∂q k 3 + qk 2
=− and =− 2 ,
∂k 3q 2 k + k 2 l ∂l 3q k + k 2 l
provided that 3q 2 k + k 2 l 6= 0.8

Now, to evaluate these partial derivatives at the point where (k, l) = (1, 1), we need to
find the corresponding value of q. This can be done by noting that, when we have k = 1
and l = 1, the equation becomes
q 3 + q − 2 = 0,
5 and, using the hint, we see that this equation can be written as
(q − 1)(q 2 + q + 2) = 0.
Indeed, since  2
2 1 7
q +q+2= q+ + > 0,
2 4
for all q ∈ R, we see that q = 1 is the only solution to this equation. Thus, the point we
are interested in has coordinates (k, l, q) = (1, 1, 1) and, at this point, we have
∂q 1+3+2 6 3 ∂q 1+1 2 1
=− =− =− and =− =− =− ,
∂k 3+1 4 2 ∂l 3+1 4 2
as the values of the partial derivatives at this point.

Solution to activity 5.17


In Activity 5.10, we saw that the function
x y3 y3
f (x, y) = 2x + x3 y − + = 2x + x3 y − xy −1 + ,
y 2 2
had partial derivatives given by
∂f ∂f 3
= 2 + 3x2 y − y −1 and = x3 + xy −2 + y 2 .
∂x ∂y 2
So, partially differentiating fx (x, y) with respect to x and y respectively, we get
1
fxx (x, y) = 6xy and fxy (x, y) = 3x2 + y −2 = 3x2 + ,
y2
whereas, partially differentiating fy (x, y) with respect to x and y respectively, we get
1 x
fyx (x, y) = 3x2 + y −2 = 3x2 + and fyy (x, y) = −2xy −3 + 3y = −2 + 3y.
y2 y3
Notice that fxy = fyx as we should expect in this course.
8
Notice that, in particular, we can never have k = 0 here as this does not satisfy the equation
q k + k 3 l + qk 2 l = 3.
3

206
5.3. Solutions to activities

Solution to activity 5.18


Given the function f (x, y) = x3/4 y 1/4 , we partially differentiate with respect to x and y
respectively to get
3 1
fx (x, y) = x−1/4 y 1/4 and fy (x, y) = x3/4 y −3/4 ,
4 4
as the first-order partial derivatives. Then, for the second-order partial derivatives, we
note that partially differentiating fx (x, y) with respect to x and y respectively, we get
3 −5/4 1/4 3 −1/4 −3/4
fxx (x, y) = − x y and fxy (x, y) = x y ,
16 16
whereas, partially differentiating fy (x, y) with respect to x and y respectively, we get
3 −1/4 −3/4 3 3/4 −7/4
fyx (x, y) = x y and fyy (x, y) = − x y .
16 16 5
Notice that fxy = fyx as we should expect in this course.

Solution to activity 5.19


In Activity 5.11, we saw that the function
p
f (x, y) = x2 + y 2 = (x2 + y 2 )1/2 ,

had partial derivatives given by


∂f ∂f
= x(x2 + y 2 )−1/2 and = y(x2 + y 2 )−1/2 .
∂x ∂y
So, partially differentiating fx (x, y) with respect to x using the product and chain rules
we get
 
2 2 −1/2 1 2 2 −3/2 (x2 + y 2 ) − x2 y2
fxx (x, y) = (1)(x +y ) +(x) − (x + y ) (2x) = = ,
2 (x2 + y 2 )3/2 (x2 + y 2 )3/2

and partially differentiating fx (x, y) with respect to y using the chain rule we get
 
1 2 2 −3/2 xy
fxy (x, y) = x − (x + y ) (2y) = − 2 .
2 (x + y 2 )3/2

Similarly, partially differentiating fy (x, y) with respect to x using the chain rule we get
 
1 2 2 −3/2 xy
fyx (x, y) = y − (x + y ) (2x) = − 2 .
2 (x + y 2 )3/2

and partially differentiating fy (x, y) with respect to y using the product and chain rules
we get
 
2 2 −1/2 1 2 2 −3/2 (x2 + y 2 ) − y 2 x2
fyy (x, y) = (1)(x + y ) + (y) − (x + y ) (2y) = = .
2 (x2 + y 2 )3/2 (x2 + y 2 )3/2
Notice that fxy = fyx as we should expect in this course.

207
5. Functions of several variables

Exercises
Exercise 5.1
Find the first and second-order partial derivatives of the function

f (x, y) = 2xy + x2a y a ,

where a is a constant.

If this function satisfies the equation

∂ 2f 2
2∂ f
x2 − 2y − 18f (x, y) + 36xy = 0,
∂x2 ∂y 2

find all possible values of a.


5
Exercise 5.2
For some numbers α, β and γ, a function, f , takes the form

x2α + y β
f (x, y) = .
x2 + y γ

If f is homogeneous of degree four, find the values of α, β and γ. Having found these
values, verify that the function satisfies Euler’s theorem.

Exercise 5.3
Suppose that R(p, q) = eq+p and that p is a positive function of q defined implicitly by
the equation
q 2 p + p2 q + qp = 3.
Given that r(q) = R(q, p(q)), use the chain rule to find its derivative, r0 (q), when q = 1.

Solutions to exercises
Solution to exercise 5.1
Given that f (x, y) = 2xy + x2a y a where a is a constant, its first and second-order partial
derivatives are given by

∂f ∂ 2f ∂ 2f
= 2y +2ax2a−1 y a =⇒ = 2a(2a−1)x2a−2 y a and = 2+2a2 x2a−1 y a−1 ,
∂x ∂x2 ∂y∂x

and
∂f ∂ 2f ∂ 2f
= 2x + ax2a y a−1 =⇒ 2
= a(a − 1)x2a y a−2 and = 2 + 2a2 x2a−1 y a−1 .
∂y ∂y ∂x∂y

Observe, in particular, that fxy (x, y) = fyx (x, y) as we should expect in this course.

208
5.3. Solutions to exercises

If this function satisfies the equation


∂ 2f 2
2∂ f
x2 − 2y − 18f (x, y) + 36xy = 0,
∂x2 ∂y 2
we can substitute in the relevant terms to see that we must have
     
2 2a−2 a 2 2a a−2 2a a
x 2a(2a − 1)x y − 2y a(a − 1)x y − 18 2xy + x y + 36xy = 0,

which can be tidied up to give us

2a(2a − 1)x2a y a − 2a(a − 1)x2a y a − 36xy − 18x2a y a + 36xy = 0,

and, after further simplification, we get

2(a2 − 9)x2a y a = 0.
5
Consequently, as x, y ∈ R, we must have a2 = 9 which means that a = ±3 are the
possible values of a if f has to satisfy the given equation.

Solution to exercise 5.2


For the function
x2α + y β
f (x, y) = 2 ,
x + yγ
to be homogeneous of degree four for some numbers α, β and γ, we require that
(λx)2α + (λy)β
f (λx, λy) = ,
(λx)2 + (λy)γ
is equal to λ4 f (x, y). But, in order for this to happen, we must find that the

numerator is homogeneous, i.e. we have 2α = β so that

(λx)2α + (λy)β = (λx)β + (λy)β = λβ (xβ + y β ),

giving us a numerator whose degree of homogeneity is β = 2α.


denominator is homogeneous, i.e. we have γ = 2 so that

(λx)2 + (λy)γ = (λx)2 + (λy)2 = λ2 (x2 + y 2 ),

giving us a denominator whose degree of homogeneity is γ = 2.


overall degree of homogeneity is four, i.e. we must find that
(λx)2α + (λy)β λβ (xβ + y β ) β
β−2 x + y
β
= = λ = λβ−2 f (x, y),
(λx)2 + (λy)γ λ2 (x2 + y 2 ) x2 + y 2
is equal to λ4 f (x, y). That is, we must have β − 2 = 4 so that β = 6.
Consequently, we find that α = 3 (since 2α = β), β = 6 and γ = 2 so that our sought
after homogeneous function is
x6 + y 6
f (x, y) = 2 .
x + y2

209
5. Functions of several variables

To verify that Euler’s theorem holds for this function, we need to show that
∂f ∂f
x +y = 4f (x, y).
∂x ∂y
To do this, we use the quotient rule to see that

∂f (6x5 )(x2 + y 2 ) − (x6 + y 6 )(2x) ∂f (6y 5 )(x2 + y 2 ) − (x6 + y 6 )(2y)


= and = ,
∂x (x2 + y 2 )2 ∂y (x2 + y 2 )2

which means that we have


   5 2 
∂f ∂f (6x5 )(x2 + y 2 ) − (x6 + y 6 )(2x) (6y )(x + y 2 ) − (x6 + y 6 )(2y)
x +y =x +y
∂x ∂y (x2 + y 2 )2 (x2 + y 2 )2
6x6 (x2 + y 2 ) − 2x2 (x6 + y 6 ) + 6y 6 (x2 + y 2 ) − 2y 2 (x6 + y 6 )
=
5 (x2 + y 2 )2
6(x6 + y 6 )(x2 + y 2 ) − 2(x2 + y 2 )(x6 + y 6 )
=
(x2 + y 2 )2
4(x6 + y 6 )
=
x2 + y 2
= 4f (x, y),

as required.

Solution to exercise 5.3


Given that, r(q) = R(q, p(q)), the chain rule tells us that

dr ∂R dq ∂R dp ∂R ∂R dp
= + = + ,
dq ∂q dq ∂p dq ∂q ∂p dq

and so, as R(q, p) = eq+p , we have


 
dr q+p q+p dp q+p dp
= e +e =e 1+ .
dq dq dq

Now we need to calculate p0 (q) given that p = p(q) is defined through the equation

q 2 p + p2 q + qp = 3.

To do this, we let G(q, p) be the function defined by

G(q, p) = q 2 p + p2 q + qp,

so that the given equation is now G(q, p) = 3. With this, we then have

dp ∂G ∂G
=− ,
dq ∂q ∂p

where
∂G ∂G
= 2qp + p2 + p and = q 2 + 2pq + q,
∂q ∂p

210
5.3. Solutions to exercises

which gives us
dp 2qp + p2 + p
=− 2 ,
dq q + 2pq + q
provided that q 2 + 2pq + q 6= 0.

To take stock, so far, we have found that


 
dr q+p dp dp 2qp + p2 + p
=e 1+ and =− 2 ,
dq dq dq q + 2pq + q

and we need to evaluate this at the point where q = 1. In particular, we now need to
find the value of p that corresponds to q = 1 if p = p(q) is the positive function of q
defined implicitly by the equation

q 2 p + p2 q + qp = 3.
5
That is, if we set q = 1 in this equation we get

p + p2 + p = 3 =⇒ p2 + 2p − 3 = 0 =⇒ (p + 3)(p − 1) = 0,

i.e. the possible values of p are −3 and 1. But, we are told that p is a positive function
of q and so we reject p = −3 and take the point where q = 1 and p = 1 to be the one we
are interested in. Then, at this point, we find that
dp 2+1+1 dr
=− = −1 =⇒ = e1+1 (1 + [−1]) = 0,
dq 1+2+1 dq

i.e. r0 (q) = 0 when q = 1.

211
5. Functions of several variables

212

You might also like