## 3.3 Partial Derivatives

130 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES 3.3 3.3.1 Partial Derivatives Quick Calculus I Review dy You will recall that if y = f (x), then the...
Author: Elwin King
130

CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

3.3 3.3.1

Partial Derivatives Quick Calculus I Review

dy You will recall that if y = f (x), then the derivative of f , denoted f 0 (x) or dx d or dx f (x) is the instantaneous rate of change of f with respect to x. We list some facts about the derivative students should know:

1. f 0 (a) = lim

x!a

f (x) f (a) x a

= lim

h!0

f (a+h) f (a) h

2. If f is di¤erentiable at a point a ( f 0 (a) exists) then f is continuous at a. 3. f 0 (a) is the slope of the tangent to y = f (x) at x = a. 4. If f 0 (x) > 0 on an interval, then f is increasing on that interval. 5. If f 00 (x) > 0 on an interval, then f is concave up on that interval ( f is increasing at an increasing rate). We extend the notion of the derivative to functions of several variables.

3.3.2

De…nitions and Interpretations of Partial Derivatives

If the derivative is the rate of change, a …rst question which arises when dealing with functions of two or more variable is "rate of change with respect to which variable"? In other words, when we study how z = f (x; y) is changing, what kind of change are we talking about? Is it a change with respect to x, to y, to both? In Calculus I, the graph of a function y = f (x) was often associated with a path along which you were walking. If the path was climbing, then the derivative (rate of change of y with respect to x) was positive. If the path was ‡at, then the derivative (rate of change) was 0. Otherwise, it was negative. We can carry this analogy to functions of several variables. The graph of a function of two variables, z = f (x; y), is a surface in 3-D. It looks more like a real terrain than the graph of a function of one variable did. Carrying the analogy, we could say that as we walk along a path, if we are climbing then the derivative is positive, if we are going downhill then the derivative is negative and if that path is ‡at, then the derivative is 0. What is more complex in the case of functions of several variables is that we can be walking in many (in…nitely many) directions. We …rst look at what happens if we are walking in a direction parallel to the x-axis or the y-axis. We will then see what happens when we are walking in any direction. Consider the surface given by z = f (x; y) and a point P (a; b; f (a; b)) on the surface. If we intersect this surface with a plane parallel to the xz-plane through P , then the equation of this plane is y = b (see …gure 3.5). The intersection of this plane with the surface is a curve which only depends on x, call it g (x). Its

3.3. PARTIAL DERIVATIVES

131

equation is z = g (x) = f (x; b). Along this curve, the rate of change of z with respect to x is g 0 (x)

= =

g (x + h) g (x) h f (x + h; b) f (x; b) lim h!0 h lim

h!0

Geometrically, this corresponds to the slope of this the curve. Similarly, if we intersect the surface with a plane parallel to the yz-plane through P , then the equation of this plane is x = a. The intersection of this plane with the surface is a curve which only depends on y, call it q (y). Its equation is z = q (y) = f (a; y). The slope of this curve is q 0 (y). and q 0 (y)

q (y + h) q (y) h f (a; y + h) f (a; y) = lim h!0 h =

lim

h!0

Using the idea above, we de…ne the partial derivatives of f . De…nition 225 (partial derivatives) Let f be a function of two variables. 1. The partial derivative of f with respect to x, denoted fx (x; y) is de…ned to be: f (x + h; y) f (x; y) fx (x; y) = lim h!0 h 2. The partial derivative of f with respect to y, denoted fy (x; y) is de…ned to be: f (x; y + h) f (x; y) fy (x; y) = lim h!0 h There are other notations for the partial derivatives. De…nition 226 Let z = f (x; y). Then: 1. fx (x; y) = fx =

@f @x

=

@ @x f

(x; y) =

@z @x

= f1 = D 1 f = D x f

2. fy (x; y) = fy =

@f @y

=

@ @y f

(x; y) =

@z @y

= f2 = D2 f = Dy f

Remark 227 The subscripts 1 and 2 represent the …rst and second variable which are x and y. It becomes more relevant when we deal with functions having n variables, for large n. Looking at the de…nition of fx (x; y), we see that the variable y is not changing. Only x is changing. So, we are computing how f (x; y) is changing with respect to x. Geometrically, if we consider the curve C1 at the intersection of the surface z = f (x; y) with the plane y = c where c is a constant, then such a curve is simply a function of x since along the curve y = c. The slope of this

132

CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

Figure 3.5: The slope of the curve at the intersection of the surface z = f (x; y) with the plane y = 1 is the fx (x; y) curve is fx (x; y) (see …gure 3.5). To be more precise, the slope of this curve would be fx (x; c). Similarly, fy (x; y) is the slope of the curve C2 at the intersection of the surface z = f (x; y) and the plane x = c. To be more precise, the slope of this curve would be fy (c; y). Going back to the analogy with walking on a terrain, fx (x; y) corresponds to the slope of the path along a direction parallel to the x-axis and fy (x; y) corresponds to the slope of the path along a direction parallel to the y-axis : In other words, the partial derivatives fx (a; b) and fy (a; b) give the slope at (a; b) of C1 and C2 where C1 is the curve through (a; b) at the intersection of z = f (x; y) and the plane y = b and C2 is the curve through (a; b) at the intersection of z = f (x; y) and the plane x = a. This de…nition extends to functions of more than two variables. In general, we have: De…nition 228 Let f (x1 ; x2 ; :::; xn ) be a function of n variables. Then, fxi (x1 ; x2 ; :::; xn ) = lim

h!0

f (x1 ; x2 ; :; xi + h; ::; xn ) h

f (x1 ; x2 ; :; xi ; ::; xn )

3.3. PARTIAL DERIVATIVES

3.3.3

133

Computation

Since partial derivatives are rates of change with respect to one variable only, we can use the rules of di¤erentiation from Calculus I. More speci…cally, we have: Proposition 229 Rules to …nd partial derivatives of z = f (x; y) 1. To …nd fx , regard y as a constant and di¤ erentiate f (x; y) with respect to x. 2. To …nd fy , regard x as a constant and di¤ erentiate f (x; y) with respect to y. Remark 230 In the process outlines above, you can use all the rules of di¤ erentiation from Calculus I. Example 231 Find

@f @x

and

@f @y

for f (x; y) = x2 + y 2 + 5xy.

1.

@f @x

=

@ @x

x2 + y 2 + 5xy = 2x + 5y

2.

@f @y

=

@ @y

x2 + y 2 + 5xy = 2y + 5x

Example 232 Find

@f @x

and

@f @y

x 1+y

for f (x; y) = sin

1. @f @x

=

@ sin @x

=

cos

=

cos

=

@ sin @y

=

cos

=

cos

x 1+y

x 1+y x 1+y

@ x @x 1 + y 1 1+y

(chain rule)

2. @f @y

Example 233 Find

@z @x

x 1+y x @ 1 + y @y x 1+y

x (chain rule) 1+y ! x

(1 + y)

2

if z is de…ned implicitly by x2 + y 2 + z 2 = 4

134

CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

Since z is de…ned implicitly, we must use implicit di¤ erentiation. @ x2 + y 2 + z 2 @x @z 2x + 2z @x @z @x Example 234 Find

@z @x

=

@ 4 @x

=

0 x z

=

if z is de…ned implicitly by x3 + y 3 + z 3 + 6xyz = 1

Since z is de…ned implicitly, we must use implicit di¤ erentiation. @ x3 + y 3 + z 3 + 6xyz @x @z @z 3x2 + 3z 2 + 6yz + 6xy @x @x @z 3z 2 + 6xy @x @z @x @z @x

3.3.4

=

@ 1 @x

=

0 3 x2 + 2yz

=

3 x2 + 2yz 3 (z 2 + 2xy) x2 + 2yz z 2 + 2xy

= =

Higher Order Derivatives

If f is a function in two variables, so are fx and fy . So, we can di¤erentiate then. Their partial derivatives will also be functions in several variables, so we can di¤erentiate then again. Thus, we have the following: @ @x @ = @y @ = @y @ = @x

(fx )x

= fxx = f11 =

(fy )y

= fyy = f22

(fx )y

= fxy = f12

(fy )x

= fyx = f21

@f @x @f @y @f @x @f @y

@2f @2z = @x2 @x2 2 @ f @2z = = @y 2 @y 2 2 @ f @2z = = @[email protected] @[email protected] @2f @2z = = @[email protected] @[email protected] =

It is similar for higher order derivatives. Example 235 Find the second order partial derivatives for z = f (x; y) = x3 + y 3 + x2 y 2

3.3. PARTIAL DERIVATIVES

135

1. fx = 3x2 + 2y 2 x 2. fy = 3y 2 + 2x2 y 3. fxx = 6x + 2y 2 4. fyy = 6y + 2x2 5. fxy = 4yx 6. fyx = 4xy Remark 236 You will note that the mixed partials are the same. This is not an accident. Clairaut, a French mathematician (1713-1765) proved the following theorem: Theorem 237 (Clairaut’s Theorem) Suppose that f is de…ned on a disk D which contains the point (a; b). If the functions fxy and fyx are both continuous on D, then fxy (a; b) = fyx (a; b)

3.3.5

Di¤erentiability and Continuity

For functions of one variable, di¤erentiability at x = a simply means that the derivative exists at x = a, that is lim f (a+h)h f (a) exists. For functions of several h!0

variables, there are several partial derivatives to consider. We give the result as a theorem without proof. Theorem 238 Consider the function f (x; y). If the partial derivatives fx and fy are continuous on an open region D, then f is di¤ erentiable at every point in D. Another important di¤erence between functions of one variable and functions of several variables is related to the relationship between di¤erentiability and continuity. For functions of one variable, if f 0 (a) exists then f has to be continuous at a. For functions f of several variables, it is possible for fx (a; b) and fy (a; b) to exist and for f not to be continuous at (a; b). For f to be continuous we also need to know that the partials fx and fy are continuous at (a; b) in other words that f is di¤erentiable at (a; b). We have the following theorem: Theorem 239 If f (x; y) is di¤ erentiable at (a; b) that is if fx and fy exist and are continuous at (a; b) then f is also continuous at (a; b).

3.3.6

Partial Di¤erential Equations

A partial di¤erential equation is an equation which involves an unknown function and some of its partial derivatives. Such equations arise in many applications in physics, chemistry, economics, ... We mention two such equations here.

136

CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES The Heat Equation: @2u @2u + 2 @x2 @y

@u =k @t

u (x; y; t) gives the heat of an isotropic, homogeneous plate as a function of the position on the plate: (x; y) and time: t. k is a constant which depends on the medium. In 3 D, the heat equation becomes @2u @2u @2u + 2 + 2 @x2 @y @z

@u =k @t

In this case u (x; y; z; t) gives the heat of an isotropic, homogeneous 3 D object as a function of the position on the object: (x; y; z) and time: t. Laplace Equation: @2u @2u + 2 =0 @x2 @y Solutions of this equation are called harmonic functions. They play a role in problems related to heat conduction, ‡uid ‡ow. The wave equation is: 2 @2u [email protected] u = a @t2 @x2 It describes the motion of a waveform. Examples of waveforms include an ocean wave, a sound wave, a wave traveling along a vibrating string. The equation written above corresponds to the vibration of a string. u (x; t) gives the displacement of a string x units from one end of the string at time t. In the case of an ocean wave, the function would be of the form u (x; y; t) and the wave equation would be

@2u = a2 @t2

@2u @2u + 2 @x2 @y

The constant a is related to the vibrating medium. Example 240 Show that u (x; y) = e @u @x @2u @x2

x

sin y satis…es Laplace equation.

=

e

x

sin y

=

e

x

sin y

=

e

x

cos y

and @u @y @2u @y 2

=

e

x

sin y

3.3. PARTIAL DERIVATIVES

137

Therefore @2u @2u + 2 @x2 @y

x

= e =

sin y

=

uxx

=

sin y

0

Example 241 Show that u (x; t) = sin (x ux

x

e

at) satis…es the wave equation.

cos (x

at)

sin (x

at)

a cos (x

at)

and ut

=

utt

=

2

a sin (x

at)

Therefore utt

a2 uxx

a2 sin (x

= =

3.3.7

at)

a2 ( sin (x

at))

0

Partial Derivatives with Maple

Let f denote a function of one of more variables. Maple can …nd the partial derivatives of any order of f . The table below explains the syntax to use. Partial Syntax Other Syntax fx di¤(f; x) fxx di¤(f; x; x) di¤(f; x\$2) fxxx di¤(f; x; x; x) di¤(f; x\$3) fxy di¤(f; x; y) fxxy di¤(f; x; x; y) fyxyx di¤(f; x; y; x; y) See the accompanying Maple worksheet for examples.

3.3.8 We use

Partial Derivatives With Scienti…c Notebook or Workplace @ @2 @2 @2 @ or for …rst order partial derivatives. We use , , , @x @y @x2 @y 2 @[email protected]

@2 for second order derivatives and so on. @[email protected] Example 242 Find

@f @x

@f @y

and @ sin

for f (x; y) = sin

x 1+y

@x

=

x 1+y

1 x cos y+1 y+1

138

CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES

and @ sin

x 1+y

@y

=

x (y + 1)

2

cos

x y+1

which is what we found earlier when we did it by hand. Example 243 Find all the second order derivatives of f (x; y) = x3 + y 3 + x2 y 2 @ 2 x3 + y 3 + x2 y 2 = 2y 2 + 6x @x2 @ 2 x3 + y 3 + x2 y 2 = 2x2 + 6y @y 2 @ 2 x3 + y 3 + x2 y 2 = 4xy @[email protected] @ 2 x3 + y 3 + x2 y 2 = 4xy @[email protected]

3.3.9

Assignment

Do odd # 1 - 49, 57, 61, 65, 69, 71 at the end of 11.3 in your book.