1PD-N1

20
0/1 P1 Calculus II Partial Differentiation & Multiple Integration 4 lectures, MT 2014 David Murray Rev November 17, 2014 [email protected] Course Page 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.

description

1

Transcript of 1PD-N1

  • 0/1

    P1 Calculus IIPartial Differentiation & Multiple Integration

    4 lectures, MT 2014 David MurrayRev November 17, 2014 [email protected] Page www.robots.ox.ac.uk/dwm/Courses/1PD

    Introduction

    So far in your explorations of the differential and integral calculus, you have consideredonly 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 oneindependent variable. The pressure in an oil field will depend on latitude, longitude anddepth, and no doubt will change over time p = p(, , d, t). What is the changeof pressure when these variables change? How might one integrate quanities over thecomplete oil field to find, say, the yield?

    This set of lectures answers the questions of how our notions of differentiation andintegration can be extended to cover multiple variables.

    Grey Book Syllabus (from Weblearn)

    Partial differentiation: the chain rule and simple transformations of first-order (notsecond-order) partial differential coefficients. Multiple integrals and their evaluation,with applications to finding areas, volumes, masses, centroids, inertias etc. (excludingline 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 of1st 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 dif-ferentials, and their use in estimating errors. Testing for total (or perfect) differ-entials. Integrating total differentials to recover original function.

    2. Relationships involving first order partial derivatives. Function of a function. Com-posite functions, the Chain Rule and the Chain Rule for Partials. Implicit Func-tions.

    3. Transformations from one set of variables to another. Transformations as old interms of new and new in terms of old. Jacobians. Transformations to Plane,spherical and polar coordinates. What makes a good transformation? Functionaldependence. 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, LongmanScientific & Technical, 2nd Ed., ISBN: 0-582-44416-0 (paperback).Stephensons book is a suitable introductory text for your first year. It is divorcedfrom applications, and is now looking a bit dull. Good for basic problem bashingthough.

    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/1PDOnly 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 variable1.1.1 Functions and ranges of validity

    Suppose we want to make a real function f of some real variable x . We certainly needthe function recipe, but we should also specify a range R of admissible values for x forwhich x is mapped onto y by y = f (x). We might have y = f (x) = x2, with R beingthe interval 1 x 1. Note that with this definition it is meaningless to ask whatis f (2)?. Often, however, the range is not specified: the assumption then is thatthe range is such as to make y real. For example, if y = (1+ x)1/2 we would assumethat 1 < x . (Those of you experienced in writing functions in a computer languagewill 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 aroundx = a by requiring |x a| < or, equivalently, (x a)2 < 2. A function y = f (x) issaid to be continuous at x = a if, for every positive number (however small), one canfind a neighbourhood

    |x a| < in which |f (x) f (a)| < . (1.1)Another way of expressing this is:

    limxa

    f (x) = f (a) . (1.2)

    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 thedenominator is not zero.

    1

  • 1/2 LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

    f(x)

    x

    f(a)

    a

  • 1.2. MOVING TO MORE THAN ONE VARIABLE 1/3

    1.2 Moving to more than one variable

    The big changes we will encounter take place when going from n = 1 variables to n > 1variables. So for much of the time we can keep the page uncluttered by dealing withfunctions of only n = 2 variables, as in f = f (x, y).

    As illustrated in Fig. 1.3, functions of two variables are conveniently represented graph-ically using the Cartesian axes Oxyz . The function representation is a surface, asopposed to a plane curve for a one variable function. It is of course progressivelyharder to represent functions of more than two variables.

    -4-2

    02

    4

    -5

    0

    5-20

    -10

    0

    10

    20

    30

    x(a) (b)

    42

    02

    4

    5

    0

    51

    0.5

    0

    0.5

    1

    xy

    f(x,y)

    42

    02

    4

    5

    0

    50

    1

    2

    3

    xy

    f(x,y)

    (c) (d)

    Figure 1.3: Surface plots of (a) x2+ y 23, (b) (x + y)(x y), (c) exp[(x2+ 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) inR 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 bedefined by (x1a)2+(x2b)2+(x3 c)2+ . . . < 2. The 2-variable case is illustratedin Figure 1.4.

    project ontosurface

    circle, radiusat (x,y)=(a,b)x

    y

    f(x,y)

    f(a,b)

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

    1.3 The partial derivativeThe 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 gradientof 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 obviousdirections are those along the xaxis and the yaxis.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

    x

    )y

    = limx0

    [f (x + x, y) f (x, y)

    x

    ];

    (f

    y

    )x

    = limy0

    [f (x, y + y) f (x, y)

    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 functionof two variables.

    plane= constantyf(x,y)

    yx

    x

    fSlope is

    fx y

    plane= constantxf(x,y)

    yx

    fSlope is

    y

    fy x

    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, writingthe the held constant subscripts after the derivative is unnecessary. The subscriptsare often omitted, but you may wish to leave them in until you are more familiar withthe subject. Another commonly used shorthand (but one which you, like me, mightfind unhelpful when writing by hand) is

    fx =

    (f

    x

    )and fy =

    (f

    y

    ). (1.8)

  • 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 variableconstant. Eg for f (x1, x2, x3, ...) we haveThe partial derivative again ...

    fx3 =

    (f

    x3

    )= lim

    x30[f (x1, x2, [x3 + x3], x4, . . .) f (x1, x2, x3, x4, . . .)

    x3

    ]

    1.4 Writing out partial derivativesIts definition indicates that actually doing partial differentiation is exactly the sameas normal differentiation with respect to one variable, while all the others are treatedas constants.

    Examples.Q: Find the first partial derivatives of f (x, y) = x2y 3 2y 2.A:First assume y is a constant, then x :

    fx = 2xy3 and fy = 3x2y 2 4y (1.9)

    Q: Find the 1st partial derivatives of f (x, y) = e(x2+y2) sin(xy 2)A:

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

    fy = e(x2+y2)[2y sin(xy 2) + 2xy cos(xy 2)] (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 and fy = 1/y (1.13)fx fy = 1/xy = ef (x,y) . (1.14)

    1.5 Higher partial derivatives?Although you do not need to consider complicated relationships involving 2nd orderderivatives, 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 notationused is:

    2f

    x2=

    xfx = fxx (1.15)

  • 1.5. HIGHER PARTIAL DERIVATIVES? 1/7

    Example.

    f (x, y) = x2y 3 2y 2 (1.16)fx = 2xy

    3 (1.17)fy = 3x

    2y 2 4y (1.18)fxx = 2y

    3 (1.19)fyy = 6x

    2y 4 . (1.20)

    But we should also consider

    yfx = fyx =

    2f

    yx: in this case, 6xy 2 (1.21)

    and

    xfy = fxy =

    2f

    xy: in this case, 6xy 2. (1.22)

    Spooky! In this case fxy = fyx is that always true? A meatier random example:

    f (x, y) = e(x2+y2) sin(xy 2) (1.23)

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

    fy = e(x2+y2)[2y sin(xy 2) + 2xy cos(xy 2)] (1.25)

    fyx = e(x2+y2)[4x2y cos() + 2y cos() 2y 3x sin() (1.26) 2y [2x sin() + y 2 cos()]]

    = e(x2+y2)[sin()[2y 3x + 4xy ] + cos()[4x2y + 2y 2y 3]]

    and fxy = e(x2+y2)[2y 3 cos() + 2y cos() 2xy 3 sin() (1.27) 2x [2y sin() + 2xy cos()]]

    = e(x2+y2)[sin()[2xy 3 + 4xy ] + cos()[2y 3 + 2y 4x2y ]]

    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

    xy=

    2

    yx(1.28)

    This result has an interesting consequence for higher partial derivatives.

  • 1/8 LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

    Example.Q: For a general function f show that

    3f

    2xy

    [3f

    yx2

    ]4[

    3f

    xyx

    ]5= 0 (1.29)

    A: Using the ordering result

    3f

    2xy=

    x

    2f

    xy=

    3f

    xyx=

    3f

    yxx, (1.30)

    and thus the equation is p.p4 p5 which is indeed zero.So the order of higher partials is unimportant but a sensible ordering can save time!

    Example.Q: Find

    3

    tyx

    [(y 5 + xy) cosh(cosh(x2 + 1/x)) + y 2tx

    ]. (1.31)

    A: Thoughtless Method. Grind away blindly differentiating with respect to x then ythen t. This may take a fortnight because the functions of x and y are moderatelyunpleasant. You will be cross when you remember that ...

    A: Thoughtful Method. The result of 2y can be obtained much more quickly bydifferentiating 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 partialderivatives.

    Example.Q: Find dy/dx given y = u1/3, u = v 3 and v = x2.A:

    dydx

    =dydu dudv dvdx

    =1

    3u2/3.3v 2.2x = 2x (1.32)

    which you can check by finding y = x2 explicitly.

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

    p

    V

    )(V

    T

    )(T

    p

    ). (1.33)

  • 1.7. TOTAL AND PARTIAL DIFFERENTIALS 1/9

    A: You would guess +1 of course. But WRONG!If pV = RT then p = RT/V , V = RT/p and T = V p/R. Thus(

    p

    V

    )(V

    T

    )(T

    p

    )=

    (RTV 2

    )(R

    p

    )(V

    R

    )= 1. (1.34)

    In fact, we will be able to show after studying implicit functions that if we have anyfunction f (x, y , z) = 0, then

    x

    y

    y

    z

    z

    x= 1.

    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 differentialsFirst, note that a differential is different from a derivative.Differentials are about the following. Suppose that we have a continuous functionf (x, y) in some region, and both fx and fy are continuous in that region. How muchdoes the value of the function change as one moves infinitesimal amounts dx and dyin the x and ydirections? The amount, df , is the total differential how do weexpress 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

    x= lim

    x0[f (x + x, y) f (x, y)

    x

    ]&f

    y= lim

    y0[f (x, y + y) f (x, y)

    y

    ](1.37)

    so that

    df =(f

    x

    )y+yy

    x +

    (f

    y

    )x

    y . (1.38)

  • 1/10 LECTURE 1. TOTAL AND PARTIAL DERIVATIVES AND DIFFERENTIALS

    where(fx

    )y+yy

    means(fx

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

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

    y

    )x

    y (1.39)

    so that(f

    x

    )y+yy

    (f

    x

    )y

    +

    (2f

    yx

    )y (1.40)

    and

    f fxx +

    (2f

    yx

    )xy +

    f

    yy . (1.41)

    In the limit as x and y tend to zero, we reachThe total or perfect differential of f (x, y)

    df =f

    xdx +

    f

    ydy (1.42)

    The total differential df is the sum of the partial differentials fxdx andfy dy .

    Function surface

    dxfx

    dyfy

    x x+dx

    y

    y

    x

    f

    f

    f+dfy+dy

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

  • 1.7. TOTAL AND PARTIAL DIFFERENTIALS 1/11

    1.7.1 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 usingthe 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 = xyz . Using the expression for the totaldifferential

    dV = yzdx + xzdy + xydz (1.44)= yzx(dT ) + xzy(dT ) + xyz(dT ) (1.45)= 3V dT (1.46)

    Thus V + dV = V (1 + 3dT ). This answer using the total differential is exact in thelimit 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 tozero. If x and y are just small rather than infinitesimally small then

    f fxx +

    f

    yy . (1.47)

    Recalling the expression for Taylors expansion in one variable, you may guess that thisis a Taylors expansion to 1st order in two variables. In other words

    f (x + x, y + y) f (x, y) + fxx +

    f

    yy . (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)1st : +

    f

    xx +

    f

    yy

    2nd : +1

    2!

    [(2f

    x2

    )(x)2 + 2

    (2f

    xy

    )(x)(y) +

    (2f

    y 2

    )(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 whetherit 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

    xand q(x, y) =

    f

    y(1.51)

    and using fxy = fyx

    p

    y=

    2f

    yx=

    q

    x=

    2f

    xy(1.52)

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

    p

    y=q

    x. (1.53)

    Example. Show that there is no function having continous second partial derivativeswhose total differential is (xydx + 2x2dy).

    Set p = xy and q = 2x2. Then

    p

    y= x 6= q

    x= 4x . (1.54)

    1.7.4 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 partialdifferentiation.

    As f /x = p(x, y):

    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 needthe g(y) because when we differentiate with respect to x it vanishes. As far as x isconcerned, g(y) is a constant of integration.

  • 1.7. TOTAL AND PARTIAL DIFFERENTIALS 1/13

    Similarly,

    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 constantK, 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 askedQ: 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

    y(y 3 + cos x sin y) = 3y 2 + cos x cos y (1.58)

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

    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 3x + sin x sin y + g(y) +K1 (1.59)

    and

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

    Comparing and resolving these expressions we have

    f = y 3x + sin x sin y + 0 + g(y) + K1l l l l

    f = xy 3 + 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 thefunction 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 variablesIn lecture 1 we noted that functions of 2 variables were relatively easy to visualizeas surfaces, whereas those in more variables were considerably more difficult, simplybecause we live in a 3D world. Time is an exception: a method of plotting n variablescan 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.6x4 + 0.1x2y 2 2x2 + 2y 2 + 5.

    21

    01

    2

    1

    0

    10

    2

    4

    6

    8

    10

    xy

    f(x,y)

    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 graphicsset(gca , FontSize , 18);colormap(default );brighten (0);

    % now plot surfacesurfc(X,Y,Z);

    % label axesxlabel(x); ylabel(y); zlabel(f(x,y));

    % save as postscript (vector graphics)print(-depsc ,surfplot.eps );

    % save as png imageprint(-dpng ,surfplot.png );

    A.2 [**] For interest: Slice plotsAnother sort of contour plot is a slice plot. Here one traces out the function f (x, yo) forseveral fixed values of y (Eg, yo = 1, 2, ...), and/or the function f (xo, y) for several fixedvalues 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 pointsStationary points in a function of two variables occur when fx = fy = 0, but furthertests are required to determine whether these points are minima, maxima, or saddlepoints.

    The required conditions are summarized in the following table.Tests for stationary points

    fx = fy Q = [fxy2 fxx fyy ] fxx (or fyy) 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.6x4+0.1x2y 22x2+2y 2+5it appears that there is a saddle at (0, 0) and two minima at (1.something, 0). Letsderive from the table.

    fx = 2.4x3 + 0.2xy 2 4x = x(2.4x2 + 0.2y 2 4) (1.63)

    fxx = 7.2x2 + 0.2y 2 4 (1.64)

    fy = 0.2x2y + 4y = y(0.2x2 + 4) (1.65)

    fyy = 0.2x2 + 4 (1.66)

    fxy = 0.4xy (1.67)

    Requiring fy = 0 gives y = 0 always, as (0.2x2 + 4) > 0. As y = 0, requiring fx = 0gives x = 0 or x =

    4/2.4 =

    5/3. So we have the three stationary points.

    What sort are they?(x, y) Q = [fxy

    2 fxx fyy ] fxx (or fyy) Type(5/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 SaddleSo 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 functionin both x and ydirections 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 functionin both x and ydirections exhibit minima.How do we compute the stationary values. One might guess by looking for points wheref /x and f /y are both zero. Indeed this is the case. For f (x, y) to be stationarywe require the total differential to be zero, ie:

    df =f

    xdx +

    f

    ydy = 0. (1.70)

    Because dx and dy are independent, this gives rise to the condition that f /x = 0and f /y = 0.

    But how to decide whether the point is a maximum or minimum? Again one might guessthat this will have something to do with second derivatives. Using Taylors Theoremwe have

    f (a + x, b + y) = f (a, b) + [(x)fx(a, b) + (y)fy(a, b)] (1.71)

    +1

    2![(x)2fxx + 2(x)(y)fxy + (y)

    2fyy ]

    + . . .

    But the first order derivativens fx , fy are zero, so that, to the second order in smallquantities:

    f (a + x, b + y) f (a, b) = 12[(x)2fxx + 2(x)(y)fxy + (y)

    2fyy ]. (1.72)

    Now the conditions for maxima and minima above (eqs 1.68 and 1.69) tell us that weshould 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)2fxx + 2(x)(y)fxy + (y)2fyy ]. (1.73)

    This expression can be rewritten in two ways:

    Either1

    fxx

    {[(x)fxx + (y)fxy ]

    2 (y)2[fxy 2 fxx fyy ]}

    (1.74)

    Or1

    fyy

    {[(x)fxy + (y)fyy ]

    2 (x)2[fxy 2 fxx fyy ]}

    (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 fyy ] < 0 then the term in{. . .} is positive. So then the sign depends on fxx , or equivalently fyy . (In fact, we havejust shown that, when Q < 0, SIGN(fxx) = SIGN(fyy).)

    So,

    when Q < 0 and fxx < 0 (or equivalently fyy < 0) the point is a maximum when Q < 0 and fxx > 0 (or equivalently fyy > 0) the point is a minimum.

    What about when Q > 0? Then the sign really does depend on how you move off fromthe point where fx = fy = 0. This is a saddle point. The function appears to have amaximum if you move in one direction and a minimum if you move in another.