HELM Workbook 18 Functions of Several Variables

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

Contents 18

Functions of
Several Variables
18.1 Functions of Several Variables 2
18.2 Partial Derivatives 8
18.3 Stationary Points 21
18.4 Errors and Percentage Change 30

Learning outcomes
In this Workbook you will learn about functions of two or more variables. You will learn that
a function of two variables can be interpreted as a surface. You will learn how to sketch
simple surfaces. You will learn what a partial derivative is and how the partial derivative
of any order may be found. As an important application of partial differentiation you will
learn how to locate the turning points of functions of several variables. In particular, for
functions of two variables, you will learn how to distinguish between maxima and minima
points. Finally you will apply your knowledge to the topic of error analysis.
Functions of  

Several Variables 18.1 

Introduction
A function of a single variable y = f (x) is interpreted graphically as a planar curve. In this Section
we generalise the concept to functions of more than one variable. We shall see that a function of
two variables z = f (x, y) can be interpreted as a surface. Functions of two or more variables often
arise in engineering and in science and it is important to be able to deal with such functions with
confidence and skill. We see in this Section how to sketch simple surfaces. In later Sections we shall
examine how to determine the rate of change of f (x, y) with respect to x and y and also how to
obtain the optimum values of functions of several variables.

 
• understand the Cartesian coordinates (x, y, z)
Prerequisites of three-dimensional space.
Before starting this Section you should . . . • be able to sketch simple 2D curves

' 
$
• understand the mathematical description of a
surface
Learning Outcomes • sketch simple surfaces
On completion you should be able to . . .
• use the notation for a function of several
variables
& %

2 HELM (2008):
Workbook 18: Functions of Several Variables
®

1. Functions of several variables


We know that f (x) is used to represent a function of one variable: the input variable is x and the
output is the value f (x). Here x is the independent variable and y = f (x) is the dependent
variable.
Suppose we consider a function with two independent input variables x and y, for example
f (x, y) = x + 2y + 3.
If we specify values for x and y then we have a single value f (x, y). For example, if x = 3 and
y = 1 then f (x, y) = 3 + 2 + 3 = 8. We write f (3, 1) = 8.

Task
Find the values of f (2, 1), f (−1, −3) and f (0, 0) for the following functions.
(a) f (x, y) = x2 + y 2 + 1 (b) f (x, y) = 2x + xy + y 3

Your solution

Answer
(a) f (2, 1) = 22 + 12 + 1 = 6; f (−1, −3) = (−1)2 + (−3)2 + 1 = 11; f (0, 0) = 1
(b) f (2, 1) = 4 + 2 + 1 = 7; f (−1, −3) = −2 + 3 − 27 = −26; f (0, 0) = 0

In a similar way we can define a function of three independent variables. Let these variables be x, y
and u and the function f (x, y, u).

Example 1
Given f (x, y, u) = x2 + yu + 2, find f (0, 1, 0), f (−1, −1, 2).

Solution
f (0, 1, 0) = 02 + 1 × 0 + 2 = 2; f (−1, −1, 2) = 1 − 2 + 2 = 1

Task
(a) Find f (2, −1, 1) for f (x, y, u) = xy + yu + ux.
(b) Evaluate f (x, y, u, t) = x2 − y 2 − u2 − 2t when x = 1, y = −2, u = 3, t = 1.

Your solution

HELM (2008): 3
Section 18.1: Functions of Several Variables
Answer
(a) f (2, −1, 1) = 2 × (−1) + (−1) × 1 + 1 × 2 = −1
(b) f (1, −2, 3, 1) = 12 − (−2)2 − 32 − 2 × 1 = −14 (this is a function of 4 independent variables).

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

c y
a

x b
Figure 1

Within this 3-dimensional space we can consider simple surfaces. Perhaps the simplest is the plane.
From 9.6 on vectors we recall the general equation of a plane:
Ax + By + Cz = D
where
 A, B,
 C, D are constants. This plane intersects the x−axis (where
 y = z= 0) at the point
D D
, 0, 0 , intersects the y−axis (where x = z = 0) at the point 0, , 0 and the z−axis
A   B
D
(where x = y = 0) at the point 0, 0, . See Figure 2 where the dotted lines are hidden from
C
view behind the plane which passes through three points marked on the axes.

D
C

D y
B
D
A

Figure 2

4 HELM (2008):
Workbook 18: Functions of Several Variables
®

There are some special cases of note.

• B = C = 0 A 6= 0.
Here the plane is x = D/A. This plane (for any given values of D and A) is parallel to the zy
plane a distance D/A units from it. See Figure 3a.

• A = 0, C = 0 B 6= 0
Here the plane is y = D/B and is parallel to the zx plane at a distance D/B units from it.
See Figure 3b.

• A = 0, B = 0 C 6= 0
Here the plane is z = D/C which is parallel to the xy plane a distance D/C units from it.
See Figure 3c.

z z
z
D
C

D
B
y y y

D
A

x (a) x (b) x (c)

Figure 3
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 Ax+By+Cz = 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 Ax + By + Cz = D (and C 6= 0) we would write, for example,
1
z= (D − Ax − By)
C
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.

HELM (2008): 5
Section 18.1: Functions of Several Variables
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 = x2 + y 2 .
Firstly we confirm that z = x2 +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) = x2 +y 2 . To sketch
the surface we fix one of the variables at a constant value.
• Fix x at value x0 .
From our discussion above we remember that x = x0 is the equation of a plane parallel to the zy
plane. In this case our relation becomes:
z = x20 + y 2
Since z is now a function of a single variable y, with x20 held constant, this relation: z = x20 + y 2
defines a curve which lies in the plane x = x0 .
In Figure 4(a) we have drawn this curve (a parabola). Now by changing the value chosen for x0
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.

z z

y y
x0
x x

(a) (b)
Figure 4
What we have done is to slice the surface by planes parallel to the zy 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 y0
Here y = y0 (the equation of a plane parallel to the zx plane.) In this case the surface becomes
z = x2 + y02
Again z is a function of single variable (since y0 is fixed) and describes a curve: again the curve is
a parabola, but this time residing on the plane y = y0 . For each different y0 we choose a different
parabola is obtained: each lying on the surface z = x2 +y 2 . Some of these curves have been sketched

6 HELM (2008):
Workbook 18: Functions of Several Variables
®

in Figure 5(a). These have then combined with the curves of Figure 4(b) to produce Figure 5(b).

z
z

y y
x x

(a) (b)
Figure 5
We now have an idea of what the surface defined by z = x2 + y 2 looks like but to complete the
picture we draw a final sequence of curves.
• Fix z at value z0 .
We have z = z0 (the equation of a plane parallel to the xy plane.) In this case the surface becomes
z0 = x2 + y 2

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

z z

y y
x x

Figure 6
(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.

HELM (2008): 7
Section 18.1: Functions of Several Variables
 

Partial Derivatives 18.2 

Introduction
When a function of more than one independent input variable changes because of changes in one or
more of the input variables, it is important to calculate the change in the function itself. This can
be investigated by holding all but one of the variables constant and finding the rate of change of the
function with respect to the one remaining variable. This process is called partial differentiation. In
this Section we show how to carry out the process.

 

Prerequisites • understand the principle of differentiating a


function of one variable
Before starting this Section you should . . .

' 
$
• understand the concept of partial
differentiation

• differentiate a function partially with


Learning Outcomes respect to each of its variables in turn

On completion you should be able to . . . • evaluate first partial derivatives

• carry out successive partial differentiations

• formulate second partial derivatives


& %

8 HELM (2008):
Workbook 18: Functions of Several Variables
®

1. First partial derivatives


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
df
given by the derivative, written . A similar situation occurs with functions of more than one
dx
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) = x3 + 2x2 y + y 2 + 2x + 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) = x3 + 6x2 + 9 + 2x + 1 = x3 + 6x2 + 2x + 10
In effect, we now have a function of x only. If we differentiate it with respect to x we obtain the
expression:
3x2 + 12x + 2.
We say that f has been partially differentiated with respect to x. We denote the partial derivative
∂f
of f with respect to x by (to be read as ‘partial dee f by dee x’ ). In this example, when y = 3:
∂x
∂f
= 3x2 + 12x + 2.
∂x
In the same way if y is held at the value 4 then f (x, 4) = x3 + 8x2 + 16 + 2x + 1 = x3 + 8x2 + 2x + 17
and so, for this value of y
∂f
= 3x2 + 16x + 2.
∂x
Now if we return to the original formulation
f (x, y) = x3 + 2x2 y + y 2 + 2x + 1
and treat y as a constant then the process of partial differentiation with respect to x gives
∂f
= 3x2 + 4xy + 0 + 2 + 0
∂x
= 3x2 + 4xy + 2.

HELM (2008): 9
Section 18.2: Partial Derivatives
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
∂f
by and is obtained by differentiating f (x, y) with respect to x in the usual way but treating
∂x
the y-variable as if it were a constant.
∂f ∂z
Alternative notations for are fx (x, y) or fx or .
∂x ∂x

Example 2

∂f
Find for (a) f (x, y) = x3 + x + y 2 + y, (b) f (x, y) = x2 y + xy 3 .
∂x

Solution
∂f ∂f
(a) = 3x2 + 1 + 0 + 0 = 3x2 + 1 (b) = 2x × y + 1 × y 3 = 2xy + y 3
∂x ∂x

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
∂f
fixed and determining the rate of change of f as y changes. This rate of change is denoted by .
∂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
∂f
by and is obtained by differentiating f (x, y) with respect to y in the usual way but treating
∂y
the x-variable as if it were a constant.
∂f ∂z
Alternative notations for are fy (x, y) or fy or .
∂y ∂y

10 HELM (2008):
Workbook 18: Functions of Several Variables
®

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


∂f
= 0 + 2x2 × 1 + 2y + 0 + 0 = 2x2 + 2y.
∂y

Example 3
∂f
Find for (a) f (x, y) = x3 + x + y 2 + y (b) f (x, y) = x2 y + xy 3
∂y

Solution
∂f ∂f
(a) = 0 + 0 + 2y + 1 = 2y + 1 (b) = x2 × 1 + x × 3y 2 = x2 + 3xy 2
∂y ∂y

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

Example 4
Find fx (1, −2) and fy (−3, 2) for f (x, y) = x2 + y 3 + 2xy.
∂f ∂f
[Remember fx means and fy means .]
∂x ∂y

Solution
fx (x, y) = 2x + 2y, so fx (1, −2) = 2 − 4 = −2; fy (x, y) = 3y 2 + 2x, so fy (−3, 2) = 12 − 6 = 6

Task
Given f (x, y) = 3x2 + 2y 2 + xy 3 find fx (1, −2) and fy (−1, −1).

∂f ∂f
First find expressions for and :
∂x ∂y
Your solution
∂f ∂f
= =
∂x ∂y

Answer
∂f ∂f
= 6x + y 3 , = 4y + 3xy 2
∂x ∂y

HELM (2008): 11
Section 18.2: Partial Derivatives
Now calculate fx (1, −2) and fy (−1, −1):
Your solution
fx (1, −2) = fy (−1, −1) =

Answer
fx (1, −2) = 6 × 1 + (−2)3 = −2; fy (−1, −1) = 4 × (−1) + 3(−1) × 1 = −7

Functions of several variables


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

Key Point 3

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

Task
∂f ∂f
Find and for f (x, y, u, v) = x2 + xy 2 + y 2 u3 − 7uv 4
∂x ∂u

Your solution
∂f ∂f
= =
∂x ∂u

Answer
∂f ∂f
= 2x + y 2 + 0 + 0 = 2x + y 2 ; = 0 + 0 + y 2 × 3u2 − 7v 4 = 3y 2 u2 − 7v 4 .
∂x ∂u

12 HELM (2008):
Workbook 18: Functions of Several Variables
®

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 = RT
where R is the gas constant.
Obtain simple expressions for

(a) the coefficient of thermal expansion, α, defined by:


 
1 ∂v
α=
v ∂T P
(b) the isothermal compressibility, κT , defined by:
 
1 ∂v
κT = −
v ∂P T

Your solution
(a)

Answer  
RT ∂v R
v= ⇒ =
P ∂T P P
 
1 ∂v R 1
so α= = =
v ∂T P Pv T

Your solution
(b)

Answer  
RT ∂v RT
v= ⇒ =− 2
P ∂P T P
 
1 ∂v RT 1
so κT = − = 2
=
v ∂P T vP P

HELM (2008): 13
Section 18.2: Partial Derivatives
Exercises
∂f ∂f
1. For the following functions find and
∂x ∂y
(a) f (x, y) = x + 2y + 3
(b) f (x, y) = x2 + y 2
(c) f (x, y) = x3 + xy + y 3
(d) f (x, y) = x4 + xy 3 + 2x3 y 2
(e) f (x, y, z) = xy + yz

2. For the functions of Exercise 1 (a) to (d) find fx (1, 1), fx (−1, −1), fy (1, 2), fy (2, 1).
Answers
∂f ∂f
1. (a) = 1, =2
∂x ∂y
∂f ∂f
(b) = 2x, = 2y
∂x ∂y
∂f ∂f
(c) = 3x2 + y, = x + 3y 2
∂x ∂y
∂f ∂f
(d) = 4x3 + y 3 + 6x2 y 2 , = 3xy 2 + 4x3 y
∂x ∂y
∂f ∂f
(e) = y, =x+z
∂x ∂y
2.
fx (1, 1) fx (−1, −1) fy (1, 2) fy (2, 1)
(a) 1 1 2 2
(b) 2 −2 4 2
(c) 4 2 13 5
(d) 11 1 20 38

14 HELM (2008):
Workbook 18: Functions of Several Variables
®

2. Second partial derivatives


Performing two successive partial differentiations of f (x, y) with respect to x (holding y constant)
∂2f
is denoted by (or fxx (x, y)) and is defined by
∂x2
∂2f
 
∂ ∂f

∂x2 ∂x ∂x
∂2f
For functions of two or more variables as well as other second-order partial derivatives can be
∂x2
∂2f
obtained. Most obvious is the second derivative of f (x, y) with respect to y is denoted by (or
∂y 2
fyy (x, y)) which is defined as:
∂2f
 
∂ ∂f

∂y 2 ∂y ∂y

Example 5
∂2f ∂2f
Find and for f (x, y) = x3 + x2 y 2 + 2y 3 + 2x + y.
∂x2 ∂y 2

Solution
∂f
= 3x2 + 2xy 2 + 0 + 2 + 0 = 3x2 + 2xy 2 + 2
∂x
∂2f
 
∂ ∂f
≡ = 6x + 2y 2 + 0 = 6x + 2y 2 .
∂x2 ∂x ∂x
∂f
= 0 + x2 × 2y + 6y 2 + 0 + 1 = 2x2 y + 6y 2 + 1
∂y
∂2f
 
∂ ∂f
= = 2x2 + 12y.
∂y 2 ∂y ∂y

We can use the alternative notation when evaluating derivatives.

Example 6
Find fxx (−1, 1) and fyy (2, −2) for f (x, y) = x3 + x2 y 2 + 2y 3 + 2x + y.

Solution
fxx (−1, 1) = 6 × (−1) + 2 × (−1)2 = −4.
fyy (2, −2) = 2 × (2)2 + 12 × (−2) = −16

HELM (2008): 15
Section 18.2: Partial Derivatives
Mixed second derivatives
It is possible to carry out a partial differentiation of f (x, y) with respect to x followed by a partial
differentiation with respect to y (or vice-versa). The results are examples of mixed derivatives. We
must be careful with the notation here.
∂2f
We use to mean ‘differentiate first with respect to y and then with respect to x’ and we use
∂x∂y
∂2f
to mean ‘differentiate first with respect to x and then with respect to y’:
∂y∂x
∂2f ∂2f
   
∂ ∂f ∂ ∂f
i.e. ≡ and ≡ .
∂x∂y ∂x ∂y ∂y∂x ∂y ∂x
(This explains why the order is opposite of what we expect - the derivative ‘operates on the left’.)

Example 7
∂2f
For f (x, y) = x3 + 2x2 y 2 + y 3 find .
∂x∂y

Solution
∂f ∂2f
= 4x2 y + 3y 2 ; = 8xy
∂y ∂x∂y

Theremaining
 possibility is to differentiate first with respect to x and then with respect to y i.e.
∂ ∂f
.
∂y ∂x
∂f ∂2f
For the function in Example 7 = 3x2 + 4xy 2 and = 8xy. Notice that for this function
∂x ∂y∂x
∂2f ∂2f
≡ .
∂x∂y ∂y∂x
This equality of mixed derivatives is true for all functions which you are likely to meet in your studies.
∂2f
To evaluate a mixed derivative we can use the alternative notation. To evaluate we write
∂x∂y
∂2f
fyx (x, y) to indicate that the first differentiation is with respect to y. Similarly, is denoted by
∂y∂x
fxy (x, y).

16 HELM (2008):
Workbook 18: Functions of Several Variables
®

Example 8
Find fyx (1, 2) for the function f (x, y) = x3 + 2x2 y 2 + y 3

Solution

fx = 3x2 + 4xy 2 and fyx = 8xy so fyx (1, 2) = 8 × 1 × 2 = 16.

Task
Find fxx (1, 2), fyy (−2, −1), fxy (3, 3) for f (x, y) ≡ x3 + 3x2 y 2 + y 2 .

Your solution

Answer
fx = 3x2 + 6xy 2 ; fy = 6x2 y + 2y
fxx = 6x + 6y 2 ; fyy = 6x2 + 2; fxy = fyx = 12xy
fxx (1, 2) = 6 + 24 = 30; fyy (−2, −1) = 26; fxy (3, 3) = 108

HELM (2008): 17
Section 18.2: Partial Derivatives
Engineering Example 1

The ideal gas law and Redlich-Kwong equation

Introduction
In Chemical Engineering it is often necessary to be able to equate the pressure, volume and temper-
ature of a gas. One relevant equation is the ideal gas law
P V = nR T (1)
where P is pressure, V is volume, n is the number of moles of gas, T is temperature and R is the
ideal gas constant (= 8.314 J mol−1 K−1 , when all quantities are in S.I. units). The ideal gas law
has been in use since 1834, although its special cases at constant temperature (Boyle’s Law, 1662)
and constant pressure (Charles’ Law, 1787) had been in use many decades previously.
While the ideal gas law is adequate in many circumstances, it has been superseded by many other
laws where, in general, simplicity is weighed against accuracy. One such law is the Redlich-Kwong
equation
RT a
P = − √ (2)
V −b T V (V + b)
where, in addition to the variables in the ideal gas law, the extra parameters a and b are dependent
upon the particular gas under consideration.
Clearly, in both equations the temperature, pressure and volume will be positive. Additionally, the
Redlich-Kwong equation is only valid for values of volume greater than the parameter b - in practice
however, this is not a limitation, since the gas would condense to a liquid before this point was
reached.
Problem in words
Show that for both Equations (1) and (2)

(a) for constant temperature, the pressure decreases as the volume increases

(Note : in the Redlich-Kwong equation, assume that T is large.)

(b) for constant volume, the pressure increases as the temperature increases.

Mathematical statement of problem


For both Equations (1) and (2), and for the allowed ranges of the variables, show that
∂P
(a) <0 for T = constant
∂V
∂P
(b) >0 for V = constant
∂T
Assume that T is sufficiently large so that terms in T −1/2 may be neglected when compared to terms
in T .

18 HELM (2008):
Workbook 18: Functions of Several Variables
®

Mathematical analysis

1. Ideal gas law


This can be rearranged as

nR T
P =
V

so that

(i) at constant temperature


∂P −nR T
= <0 as all quantities are positive
∂V V2
(ii) for constant volume
∂P nR
= >0 as all quantities are positive
∂T V

2. Redlich-Kwong equation

RT a
P = − √
V −b T V (V + b)
= R T (V − b) − a T −1/2 (V 2 + V b)−1
−1

so that

(i) at constant temperature


∂P
= −R T (V − b)−2 + a T −1/2 (V 2 + V b)−2 (2V + b)
∂V
which, for large T , can be approximated by
∂P −R T
≈ <0 as all quantities are positive
∂V (V − b)2

(ii) for constant volume


∂P 1
= R(V − b)−1 + a T −3/2 (V 2 + V b)−1 >0 as all quantities are positive
∂T 2

Interpretation
∂P
In practice, the restriction on T is not severe, and regions in which < 0 does not apply are those
∂V
in which the gas is close to liquefying and, therefore, the entire Redlich-Kwong equation no longer
applies.

HELM (2008): 19
Section 18.2: Partial Derivatives
Exercises
∂2f ∂2f ∂2f ∂2f
1. For the following functions find , , , .
∂x2 ∂y 2 ∂x∂y ∂y∂x
(a) f (x, y) = x + 2y + 3
(b) f (x, y) = x2 + y 2
(c) f (x, y) = x3 + xy + y 3
(d) f (x, y) = x4 + xy 3 + 2x3 y 2
(e) f (x, y, z) = xy + yz

2. For the functions of Exercise 1 (a) to (d) find fxx (1, −3), fyy (−2, −2), fxy (−1, 1).

∂f ∂2f
3. For the following functions find and
∂x ∂x∂t
(a) f (x, t) = x sin(tx) + x2 t (b) f (x, t, z) = zxt − ext (c) f (x, t) = 3 cos(t + x2 )
Answers
∂2f ∂2f ∂2f ∂2f
1. (a) = 0 = = =
∂x2 ∂y 2 ∂x∂y ∂y∂x
∂2f ∂2f ∂2f ∂2f
(b) = 2 = ; = =0
∂x2 ∂y 2 ∂x∂y ∂y∂x
∂2f ∂2f ∂2f ∂2f
(c) = 6x, = 6y; = = 1.
∂x2 ∂y 2 ∂x∂y ∂y∂x
∂2f 2 2 ∂2f 3 ∂2f ∂2f
(d) = 12x + 12xy , = 6xy + 4x , = = 3y 2 + 12x2 y
∂x2 ∂y 2 ∂x∂y ∂y∂x
∂2f ∂2f ∂2f ∂2f
(e) = = 0; = =1
∂x2 ∂y 2 ∂x∂y ∂y∂x

fxx (1, −3) fyy (−2, −2) fxy (−1, 1)


(a) 0 0 0
2. (b) 2 2 0
(c) 6 −12 1
(d) 120 −8 15

∂f ∂2f ∂2f
3. (a) = sin(tx) + xt cos(tx) + 2xt = = 2x cos(tx) − x2 t sin(tx) + 2x
∂x ∂t∂x ∂x∂t
∂f ∂2f ∂2f
(b) = zt − text = = z − ext − txext
∂x ∂t∂x ∂x∂t
∂f 2 ∂2f ∂2f
(c) = −6x sin(t + x ) = = −6x cos(t + x2 )
∂x ∂t∂x ∂x∂t

20 HELM (2008):
Workbook 18: Functions of Several Variables
®

 

Stationary Points 18.3 

Introduction
The calculation of the optimum value of a function of two variables is a common requirement in many
areas of engineering, for example in thermodynamics. Unlike the case of a function of one variable
we have to use more complicated criteria to distinguish between the various types of stationary point.

 
• understand the idea of a function of two
Prerequisites variables
Before starting this Section you should . . . • be able to work out partial derivatives

' 
$
• identify local maximum points, local
minimum points and saddle points on the
surface z = f (x, y)
Learning Outcomes • use first partial derivatives to locate the
On completion you should be able to . . . stationary points of a function f (x, y)

• use second partial derivatives to determine


the nature of a stationary point
& %

HELM (2008): 21
Section 18.3: Stationary Points
1. The stationary points of a function of two variables
Figure 7 shows a computer generated picture of the surface defined by the function
z = x3 + y 3 − 3x − 3y, where both x and y take values in the interval [−1.8, 1.8].

4
z C
3
D
2
A
1

-1

-2

-3

-4
B
2

1 2
x y 1
0
0
-1
-1
-2 -2

Figure 7
There are four features of particular interest on the surface. At point A there is a local maximum,
at B there is a local minimum, and at C and D there are what are known as saddle points.
At A the surface is at its greatest height in the immediate neighbourhood. If we move on the surface
from A we immediately lose height no matter in which direction we travel. At B the surface is at its
least height in the neighbourhood. If we move on the surface from B we immediately gain height,
no matter in which direction we travel.
The features at C and D are quite different. In some directions as we move away from these points
along the surface we lose height whilst in others we gain height. The similarity in shape to a horse’s
saddle is evident.
At each point P of a smooth surface one can draw a unique plane which touches the surface there.
This plane is called the tangent plane at P . (The tangent plane is a natural generalisation of
the tangent line which can be drawn at each point of a smooth curve.) In Figure 7 at each of
the points A, B, C, D the tangent plane to the surface is horizontal at the point of interest. Such
points are thus known as stationary points of the function. In the next subsections we show how to
locate stationary points and how to determine their nature using partial differentiation of the function
f (x, y),

22 HELM (2008):
Workbook 18: Functions of Several Variables
®

Task
In Figures 8 and 9 what are the features at A and B?

-4
A
-5

-6

-7

-8

-9

-10

-11

-12
5
4.5
4
B 1.5
1
3.5 0.5
3 0
-0.5
2.5 -1
2 -1.5

Figure 8

10 A
8

2
B
0

-2

-4

-6

-8
5
4
2
3
1
2
1 0
0 -1
-1 -2

Figure 9
Your solution

HELM (2008): 23
Section 18.3: Stationary Points
Answer
Figure 8 A is a saddle point, B is a local minimum.
Figure 9 A is a local maximum, B is a saddle point.

2. Location of stationary points


As we said in the previous subsection, the tangent plane to the surface z = f (x, y) is horizontal at a
stationary point. A condition which guarantees that the function f (x, y) will have a stationary point
at a point (x0 , y0 ) is that, at that point both fx = 0 and fy = 0 simultaneously.

Task
Verify that (0, 2) is a stationary point of the function f (x, y) = 8x2 +6y 2 −2y 3 +5
and find the stationary value f (0, 2).

First, find fx and fy :


Your solution

Answer
fx = 16x ; fy = 12y − 6y 2
Now find the values of these partial derivatives at x = 0, y = 2:
Your solution

Answer
fx = 0 , fy = 24 − 24 = 0
Hence (0, 2) is a stationary point.
The stationary value is f (0, 2) = 0 + 24 − 16 + 5 = 13

Example 9
Find a second stationary point of f (x, y) = 8x2 + 6y 2 − 2y 3 + 5.

Solution
fx = 16x and fy ≡ 6y(2 − y). From this we note that fx = 0 when x = 0, and fx = 0 and when
y = 0, so x = 0, y = 0 i.e. (0, 0) is a second stationary point of the function.

It is important when solving the simultaneous equations fx = 0 and fy = 0 to find stationary points
not to miss any solutions. A useful tip is to factorise the left-hand sides and consider systematically
all the possibilities.

24 HELM (2008):
Workbook 18: Functions of Several Variables
®

Example 10
Locate the stationary points of
f (x, y) = x4 + y 4 − 36xy

Solution
First we write down the partial derivatives of f (x, y)
∂f ∂f
= 4x3 − 36y = 4(x3 − 9y) = 4y 3 − 36x = 4(y 3 − 9x)
∂x ∂y
∂f ∂f
Now we solve the equations = 0 and = 0:
∂x ∂y

x3 − 9y = 0 (i)
y 3 − 9x = 0 (ii)
y3
From (ii) we obtain: x = (iii)
9
Now substitute from (iii) into (i)

y9
− 9y = 0
93
⇒ y 9 − 94 y = 0
⇒ y(y 8 − 38 ) = 0 (removing the common factor)
⇒ y(y 4 − 34 )(y 4 + 34 ) = 0 (using the difference of two squares)
We therefore obtain, as the only solutions:
y = 0 or y 4 − 34 = 0 (since y 4 + 34 is never zero)
The last equation implies:
(y 2 − 9)(y 2 + 9) = 0 (using the difference of two squares)
∴ y 2 = 9 and y = ± 3.

Now, using (iii): when y = 0, x = 0, when y = 3, x = 3, and when y = −3, x = −3.


The stationary points are (0, 0), (−3, −3) and (3, 3).

Task
Locate the stationary points of
f (x, y) = x3 + y 2 − 3x − 6y − 1.

First find the partial derivatives of f (x, y):


Your solution

HELM (2008): 25
Section 18.3: Stationary Points
Answer
∂f ∂f
= 3x2 − 3, = 2y − 6
∂x ∂y

∂f ∂f
Now solve simultaneously the equations = 0 and = 0:
∂x ∂y
Your solution

Answer
3x2 − 3 = 0 and 2y − 6 = 0.
Hence x2 = 1 and y = 3, giving stationary points at (1, 3) and (−1, 3).

3. The nature of a stationary point


We state, without proof, a relatively simple test to determine the nature of a stationary point, once
located. If the surface is very flat near the stationary point then the test will not be sensitive enough
to determine the nature of the point. The test is dependent upon the values of the second order
derivatives: fxx , fyy , fxy and also upon a combination of second order derivatives denoted by D where
 2 2
∂2f ∂2f ∂ f
D≡ 2
× 2 − , which is also expressible as D ≡ fxx fyy − (fxy )2
∂x ∂y ∂x∂y
The test is as follows:

Key Point 4
Test to Determine the Nature of Stationary Points

1. At each stationary point work out the three second order partial derivatives.

2. Calculate the value of D = fxx fyy − (fxy )2 at each stationary point.


Then, test each stationary point in turn:

3. If D < 0 the stationary point is a saddle point.


∂2f
If D > 0 and > 0 the stationary point is a local minimum.
∂x2
∂2f
If D > 0 and < 0 the stationary point is a local maximum.
∂x2
If D = 0 then the test is inconclusive (we need an alternative test).

26 HELM (2008):
Workbook 18: Functions of Several Variables
®

Example 11
The function: f (x, y) = x4 + y 4 − 36xy has stationary points at
(0, 0), (−3, −3), (3, 3). Use Key Point 4 to determine the nature of each sta-
tionary point.

Solution
∂f ∂f
We have = fx = 4x3 − 36y and = fy = 4y 3 − 36x.
∂x ∂y
∂2f 2 ∂ f
2
2 ∂2f
Then = f xx = 12x , = f yy = 12y , = fyx = −36.
∂x2 ∂y 2 ∂x∂y
A tabular presentation is useful for calculating D = fxx fyy − (fxy )2 :

Point Point Point


Derivatives (0, 0) (−3, −3) (3, 3)

fxx 0 108 108

fyy 0 108 108

fxy −36 −36 −36

D <0 >0 >0

(0, 0) is a saddle point; (−3, −3) and (3, 3) are both local minima.

Task
Determine the nature of the stationary points of f (x, y) = x3 + y 2 − 3x − 6y − 1,
which are (1, 3) and (1, −3).

Write down the three second partial derivatives:


Your solution

Answer
fxx = 6x, fyy = 2, fxy = 0.

HELM (2008): 27
Section 18.3: Stationary Points
Now complete the table below and determine the nature of the stationary points:
Your solution

Point Point
Derivatives (1, 3) (−1, 3)

fxx

fyy

fxy

Answer
Point Point
Derivatives (1, 3) (−1, 3)

fxx 6 −6

fyy 2 2

fxy 0 0

D >0 <0

State the nature of each stationary point:


Your solution

Answer
(1, 3) is a local minimum; (−1, 3) is a saddle point.

28 HELM (2008):
Workbook 18: Functions of Several Variables
®

For most functions the procedures described above enable us to distinguish between the various types
of stationary point. However, note the following example, in which these procedures fail.
Given f (x, y) = x4 + y 4 + 2x2 y 2 .
∂f ∂f
= 4x3 + 4xy 2 , = 4y 3 + 4x2 y,
∂x ∂y

∂2f ∂2f ∂2f


2
= 12x2 + 4y 2 , 2
= 12y 2 + 4x2 , = 8xy
∂x ∂y ∂x∂y
∂f ∂f
Location: The stationary points are located where = = 0, that is, where
∂x ∂y
4x3 +4xy 2 = 0 and 4y 3 +4x2 y = 0. A simple factorisation implies 4x(x2 +y 2 ) = 0 and 4y(y 2 +x2 ) =
0. The only solution which satisfies both equations is x = y = 0 and therefore the only stationary
point is (0, 0).
Nature: Unfortunately, all the second partial derivatives are zero at (0, 0) and therefore D = 0, so
the test, as described in Key Point 4, fails to give us the necessary information.
However, in this example it is easy to see that the stationary point is in fact a local minimum.
This could be confirmed by using a computer generated graph of the surface near the point (0, 0).
Alternatively, we observe x4 + y 4 + 2x2 y 2 ≡ (x2 + y 2 )2 so f (x, y) ≥ 0, the only point where
f (x, y) = 0 being the stationary point. This is therefore a local (and global) minimum.

Exercises
Determine the nature of the stationary points of the function in each case:

1. f (x, y) = 8x2 + 6y 2 − 2y 3 + 5

2. f (x, y) = x3 + 15x2 − 20y 2 + 10

3. f (x, y) = 4 − x2 − xy − y 2

4. f (x, y) = 2x2 + y 2 + 3xy − 3y − 5x + 8

5. f (x, y) = (x2 + y 2 )2 − 2(x2 − y 2 ) + 1

6. f (x, y) = x4 + y 4 + 2x2 y 2 + 2x2 + 2y 2 + 1

Answers

1. (0, 0) local minimum, (0, 2) saddle point.

2. (0, 0) saddle point, (−10, 0) local maximum.

3. (0, 0) local maximum.

4. (−1, 3) saddle point.

5. (0, 0) saddle point, (1,0) local minimum, (−1, 0) local minimum.

6. f (x, y) ≡ (x2 + y 2 + 1)2 , local minimum at (0, 0).

HELM (2008): 29
Section 18.3: Stationary Points
Errors and  

Percentage Change 18.4 

Introduction
When one variable is related to several others by a functional relationship it is possible to estimate
the percentage change in that variable caused by given percentage changes in the other variables.
For example, if the values of the input variables of a function are measured and the measurements
are in error, due to limits on the precision of measurement, then we can use partial differentiation to
estimate the effect that these errors have on the forecast value of the output.

 

Prerequisites • understand the definition of partial


derivatives and be able to find them
Before starting this Section you should . . .

' 
$
• calculate small errors in a function of more
than one variable
Learning Outcomes
• calculate approximate values for absolute
On completion you should be able to . . . error, relative error and percentage relative
error
& %

30 HELM (2008):
Workbook 18: Functions of Several Variables
®

1. Approximations using partial derivatives


Functions of two variables
We saw in 16.5 how to expand a function of a single variable f (x) in a Taylor series:
0 (x − x0 )2 00
f (x) = f (x0 ) + (x − x0 )f (x0 ) + f (x0 ) + . . .
2!
This can be written in the following alternative form (by replacing x − x0 by h so that x = x0 + h):
h2 00
f (x0 + h) = f (x0 ) + hf 0 (x0 ) +f (x0 ) + . . .
2!
This expansion can be generalised to functions of two or more variables:
f (x0 + h, y0 + k) ' f (x0 , y0 ) + hfx (x0 , y0 ) + kfy (x0 , y0 )
where, assuming h and k to be small, we have ignored higher-order terms involving powers of h and
k. We define δf to be the change in f (x, y) resulting from small changes to x0 and y0 , denoted by
h and k respectively. Thus:
δf = f (x0 + h, y0 + k) − f (x0 , y0 )
and so δf ' hfx (x0 , y0 ) + kfy (x0 , y0 ). Using the notation δx and δy instead of h and k for small
increments in x and y respectively we may write
δf ' δx.fx (x0 , y0 ) + δy.fy (x0 , y0 )
Finally, using the more common notation for partial derivatives, we write
∂f ∂f
δf ' δx + δy.
∂x ∂y
Informally, the term δf is referred to as the absolute error in f (x, y) resulting from errors δx, δy
in the variables x and y respectively. Other measures of error are used. For example, the relative
δf δf
error in a variable f is defined as and the percentage relative error is × 100.
f f

Key Point 5
Measures of Error
If δf is the change in f at (x0 , y0 ) resulting from small changes h, k to x0 and y0 respectively, then
δf = f (x0 + h, y0 + k) − f (x0 , y0 ), and
The absolute error in f is δf.

δf
The relative error in f is .
f
δf
The percentage relative error in f is × 100.
f

HELM (2008): 31
Section 18.4: Errors and Percentage Change
Note that to determine the error numerically we need to know not only the actual values of δx and
δy but also the values of x and y at the point of interest.

Example 12
Estimate the absolute error for the function f (x, y) = x2 + x3 y

Solution
fx = 2x + 3x2 y; fy = x3 .
Then δf ' (2x + 3x2 y)δx + x3 δy

Task
Estimate the absolute error for f (x, y) = x2 y 2 + x + y at the point (−1, 2) if
δx = 0.1 and δy = 0.025. Compare the estimate with the exact value of the error.

First find fx and fy :


Your solution
fx = fy =

Answer
fx = 2xy 2 + 1, fy = 2x2 y + 1

Now obtain an expression for the absolute error:


Your solution

Answer
δf ' (2xy 2 + 1)δx + (2x2 y + 1)δy

Now obtain the estimated value of the absolute error at the point of interest:
Your solution

Answer
δf ' (2xy 2 + 1)δx + (2x2 y + 1)δy = (−7)(0.1) + (5)(0.025) = −0.575.
Finally compare the estimate with the exact value:
Your solution

32 HELM (2008):
Workbook 18: Functions of Several Variables
®

Answer
The actual error is calculated from
δf = f (x0 + δx, y0 + δy) − f (x0 , y0 ) = f (−0.9, 2.025) − f (−1, 2) = −0.5534937.
We see that there is a reasonably close correspondence between the two values.

Functions of three or more variables


If f is a function of several variables x, y, u, v, . . . the error induced in f as a result of making small
errors δx, δy, δu, δv . . . in x, y, u, v, . . . is found by a simple generalisation of the expression for two
variables given above:
∂f ∂f ∂f ∂f
δf ' δx + δy + δu + δv + . . .
∂x ∂y ∂u ∂v

Example 13
Suppose that the area of triangle ABC is to be calculated by measuring two sides
and the included angle. Call the sides b and c and the angle A.
1
Then the area S of the triangle is given by S = bc sin A.
2
Now suppose that the side b is measured as 4.00 m, c as 3.00 m and A as 30o .
Suppose also that the measurements of the sides could be in error by as much
as ± 0.005 m and of the angle by ± 0.01o . Calculate the likely maximum error
induced in S as a result of the errors in the sides and angle.

Solution
1 1
Here S is a function of three variables b, c, A. We calculate S= × 4 × 3 × = 3 m2 .
2 2
∂S 1 ∂S 1 ∂S 1
Now = c sin A, = b sin A and = bc cos A, so
∂b 2 ∂c 2 ∂A 2
∂S ∂S ∂S 1 1 1
δS ' δb + δc + δA = c sin A δb + b sin A δc + bc cos A δA.
∂b ∂c ∂A 2 2 2
π
Here |δb|max = |δc|max = 0.005 and |δA|max = × 0.01 (A must be measured in radians).
180
Substituting these values we see that the maximum error in the calculated value of S is given by
the approximation
    √ !
1 1 1 1 1 3 π
|δS|max ' ×3× × 0.005 + ×4× × 0.005 + ×4×3× × 0.01
2 2 2 2 2 2 180

' 0.0097 m2

Hence the estimated value of S is in error by up to about ± 0.01 m2 .

HELM (2008): 33
Section 18.4: Errors and Percentage Change
Engineering Example 2

Measuring the height of a building

The height h of a building is estimated from (i) the known horizontal distance x between the point of
observation M and the foot of the building and (ii) the elevation angle θ between the horizontal and
the line joining the point of observation to the top of the building (see Figure 10). If the measured
horizontal distance is x = 150 m and the elevation angle is θ = 40◦ , estimate the error in measured
building height due to an error of 0.1◦ degree in the measurement of the angle of elevation.

M θ
x

Figure 10: Geometry of the measurement


The variables x, θ, and h are related by
tan θ = h/x.
or
x tan θ = h. (1)
The error in h resulting from a measurement error in θ can be deduced by differentiating (1):
d(x tan θ) dh dx d(tan θ) dh
= ⇒ tan θ +x = .
dθ dθ dθ dθ dθ
This can be written
dx dh
tan θ + x sec2 θ = . (2)
dθ dθ
Equation (2) gives the relationship among the small variations in variables x, h and θ. Since x is
dx
assumed to be without error and independent of θ, = 0 and equation (2) becomes

dh
x sec2 θ = . (3)

Equation (3) can be considered to relate the error in building height δh to the error in angle δθ:
δh
' x sec2 θ.
δθ
It is given that x = 150 m.
The incidence angle θ = 40◦ can be converted to radians i.e. θ = 40π/180 rad = 2π/9 rad.
Then the error in angle δθ = 0.1◦ needs to be expressed in radians for consistency of the units in (3).

34 HELM (2008):
Workbook 18: Functions of Several Variables
®

So δθ = 0.1π/180 rad = π/1800 rad. Hence, from Equation (3)


π
δh = 150 ≈ 0.45 m.
1800 × cos2 (2π/9)
So the error in building height resulting from an error in elevation angle of 0.1◦ is about 0.45 m.

Task
Estimate the maximum error in f (x, y) = x2 + y 2 + xy at the point x = 2, y = 3
if maximum errors ± 0.01 and ± 0.02 are made in x and y respectively.

∂f ∂f
First find and :
∂x ∂y
Your solution
∂f ∂f
= =
∂x ∂y

Answer
∂f ∂f
= 2x + y; = 2y + x.
∂x ∂y

For x = 2 and y = 3 calculate the value of f (x, y):


Your solution

Answer
f (2, 3) = 22 + 32 + 2 × 3 = 19.
Now since the error in the measured value of x is ± 0.01 and in y is ± 0.02 we have
|δx|max = 0.01, |δy|max = 0.02. Write down an expression to approximate to |δf |max :
Your solution

Answer
|δf |max ' |(2x + y)| |δx|max + |(2y + x)| |δy|max
Calculate |δf |max at the point x = 2, y = 3 and give bounds for f (2, 3):
Your solution

Answer

|δf |max ' (2 × 2 + 3) × 0.01 + (2 × 3 + 2) × 0.02


= 0.07 + 0.16 = 0.23.

Hence we quote f (2, 3) = 19 ± 0.23, which can be expressed as 18.77 ≤ f (2, 3) ≤ 19.23

HELM (2008): 35
Section 18.4: Errors and Percentage Change
2. Relative error and percentage relative error
Two other measures of error can be obtained from a knowledge of the expression for the  absolute error.

δf δf
As mentioned earlier, the relative error in f is and the percentage relative error is × 100 %.
f f
Suppose that f (x, y) = x2 + y 2 + xy then

∂f ∂f
δf ' δx + δy
∂x ∂y

= (2x + y)δx + (2y + x)δy

The relative error is


δf 1 ∂f 1 ∂f
' δx + δy
f f ∂x f ∂y
(2x + y) (2y + x)
= δx + 2 δy
x2 2
+ y + xy x + y 2 + xy

The actual value of the relative error can be obtained if the actual errors of the independent variables
are known and the values of x and y at the point of interest. In the special case where the function
is a combination of powers of the input variables then there is a short cut to finding the relative error
x2 y 4
in the value of the function. For example, if f (x, y, u) = 3 then
u
∂f 2xy 4 ∂f 4x2 y 3 ∂f 3x2 y 4
= 3 , = , =− 4
∂x u ∂y u3 ∂u u
Hence
2xy 4 4x2 y 3 3x2 y 4
δf ' δx + δy − δu
u3 u3 u4
Finally,
δf 2xy 4 u3 4x2 y 3 u3 3x2 y 4 u3
' 3 × 2 4 δx + × δy − × δu
f u xy u3 x2 y 4 u4 x2 y 4
Cancelling down the fractions,
δf δx δy δu
'2 +4 −3 (1)
f x y u
so that
rel. error in f ' 2× (rel. error in x) + 4× (rel. error in y) − 3× (rel. error in u).
Note that if we write
f (x, y, u) = x2 y 4 u−3
we see that the coefficients of the relative errors on the right-hand side of (1) are the powers of the
appropriate variable.
To find the percentage relative error we simply multiply the relative error by 100.

36 HELM (2008):
Workbook 18: Functions of Several Variables
®

Task
x3 y
If f = and x, y, u are subject to percentage relative errors of 1%, −1% and
u2
2% respectively find the approximate percentage relative error in f .

∂f ∂f ∂f
First find , and :
∂x ∂y ∂u
Your solution
∂f ∂f ∂f
= = =
∂x ∂y ∂u

Answer
∂f 3x2 y ∂f x3 ∂f 2x3 y
= 2 , = 2, =− 3 .
∂x u ∂y u ∂u u

Now write down an expression for δf


Your solution
δf '

Answer
3x2 y x3 2x3 y
δf ' 2 δx + 2 δy − 3 δu
u u u
Hence write down an expression for the percentage relative error in f :
Your solution

Answer
δf 3x2 y u2 x3 u2 2x3 y u2
× 100 ' 2 × 3 δx × 100 + 2 × 3 δy × 100 − 3 × 3 δu × 100
f u xy u xy u xy

Finally, calculate the value of the percentage relative error:

Your solution

Answer

δf δx δy δu
× 100 ' 3 × 100 + × 100 − 2 × 100
f x y u

= 3(1) − 1 − 2(2) = −2%

Note that f = x3 yu−2 .

HELM (2008): 37
Section 18.4: Errors and Percentage Change
Engineering Example 3

Error in power to a load resistance

Introduction
The power required by an electrical circuit depends upon its components. However, the specification
of the rating of the individual components is subject to some uncertainity. This Example concerns
the calculation of the error in the power required by a circuit shown in Figure 11 given a formula for
the power, the values of the individual components and the percentage errors in them.
Problem in words
The power delivered to the load resistance RL for the circuit shown in Figure 11 is given by
25RL
P =
(R + RL )2

2000Ω
RL

Figure 11: Circuit with a load resistance


If R = 2000 Ω and RL = 1000 Ω with a maximum possible error of 5% in either, find P and estimate
the maximum error in P.
Mathematical statement of the problem
25RL
We can calculate P by substituting R = 2000 and RL = 1000 into P = .
(R + RL )2
We need to calculate the absolute errors in R and RL and use these in the approximation δP ≈
P P
δR + δRL to calculate the error in P.
R RL
Mathematical analysis
At R = 2000 and RL = 1000
25 × 1000 25 25
P = 2
= = × 10−3 ≈ 2.77 × 10−3 watts.
(1000 + 2000) 9000 9
5 5
A 5% error in R gives |δR|max = × 2000 = 100 and |δRL |max = × 1000 = 50
100 100
P P
|δP |max ≈ |δR|max + |δRL |max
R RL
We need to calculate the values of the partial derivatives at R = 2000 and RL = 1000.
25RL
P = = 25RL (R + RL )−2
(R + RL )2
P
= −50RL (R + RL )−3
R

38 HELM (2008):
Workbook 18: Functions of Several Variables
®

P
= 25(R + RL )−2 − 50RL (R + RL )−3
RL

P −50 50
So (2000, 1000) = −50(1000)(3000)−3 = 2
= − × 10−6
R 1000 × 27 27
 
P 25 50
(2000, 1000) = 25(3000)−2 − 50(1000)(3000)−3 = − × 10−6
RL 9 27
 
75 − 50 25
= × 10−6 = × 10−6
27 27

P P
Substituting these values into |δP |max ≈ |δR|max + |δRL |max we get:
R RL
 
50 25 5000 25 × 50
|δP |max = × 10−6 × 100 + × 10−6 × 50 = + × 10−6 ≈ 2.315 × 10−4
27 27 27 27

Interpretation

At R = 2000 and RL = 1000, P will be 2.77 × 10−3 W and, assuming 5% errors in the values of the
resistors, then the error in P ≈ ±2.315 × 10−4 W. This represents about 8.4% error. So the error in
the power is greater than that in the individual components.

Exercises
1. The sides of a right-angled triangle enclosing the right-angle are measured as 6 m and 8 m. The
maximum errors in each measurement are ± 0.1m. Find the maximum error in the calculated
area.

2. In Exercise 1, the angle opposite the 8 m side is calculated from tan θ = 8/6 as θ = 53◦ 80 .
Calculate the approximate maximum error in that angle.
r
3x
3. If v = find the maximum percentage error in v due to errors of 1% in x and 3% in y.
y
r
1 E
4. If n = and L, E and d can be measured correct to within 1%, how accurate is the
2L d
calculated value of n?
1 2
5. The area of a segment of a circle which subtends an angle θ is given by A = r (θ − sin θ).
2
The radius r is measured with a percentage error of +0.2% and θ is measured as 450 with an
error of = +0.1◦ . Find the percentage error in the calculated area.

HELM (2008): 39
Section 18.4: Errors and Percentage Change
Answers
1 ∂A ∂A y x
1. A = xy δA ≈ δx + δy δA ≈ δx + δy
2 ∂x ∂y 2 2

Maximum error = |yδx| + |xδy| = 0.7 m2 .

y ∂θ ∂θ y x
2. θ = tan−1 so δθ = δx + δy = − 2 2
δx + 2 δy
x ∂x ∂y x +y x + y2

−8 6
Maximum error in θ is (0.1) + 2 (0.1) = 0.014 rad. This is 0.80 .
62 +8 2 6 + 82
1 1 1 δv δx δy
3. Take logarithms of both sides: ln v = ln 3 + ln x − ln y so ≈ −
2 2 2 v 2x 2y

δx δy 1 3
Maximum percentage error in v = + − = % + % = 2%.
2x 2y 2 2
4. Take logarithms of both sides:
1 1 δn δL δE δd
ln n = − ln 2 − ln L + ln E − ln d so =− + −
2 2 n L 2E 2d
δL δE δd 1 1
Maximum percentage error in n = − + + − = 1% + % + % = 2%.
L 2E 2d 2 2

1 δA 2δr 1 − cos θ
5. A = r2 (θ − sin θ) so = + δθ
2 A r θ − sin θ

1 

1− √ 


δA 2
 π
= 2(0.2)% + × 100% = (0.4 + 0.65)% = 1.05%
A π 1  1800
 −√ 

 
4 2

40 HELM (2008):
Workbook 18: Functions of Several Variables

You might also like