2 Functions of two variables

The aim of this Section is to enable the reader to gain confidence in dealing with functions of several variables. In order to do this we often concentrate on functions of just two variables. The latter have an easy geometrical interpretation and we can therefore use our geometrical intuition to help understand the meaning of much of the mathematics associated with such functions. We begin by reminding the reader of the Cartesian coordinate system used to locate points in three dimensions. A point P is located by specifying its Cartesian coordinates ( a , b , c ) defined in Figure 1.

Figure 1

No alt text was set. Please request alt text from the person who provided you with this resource.

Within this 3-dimensional space we can consider simple surfaces. Perhaps the simplest is the plane . From HELM booklet  9.6 on vectors we recall the general equation of a plane:

A x + B y + C z = D

where A , B , C , D are constants. This plane intersects the x axis (where y = z = 0 ) at the point D A , 0 , 0 , intersects the y axis (where x = z = 0 ) at the point 0 , D B , 0 and the z axis (where x = y = 0 ) at the point 0 , 0 , D C . See Figure 2 where the dotted lines are hidden from view behind the plane which passes through three points marked on the axes.

Figure 2

No alt text was set. Please request alt text from the person who provided you with this resource.

There are some special cases of note.

Figure 3

No alt text was set. Please request alt text from the person who provided you with this resource.

Planes are particularly simple examples of surfaces . Generally, a surface is described by a relation connecting the three variables x , y , z . In the case of the plane this relation is linear A x + B y + C z = D . In some cases, as we have seen, one or two variables may be absent from the relation. In three dimensions such a relation still defines a surface, for example z = 0 defines the plane of the x - and y -axes.

Although any relation connecting x , y , z defines a surface, by convention, one of the variables (usually z ) is chosen as the dependent variable and the other two therefore are independent variables. For the case of a plane A x + B y + C z = D (and C 0 ) we would write, for example,

z = 1 C ( D A x B y )

Generally a surface is defined by a relation of the form

z = f ( x , y )

where the expression on the right is any relation involving two variables x , y .

2.1 Sketching surfaces

A plane is relatively easy to sketch since it is flat all we need to know about it is where it intersects the three coordinate axes. For more general surfaces what we do is to sketch curves (like contours) which lie on the surface. If we draw enough of these curves our ‘eye’ will naturally interpret the shape of the surface.

Let us see, for example, how we sketch z = x 2 + y 2 .

Firstly we confirm that z = x 2 + y 2 is a surface since this is a relation connecting the three coordinate variables x , y , z . In the standard notation our function of two variables is f ( x , y ) = x 2 + y 2 . To sketch the surface we fix one of the variables at a constant value.

Fix x at value x 0 .

From our discussion above we remember that x = x 0 is the equation of a plane parallel to the z y plane. In this case our relation becomes:

z = x 0 2 + y 2

Since z is now a function of a single variable y , with x 0 2 held constant, this relation: z = x 0 2 + y 2 defines a curve which lies in the plane x = x 0 .

In Figure 4(a) we have drawn this curve (a parabola ). Now by changing the value chosen for x 0 we will obtain a sequence of curves, each a parabola, lying in a different plane, and each being a part of the surface we are trying to sketch. In Figure 4(b) we have drawn some of the curves of this sequence.

Figure 4

(a) (b)

No alt text was set. Please request alt text from the person who provided you with this resource.

What we have done is to slice the surface by planes parallel to the z y plane. Each slice intersects the surface in a curve. In this case we have not yet plotted enough curves to accurately visualise the surface so we need to draw other surface curves.

Fix y at value y 0

Here y = y 0 (the equation of a plane parallel to the z x plane.) In this case the surface becomes

z = x 2 + y 0 2

Again z is a function of single variable (since y 0 is fixed) and describes a curve: again the curve is a parabola , but this time residing on the plane y = y 0 . For each different y 0 we choose a different parabola is obtained: each lying on the surface z = x 2 + y 2 . Some of these curves have been sketched in Figure 5(a). These have then combined with the curves of Figure 4(b) to produce Figure 5(b).

Figure 5

(a) (b)

No alt text was set. Please request alt text from the person who provided you with this resource.

We now have an idea of what the surface defined by z = x 2 + y 2 looks like but to complete the picture we draw a final sequence of curves.

Fix z at value z 0 .

We have z = z 0 (the equation of a plane parallel to the x y plane.) In this case the surface becomes

z 0 = x 2 + y 2

But this is the equation of a circle centred on x = 0 , y = 0 of radius z 0 . (Clearly we must choose z 0 0 because x 2 + y 2 cannot be negative.) As we vary z 0 we obtain different circles, each lying on a different plane z = z 0 . In Figure 6 we have combined the circles with the curves of Figure 5(b) to obtain a good visualisation of the surface z = x 2 + y 2 .

Figure 6

No alt text was set. Please request alt text from the person who provided you with this resource.

(Technically the surface is called a paraboloid , obtained by rotating a parabola about the z axis.)

With the wide availability of sophisticated graphics packages the need to be able to sketch a surface is not as important as once it was. However, we urge the reader to attempt simple surface sketching in the initial stages of this study as it will enhance understanding of functions of two variables.