Sie sind auf Seite 1von 25

# Partial Derivatives

## Functions of Several Variables

So far we have focused our attention of functions of one variable. These functions model situations in which a variable depends on another independent variable. In practice is more common to nd situations in which a variable depends on more than one independent variable. For instance, the area of a rectangle depends on its length and width; the volume of a rectangular box depends on its length, width and height. Let D be a set of ordered pairs of real numbers. The process f that assigns to each pair (x, y ) in D a real number z is called a real valued function of two variables and we write z = f (x, y ). If D is a set of ordered triples of real numbers, the process f that assigns to each triple (x, y, z ) in D a real number w is called a real valued function of three variables and we write w = f (x, y, z ). In general, if D is a set of ordered ntuples of real numbers, the process f that assigns to each n-tuple (x1 , . . . , xn ) in D a real number y is called a real valued function of n variables and we write y = f (x1 , . . . , xn ) or in compact form y = f (x) where x is the vector of n components (x1 , . . . , xn ). The set D is called the domain of the function, the variables x1 , . . . , xn are the independent variables and y the dependent variable. In the following we will focus mainly on functions of two variables and we will show how to extend the results to three or more variables. Graphical Representation of Two Variable Functions There are two standard ways of representing graphically a function of two variables. One is as a surface in the three dimensional spaceand another one as a set of plane curves in the domain of the function. 1

3D Graph The graph of a function of two variables f and domain D is the set of points (x, y, z ) in the three dimensional space such that z = f (x, y ) and (x, y ) D.

This set represents a three dimensional surface whose projection on the xy plane is the domain D.We note that not all surfaces represent a function of two variables. As in the case of curves and one variable functions they must satisfy the vertical test. For instance, the top half of a sphere meets the test but not the whole sphere, so the sphere can not represent a single function of two variables. Example 1 Graph the function z =3+ and nd its domain. Solution The equation x2 + y 2 + (z 3)2 = 1 represents all points whose distance to the point (0, 0, 3) is 1, i.e. the sphere of radius 1 and center at (0, 0, 3). Solving for z we obtain p z = 3 1 x2 y 2 . Therefore, the graph of the function z =3+ p 1 x2 y 2 p 1 x2 y 2

is the top half the sphere of radius 1 centered at (0, 0, 3). Level Curves and Contour Lines A level curve of a function of two variables f is the set of points (x, y ) in the domain D of f such that the function has a constant value f (x, y ) = c. The level curves are plane curves in the functions domain. Plotting dierent level curves we obtain a two dimensional representation of the surface z = f (x, y). The actual curve in space where the plane z = c cuts the surface z = f (z, y ) is called a contour line. Level curves are the projection of the contour lines on the xy plane. Example 2 Show that the level curves of the surface p z = 3 + 1 x2 y 2

## are circles. Find the level curve corresponding to c = 7/2. 2

or

x2 + y2 = 1 (c 3)2 . p This curves are circles of radius r = 1 (c 3)2 . In particular for c = 7/2 the corresponding level curve is the circle 2 7 3 3 = . x2 + y 2 = 1 2 4 Representation of Three Variable Functions by Level Surfaces To represent the graph of function of three variables a fourth dimension is needed. Since a representation in a 4D space is not possible we try to extend the idea of level curves to functions of three variables. A level surface of a function of three variables f is the set of points (x, y, z ) in the domain D of f such that the function has a constant value f (x, y, z ) = c. These points make a surface in the functions domain. Plotting dierent level surfaces we obtain a three dimensional representation of the function w = f (x, y, z ). We can fake the fourth dimension adding color. Example 3 Describe the level surfaces of the function w = f (x, y, z ) = x2 + y2 + z 2 . Solution This function represents the square of the distance from a point (x, y, z ) in the three dimensional space to the origin. For every k > 0 the level surface x2 + y2 + z 2 = k is a sphere of radius R = k centered at the origin.

## Limits and Continuity

We start with an informal denition of limit of a multivariable function and then we dene continuity in terms of limits. Informal Denition of Limit We say that a function of two variables z = f (x, y ) approaches a limit L as (x, y ) approaches (x0 , y0 ) and write
(x,y )(x0 ,y0 )

lim

f (x, y) = L

if the values of f (x, y ) lie arbitrarily close to L for all points (x, y) suciently close to (x0 , y0 ). It can be shown that limits of functions of two variables follow the same rules as functions of a single variable in regard to sum, product, quotient and powers. 3

Continuity A function of two variables z = f (x, y) is continuous at the point (x0 , y0 ) if and only if 1. f is dened at (x0 , y0 ), 2. the limit of f as (x, y ) approaches (x0 , y0 ) exists, and 3. the limit coincides with the value of f at (x0 , y0 ), i.e.
(x,y )(x0 ,y0 )

lim

f (x, y ) = f (x0 , y0 ).

A function is continuous if it is continuous at every point of its domain. Functions dened by elementary expressions (polynomials, rational expressions, algebraic expressions, trigonometric functions, exponential and logarithms,....) are continuous at every point at which they are dened. Directional Limits Let z = f (x, y) a function of two variables and u the line that goes trough the point (x0 , y0 ) in the direction of the vector u = m i+n j. The limit of f at (x0 , y0 ) in the direction u is the limit of f as (x, y ) approaches (x0 , y0 ) along the line , i.e. Lu =
(x,y)(x0 ,y0 ) (x,y )u

lim

t0

## If f has a limit L as (x, y) approaches (x0 , y0 ), i.e. if

(x,y )(x0 ,y0 )

lim

f (x, y) = L

then all directional limits of f at (x0 , y0 ) exist and are equal to L. Actually the limit along any path through (x0 , y0 ) exists and is equal to L. This property can be used to prove the nonexistence of a limit. Directional Limits and the Nonexistence of Limit If a function has dierent limits along two dierent directions (or paths) as (x, y ) approaches (x0 , y0 ) then the limit of f as (x, y ) approaches (x0 , y0 ) does not exist.

Partial Derivatives

Partial derivatives are used to analyze how changes in one of the independent variables aect the dependent variable.

Denition and Notation Denition 4 Given a function of two variables z = f (x, y) we dene the partial derivative of f with respect to x at the point (x0 y0 ) as f f (x0 + x, y0 ) f (x0 , y0 ) = lim x (x0 ,y0 ) x0 x

and the partial derivative of f with respect to y at the point (x0 y0 ) as f f (x0 , y0 + y ) f (x0 , y0 ) = lim y (x0 ,y0 ) y0 y provided the limits exist.

Meaning The partial derivative with respect to x at a point (x0 y0 ) is a number. This number represents: The rate of change at the point (x0 y0 ) of the dependent variable z with respect to the independent variable x when the other independent variable y is kept constant. The slope of the tangent line at the point (x0 y0 ) to the intersection curve of the surface z = f (x, y) and the vertical plane y = y0 . In the same way, the partial derivative with respect to y at a point (x0 y0 ) represents: The rate of change at the point (x0 y0 ) of the dependent variable z with respect to the independent variable y when the other independent variable x is kept constant. The slope of the tangent line at the point (x0 y0 ) to the intersection curve of the surface z = f (x, y) and the vertical plane x = x0 . Other Notation The partial derivative with respect to x at (x0 , y0 ) is also denoted by f (x0 , y0 ), x fx (x0 , y0 ), z (x0 , y0 ), x zx (x0 , y0 ).

When the partial derivative with respect to x is calculated at a generic point (x, y ) the partial derivative is a two variable function in itself and we just write f , x fx , z , x 5 zx .

In the same way the partial derivative with respect to y at (x0 , y0 ) is also denoted by z f (x0 , y0 ), (x0 , y0 ), fy (x0 , y0 ), zy (x0 , y0 ). y y or just f , y fy , z , y zy ,

when the partial derivative with respect to y is calculated at a generic point (x, y ) and is regarded as a function. Example 5 Calculate the partial derivatives of the function f (x, y ) = x2 3xy 2 + 2 at the point (2, 1). Solution Partial derivatives f x f y = 2x 3y2 = 6xy

Partial Derivatives of Second Order As we have seen dierentiating a function of two variables z = f (x, y ) produces two partial derivatives. Dierentiating these two rst order partial derivatives again we obtain the following four second order partial derivatives: 2f f = also denoted by fxx x2 x x f 2f = also denoted by fxy y x y x f 2f = also denoted by fyx x y x y f 2f = also denoted by fyy . y2 y y 6

Partial derivatives at the given point f = 2x 3y2 (2,1) = 1 x (2,1) f = (6xy )|(2,1) = 12. y
(2,1)

The derivatives fxy and fyx are called the mixed second order partial derivatives. Whenever f, fx , fy , fxy and fyx are continuous the mixed derivatives must be equal, i.e. 2f 2f = . y x x y Example 6 Calculate the second order partial derivatives of the function f (x, y ) = x2 3xy 2 + 2 at the point (2, 1). Solution The rst order partial derivatives are f x f y = 2x 3y2 = 6xy.

Then, by dierentiation of these new functions we obtain f 2f = =2 x2 x x f 2f = = 6y y x y x f 2f = = 6y x y x y f 2f = = 6x. y2 y y At the point (2, 1) these partial derivatives 2f = x2 (2,1) 2f = y x (2,1) 2f = x y (2,1) 2f = y2
(2,1)

## take the following values 2 6 6 12.

Partial Derivatives of Higher Order The four second order derivatives can be dierentiated again to produce eight third order partial derivatives. These

in turn produce sixteen fourth order partial derivatives and so on. Notation is similar and for instance a third order derivative is 3f 2f = fyyx = x y 2 x y2 and a fourth order derivative is 3 f . y x y2 Under continuity of function and derivatives through the order in question the order of dierentiation does not matter. In the last case we could get to the same derivative fyyxy = fyyxy = fyyyx = fyxyy = fxyyy = 4f . x y 3

Dierentiability

Let y = f (x) be a function of one variable with derivative at x = x0 . The linearization of f at that point is L(x) = f (x0 ) + f 0 (x0 )(x x0 ). If h = x is the increment that results when we move from x0 to x,the error made when the value of the function f (x) is replaced by the value of the linearization L(x) is given by r(h) = f (x0 + h) f (x0 ) f 0 (x0 )h. and it satises the condition
h0

lim

r(h) = 0. h

This condition allows us to say that for small increments f (x) ' L(x). Now let z = f (x, y) be a function of two variables with partial derivatives at (x0 , y0 ). We dene the linearization of f at the point (x0 , y0 ) by L(x, y) = f (x0 , y0 ) + fx (x0 , y0 )(x x0 ) + fy (x0 , y0 )(y y0 ). If h = x and k = y are the respective increments in x and y when we move from (x0 , y0 ) to (x, y ),the error made when the value of the function f (x, y ) is replaced by the value of the linearization L(x, y) is given by r(h, k) = f (x0 + h, y0 + k) f (x0 , y0 ) fx (x0 , y0 )h fy (x0 , y0 )k. It can be proven that when the partial derivatives of f are continuous the error function satises the following condition
(h,k)0

lim

r(h, k) = 0. h2 + k2 8

This condition, called the dierentiability condition, allows us to say that for small increments of x and y the linearization is a good approximation of the function f, i.e. f (x, y) ' L(x, y ). We note that the dierentiability condition may not hold if the partial derivatives are not continuous. Functions with partial derivatives for which the differentiability condition holds are said to be dierentiable. If we identify the dierentials of the independent variables dx, dy with their respective increments x, y, i.e. dx = x = h, dy = y = k we dene the total dierential of z = f (x, y ) by dz = fx (x0 , y0 ) dx + fy (x0 , y0 ) dy. The total dierential dz can be used to approximate the true increment z of the dependent variable z. For a function of three variables w = f (x, y, z ) the linearization of f at the point P (x0 , y0 , z0 ) is given by L(x, y, z ) = f (P ) + fx (P )(x x0 ) + fy (P )(y y0 ) + fz (P )(z z0 ) and the total dierential of w is dw = fx (P ) dx + fy (P ) dy + fz (P ) dy. If the partial derivatives are continuous dw ' w. Example 7 The dimensions of a rectangular box are 60, 80 and 50 cm respectively. If each dimension is is measured with an error of no more than 2% , estimate the greatest absolute error and the percentage error if the volume of the box is computed from these measurements. Solution The volume of a box as a function of its dimensions x, y and z is V = xyz. The partial derivatives of this function are Vx = yz, And its dierential dV = yz dx + xz dy + xy dz. For the given dimensions V (60, 80, 50) = 240000 Vx = 4000, and dV = 4000 dx + 3000 dy + 4800 dz. 9 Vy = 3000, Vz = 4800, Vy = xz, Vz = xy.

If the measurements errors are |x| 0.02 60 = 1.2 |y| 0.02 80 = 1.6 |z | 0.02 50 = 1.0 Then, an estimate of the absolute error in the volume is |V | ' = = = |dV | |4000 dx + 3000 dy + 4800 dz | 4000 |dx| + 3000 |dy | + 4800 |dz | 4000 1.2 + 3000 1.6 + 4800 1.0 3 4800 14400.

## The Chain Rule

Let y = f (x) be a function of one variable and suppose that the variable x is a function of a third variable t, x = x(t). This makes the rst variable y a function of t, y = f (x(t)). Assuming all functions involved are dierentiable, the chain rule for functions of one variable states that dy dx dy = . dt dx dt Now we want to extend this formula to functions of several variables. We give several formulas below to cover the more usual cases. Chain Rule for Functions of Two Intermediate Variables and One Final Variable Let z = f (x, y) be a function of two variables and suppose that the variables x and y are functions of a third variable t, x = x(t) and y = y (t). This makes the rst variable z a function of t, z = f (x(t), y(t)). Assuming all functions involved are dierentiable, then z is a dierentiable function of t and z dx z dy dz = + . dt x dt y dt

10

Chain Rule for Functions of Three Intermediate Variables and One Final Variable Let w = f (x, y, z ) be a function of three variables and suppose that the variables x, y and z are functions of a third variable t, x = x(t), y = y (t) and z = z (t). This makes the rst variable w a function of t, w = f (x(t), y (t), z (t)). Assuming all functions involved are dierentiable, then w is a dierentiable function of t and w dx w dy w dz dw = + + . dt x dt y dt z dt Chain Rule for Functions of Three Intermediate Variables and Two Final Variables Let w = f (x, y, z ) be a function of three variables and suppose that the variables x, y and z are functions of two nal variables r and s, x = x(r, s), y = y (r, s) and z = z (r, s). This makes the rst variable w a function of the nal variables r and s, w = f (x(r, s), y (r, s), z (r, s)). Assuming all functions involved are dierentiable, then w is a dierentiable function of r and s and w r w s = = dw dx dw dy dw dz + + dx dr dy dr dz dr dw dx dw dy dw dz + + . dx ds dy ds dz ds

Example 8 Find the partial derivatives zx and zy if z is dened implicitly by the equation x4 + y 4 + z 2 + 2xz 2yz + 5 = 0. Solution In this equation x and y are independent variables and z is a function of x and y. To nd the partial derivative of z with respect to x we dierentiate the equation with respect to x using the chain rule 4x3 + 2zzx + 2z + 2xzx 2yzx = 0. Collecting terms in zx 4x3 + 2z + 2 (z + x y) zx = 0. And solving for zx we nd that zx = 2x3 + z . z+xy

To nd the partial derivative with respect to y we proceed in the same way but taking derivatives with respect to y 4y 3 + 2zzy + 2xzy 2z 2yzy = 0. 11

## Collecting terms in zy 4y 3 2z + 2 (z + x y) zy = 0. And solving for zy we nd that zy = 2y3 z . z+xy

Directional Derivatives

Partial derivatives provide the rate of change of a function when one of the independent variables changes and the rest are kept constant, i.e. when we move in a direction parallel to one axis. Directional derivatives provide the rate of change when we move in a direction non parallel to the axis. Directional Derivatives for Functions of Two Variables Denition 9 Let z = f (x, y ) a function of two variables, (x0 , y0 ) a point in the domain of f and u = u1 i + u2 j a unit vector in the plane. The directional derivative of f at (x0 , y0 ) in the direction u is the number f (x0 + u1 t, y0 + u2 t) f (x0 , y0 ) . t0 t Instead of calculating the directional derivative by direct calculation of the above limit we will develop a formula that can be applied directly. If we dene Du f (x0 , y0 ) = lim F (t) = f (x0 + u1 t, y0 + u2 t). Then, F (t) F (0) = F 0 (0). t Observe that the function F gives the values of the function f along the line through the point (x0 , y0 ) in the direction of u whose parametric equations are Du f (x0 , y0 ) = lim
t0

## x = x0 + u1 t, Applying the chain rule to F yields F 0 (t) = = At t = 0 we have

y = y0 + u2 t.

f dx f dy + x dt y dt f f u1 + u2 . x y

## Du f (x0 , y0 ) = F 0 (0) f f (x0 , y0 )u1 + (x0 , y0 )u2 . = x y

12

Gradient Vector Denition 10 Given the function z = f (x, y ) the gradient of f at (x0 , y0 ) is the plane vector f (x0 , y0 ) = f f (x0 , y0 ) i + (x0 , y0 ) j. x y

With this denition the directional derivative can be written in the form Du f (x0 , y0 ) = f (x0 , y0 )u1 + x f (x0 , y0 ) i + = x = f (x0 , y0 ) u. f (x0 , y0 )u2 y f (x0 , y0 ) j [u1 i + u2 j] y

## Example 11 Find the derivative of the function f (x, y ) = x2 y 2 + 9 4

at the point (3, 2) in the direction d =2 i + j. Solution Gradient f = = Gradient at the point (3, 2) f (3, 2) = Unit vector in the direction of d u= d 2i+ j 2 1 = = i + j. 2 2 kdk 2 +1 5 5 2 i + j. 3 f f i+ j x y 2x 2y i+ j. 9 4

## Derivative of f at (3, 2) in the direction d Du f (3, 2) = f (x0 , y0 ) u 2 2 1 = i+ j i+ j 3 5 5 4 1 + = 3 5 5 7 5 = . 15 13

Properties of the Gradient Let be the angle between the gradient vector f (x0 , y0 ) and the direction of the unit vector u. Since kuk = 1, we can write Du f (x0 , y0 ) = kf (x0 , y0 )k cos . The following properties follow from this formula: 1. The gradient vector f (x0 , y0 ) points in the direction of maximum rate of increase of f at (x0 , y0 ) and this maximum rate of increase is kf (x0 , y0 )k . 2. The direction opposite to the gradient, f (x0 , y0 ) is the direction in which f decreases most rapidly at (x0 , y0 ) and the rate of change in this direction is kf (x0 , y0 )k . 3. The gradient of f at (x0 , y0 ), f (x0 , y0 ), is perpendicular to the level curve of f through the point (x0 , y0 ). Example 12 Given the function of the above example f (x, y ) = and the same point P = (3, 2): 1. nd the direction in which increases most rapidly at the point P and the corresponding rate of change. 2. In which direction does the function decrease most rapidly at P ? 3. What are the directions of zero change of f at P ? Solution 1. The direction u in which the function increases most rapidly is the direction of f (3, 2) . From the above example f (3, 2) = The norm of this vector is 2 i + j. 3 x2 y 2 + 9 4

## s 2 2 13 2 kf (3, 2)k = . +1 = 3 3 f (3, 2) kf (3, 2)k 3 2 i+ j 13 3 2 1 i + j. 13 13 14

Therefore u = = =

## The rate of change in this direction is kf (3, 2)k = 13 . 3

2. The direction in which the function decreases most rapidly is the direction of f (3, 2), i.e. the direction of 2 f (3, 2) = i j. 3

3. The directions of zero change are the directions orthogonal to the gradient 1 2 n= i+ j 13 13 or 2 1 n = i j. 13 13

Tangent Line to a Curve in the Plane The plane curve dened by the implicit equation f (x, y ) = 0 can be viewed as a level curve of the function of two variables z = f (x, y ). Therefore, given a point (x0 , y0 ) on the curve, the vector f f (x0 , y0 ) i + (x0 , y0 ) j f (x0 , y0 ) = x y is orthogonal to the tangent line through that point. Then, the equation of the tangent line to the curve in its point-normal form is given by f f (x0 , y0 ) (x x0 ) + (x0 , y0 ) (y y0 ) = 0. x y Example 13 Find the tangent line to the ellipse x2 y 2 + =2 9 4 at the point P = (3, 2). Solution This ellipse is a level curve of the function x2 y 2 + . 9 4 Its gradient at the given point is, see above examples, 2 f (3, 2) = i + j. 3 Therefore the equation of the tangent line at P is 2 (x 3) + (y 2) = 0 3 or 2x + 3y = 12. f (x, y) = 15

Directional Derivatives and Gradient in Three Dimensions The above denition extends naturally to three or more variables. Denition 14 If w = f (x, y, z ) is a three variable function then the gradient of f at (x0 , y0 , z0 ) is the three dimensional vector f (x0 , y0 , z0 ) = f f f (x0 , y0 , z0 ) i + (x0 , y0 , z0 ) j+ (x0 , y0 , z0 ) k. x y y

With this denition the directional derivative of f in the direction of the unit vector u = u1 i + u2 j+u3 k can be written in the form Du f (x0 , y0 , , z0 ) = f (x0 , y0 , z0 ) u f f f (x0 , y0 , z0 )u1 + (x0 , y0 , z0 )u2 + (x0 , y0 , z0 )u3 . = x y y The properties of the gradient remain the same with the only dierence that the gradient is perpendicular to the level surfaces instead of level curves. These properties are: 1. The gradient vector f (x0 , y0 , z0 ) points in the direction of maximum rate of increase of f at (x0 , y0 , z0 ) and this maximum rate of increase is kf (x0 , y0 , z0 )k . 2. The direction opposite to the gradient, f (x0 , y0 , z0 ) is the direction in which f decreases most rapidly at (x0 , y0 , z0 ) and the rate of change in this direction is kf (x0 , y0 , z0 )k . 3. The gradient of f at (x0 , y0 , z0 ), f (x0 , y0 , z0 ), is perpendicular to the level surface of f through the point (x0 , y0 , z0 ). Example 15 Suppose the electric potential V in volts at a point (x, y, z ) in the three dimensional space is given by the function 1 . V =p 2 x + y2 + z 2

1. Find the direction of the greatest rate of change of V at the point P = (1, 2, 2) and the greatest rate of change. 2. Find the rate of change of the potential V at the point P in the direction of the vector d = 3 i 2 j + 6 k. 3. Find the level surface (equipotential surface) formed by all points at the same potential as P.

16

Solution 1. The direction of the greatest rate of change of V at the point P = (1, 2, 2) is given by the gradient of V at P. Partial derivatives of V Vx Vy Vz Gradient of V V = Gradient of V at P V (1 2, 2) = 2 2 1 i+ j k. 27 27 27 1 (x2 + y2 + z 2 )3/2 [x i + y j + z k] = = = x (x2 + y2 + z 2 )3/2 y (x2 + y2 + z 2 )3/2 z (x2 + y2 + z 2 )3/2 .

Direction of greatest rate of change at P u= 1 2 2 V (1 2, 2) = i + j k. kV (1 2, 2)k 3 3 3 1 kV (1 2, 2)k = . 9 2. Unit vector in the direction of d = 3 i 2 j + 6 k u= d 3 2 6 = i j + k. kdk 7 7 7

## Greatest rate of change

Rate of change of V at P in this direction Du V (1, 2, 2) = V (1 2, 2) u 2 2 3 2 6 1 j k i j+ k = i+ 27 27 27 7 7 7 3 4 12 = 189 189 189 19 . = 189 3. Electric potential at P 1 V (1, 2, 2) = . 3 17

or

## which is the sphere of radius 3 centered at the origin.

Tangent Plane and Normal Line to a Surface in the 3D Space The surface dened by the implicit equation f (x, y, z ) = 0 can be viewed as a level surface of the function of three variables w = f (x, y, z ). Therefore, given a point P0 = (x0 , y0 , z0 ) on the surface, the vector f (x0 , y0 , z0 ) = f f f (x0 , y0 , z0 ) i + (x0 , y0 , z0 ) j + (x0 , y0 , z0 ) k x y z

is orthogonal to the tangent plane through that point P0 . Then, the equation of the tangent plane to the surface in its point-normal form is given by f f f (x0 , y0 , z0 ) (x x0 ) + (x0 , y0 , z0 ) (y y0 ) + (x0 , y0 , z0 ) (z z0 ) = 0. x y z The gradient vector f (x0 , y0 , z0 ) is also the directional vector of the normal line to the surface at P0 . The parametric equations of this line are x = x0 + fx (x0 , y0 , z0 )t, y = y0 + fy (x0 , y0 , z0 )t, z = z0 + fz (x0 , y0 , z0 )t.

In continuous form the tangent line is given by y y0 z z0 x x0 = = . fx (P0 ) fy (P0 ) fz (P0 ) Example 16 Find the tangent plane and normal line to the surface (ellipsoid) 2x2 + y 2 + 5z 2 11 = 0. at the point P0 = (1, 2, 1). Solution This ellipsoid is a level surface of the function f (x, y, z ) = 2x2 + y 2 + 5z 2 11. Gradient of the function f = 4x i + 2y j + 10z k 18

Gradient at the point P0 = (1, 2, 1) f (1, 2, 1) = 4 i + 4 j+10 k. Equation of the tangent plane at P0 4(x 1) + 4(y 2) + 10(z 1) = 0 or 2x + 2y + 5z = 11. Parametric equations of the tangent line x = 1 + 2t, y = 2 + 2t, z = 1 + 5t.

## Maxima and Minima

The key to nd the local maxima and/or minima of a function of a single variable y = f (x) is to look for the points where f 0 (x) = 0, i.e. the points where the tangent to the graph of f is horizontal. We will extend this idea to the case of a function of two variables. First Derivative Test for Local Extrema If a function z = f (x, y ) has a local maximum or minimum value at a point (x0 , y0 ) the function of a single variable z = f (x, y0 ) has also a local extreme value at the point x = x0 . As a consequence its derivative has to be zero at the point, i.e. fx (x0 , y0 ) = 0. In the same way, the function of a single variable z = f (x0 , y ) has also a local extreme value at the point y = y0 and its derivative has to be zero, i.e. fy (x0 , y0 ) = 0. Proposition 17 (Necessary conditions for local extreme value) If a function z = f (x, y ) has a local maximum or minimum value at an interior point (x0 , y0 ) of its domain then fx (x0 , y0 ) = 0 and fy (x0 , y0 ) = 0. If the function is dierentiable and both partial derivatives are zero the tangent plane is given by z = f (x0 , y0 ) + 0(x x0 ) + 0(y y0 ) = f (x0 , y0 )

and we conclude that the surface has horizontal tangent plane at a local extremum. Critical Points and Saddle Points Denition 18 (Critical Points) An interior point in the domain of a function z = f (x, y) is said to be a critical point of f if the point satises the equations fx = 0, fy = 0 or one or both partial derivatives do not exist at the point. 19

As a consequence, the only points where a function can have extrema are critical points or boundary points. As for dierentiable functions of one variable not all critical points correspond to a extreme value of the function. Denition 19 (Saddle Points) A dierentiable function z = f (x, y) has a saddle point at a critical point (x0 , y0 ) if in every open disk centered at (x0 , y0 ) there exist points (x, y ) in the domain of f such that f (x, y ) > f (x0 , y0 ) and there exist points (x, y ) in the domain of f such that f (x, y ) < f (x0 , y0 ). Critical points can be tested for local extrema using the following test based on the second order partial derivatives. Proposition 20 Let z = f (x, y ) be a function with rst and second partial derivatives continuous on a disk centered at a point (x0 , y0 ). Assume (x0 , y0 ) is a critical point f , i.e. fx (x0 , y0 ) = fy (x0 , y0 ) = 0, and let fxx (x0 , y0 ) fxy (x0 , y0 ) = fxx (x0 , y0 )fyy (x0 , y0 ) [fxy (x0 , y0 )]2 . = fxy (x0 , y0 ) fyy (x0 , y0 ) Then, 1. If > 0 and fxx (x0 , y0 ) > 0, f has a local minimum at (x0 , y0 ). 2. If > 0 and fxx (x0 , y0 ) < 0, f has a local maximum at (x0 , y0 ). 3. If < 0, f has a saddle point at (x0 , y0 ). 4. If < 0, the test does not give any information. Example 21 Find the extreme values of the function f (x, y) = x2 + y 2 xy x y. Solution The function has partial derivatives everywhere. The critical points are the solutions to the system of equations fx fy = 2x y 1 = 0 = 2y x 1 = 0.

The only solution to this system is the point x = 1, y = 1. The second order partial derivatives are fxx = 2, Then, fxy = 1, fyy = 2.

From the second partial derivative test we conclude that the function has a local minimum at the point (1, 1). The value of f at this point is f (1, 1) = 1. Example 22 Find the extreme values of the function f (x, y) = x2 y 2 . 20

## 2 1 = 1 2 = 3 > 0 and fxx = 2 > 0.

Solution The function has partial derivatives everywhere. The critical points are the solutions to the system of equations fx fy = 2x = 0 = 2y = 0.

The only solution to this system is the point x = 0, y = 0. The second order partial derivatives are fxx = 2, Then, fxy = 0, fyy = 2.

From the second partial derivative test we conclude that the function has a saddle point at (0, 0).The function has no local extrema. Absolute Extrema on Closed Bounded Regions We say that a plane region D is closed if it contains all its boundary points. If there exists a disk B of radius r > 0 containing D, i.e. such that D B, we say that the region D is bounded. A continuous function f (x, y ) on a closed and bounded region D always has an absolute maximum value and absolute minimum value. The function can assume these absolute extrema at more than one point. Absolute extreme are found by inspection once you have 1. a rst list including all the critical points in the interior of D 2. a second list with all local extrema on the boundary of D. Example 23 Find the absolute extreme values of the function f (x, y ) = x2 + y2 xy x y in the closed triangular region D limited by the line x + y = 3 and the coordinate axis. Solution The only critical point of the function f is the point (1, 1), see example above. Since this point is an interior point of D is a possible point for absolute extremum. The boundary of the region D is formed by the three sides of the triangle, the side x + y = 3, the side y = 0 and the side x = 0. We will consider each side separately. 1. On the side x + y = 3, we have y = 3 x and 0 x 3. The extreme values of f on this side are given are the extreme values of the single variable function F1 (x) = f (x, 3 x) = x2 + (3 x)2 x (3 x) 3 = 3x2 9x + 6 21

2 0 = 0 2

= 4 < 0.

on the interval 0 x 3. These extreme values may occur at the points of the interval 0 < x < 3 where
0 (x) = 6x 9 = 0 F1

i.e. x = 3/2 or at the endpoints x = 0 and x = 3. Therefore we have three possible extrema of f on this side, the point x = 3/2, y = 3 x = 3/2 and the vertices (0, 3) and (3, 0). 2. On the side y = 0, 0 x 3, the extreme values of f are the extreme values of the single variable function F2 (x) = f (x, 0) = x2 x on the interval 0 x 3. These extreme values may occur at the points of the interval 0 < x < 3 where
0 (x) = 2x 1 = 0 F2

i.e. x = 1/2 or at the endpoints x = 0 and x = 3.Therefore we have three possible extrema of f on this side, the point x = 1/2, y = 0 and the vertices (0, 0) and (3, 0). 3. On the side x = 0, 0 y 3, the extreme values of f are the extreme values of the single variable function F3 (y) = f (0, y) = y2 y on the interval 0 x 3. These extreme values may occur at the points of the interval 0 < x < 3 where
0 (y) = 2y 1 = 0 F3

i.e. y = 1/2 or at the endpoints y = 0 and y = 3.Therefore we have three possible extrema of f on this side, the point y = 1/2, x = 0 and the vertices (0, 0) and (0, 3). In total we have the following list of candidates: (1, 1), (3/2, 3/2), (1/2, 0), (0, 1/2), (3, 0), ( 0, 3), (0, 0). The values of at these points are f (1, 1) f (3/2, 3/2) f (1/2, 0) f (3, 0) f (0, 0) = = = = = 1 3/4 f (0, 1/2) = 1/4 f (0, 3) = 6 0

By inspection we conclude that f reaches an absolute maximum value of 6 at the points (3, 0) and (0, 3).The absolute minimum of f is 1 which f assumes at the point (1, 1). 22

Lagrange Multipliers

We sometimes need to nd the extrema of a function when the independent variables are constrained by one or more conditions. For instance given a function z = f (x, y ) we might want to nd the maximum and minimum value f takes on the curve dened by the equation g (x, y ) = 0. In some cases it is possible to solve for y or nd a convenient parametrization of the curve to reduce the problem to one independent variable. This is not always possible or convenient and less so in more general situations in which more independent variables and more constraints are involved. In this section we present a more elegant a powerful technique called the method of Lagrange multipliers. First we will examine the case of max/min problems with one constrain and then we will extend it to two or more constraints. Max-Min Problems with One Constrain Assume the following max/min. problem: Find the extrema of a function z = f (x, y ) subject to the condition g(x, y ) = 0. The Lagrange multipliers method is based on the following result. Proposition 24 Let f (x, y ) and g (x, y ) be two functions with continuous partial derivatives at a point (x0 , y0 ) such that g(x0 , y0 ) = 0 and g (x0 , y0 ) 6= 0. If f reaches a local extremum at (x0 , y0 ) subject to the condition g (x, y ) = 0 then there exists a real number such that f (x0 , y0 ) = g (x0 , y0 ). In order to apply this result in a systematic way we will proceed as follows: 1. Create a new auxiliary function L L(x, y, ) = f (x, y) g(x, y ) where is a new independent variable called a Lagrange multiplier. 2. Find the critical points of the auxiliary function L, i.e. the solutions (x, y, ) of the system of equations Lx Ly L = fx gx = 0 = fy gy = 0 = g = 0.

3. Make a list with all the points (x, y) such that (x, y, ) is a critical point obtained in step 2. Add to this list those points such that g 6= 0 and g = 0 if any. 4. Analyze the points on this list for maximum or minimum in the usual way.

23

This method applies to a functions of three or more variable. If w = f (x, y, z ) is a function of three variables and we want to nd the extrema that f takes on the surface g (x, y, z ) = 0 we proceed in the same way. The only dierence is that the function L = f g now has four variables x, y, z and and in step 2 the system is a system of four equations fx gx = 0, in four unknowns. Example 25 Find the extrema of the function f (x, y ) = xy on the ellipse 2x2 + 3y 2 = 6. Solution The Lagrange function is L(x, y, ) = xy (2x2 + 3y 2 6). To nd the critical points of L we calculate its partial derivatives, set them to zero and solve the resulting system Lx Ly L = y 4x = 0 = x 6y = 0 = 2x2 + 3y 2 6 = 0. 3y 2 12xy 2x2 12xy and subtracting them 3y 2 = 2x2 . This equation together with the equation of the ellipse gives 2x2 = 3 and y 2 = 1. Therefore the extrema are found among the four points ! 6 , 1 . 2 Max-Min Problems with Two Constraints Assume the following max/min. problem: Find the extrema of a function w = f (x, y, z ) subject to the conditions g1 (x, y, z ) = 0, g2 (x, y, z ) = 0. In this case the Lagrange multipliers method requires two Lagrange multipliers and it is based on the following result. fy gy = 0, fz gz = 0, g = 0.

## Multiplying the rst equation by 3y and the second one by 2x we get = 0 = 0

24

Proposition 26 Let f (x, y, z ), g (x, y, z ) and h(x, y, z ) be functions with continuous partial derivatives at a point (x0 , y0 , z0 ) such that g(x0 , y0 , z0 ) = 0, h(x0 , y0 , z0 ) = 0. Assume that g(x0 , y0 , z0 ) and g (x0 , y0 , z0 ) are linearly independent. If f reaches a local extremum at (x0 , y0 , z0 ) subject to the conditions g = 0, h = 0 then there exist real numbers and such that f (x0 , y0 , z0 ) = g (x0 , y0 , z0 ) + h(x0 , y0 , z0 ). In order to apply this result in a systematic way proceed as follows: 1. Create a new auxiliary function L L(x, y, z, , ) = f (x, y, z ) g (x, y, z ) h(x, y, z ) where and are two new independent variables called Lagrange multipliers. 2. Find the critical points of the auxiliary function L, i.e. the solutions (x, y, z, , ) of the system of equations Lx Ly Lz L L = = = = = fx gx hx = 0 fy gy hy = 0 fz gz hz = 0 g=0 h = 0.

3. Make a list with all the points (x, y, z ) such that (x, y, z, , ) is a critical point obtained in step 2. Add to this list those points such that g 6= 0 and g = 0 if any. 4. Analyze the points on this list for maximum or minimum in the usual way.

25