P1 Calculus II Partial Differentiation & Multiple Integration

You might also like

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

0/1

P1 Calculus II
Partial Differentiation & Multiple Integration
4 lectures, MT 2014
Rev November 17, 2014
Course Page

David Murray
david.murray@eng.ox.ac.uk
www.robots.ox.ac.uk/dwm/Courses/1PD

Introduction
So far in your explorations of the differential and integral calculus, you have considered
only functions of one variable: y = f (x), and all that.
But you do not have to look too hard to find quantities which depend on more than one
independent variable. The pressure in an oil field will depend on latitude, longitude and
depth, and no doubt will change over time p = p(, , d, t). What is the change
of pressure when these variables change? How might one integrate quanities over the
complete oil field to find, say, the yield?
This set of lectures answers the questions of how our notions of differentiation and
integration can be extended to cover multiple variables.
Grey Book Syllabus (from Weblearn)
Partial differentiation: the chain rule and simple transformations of first-order (not
second-order) partial differential coefficients. Multiple integrals and their evaluation,
with applications to finding areas, volumes, masses, centroids, inertias etc. (excluding
line and surface integrals and using spherical and cylindrical coordinate systems only).
At the end of this course students will:
Be familiar with the basic operations of calculus of functions of several variables.
Understand and perform partial differentiation on a function of multiple variables.
Be able to use the chain rule on partial differentials and simple transformations of
1st order partial differential coefficients.
Understand the concept of a Jacobian and its use
Be able to evaluate multiple integrals and use this to find areas, volumes, masses,
centroids, moments of inertia, etc.

0/2

Lecture Content
1. The partial derivative. First and higher partial derivatives. Total and partial differentials, and their use in estimating errors. Testing for total (or perfect) differentials. Integrating total differentials to recover original function.
2. Relationships involving first order partial derivatives. Function of a function. Composite functions, the Chain Rule and the Chain Rule for Partials. Implicit Functions.
3. Transformations from one set of variables to another. Transformations as old in
terms of new and new in terms of old. Jacobians. Transformations to Plane,
spherical and polar coordinates. What makes a good transformation? Functional
dependence. Shape.
4. Double, triple (and higher) integrals using repeated integration. Transformations,
the use of the Jacobian. Plane, spherical and polar coordinates.
Tutorial Sheets
The tutorial sheet associated with this course is
1P1H Calculus 2: Partial Differentiation and Multiple Integrals
Reading
James, G. (2001) Modern Engineering Mathematics, Prentice-Hall, 3rd Ed.,
ISBN: 0-13-018319-9 (paperback).
Stephenson, G. (1973) Mathematical Methods for Science Students, Longman
Scientific & Technical, 2nd Ed., ISBN: 0-582-44416-0 (paperback).
Stephensons book is a suitable introductory text for your first year. It is divorced
from applications, and is now looking a bit dull. Good for basic problem bashing
though.
Kreyszig, E. (1999) Advanced Engineering Mathematics, John Wiley & Sons,
8th Ed., ISBN: 0-471-15496-2 (paperback).
Course WWW Pages
Pdf copies of these notes (in colour), copies of the lecture slides, the tutorial sheets,
corrections, answers to FAQs etc, will be accessible from
www.robots.ox.ac.uk/dwm/Courses/1PD
Only the notes and the tute sheets get put on weblearn.

Lecture 1
Total and Partial Derivatives and Differentials
1.1

Revision of continuity and the derivative for one variable

1.1.1

Functions and ranges of validity

Suppose we want to make a real function f of some real variable x. We certainly need
the function recipe, but we should also specify a range R of admissible values for x for
which x is mapped onto y by y = f (x). We might have y = f (x) = x 2 , with R being
the interval 1 x 1. Note that with this definition it is meaningless to ask what
is f (2)?. Often, however, the range is not specified: the assumption then is that
the range is such as to make y real. For example, if y = (1 + x)1/2 we would assume
that 1 < x. (Those of you experienced in writing functions in a computer language
will know the importance of setting proper ranges for input variables. Without them,
a program may crash.)
1.1.2

Continuity for a function of one variable

Suppose we have a value x = a. We can define a neighbourhood of x-values around


x = a by requiring |x a| < or, equivalently, (x a)2 < 2 . A function y = f (x) is
said to be continuous at x = a if, for every positive number  (however small), one can
find a neighbourhood
|x a| <

in which

|f (x) f (a)| <  .

(1.1)

Another way of expressing this is:


lim f (x) = f (a) .

(1.2)

xa

It should not matter whether x tends to a from below or from above.


You will recall from previous lectures that:
The sum, difference and product of two continuous functions is continuous.
The quotient of two continuous functions is continous at every point where the
denominator is not zero.
1

1/2

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

f(x)
f(a)

<
<

a
Figure 1.1: Neighbourhood for continuity for a function of one variable.

1.1.3

The derivative of a function of one variable

You will also recall that the derivative is defined as




f (x + x) f (x)
d
f (x) = lim
.
x0
dx
x
f (x) is differentiable if this limit exists, and exists independent of how x 0.

Tends to tangent
as x tends to zero

f(x+ x)

f= f(x+ x) f(x)
f(x)

x
x

x+ x

Figure 1.2: Geometrical interpretation of the derivative.

(1.3)

1.2. MOVING TO MORE THAN ONE VARIABLE

1.2

1/3

Moving to more than one variable

The big changes we will encounter take place when going from n = 1 variables to n > 1
variables. So for much of the time we can keep the page uncluttered by dealing with
functions of only n = 2 variables, as in f = f (x, y ).
As illustrated in Fig. 1.3, functions of two variables are conveniently represented graphically using the Cartesian axes Oxy z. The function representation is a surface, as
opposed to a plane curve for a one variable function. It is of course progressively
harder to represent functions of more than two variables.

(a)

(b)

2
f(x,y)

f(x,y)

0.5
0

1
0.5

0
5

1
5
0
y

0
5 4

(c)

2
x

0
5 4

2
x

(d)

Figure 1.3: Surface plots of (a) x 2 + y 2 3, (b) (x + y )(x y ), (c) exp[(x 2 + y 2 )/10] sin(2x) cos(4y ),
and (d) |(x y )|1/2 . (The Matlab code for such plots is given as an Appendix.)

1/4

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

1.2.1

Continuity for functions of several variables

A function f = f (x, y ), defined in some region R, is continuous at a point (x, y ) =


(a, b) in R if, for every positive number  (however small), it is possible to find a positive
such that for all points in the neighbourhood defined by
(x a)2 + (y b)2 < 2

(1.4)

we have
|f (x, y ) f (a, b)| < .

(1.5)

Or equivalently, as before,
lim

(x,y )(a,b)

f (x, y ) = f (a, b).

(1.6)

Note that for functions of more variables f (x1 , x2 , x3 , ...) the neighbourhood would be
defined by (x1 a)2 + (x2 b)2 + (x3 c)2 + . . . < 2 . The 2-variable case is illustrated
in Figure 1.4.

f(x,y)
f(a,b)

project onto
surface

y
x

circle, radius
at (x,y)=(a,b)

Figure 1.4: Neighbourhood for continuity for a function of 2 variables

1.3

The partial derivative

The extension of the idea of continuity to functions of several variables was direct.
Extending the notion of the derivative is not quite as simple the slope or gradient
of the f (x, y ) surface at (x, y ) depends on which direction you move off in.
The key idea is to consider the gradient in a particular direction and the obvious
directions are those along the xaxis and the y axis.
Now, if one wants to move off from (x, y ) in the x direction, one has to keep y fixed,
and vice versa.

1.3. THE PARTIAL DERIVATIVE

1/5

The partial derivative of f (x, y ) wrt x, then wrt y


 

  


f
f (x + x, y ) f (x, y )
f
f (x, y + y ) f (x, y )
= lim
;
= lim
x y x 0
x
y x y 0
y
(1.7)
The subscript y indicates that y is being kept constant, and then similarly for x
1.3.1

Geometrical interpretation of the partial derivative

Figure 1.5 shows the geometrical interpretation of the partial derivatives of a function
of two variables.

f(x,y)

y = constant
plane

Slope is
f
xy
x

x
f(x,y)

x = constant
plane

Slope is
f
yx
y

Figure 1.5: Interpreting partial derivatives as the slopes of slices through the function

1.3.2

A possibly useful shorthand

Given that the list of variables is known, and the one being varied is explicit, writing
the the held constant subscripts after the derivative is unnecessary. The subscripts
are often omitted, but you may wish to leave them in until you are more familiar with
the subject. Another commonly used shorthand (but one which you, like me, might
find unhelpful when writing by hand) is
 
 
f
f
fx =
and
fy =
.
(1.8)
x
y

1/6

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

1.3.3

More than two variables

If we are dealing with a function of more variables, we keep all but the one variable
constant. Eg for f (x1 , x2 , x3 , ...) we have
The partial derivative again ...




f
f (x1 , x2 , [x3 + x3 ], x4 , . . .) f (x1 , x2 , x3 , x4 , . . .)
f x3 =
= lim
x3 0
x3
x3

1.4

Writing out partial derivatives

Its definition indicates that actually doing partial differentiation is exactly the same
as normal differentiation with respect to one variable, while all the others are treated
as constants.
Examples.
Q: Find the first partial derivatives of f (x, y ) = x 2 y 3 2y 2 .
A:First assume y is a constant, then x:
fx = 2xy 3

and

fy = 3x 2 y 2 4y

Q: Find the 1st partial derivatives of f (x, y ) = e (x

(1.9)
2

+y 2 )

sin(xy 2 )

A:
2

fx = e (x +y ) [2x sin(xy 2 ) + y 2 cos(xy 2 )]


2
2
fy = e (x +y ) [2y sin(xy 2 ) + 2xy cos(xy 2 )]

(1.10)
(1.11)

Q: If f (x, y ) = ln(xy ), derive an expression for fx fy in terms of f .


A:
f (x, y ) = ln(x) + ln(y )

(1.12)

fx = 1/x

(1.13)

and fy = 1/y

fx fy = 1/xy = e f (x,y ) .

1.5

(1.14)

Higher partial derivatives?

Although you do not need to consider complicated relationships involving 2nd order
derivatives, you do need to know how to find them. It is very obvious! fx and fy are
(well, probably are) perfectly good functions of (x, y ). An example of the notation
used is:

2f
=
fx = fxx
x 2
x

(1.15)

1.5. HIGHER PARTIAL DERIVATIVES?

1/7

Example.
f (x, y )
fx
fy
fxx
fy y

=
=
=
=
=

x 2 y 3 2y 2
2xy 3
3x 2 y 2 4y
2y 3
6x 2 y 4 .

(1.16)
(1.17)
(1.18)
(1.19)
(1.20)

But we should also consider

2f
fx = fy x =
: in this case, 6xy 2
y
y x

(1.21)

2f

fy = fxy =
: in this case, 6xy 2 .
x
xy

(1.22)

and

Spooky! In this case fxy = fy x is that always true?


A meatier random example:
2

f (x, y ) = e (x +y ) sin(xy 2 )
2
2
fx = e (x +y ) [2x sin(xy 2 ) + y 2 cos(xy 2 )]
2
2
fy = e (x +y ) [2y sin(xy 2 ) + 2xy cos(xy 2 )]
fy x = e (x +y ) [4x 2 y cos() + 2y cos() 2y 3 x sin()
2y [2x sin() + y 2 cos()]]
2
2
= e (x +y ) [sin()[2y 3 x + 4xy ] + cos()[4x 2 y + 2y 2y 3 ]]
2
2
and fxy = e (x +y ) [2y 3 cos() + 2y cos() 2xy 3 sin()
2x[2y sin() + 2xy cos()]]
2
2
= e (x +y ) [sin()[2xy 3 + 4xy ] + cos()[2y 3 + 2y 4x 2 y ]]

(1.23)
(1.24)
(1.25)
(1.26)

(1.27)

Hmm. So they are equal in this case too.


When both sides exist, and are continuous at the point of interest...
The differential operators are equivalent:
2
2
=
xy
y x
This result has an interesting consequence for higher partial derivatives.

(1.28)

1/8

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

Example.
Q: For a general function f show that
 3 4 
5
f
3f
3f

=0
xy x
2 xy y x 2

(1.29)

A: Using the ordering result


3f
3f
3f
2f
=
=
,
=
x xy
xy x
y xx
2 xy

(1.30)

and thus the equation is p.p 4 p 5 which is indeed zero.


So the order of higher partials is unimportant but a sensible ordering can save time!
Example.
Q: Find

3  5
(y + xy ) cosh(cosh(x 2 + 1/x)) + y 2 tx .
ty x

(1.31)

A: Thoughtless Method. Grind away blindly differentiating with respect to x then y


then t. This may take a fortnight because the functions of x and y are moderately
unpleasant. You will be cross when you remember that ...
A: Thoughtful Method. The result of 2y can be obtained much more quickly by
differentiating with respect to t first.

1.6

A stern Warning. Partial derivatives are not fraction-like.

Although total derivatives have fraction-like qualities, this is NOT the case with partial
derivatives.
Example.
Q: Find dy /dx given y = u 1/3 , u = v 3 and v = x 2 .
A:
dy
dy du dv
1
=

= u 2/3 .3v 2 .2x = 2x


dx
du dv dx
3

(1.32)

which you can check by finding y = x 2 explicitly.


Example. But but but! Suppose we were asked:
Q: Given the perfect gas law pV = RT , determine
   
p
V
T
.
V
T
p

(1.33)

1.7. TOTAL AND PARTIAL DIFFERENTIALS

A: You would guess +1 of course. But

1/9

WRONG!

If pV = RT then p = RT /V , V = RT /p and T = V p/R. Thus


    
  
p
V
T
RT
R
V
=
= 1.
V
T
p
V2
p
R

(1.34)

In fact, we will be able to show after studying implicit functions that if we have any
function f (x, y , z) = 0, then
x y z
= 1.
y z x
Partial derivatives, unlike total derivates, do not behave as fractions.
Although we CAN write down expressions like df = . . .
We CANNOT write down f = . . ..
If you ever think that you are dividing partials, THINK AGAIN!

1.7

Total and partial differentials

First, note that a differential is different from a derivative.


Differentials are about the following. Suppose that we have a continuous function
f (x, y ) in some region, and both fx and fy are continuous in that region. How much
does the value of the function change as one moves infinitesimal amounts dx and dy
in the x and y directions? The amount, df , is the total differential how do we
express it?
Given small changes in x and y it is easy enough to write the change in f as:
f = f (x + x, y + y ) f (x, y ) .

(1.35)

By adding in two cancelling terms this can be rewritten as


df = [f (x + dx, y + dy ) f (x, y + dy )] + [f (x, y + dy ) f (x, y )] .

(1.36)

But recall that






f
f (x + x, y ) f (x, y )
f
f (x, y + y ) f (x, y )
= lim
= lim
&
(1.37)
x 0
y 0
x
x
y
y
so that

df =

f
x

y +y


x +

f
y


y .
x

(1.38)

1/10

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS


f y +y
x y

means

f
x y

evaluated at y + y . But for any function g(x, y )


 
g
g(x, y + y ) g(x, y ) +
y
(1.39)
y x

where

so that
 2 
 y +y  
f
f
f

+
y
x y
x y
y x

(1.40)

and
f
x +
f
x

2f
y x


xy +

f
y .
y

(1.41)

In the limit as x and y tend to zero, we reach


The total or perfect differential of f (x, y )
df =

f
f
dx +
dy
x
y

(1.42)

The total differential df is the sum of the partial differentials

f
x dx

and

f
y dy .

Function surface
y

f dy
y

f+df
y+dy
f

f dx
x

y
x

x+dx

Figure 1.6: Total differential as the sum of partial differentials. Remember that dx and dy are infinitesimals.

1.7. TOTAL AND PARTIAL DIFFERENTIALS

1.7.1

1/11

Using the total differential

Example.
Q: A material with a linear temperature coefficient is made into a block of sides x,
y , z measured at some temperature T . The temperature is raised by a finite T . (a)
Derive the new volume of the block. (b) Then let T dT and find the change using
the total differential.
A: (a) Exactly:
V + V = x(1 + T )y (1 + T )z(1 + T ) = V (1 + T )3 .

(1.43)

A: (b) The volume of the block is V = xy z . Using the expression for the total
differential
dV = y zdx + xz dy + xy dz
= y zx(dT ) + xzy (dT ) + xy z (dT )
= 3V dT

(1.44)
(1.45)
(1.46)

Thus V + dV = V (1 + 3dT ). This answer using the total differential is exact in the
limit as the small T in part (a) tends to zero and becomes dT in part (b).
1.7.2

[**] An aside ... not on the syllabus!

Note that our expression 1.42 is an exact one for df in the limit as dx and dy tend to
zero. If x and y are just small rather than infinitesimally small then
f

f
f
x +
y .
x
y

(1.47)

Recalling the expression for Taylors expansion in one variable, you may guess that this
is a Taylors expansion to 1st order in two variables. In other words
f (x + x, y + y ) f (x, y ) +

f
f
x +
y .
x
y

(1.48)

As we are already off piste, we might as well see how it continues! To 2nd order
f (x + x, y + y ) f (x, y )
(1.49)
f
f
1st : +
x +
y
x
y
 2 
 2 
 2 

1
f
f
f
2
2
2nd : +
(x) + 2
(x)(y ) +
(y )
2!
x 2
xy
y 2
3rd : + . . . think binomial! . . .

1/12

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

1.7.3

When is an expression a total differential?

Suppose we are given some expression p(x, y )dx+q(x, y )dy . Can we determine whether
it is the total differential of some function f (x, y )?
Now, if it is,
df = p(x, y )dx + q(x, y )dy .

(1.50)

But then we must have that


p(x, y ) =

f
x

and q(x, y ) =

f
y

(1.51)

and using fxy = fy x


p
2f
=
y
y x

q
2f
=
x
xy

(1.52)

That is the test is


The t.d. test: p(x, y )dx + q(x, y )dy is a total differential iff
p
q
=
.
y
x

(1.53)

Example. Show that there is no function having continous second partial derivatives
whose total differential is (xy dx + 2x 2 dy ).
Set p = xy and q = 2x 2 . Then
p
=x
y
1.7.4

6=

q
= 4x .
x

(1.54)

Recovering the function from its total differential

Suppose we found p(x, y )dx + q(x, y )dy to be total differential using the above test.
Could we recover the function f ? To recover f we must perform the reverse of partial
differentiation.
As f /x = p(x, y ):
Z
f = p(x, y )dx + g(y ) + K1

(1.55)

where g is a function of y alone and K1 is a constant. You can see that we need
the g(y ) because when we differentiate with respect to x it vanishes. As far as x is
concerned, g(y ) is a constant of integration.

1.7. TOTAL AND PARTIAL DIFFERENTIALS

1/13

Similarly,
Z
f =

q(x, y )dy + h(x) + K2

(1.56)

We now need to resolve the two expressions for f , and this is possible, up to a constant
K, as the following example shows.
Example. Let f = xy 3 + sin x sin y + 6y + 10 but pretend we do not know it.
Instead we are asked
Q: Determine whether
(y 3 + cos x sin y )dx + (3xy 2 + sin x cos y + 6)dy

(1.57)

is a perfect differential and, if so, of what function f ?


A: Testing whether p/y = q/x, we find that
3
(y + cos x sin y ) = 3y 2 + cos x cos y
y

(1.58)

(3xy 2 + sin x cos y + 6) = 3y 2 + cos x cos y


x
They are the same, so it is a perfect differential.
Integrating (y 3 + cos x sin y ) over x and (3xy 2 + sin x cos y + 6) over y we find:
f = y 3 x + sin x sin y + g(y ) + K1

(1.59)

f = xy 3 + sin x sin y + 6y + h(x) + K2 .

(1.60)

and

Comparing and resolving these expressions we have


f = y 3 x + sin x sin y + 0 + g(y ) + K1
l
l
l
l
3
f = xy + sin x sin y + h(x) + 6y + K2

(1.61)

So
f = xy 3 + sin x sin y + 6y + K1 .

(1.62)

Thus we have indeed recovered the original function, up to a constant of integration.


We would need some extra piece of information to recover this say the value of the
function at a particular point.

1/14

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

Given p(x, y )dx + q(x, y )dy


Test whether: p/y = q/x. If good:
Integrate p(x, y ) wrt x, remembering g(y ) is a const of integration
Integrate q(x, y ) wrt y , remembering h(x) is a const of integration
Resolve the two expressions.

[**] For interest only


A.1 Plotting Functions of several variables
In lecture 1 we noted that functions of 2 variables were relatively easy to visualize
as surfaces, whereas those in more variables were considerably more difficult, simply
because we live in a 3D world. Time is an exception: a method of plotting n variables
can always be converted to a video where time is the n + 1th variable.
The Figure shows the surface plot and the level contour plots of the function f (x, y ) =
0.6x 4 + 0.1x 2 y 2 2x 2 + 2y 2 + 5.

10

f(x,y)

8
6
4
2
0
1
0
y

0
1 2

1
x

The following is some simple Matlab code to give a surface plot of a function.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% surface plot script
%
% vectors of grid x and y positions
x
= [ -2:0.1:2];

1.7. TOTAL AND PARTIAL DIFFERENTIALS

%
%

%
%
%
%

1/15

y
= [ -1:0.1:1];
turn these in array suitable for surface plotting
[X , Y ] = meshgrid (x , y );
find the function values at each point in mesh
Xsq
= X .* X ;
Ysq
= Y .* Y ;
Z
= 0.6* Xsq .* Xsq + 0.1* Xsq .* Ysq - 2.*( Xsq - Ysq ) +5;
initial graphics
set ( gca , FontSize , 18);
colormap ( default );
brighten (0);
now plot surface
surfc (X ,Y , Z );
label axes
xlabel ( x ); ylabel ( y ); zlabel ( f (x , y ) );
save as postscript ( vector graphics )
print ( - depsc , surfplot . eps );
save as png image
print ( - dpng , surfplot . png );

A.2 [**] For interest: Slice plots


Another sort of contour plot is a slice plot. Here one traces out the function f (x, yo ) for
several fixed values of y (Eg, yo = 1, 2, ...), and/or the function f (xo , y ) for several fixed
values of xo . This sort of plot is commonly used to display transistor characteristics.

Figure 1.7: A slice plot through transistor characteristics

1/16

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

A.3 [**] For interest: Finding maxima, minima and saddle points
Stationary points in a function of two variables occur when fx = fy = 0, but further
tests are required to determine whether these points are minima, maxima, or saddle
points.
The required conditions are summarized in the following table.
Tests for stationary points
fx = fy Q = [fxy 2 fxx fy y ] fxx (or fy y )
Type
=0
<0
>0
Minimum
=0
<0
<0
Maximum
=0
>0
Irrelevant
Saddle
Example.
From the surface plot of the earlier function f (x, y ) = 0.6x 4 + 0.1x 2 y 2 2x 2 + 2y 2 + 5
it appears that there is a saddle at (0, 0) and two minima at (1.something, 0). Lets
derive from the table.

fx =
fxx =
fy =
fy y =
fxy =

2.4x 3 + 0.2xy 2 4x = x(2.4x 2 + 0.2y 2 4)


7.2x 2 + 0.2y 2 4
0.2x 2 y + 4y = y (0.2x 2 + 4)
0.2x 2 + 4
0.4xy

(1.63)
(1.64)
(1.65)
(1.66)
(1.67)

Requiring fy = 0 gives yp= 0 always,p


as (0.2x 2 + 4) > 0. As y = 0, requiring fx = 0
gives x = 0 or x = 4/2.4 = 5/3. So we have the three stationary points.
What sort are they?
Q = [fxy 2 fxx fy y ]
fxx (or fy y )
Type
p(x, y )
( p5/3, 0) 0 [7.2(5/3) 4][0.2(5/3) + 4] < 0 [7.2(5/3) 4] > 0 Minimum
( 5/3, 0) 0 [7.2(5/3) 4][0.2(5/3) + 4] < 0 [7.2(5/3) 4] > 0 Minimum
(0, 0)
0 (4)(4) > 0
Irrelevant
Saddle
So all is as expected.
1.7.5

Where does the table of conditions come from?

A function has a maximum at (a, b) if


f (a + x, b + y ) f (a, b) < 0

(1.68)

for arbitrarily small x and y . Geometrically we see that slices through the function
in both x and y directions exhibit maxima.

1.7. TOTAL AND PARTIAL DIFFERENTIALS

1/17

Figure 1.8:

Similarly a function has a minimum at (a, b) if


f (a + x, b + y ) f (a, b) > 0

(1.69)

for arbitrarily small x and y . Geometrically we see that slices through the function
in both x and y directions exhibit minima.
How do we compute the stationary values. One might guess by looking for points where
f /x and f /y are both zero. Indeed this is the case. For f (x, y ) to be stationary
we require the total differential to be zero, ie:
df =

f
f
dx +
dy = 0.
x
y

(1.70)

Because dx and dy are independent, this gives rise to the condition that f /x = 0
and f /y = 0.
But how to decide whether the point is a maximum or minimum? Again one might guess
that this will have something to do with second derivatives. Using Taylors Theorem
we have
f (a + x, b + y ) = f (a, b) + [(x)fx (a, b) + (y )fy (a, b)]
1
+
[(x)2 fxx + 2(x)(y )fxy + (y )2 fy y ]
2!
+ ...

(1.71)

But the first order derivativens fx , fy are zero, so that, to the second order in small
quantities:
1
f (a + x, b + y ) f (a, b) = [(x)2 fxx + 2(x)(y )fxy + (y )2 fy y ].
2

(1.72)

Now the conditions for maxima and minima above (eqs 1.68 and 1.69) tell us that we
should be interested in the sign of the rhs of equation 1.72 or, equivalently, the sign

1/18

LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

of:
[(x)2 fxx + 2(x)(y )fxy + (y )2 fy y ].

(1.73)

This expression can be rewritten in two ways:


Either
Or

1
fxx
1
fy y

[(x)fxx + (y )fxy ]2 (y )2 [fxy 2 fxx fy y ]

[(x)fxy + (y )fy y ]2 (x)2 [fxy 2 fxx fy y ]

(1.74)
(1.75)

It is clear that in general the sign depends on the actual x and y under consideration,
that is, on how you move off from the point where fx = fy = 0.
But what we can say unequivocally is that if Q = [fxy 2 fxx fy y ] < 0 then the term in
{. . .} is positive. So then the sign depends on fxx , or equivalently fy y . (In fact, we have
just shown that, when Q < 0, SIGN(fxx ) = SIGN(fy y ).)
So,
when Q < 0 and fxx < 0 (or equivalently fy y < 0) the point is a maximum
when Q < 0 and fxx > 0 (or equivalently fy y > 0) the point is a minimum.
What about when Q > 0? Then the sign really does depend on how you move off from
the point where fx = fy = 0. This is a saddle point. The function appears to have a
maximum if you move in one direction and a minimum if you move in another.

You might also like