FOCUS ON THEORY 653 DIFFERENTIABILITY Notes on Differentiabilit In Section 13.3 we gave an informal introduction to te concet of differentiabilit. We called a function f (; ) differentiable at a oint (a; b) if it is well-aroimated b a linear function near (a; b). Tis section focuses on te recise meaning of te rase well-aroimated. B looking at eamles, we sall see tat local linearit requires te eistence of artial derivatives, but te do not tell te wole stor. In articular, eistence of artial derivatives at a oint is not sufficient to guarantee local linearit at tat oint. We begin b discussing te relation between continuit and differentiabilit. As an illustration, take a seet of aer, crumle it into a ball and smoot it out again. Werever tere is a crease it would be difficult to aroimate te surface b a lane tese are oints of nondifferentiabilit of te function giving te eigt of te aer above te floor. Yet te seet of aer models a gra wic is continuous tere are no breaks. As in te case of one-variable calculus, continuit does not iml differentiabilit. But differentiabilit does require continuit: tere cannot be linear aroimations to a surface at oints were tere are abrut canges in eigt. Starting from te definition of differentiabilit for single-variable functions, we develo a definition of differentiabilit for two-variable functions. Differentiabilit For Functions Of One Variable We recall tat a function g() is differentiable at te oint a if te it g 0 g(a + ) g(a) (a) = eists. Geometricall, te definition means tat te gra of = g() can be well-aroimated b te line = L() = g(a) +g 0 (a)( a). How well does tis line ave to aroimate te function g() near te oint a before we can sa tat g is differentiable at a? To answer tis question, suose g is differentiable at a and let E() be te error between te function g() and te line L(), so tat E() =g() L() = g() g(a) g 0 (a)( a): Tis means tat at te oint = a + near a, te error E() is given b E(a + ) =g(a + ) g(a) g 0 (a): Suose we consider te relative error E(a + )=.Weave E(a + ) Tus, in te it as! 0,weave g(a + ) g(a) = g 0 (a): E(a + ) g(a + ) g(a) = g 0 (a): B te definition of te derivative, te rigt-and side of te last equation is 0.
654 CHAPTER zero / FOCUS ON THEORY Terefore we see tat if f is differentiable, te relative error tends to 0 as tends to 0: E(a + ) =0: We will take well aroimated to mean tat tis it is zero. We use tis idea to give a new definition of differentiabilit wic can be generalized to functions of several variables A function g() is differentiable at te oint a if tere is a linear function L() =g(a) +m( a) suc tat if te error, E(), is defined b g() =L() +E() and if = a ten te relative error E(a + )= satisfies E(a + ) =0: Te function L() is called te local linearization of g() near a. Te function g is differentiable if it is differentiable at eac oint of its domain. L() g(a) 6? E() g() ff ( a) - a Figure 1: Gra of te function = g() and its local linearization = L() near te oint a Tis new definition tells us tat te ratio E()=( a) in Figure 1, te error divided b te distance from te oint a, tends to 0 as! a. In addition, it can be sown tat we must ave m = g 0 (a). Differentiabilit For Functions Of Two Variables Based on our new definition of differentiabilit, we define differentiabilit of a function of two variables at a oint in terms of te error and te distance from te oint. If te oint is (a; b) and te nearb oint is (a + ; b + k), te distance is 2 + k 2. (See Figure 2.)
DIFFERENTIABILITY 655 A function f (; ) is differentiable at te oint (a; b) if tere is a linear function L(; ) = f (a; b) +m( a) +n( b) suc tat if te error E(; ) is defined b f (; ) =L(; ) +E(; ); and if = a; k = b, ten te relative error E(a + ; b + k)= 2 + k 2 satisfies E(a + ; b + k) =0: k!0 2 + k 2 Te function f is differentiable if it is differentiable at eac oint of its domain. Te function L(; ) is called te local linearization of f (; ) near (a; b). z L(; ) f (; ) 6? E(; ) =E(a + ; b + k) (a; b) ff Distance = 2 + k 2 (a + ; b + k) ff ff Figure 2: Gra of function z = f (; ) and its local linearization z = L(; ) near te oint (a; b) Partial Derivatives and Differentiabilit In te net eamle, we sow tat tis definition of differentiabilit is consistent wit our revious notion tat is, tat m = f and n = f and tat te gra of L(; ) is te tangent lane. Eamle 1 Sow tat if f is a differentiable function wit local linearization L(; ) =f (a; b) +m( a) + n( b), ten m = f (a; b) and n = f (a; b). Solution Since f is differentiable, we know tat te relative error in L(; ) tends to 0 as we get close to (a; b). Suose >0 and k =0. Ten we know tat E(a + ; b) 0= 2 + k = E(a + ; b) f (a + ; b) L(a + ; b) = 2 f (a + ; b) f (a; b) m = f (a + ; b) f (a; b) = m = f (a; b) m: A similar result olds if < 0, soweavem = f (a; b). Te result n = f (a; b) is found in a similar manner.
656 CHAPTER zero / FOCUS ON THEORY Te revious eamle sows tat if a function is differentiable at a oint, it as artial derivatives tere. Terefore, if an of te artial derivatives fail to eist, ten te function cannot be differentiable. Tis is wat aens in te following eamle of a cone. Eamle 2 Consider te function f (; ) = 2 + 2.Isf differentiable at te origin? z : Figure 3: Te function f (; ) = 2 + 2 is not locall linear at (0; 0): Zooming in around (0; 0) does not make te gra look like a lane Solution If we zoom in on te gra of te function f (; ) = 2 + 2 at te origin, as sown in Figure 3, te sar oint remains; te gra never flattens out to look like a lane. Near its verte, te gra does not look like it is well aroimated (in an reasonable sense) b an lane. Judging from te gra of f, we would not eect f to be differentiable at (0; 0). Let us ceck tis b tring to comute te artial derivatives of f at (0; 0): f (; 0) f (0; 0) f (0; 0) = = 2 +0 0 jj = : Since jj= = ±1, deending on weter aroaces 0 from te left or rigt, tis it does not eist and so neiter does te artial derivative f (0; 0). Tus, f cannot be differentiable at te origin. If it were, bot of te artial derivatives, f (0; 0) and f (0; 0), would eist. Alternativel, we could sow directl tat tere is no linear aroimation near (0; 0) tat satisfies te small relative error criterion for differentiabilit. An lane assing troug te oint (0; 0; 0) as te form L(; ) = m + n for some constants m and n. IfE(; ) = f (; ) L(; ), ten E(; ) = 2 + 2 m n: Ten for f to be differentiable at te origin, we would need to sow tat 2 + k 2 m nk =0: 2 + k 2 Taking k =0gives k!0 jj m =1 m jj jj : Tis it eists onl if m =0for te same reason as before. But ten te value of te it is 1 and not 0 as required. Tus, we again conclude f is not differentiable. In Eamle 2 te artial derivatives f and f did not eist at te origin and tis was sufficient to establis nondifferentiabilit tere. We migt eect tat if bot artial derivatives do eist, ten f is differentiable. But te net eamle sows tat tis not necessaril true: te eistence of bot artial derivatives at a oint is not sufficient to guarantee differentiabilit.
DIFFERENTIABILITY 657 Eamle 3 Consider te function f (; ) = 1=3 1=3. Sow tat te artial derivatives f (0; 0) and f (0; 0) eist, but tat f is not differentiable at (0; 0). z Figure 4: Gra of z = 1=3 1=3 for z 0 Solution See Figure 4 for te art of te gra of z = 1=3 1=3 wen z 0. Weavef (0; 0) = 0 and we comute te artial derivatives using te definition: f (; 0) f (0; 0) 0 0 f (0; 0) = = =0; and similarl f (0; 0) = 0: So, if tere did eist a linear aroimation near te origin, it would ave to be L(; ) =0. But we can sow tat tis coice of L(; ) doesn t result in te small relative error tat is required for differentiabilit. In fact, since E(; ) =f (; ) L(; ) =f (; ), we need to look at te it k!0 1=3 k 1=3 2 + k 2 : If tis it eists, we get te same value no matter ow and k aroac 0. Suose we take k = >0. Ten te it becomes 1=3 1=3 2 + = 2=3 2 2 = 1 1=3 2 : But tis it does not eist, since small values for will make te fraction arbitraril large. So te onl ossible candidate for a linear aroimation at te origin does not ave a sufficientl small relative error. Tus, tis function is not differentiable at te origin, even toug te artial derivatives f (0; 0) and f (0; 0) eist. Figure 4 confirms tat near te origin te gra of z = f (; ) is not well aroimated b an lane. In summar, ffl ffl If a function is differentiable at a oint, ten bot artial derivatives eist tere. Having bot artial derivatives at a oint does not guarantee tat a function is differentiable tere.
658 CHAPTER zero / FOCUS ON THEORY Continuit and Differentiabilit We know tat differentiable functions of one variable are continuous. Similarl, it can be sown tat if a function of two variables is differentiable at a oint, ten te function is continuous tere. In Eamle 3 te function f was continuous at te oint were it was not differentiable. Eamle 4 sows tat even if te artial derivatives of a function eist at a oint, te function is not necessaril continuous at tat oint if it is not differentiable tere. Eamle 4 Suose tat f is te function of two variables defined b ( f (; ) = 2 ; + 2 (; ) 6= (0; 0), 0; (; ) =(0; 0). Problem 4 on age 613 sowed tat f (; ) is not continuous at te origin. Sow tat te artial derivatives f (0; 0) and f (0; 0) eist. Could f be differentiable at (0; 0)? Solution From te definition of te artial derivative we see tat f (; 0) f (0; 0) f (0; 0) = = 1 2 0 0 2 = +0 =0; and similarl f (0; 0) = 0: So, te artial derivatives f (0; 0) and f (0; 0) eist. However, f cannot be differentiable at te origin since it is not continuous tere. In summar, ffl ffl If a function is differentiable at a oint, ten it is continuous tere. Having bot artial derivatives at a oint does not guarantee tat a function is continuous tere. How Do We Know If a Function Is Differentiable? Can we use artial derivatives to tell us if a function is differentiable? As we see from Eamles 3 and 4, it is not enoug tat te artial derivatives eist. However, te following condition does guarantee differentiabilit: If te artial derivatives, f and f, of a function f eist and are continuous on a small disk centered at te oint (a; b), ten f is differentiable at (a; b). We will not rove tis fact, altoug it rovides a criterion for differentiabilit wic is often simler to use tan te definition. It turns out tat te requirement of continuous artial derivatives is more stringent tan tat of differentiabilit, so tere eist differentiable functions wic do not ave continuous artial derivatives. However, most functions we encounter will ave continuous artial derivatives. Te class of functions wit continuous artial derivatives is given te name C 1.
DIFFERENTIABILITY 659 Eamle 5 Solution Sow tat te function f (; ) =ln( 2 + 2 ) is differentiable everwere in its domain. Te domain of f is all of 2-sace ecet for te origin. We sall sow tat f as continuous artial derivatives everwere in its domain (tat is, te function f is in C 1 ). Te artial derivatives are f = 2 and 2 + 2 f = 2 2 + 2 : Since eac of f and f is te quotient of continuous functions, te artial derivatives are continuous everwere ecet te origin (were te denominators are zero). Tus, f is differentiable everwere in its domain. Most functions built u from elementar functions ave continuous artial derivatives, ecet eras at a few obvious oints. Tus, in ractice, we can often identif functions as being C 1 witout elicitl comuting te artial derivatives. Problems on Differentiabilit For te functions f in Problems 1 4 answer te following questions. Justif our answers. (a) Use a comuter to draw a contour diagram for f. (b) Is f differentiable at all oints (; ) 6= (0; 0)? (c) Do te artial derivatives f and f eist and are te continuous at all oints (; ) 6= (0; 0)? (d) Is f differentiable at (0; 0)? (e) Do te artial derivatives f and f eist and are te continuous at (0; 0)? 1. f (; ) = 8 < : + ; 6= 0and 6= 0, ( 2 0; =0or =0. 2. f (; ) = ( 2 + 2 ; (; ) 6= (0; 0), ) 2 0; (; ) =(0; 0). ( ; (; ) 6= (0; 0), 3. f (; ) = 2 + 2 0; (; ) =(0; 0): ( 2 4. f (; ) = 4 ; (; ) 6= (0; 0); + 2 0; (; ) =(0; 0): 5. Consider te function ( 2 f (; ) = 2 ; + 2 (; ) 6= (0; 0); 0; (; ) =(0; 0): (a) Use a comuter to draw te contour diagram for f. (b) Is f differentiable for (; ) 6= (0; 0)? (c) Sow tat f (0; 0) and f (0; 0) eist. (d) Is f differentiable at (0; 0)? (e) Suose (t) = at and (t) = bt, were a and b are constants, not bot zero. If g(t) = f ((t);(t)), sow tat (f) (g) Sow tat g 0 (0) = ab2 a 2 + b 2 : f (0; 0) 0 (0) + f (0; 0) 0 (0) = 0: Does te cain rule old for te comosite function g(t) at t =0? Elain. Sow tat te directional derivative f ~u (0; 0) eists for eac unit vector ~u. Does tis iml tat f is differentiable at (0; 0)?
660 CHAPTER zero / FOCUS ON THEORY 6. Consider te function f (; ) = ( 2 2 ; + 4 (; ) 6= (0; 0); 0; (; ) =(0; 0): (a) Use a comuter to draw te contour diagram for f. (b) Sow tat te directional derivative f ~u (0; 0) eists for eac unit vector ~u. (c) Is f continuous at (0; 0)? Isf differentiable at (0; 0)? Elain. jj. 7. Consider te function f (; ) = (a) Use a comuter to draw te contour diagram for f. Does te contour diagram look like tat of a lane wen we zoom in on te origin? (b) Use a comuter to draw te gra of f. Does te gra look like a lane wen we zoom in on te origin? (c) Is f differentiable for (; ) 6= (0; 0)? (d) Sow tat f (0; 0) and f (0; 0) eist. (e) Is f differentiable at (0; 0)? [Hint: Consider te directional derivative f ~u (0; 0) for ~u = ( ~ i + ~ j )= 2.] 8. Suose a function f is differentiable at te oint (a; b). Sow tat f is continuous at (a; b). 9. Suose f (; ) is a function suc tat f (0; 0) = 0 and f (0; 0) = 0, and f ~u (0; 0) = 3 for ~u = ( ~ i + ~ j )= 2. (a) Is f differentiable at (0; 0)? Elain. (b) Give an eamle of a function f defined on 2-sace wic satisfies tese conditions. [Hint: Te function f does not ave to be defined b a single formula valid over all of 2-sace.] 10. Consider te following function: f (; ) = ( 2 ( 2 ) 2 + 2 ; (; ) 6= (0; 0); 0; (; ) =(0; 0): Te gra of f is sown in Figure 5, and te contour diagram of f is sown in Figure 6. z :25 :65 :85 :25 :45 :05 :85 :25 :25 :05 :25:45:65 :25 :25 :25 Figure 5: Gra of (2 2 ) 2 + 2 Figure 6: Contour diagram of (2 2 ) 2 + 2 (a) Find f (; ) and f (; ) for (; ) 6= (0; 0). (b) Sow tat f (0; 0)=0and f (0; 0) = 0. (c) Are te functions f and f continuous at (0; 0)? (d) Is f differentiable at (0; 0)?