midterm sos 237 package calculus

31
7/28/2019 Midterm SOS 237 Package Calculus http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 1/31 MATH237: EXAM-AID SOS NIALL W. MACGILLIVRAY (EDITOR); VINCENT CHAN (WRITER) October 30th, 2010 1. Scalar Functions (1.1-1.2) DEFINITION 1.1. Suppose A and B are sets. A function is a rule that determines how a subset of A is associated with a subset of B, such that each element in A for which is defined is sent to exactly one element in B. This subset of A for which f is defined is called the domain of and denoted by D(), while the subset of B which is attained by is called the range of and denoted by R(). We typically denote by : A B. DEFINITION 1.2. : R R is a scalar function, i.e. when the domain is a subset of R and the range is a subset of R. EXAMPLE 1. Define : R 2 R by (x, y) = x 2 + 2y 2 2x. Find the domain and range of f. SOLUTION. Clearly D() = R 2 . For the range, notice x 2 +y 2 2x x 2 2x, which has a minimum at x = 1 (using what we know from 1-dimension). Then (x, y) (1, 0) = 1. For any value z [0, [, we can take x = 1 + √ 1 + z and y = 0. Indeed, this is a possible value for x we can solve for using z = x 2 2x and the quadratic equation. Thus, R() = [ 1, [. EXAMPLE 2. Define : R 2 R by (x, y) = |x|+|y| |x|−|y| . Find the domain and range of . SOLUTION. We only need |x| = |y| for to be defined. The domain is then R 2 \ {(x, y) : |x| = |y|}. As for the range, notice we can obtain 1 and -1 by setting y = 0 and x = 0 respectively. Now, suppose for z R, we have (x, y) = z. Then |x| +|y| = z|x|− z|y|, so that: (1 z)|x| = (1 + z)|y| We have already dealt with the case z = ±1. Otherwise, |y| = 1z 1+z |x|. Since |x|, |y| ≥ 0, we have 1z 1+z 0. Then either both 1 z and 1 z are positive, or both are negative. That is, we have z < 1 or z > 1. 1

Upload: san-li

Post on 03-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 1/31

MATH237: EXAM-AID SOS

NIALL W. MACGILLIVRAY (EDITOR); VINCENT CHAN (WRITER)

October 30th, 2010

1. Scalar Functions (1.1-1.2)

DEFINITION 1.1. Suppose A and B are sets. A function f  is a rule that determineshow a subset of  A is associated with a subset of  B, such that each element in A for whichf  is defined is sent to exactly one element in B. This subset of A for which f is defined iscalled the domain of  f  and denoted by D(f ), while the subset of  B which is attained by f 

is called the range of  f  and denoted by R(f ). We typically denote f  by f : A

→B.

DEFINITION 1.2. f : R → R is a scalar function, i.e. when the domain is a subset of Rand the range is a subset of R.

EXAMPLE 1. Define f : R2 → R by f (x, y) = x2 + 2y2 − 2x. Find the domain andrange of f.

SOLUTION. Clearly D(f ) = R2. For the range, notice x2+y2−2x ≥ x2 − 2x, which has a

minimum at x = 1 (using what we know from 1-dimension). Then f (x, y) ≥ f (−1, 0) = −1.For any value z ∈ [0, ∞[, we can take x = 1 +

√ 1 + z and y = 0. Indeed, this is a possible

value for x we can solve for using z = x2 − 2x and the quadratic equation. Thus, R(f ) =[−

1,

∞[.

EXAMPLE 2. Define f : R2 → R by f (x, y) =|x|+|y||x|−|y| . Find the domain and range of  f .

SOLUTION. We only need |x| = |y| for f  to be defined. The domain is then R2 \

{(x, y) : |x| = |y|}. As for the range, notice we can obtain 1 and -1 by setting y = 0 andx = 0 respectively. Now, suppose for z ∈ R, we have f (x, y) = z. Then |x|+|y| = z|x|−z|y|,so that:

(1 − z)|x| = −(1 + z)|y|We have already dealt with the case z = ±1. Otherwise, |y| = − 1−z

1+z|x|. Since |x|, |y| ≥ 0,

we have

−1−z1+z

≥0. Then either both 1

−z and

−1

−z are positive, or both are negative.

That is, we have z < −1 or z > 1.

1

Page 2: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 2/31

WATERLOO SOS EXA M-AID: MATH237

In either case, we can set = 1 and = − 1−1+ ∣∣ to obtain , so the range is (including the case = ±1)

( ) = (−∞, −1] ∪ [1, ∞).

EXERCISE 1. Find the domain and range of the following functions.

(a)  (, ) = ln(1 − ∣∣).

(b) (, ) = cossin .

(c) ℎ(, ) =√ 

1 − 2 − 2

It is difficult to sketch scalar functions from their definition alone. To help us, we look at level curvesand cross-sections.

DEFINITION 1.3. For   : ℝ2

→ℝ, we define the level curves of   to be the curves given by

=  (, ),

where is a constant (in the range of  ).

Sketching level curves is an exercise in solving for equations in two variables. The course notes coverthree excellent examples, which are fairly standard.

EXAMPLE 3. Define a function   by  (, ) = 2 + 22 − 2. Sketch the level curves and use them to sketchthe surface =  (, ).

SOLUTION. From example 1, ( ) = ℝ

2

and ( ) = [−1, ∞). For values of  ≥ −1, we examine 2

+ 22

−2 = . Recall that the equation

( − ℎ)2

2+

( − )2

2= 1

determines an ellipse with major axis length 2, minor axis length 2, shifted ℎ units right and units up.This formula is a more general form of what we have: since there are no terms, we will have = 0 andsince there is a −2 term, we will want ℎ = 1 (to get ( − 1)2 = 2 − 2 + 1). Then if  ∕= −1,

2 + 22 − 2 =

2 − 2 + 1 + 22 = + 1

( − 1)2

+ 1+

22

+ 1= 1

( − 1)2√  + 1

2 + 2 +12

2 = 1.

Thus, 2 + 22 − 2 = describes an ellipse with major axis length 2√ 

+ 1, minor axis length 2 

+12 =√ 

2( + 1), shifted 1 unit right. If  = −1, we get just the single point (−1, 0), and this is the exceptionallevel curve. We can thus generate the image of  , and we get a surface called an elliptical paraboloid.

2

Page 3: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 3/31

WATERLOO SOS EXA M-AID: MATH237

EXERCISE 2. Sketch the level curves and use them to sketch the surface  (, ) = (

−)2.

DEFINITION 1.4. For   : ℝ2 → ℝ, we define the cross-sections of   to be the curves given by

=  (, ) or =  (, )

where , are constants. They correspond to the intersection of the surface with the vertical planes = , = respectively.

EXAMPLE 4. Define a function   by  (, ) = 2 + 22 − 2. Sketch the cross-sections.

SOLUTION. The cross-sections = yield = 2 + 22 − 2 while the cross-sections = yield =2 + 22 − 2. Sketching these for , = 0, 1, . . . , 6,

EXERCISE 3. Sketch the cross-sections for  (, ) = ( − )2.

3

Page 4: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 4/31

WATERLOO SOS EXA M-AID: MATH237

2 Limit Theorems (2.1-2.2)

Notation: We will use underline to denote a vector, for example = (1, 2, . . . , ) ∈ ℝ.

Notation: We will use ∥ ⋅ ∥ to denote Euclidean distance in ℝ. That is, for = (1, 2, . . . , ), =

(1, 2, . . . , )∈ℝ, we have

∥ − ∥ :=

 ⎷ ∑=1

( − )2.

In particular, for = 2 we have for = (, ), = (, ) ∈ ℝ2

∥ − ∥ :=√ 

( − )2 + ( − )2.

Fortunately, our limit theorems from single variable functions are preserved when we move up intohigher dimensions. In particular, we have the following:

THEOREM 2.1. Let , : ℝ → ℝ. If  lim→

 () and lim→

() both exist, then

(a) lim→

[ () + ()] = lim→

 () + lim→

().

(b) lim→

[ ()()] =

lim→

 ()

lim→

()

.

(c) lim→

 ()

()=

lim→

 ()

lim→

(), if  lim

→() ∕= 0.

COROLLARY 2.2. If  lim→

 () exists, then the limit is unique.

It can be difficult to use the formal definition of a limit to find one or prove it exists. The followingtheorem can be used quite frequently to help us in that regard.

THEOREM 2.3 [SQUEEZE THEOREM]. Let   : ℝ → ℝ. If there exists a function () such that ∣ ()−∣ ≤ () for all ∕= () in some neighborhood of  and lim

→() = 0, then lim

→ () = .

3 Proving a Limit Does (Not) Exist (2.3-2.4)

You may notice that the Squeeze Theorem relies on the fact that we begin with a candidate for the limit,. If this is not given, we can test the limiting behaviour of  (, ) as we approach along straight linesof different slopes. If the limiting value is always , this is a possible candidate, and we can try to applySqueeze Theorem. Note that it is possible for a function to have a limit along every straight line, yet stillnot have a limit in the formal sense, so it is important to prove the limit exists. Remember when testing fora limit, use curves that do indeed pass through the point. If we wanted the limit (, ) → (0, 1), it wouldnot help to use lines like = . Another trick for rational functions is to examine the degrees of thenumerator and denominator. For limits going to 0, with potential limit 0, if the degree (maximum sum of the exponents of each factor in a term) is greater in the numerator, the limit will probably exist. If it is lessin the numerator, the limit will probably not exist. If they are the same, nothing can be said in general.

4

Page 5: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 5/31

WATERLOO SOS EXA M-AID: MATH237

EXAMPLE 5. Determine whether lim(,)→(0,0)

2

2 + 2exists, and if so find its value.

SOLUTION. Taking lines = we get

lim(,)→(0,0)

22 + ()2

= lim(,)→(0,0)

1 +

= 0.

We then guess the limit is = 0. Since 2, 2 ≥ 0, ∣2∣ ≤ ∣2 + 2∣. Then 2

2 + 2− 0

≤ ∣2 + 2∣∣∣∣2 + 2∣ = ∣∣.

Since lim(,)→(0,0)

∣∣ = 0 we get lim(,)→(0,0)

2

2 + 2= 0 by the Squeeze Theorem.

EXAMPLE 6. Determine whether lim(,)→(0,0)

√ ∣∣ + 2

exists, and if so find its value.

SOLUTION. Taking lines = we get

lim(,)→(0,0)

√ ∣∣

+ ()2= lim

(,)→(0,0)

√ 

∣∣1 + 2

= 0.

This covers every non-vertical line. Finally for = 0,

lim(,)→(0,0)

√ 0

0 + 2= lim

(,)→(0,0)0 = 0.

This seems to indicate the limit should be 0. However, notice the degree (sum of the degrees of  and ) onthe numerator is 3

2 while it is 2 on the denominator. This suggests the denominator goes to zero faster, sothat the limit does not exist. Indeed, along the curve = 2, we have

lim(,)→(0,0)

√ ∣2∣

2 + 2=

{12 for → 0+,

− 12 for → 0−,

so the limit does not exist.

EXERCISE 4. Determine whether lim(,)→(0,0)

 (, ) exists for the following functions, and if so find its value.

(a)  (, ) = 2++2

2+2 .

(b)  (, ) = 2++2

2+2 .

(c)  (, ) = ∣∣44+4

, for > 0.

5

Page 6: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 6/31

WATERLOO SOS EXA M-AID: MATH237

4 Continuity Theorems (3.1-3.2)

The definition of continuity for multi-variable functions is very similar to that of single-variable functions.

DEFINITION 4.1. A function   : ℝ

→ℝ is continuous at if and only if  lim

 () =  (). If   is continuous

at every point in a set ⊂ ℝ, we say that   is coninuous on .

Note that by stating the equality, we are implicitly requiring the limit to exit, the value to be defined at, and for the equality itself to hold.

EXAMPLE 7. Let   : ℝ2 → ℝ be defined by  (, ) = 22+2 . Determine whether   is continuous at (0, 0).

SOLUTION. Notice  (, ) is not even defined at (0, 0), so it will not be continuous.

EXAMPLE 8. Let   : ℝ2 → ℝ be defined by

 (, ) =

{2

2+2 if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

Determine whether   is continuous at (0, 0).

SOLUTION. By example 5, lim(,)→(0,0)

2

2 + 2= (0, 0) =  (0, 0), so   is continuous at (0, 0).

EXERCISE 5. Let   : ℝ2 → ℝ be defined by  (, ) =

{ sin 2+2 if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

Determine whether   is continuous at (0, 0).

Some functions can be shown to be continuous by relying on information about how it is formed usingsimpler functions. To do this, we first define some operations on functions.

DEFINITION 4.2. Let , : ℝ → ℝ and ∈ ( ) ∩ (). We define

(a) the sum   + : ℝ → ℝ by(  + )() =  () + (),

(b) the product : ℝ → ℝ by( )() =  ()(),

(c) the quotient   : ℝ → ℝ by

 

() =

 ()

(), if () ∕= 0.

6

Page 7: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 7/31

WATERLOO SOS EXA M-AID: MATH237

For ℎ : ℝ → ℝ, we also define the composition ℎ ∘   : ℝ → ℝ by

(ℎ ∘  )() = ℎ( ()),

for all such that  () ∈ (ℎ).

As with the limit theorems, our continuity theorems from single variable functions are preserved whenwe move up into higher dimensions. In particular, we have the following:

THEOREM 4.3. Suppose , : ℝ → ℝ are continuous at , and ℎ : ℝ → ℝ is continuous at  (). Then   + , , / (if () ∕= 0), and ℎ ∘   are continuous at .

The following functions are “known” (i.e. can be easily proven, left as exercise) to be continuous on theirdomains:

(a) the constant functions  () =

(b) the coordinate functions  (1, 2, . . . , ) = 1,  (1, 2, . . . , ) = 2, . . . ,  (1, 2, . . . , ) =

(c) the logarithm function ln()

(d) the exponential function

(e) the trigonometric functions sin(), cos()

(f) the inverse trigonometric functions arcsin(), arccos()

(g) the absolute value function ∣∣

EXAMPLE 9. On what set is  (, ) = cos( 22+2 ) continuous?

SOLUTION. Applying our continuity theorems to the coordinate functions, 2 and 2 + 2 are continuous,

and hence their quotient 22+2 is continuous except at (0, 0), where 2 + 2 = 0. Then by composing with

cosine which is continuous,  (, ) is continuous on ℝ2 ∖ (0, 0).

We can use these in conjunction with our work on limits to decide if functions are continuous, and onwhat set.

EXAMPLE 10. Define   : ℝ2 → ℝ by

 (, ) =

{2

2+2if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

On what set is  (, ) continuous?

SOLUTION. Recall we showed  (, ) is continuous at (0, 0) in example 8. By work done in example 9, (, ) is also continuous except at (0, 0). Hence,  (, ) is continuous on all of ℝ2.

7

Page 8: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 8/31

WATERLOO SOS EXA M-AID: MATH237

EXERCISE 6. Define   : ℝ2 → ℝ  by  (, ) = 2+2+2 for (, ) ∕= (0, 0). Can   be defined at (0, 0) so that   is

continuous?

5 Limits Revisited (3.3)

Using our knowledge of continuity and its definition, certain limits become easier by simply evaluating thefunction at the point.

EXAMPLE 11. Evaluate lim(,)→(0,1)

 (, ) where  (, ) = cos( 22+2 ).

SOLUTION. By continuity theorems (see example 9),  (, ) is continuous except at (0, 0), hence it is contin-uous at (0, 1). By the definition of continuity,

lim(,)→(0,1)

 (, ) =  (0, 1) = cos

0

1

= 1.

REMARK 5.1. Notice we may have implicitly assumed continuity and utilized the above method of calcu-lating limits in the previous section. For example, we use facts like lim

(,)→(0,0)∣∣ = 0 (recall example 5). This

is true, and we might be tempted to argue that since ∣∣ is continuous, our continuity theorem ensures that∣∣ is continuous and thus by the definition of continuous, we have lim

(,)→(0,0)∣∣ = 0. However, we need

to prove ∣∣ is continuous first, which is equivalent to proving lim(,)→(0,0)

∣∣ = 0! In fact, we never used

continuity results in the previous section. We implicitly used the formal definition of limits in the

− 

sense. Indeed, for any > 0, take   = . Then if ∥(, ) − (0, 0)∥ <  , we have

∣∣∣ − 0∣ =√ 

2 ≤√ 

2 + 2 = ∥(, ) − (0, 0)∥ <   = ,

so lim(,)→(0,0)

∣∣ = 0. To use the squeeze theorem, you should bound the function by a function () which

is a basic continuous function.

6 Partial Derivatives (4.1-4.2)

DEFINITION 6.1. Let   : ℝ → ℝ. The partial derivatives of   at are defined by

∂ 

() = limℎ→

0

 (1, 2, . . . , + ℎ , . . . , ) −  (1, . . . , )

,

provided the limit exists. For example, if    : ℝ2 → ℝ, then the partials at (, ) are:

∂ 

∂(, ) = lim

ℎ→0

 ( + ℎ, ) −  (, )

ℎ,

∂ 

∂(, ) = lim

ℎ→0

 (, + ℎ) −  (, )

ℎ,

8

Page 9: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 9/31

WATERLOO SOS EXA M-AID: MATH237

provided the limits exist.

Notice the definition of a partial derivative is the same as usual differentiation in one variable, where we

fix all other variables. In two variables, geometrically ∂ ∂

is the slope of the tangent of the curve formed bythe cross section holding the other variable fixed at the point, and physically, it is a measure of the change

in a function in one coordinate direction. Usually, we will try to calculate the partial derivatives by usingthe standard differentiation rules in one variable.

EXAMPLE 12. Let   : ℝ2 → ℝ be defined by  (, ) = 22 − 2 cos(). Calculate ∂ ∂ and ∂ 

∂ at an arbitrarypoint.

SOLUTION. By differentiation rules for single variable,

∂ 

∂= 22 + 2 sin(),

∂ 

∂= 22

−2 cos().

Sometimes, we cannot apply the rules of differentiation, and must instead use the definition of thepartial derivatives.

EXAMPLE 13. Let   : ℝ2 → ℝ be defined by

 (, ) =

{2

2+2 if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

Determine if 

∂ 

∂(0, 0)

and

∂ 

∂(0, 0)

exist, and if so find their values.

SOLUTION. In this case, we cannot substitute (0, 0) into the equation, so we use the definition of partialderivatives:

∂ 

∂(0, 0) = lim

ℎ→0

 (0 + ℎ, 0) −  (0, 0)

ℎ= lim

ℎ→0

0ℎ2

ℎ= lim

ℎ→00 = 0,

∂ 

∂(0, 0) = lim

ℎ→0

 (0, 0 + ℎ) −  (0, 0)

ℎ= lim

ℎ→0

0ℎ2

ℎ= lim

ℎ→00 = 0.

EXERCISE 7.

Calculate

∂ 

∂ and

∂ 

∂ at(0, 0)

(if they exist) for the following functions.(a)  (, ) = ln(1 + + ).

(b) (, ) =

{3

4+∣∣ if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

9

Page 10: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 10/31

WATERLOO SOS EXA M-AID: MATH237

Consider   : ℝ2 → ℝ. There are two first partial derivatives,   and  . Each of these are functions of , again, so we may take their partial derivatives, to obtain the second partial derivatives of  . Thus, weget four possible second derivatives of  :

∂ 2 

∂2

=∂ 

∂∂ 

∂ ,

∂ 2 

∂∂

=∂ 

∂∂ 

∂ ,

∂ 2 

∂∂=

∂ 

∂ 

,

∂ 2 

∂2=

∂ 

∂ 

.

We have subscript and operator notation in this case as well, for ease of notation:

∂ 2 

∂2=   = 2

1,∂ 2 

∂∂= = 21,

∂ 2 

∂∂=   = 12,

∂ 2 

∂2=   = 2

2.

Remember to not get the order of the variables confused in the various notations. Subscript notationreads left to right (differentiate with respect to the left variable first, then the right), while operator and

standard notation read right to left (differentiate with respect to the right variable first, then the left).We can write out all of the second partial derivatives of a scalar function on ℝ2 in a 2 × 2 matrix.

DEFINITION 6.2. Let   : ℝ2 → ℝ. The Hessian matrix of  , denoted by  ( ), is defined as

 (, ) =

      

.

EXAMPLE 14. Let   : ℝ2 → ℝ be defined by  (, ) = 22−2 cos(). Find all the second partial derivativesof  .

SOLUTION. By differentiation rules for single variable (recall example 12), we have

∂ 

∂= 22 + 2 sin(),

∂ 

∂= 22 − 2 cos().

Then applying differentiation rules a second time yields

∂ 2 

∂2=

∂ 

[22 + 2 sin()

]= 22 + 2 cos(),

∂ 2 

∂∂

=∂ 

∂[22 + 2 sin()] = 4 + 2 sin(),

∂ 2 

∂∂=

∂ 

[22 − 2 cos()

]= 4 + 2 sin(),

∂ 2 

∂2=

∂ 

[22 − 2 cos()

]= 22.

You may have noticed that in the previous example,   =  . A natural question is to ask if this alwaysholds; in fact this is not always true, but we can get a weaker condition.

10

Page 11: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 11/31

WATERLOO SOS EXA M-AID: MATH237

THEOREM 6.3. Let   : ℝ2 → ℝ. If   and   are defined in some neighborhood of  (, ) and are continuous at(, ), then  (, ) =  (, ).

We can generalize these ideas to higher-order partial derivatives. For example,   : ℝ2 → ℝ has eightthird partial derivatives,

 ,  ,  ,  ,  ,   ,   ,   .

It turns out that continuous partial derivatives is a very nice property. We introduce some notation inthis case.

DEFINITION 6.4. Let   : ℝ → ℝ. If the -th partial derivatives of   are continuous, then we write   ∈  

and say   is in class  . For example, if    : ℝ2 → ℝ and   ∈  2, then   has continuous second partialderivatives. Notice by Theorem 6.3 this implies   =  .

7 Linear Approximations (4.3-4.4)

Having discussed partial derivatives, we are well on our way to defining differentiability in multiple vari-ables. Recall that in 1-dimension, the “tangent line” can be used to approximate the graph of a functionnear the point of tangency. The equation of the tangent line to =  () at the point (,  ()) is given by

=  () +  ′()( − ).

This equation defines a function : ℝ → ℝ via () =  ()+ ′()(−), called the linear approximationof    at = , since it is a linear equation that approximates   at = . We write this approximation by () ≈ () for sufficiently close to .

DEFINITION 7.1. Analogously, for   : ℝ2 → ℝ we define the linear approximation (,)(, ) of    at (, ) by

(,)(, ) =  (, ) +∂ 

∂(, )( − ) +

∂ 

∂(, )( − ).

This plane approximates  (, ) near (, ). We write this as  (, ) ≈ (,)(, ) for (, ) sufficiently closeto (, ). This is also known as the tangent plane to =  (, ) and the point (,, (, )). You may noticewe are implicitly assuming the partial derivatives exist; we will develop a more rigorous definition of thetangent plane in a later section.

EXAMPLE 15. Define  (, ) = tan − cos . Find the tangent plane (linear approximation) at the point(34 ,

2 ).

SOLUTION. By standard differentiation rules,

  = sec2

(or 1 + tan2

),  = sin .

Then the tangent plane is given by

=  ( 34 , 2 ) +  ( 34 ,

2 )( − 34 ) +  (34 ,

2 )( − 2 )

= tan( 34 ) − cos(2 ) + sec2( 34 )( − 34 ) + sin(2 )( −

2 ) = −1 + 2( − 34 ) + ( −

2 ).

Note: it is helpful to brush up on your trigonometric functions.

11

Page 12: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 12/31

WATERLOO SOS EXA M-AID: MATH237

EXERCISE 8. Verify each approximation (remember, don’t immediately try to expand the terms):

(a) 2

2

+2

≈2

5

+ 16

25

(−

1)−

3

25

(−

2), for (, ) sufficiently close to (1, 2).

(b) ln( + + 1) ≈ + , for (, ) sufficiently close to (0, 0).

(c) exp(2 − 2) ≈ 1 + 4( − 2) − 4( − 2), for (, ) sufficiently close to (2, 2).

EXAMPLE 16. Calculate tan(198 ) − cos(32) approximately (Use ≈ 3.14). Compare with the calculator value.

SOLUTION. Notice 198 = 9.5

4 ≈ 34 and 3

2 ≈ 2 .

REMARK 7.2. This may seem arbitrary at first, but our strategy is to try to find points at which we know thevalue of tan and cos without a calculator. For example, we should know or be able to work out tan0 = 0,tan(6 ) = 1√ 

3, tan(±

4 ) = 1, tan(±3 ) =

√ 3, and so on. We know how to handle odd multiples of  4 (it is

±1), and we are given 198 , whose denominator happens to be a multiple of 4. Writing 19

8 = 9.54 , we look

for an odd multiple of  that will be approximately 9.5. Even making the estimate that = 3.14, we have3 ≈ 9.42 ≈ 9.5.

Define  (, ) = tan − cos . Recall we showed in example 15 the linear approximation at ( 34 , 2 ) is

given by

 (, ) ≈ −1 + 2( − 34 ) + ( −

2 ),

⇒  ( 198 , 32) ≈ −1 + 2( 198 − 3∗3.14

4 ) + ( 32 − 3.142 )

=

−1 + 2( 198

−18.868 ) + ( 32

−3.142 )

= −1 + 0.164 + 0.14

2 = −1 + 0.04 − 0.07 = −1.03.

The calculator gives us a value of about −1.034, for an error of about 0.004.

EXERCISE 9. Calculate the following approximately (compare with the calculator value):

(a)√ 

120 + 3√ 

65.

(b) 2 − cos + sin at (, ) = (0.01, 3.10).

Notation: For   : ℝ2 → ℝ and a point (, ), define

Δ = − , Δ = − , Δ  =  (, ) −  (, ).

By rearranging  (, ) in the linear approximation formula,

 (, ) −  (, ) ≈ ∂ 

∂( − ) +

∂ 

∂( − ),

12

Page 13: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 13/31

WATERLOO SOS EXA M-AID: MATH237

which in our new notation becomes

Δ  ≈ ∂ 

∂Δ +

∂ 

∂Δ.

That is, we have a formula for the approximate change in   due to a change (Δ, Δ). We call this theincrement form of the linear approximation formula.

EXERCISE 10. Suppose a triangle has two sides (say and ) of length 1 m, and the angle between them is6 . If  is increased by 1 cm and decreases by 1 cm, estimate the change in area.

The linear approximation formula becomes unwieldy when generalizing to higher dimensions. To helpus out, we introduce a new definition.

DEFINITION 7.3. Let   : ℝ → ℝ. The gradient of   at is defined by

∇ () = ( 1(),  2(), . . . ,  ()).

DEFINITION 7.4. For   : ℝ → ℝ we define the linear approximation () of    at by

() =  () + ∇ () ⋅ ( − ).

We write  () ≈  () + ∇ () ⋅ ( − ) for sufficiently close to . In the increment form, we have

Δ  ≈ ∇ () ⋅ Δ,

for Δ sufficiently close to zero. (Δ  =  () −  (), and Δ = (Δ1, Δ2, . . . , Δ) = (1 − 1, 2 −2, . . . , − ).)

EXERCISE 11. Define   : ℝ3 → ℝ by  (,,) = sin() + 2 + √  + . Find the gradient of   and thelinear approximation for   at (1, 2, 3).

EXERCISE 12. Use linear approximation to estimate√ 

99 + 3√ 

28 + 4√ 

624. Compare with the calculator value.

8 Differentiability (5.1)

In the last section, we defined the linear approximation of    and had  ()

≈() for sufficiently close

to , where() =  () + ∇ () ⋅ ( − ).

It is a natural question to ask: how good is the approximation?

DEFINITION 8.1. The error in the linear approximation is defined by

1, =  () − ().

13

Page 14: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 14/31

WATERLOO SOS EXA M-AID: MATH237

We will consider how large 1, is compared to the displacement ∥ − ∥. In one variable, we see theerror is relatively small.

THEOREM 8.2. If   : ℝ → ℝ and  ′() exists, then lim→

∣1,()∣∣−∣ = 0.

We use this idea to define an analogous notion of differentiability in higher dimensions.

DEFINITION 8.3. A function   : ℝ2 → ℝ is differentiable at = (, ) if and only if there is a linear function() =  (, ) + ( − ) + ( − ) such that

lim→

∣1,()∣∥ − ∥ = 0,

where1,() =  () − ().

Fortunately, all our work with linear approximation has not been in vain.

THEOREM 8.4. If   : ℝ2 → ℝ is differentiable at = (, ) with linear function () =  (, )+(−)+(−),then () is the linear approximation of   at , i.e. =  (, ) and =  (, ).

REMARK 8.5. (a) Thus to prove   : ℝ2 → ℝ is differentiable, we simply need to prove

lim→

∣1,()∣∥ − ∥ = 0,

where1,() =  () − ().

(b) To prove it is not differentiable, either this limit is not 0, or the partial derivatives of    don’teven exist (and so the linear approximation does not exist).

(c) This theorem also tells us that the linear approximation for   is a good approximation if   isdifferentiable, that is, the error goes to 0 faster than the magnitude of the displacement.

EXAMPLE 17. Let   : ℝ2 → ℝ be defined by

 (, ) =

{2

2+2if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

Determine whether   is differentiable at (0, 0).

SOLUTION. We first check if  (0,0)(, ) exists, that is, if the partial derivatives at (0, 0) exist. Recall fromexample 13 that they do (or work it out again), and

 (0, 0) = 0 =  (0, 0).

14

Page 15: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 15/31

WATERLOO SOS EXA M-AID: MATH237

Since  (0, 0) = 0, the linear approximation is (0,0)(, ) = 0, and the error is

1,(0,0)(, ) =  (, ) − (0,0)(, ) =

{2

2+2 if (, ) ∕= (0, 0),

0 if (, ) = (0, 0),

and the magnitude of displacement is

∥(, ) − (0, 0)∥ =√ 

2 + 2.

Now along the line = , we have

∣1,(0,0)(, )∣∥(, ) − (0, 0)∥ =

∣ 22+2 ∣√ 2 + 2

=12 ∣∣√ 2∣∣ =

1

2√ 

2∕= 0,

so by definition,   is not differentiable at (0, 0).

EXERCISE 13. Define  (, ) = ∣∣. Prove that   is differentiable at (, ) = (0, 0), yet not at (, ) = (1, 0).Contrast this to the case in single variable, when () = ∣∣ is differentiable at = 1 yet not at = 0.

Now that we have the definition of differentiability, we can give a formal definition of the tangent plane.

DEFINITION 8.6. Suppose   : ℝ2 → ℝ is differentiable at (, ). The tangent plane of  =  (, ) at the point(,, (, )) is the plane given by

=  (, ) +  (, )( − ) +  (, )( − ).

Notice this is the graph of the linear approximation.

EXERCISE 14. Suppose   : ℝ2 → ℝ is differentiable at (, ). Is it possible to find a plane   (, ) such thatthe error in approximating the surface using   is strictly less than the error in approximating the surfaceusing the tangent plane?

9 Partial Derivatives, Continuous Functions, and Differentiable Func-

tions (5.2-5.3)

We now look at the various connections between partial derivatives, continuous functions, and differen-

tiable functions. Recall in one variable:  () differentiable at implies  () is continuous at . In twodimensions, we will have the analogous result that if  (, ) is differentiable at (, ), then  (, ) is contin-uous at (, ).

THEOREM 9.1. Let   : ℝ2 → ℝ. If   is differentiable at (, ), then   is continuous at (, ).

15

Page 16: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 16/31

WATERLOO SOS EXA M-AID: MATH237

EXERCISE 15. Show the converse to Theorem 9.1 is not true, i.e. find a function which is continuous at (, ), but is not differentiable at (, ). Hint: Look at a previous exercise.

What about the partial derivatives that we have developed? Is their existence sufficient for continuity?

EXAMPLE 18. Define   : ℝ2 → ℝ by

 (, ) =

{√ ∣∣

+2 if (, ) ∕= (0, 0),

0 if (, ) = (0, 0).

Prove  (0, 0) = 0 =  (0, 0), yet   is not continuous at (0, 0).

SOLUTION. Using the definition of partial derivatives,

 (0, 0) = limℎ→0

 (ℎ, 0)

− (0, 0)

ℎ = limℎ→0

0ℎ

ℎ = 0,

 (0, 0) = limℎ→0

 (0, ℎ) −  (0, 0)

ℎ= lim

ℎ→0

0ℎ2

ℎ= 0.

Thus, both partial derivatives exist. However, recall we showed in example 6 that the limit as (, ) → (0, 0)does not exist. Indeed, for = 0 we get

lim(,)→(0,0)

√ 0

0 + 2= lim

(,)→(0,0)0 = 0,

while for = 2, we get

lim(,)→(0,0)

√ ∣2∣2 + 2 ={1

2

for →

0+,

− 12 for → 0−.

Thus,   is not continuous at (0, 0).

It can be tedious to always go back to the definition of differentiability to prove a function is differen-tiable. Fortunately, we have a shortcut.

THEOREM 9.2. Let   : ℝ2 → ℝ. If   and   are continuous at (, ), then   is differentiable at (, ). (This theorem generalizes to dimensions in the natural way.)

REMARK 9.3. It is important to distinguish between

(a)  , which is a function (, ) →  (, ), and

(b)  (, ), which is the partial derivative of   with respect to , evaluated at (, ).

For example, when proving the partial derivative with respect to is continuous at (, ), you must provethe function   is continuous at (, ), i.e.

lim(,)→(,)

 (, ) =  (, ).

16

Page 17: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 17/31

WATERLOO SOS EXA M-AID: MATH237

EXAMPLE 19. Let   : ℝ2 → ℝ be defined by  (, ) =√ 

2 + 2. Determine where   is differentiable.

SOLUTION. By differentiation,  =

√ 2 + 2

,

for (, ) ∕= (0, 0). By the continuity theorems,   is continuous for (, ) ∕= (0, 0). By symmetry,   iscontinuous for (, ) ∕= (0, 0). Then by Theorem 9.1,   is differentiable for all (, ) ∕= (0, 0).

However, we have not finished the question - we have not determined differentiability at (0, 0). In caseslike this, we will have to go back to the definition of differentiability. I leave the final step of proving   isnot differentiable at (0, 0) as an exercise.

EXERCISE 16 [CHALLENGE ]. Show the converse to Theorem 9.2 is not true, i.e. find a function which is

differentiable at (, ), yet the partial derivatives are not continuous at (, ). Hint: Try thinking about afunction which oscillates rapidly as you approach the origin.

EXERCISE 17. Find a function whose directional derivative exists in every direction at a point , yet is notdifferentiable at . Hint: Find such a function that is not even continuous at . If you’re interested, you canalso find such a function which is continuous, but not differentiable.

10 Linear Approximation Revisited (5.4)

Recall by definition of differentiability, the linear approximation for   is a good approximation if   is differ-

entiable. Now that we can apply Theorem 9.2, we can usually verify the validity of approximations mucheasier.

EXAMPLE 20. Discuss the validity of the approximation

tan − cos ≈ −1 + 2( − 34 ) + ( −

2 ).

SOLUTION. Write  (, ) = tan − cos . Recall in example 15, by standard differentiation rules we get

∇ (, ) = (sec2 , sin ),

and at (34 , 2 ),

∇ (

3

4 ,

2 ) = (2, 1),so the linear approximation is

(34 ,

2)(, ) = −1 + 2( − 3

4 ) + ( − 2 ).

By the continuity theorems,   and   are continuous at (34 , 2 ), so that   is differentiable at ( 34 ,

2 ). Thus,

tan − cos ≈ −1 + 2( − 34 ) + ( −

2 ).

gives a good approximation for (, ) sufficiently close to (34 , 2 ).

17

Page 18: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 18/31

WATERLOO SOS EXA M-AID: MATH237

EXERCISE 18. Discuss the validity of the approximation

ln(2 + 2)

≈2(

−1).

11 Basic Chain Rule (6.1)

THEOREM 11.1. Suppose   : ℝ2 → ℝ, : ℝ → ℝ, and : ℝ → ℝ. Let () =  ((), ()), and let = (0)and = (0). If   is differentiable at (, ) and ′(0) and ′(0) exist, then ′(0) exists. Moreover, we have theequation

′(0) =  (, )′(0) +  (, )′(0).

To get an intuition of this theorem, it helps to think of a physical model (a similar example is in yourcourse notes). Consider a metal plate which is heated and cooled non-uniformly. The temperature  (, )is a function of  and , the position on the plate. The increment form of the linear approximation formulagives the change in   corresponding to changes in and :

Δ  ≈ ∂ 

∂Δ +

∂ 

∂Δ,

for Δ, Δ sufficiently small. Suppose we are making measurements at various positions over time; wehave = (), = (). Dividing by Δ and taking the limit forces the error to disappear and we get therate of change of the temperature as we measure to be

 

=

∂ 

+

∂ 

.

It is important to note that this is not a proof; it is merely a tool for understanding the chain rule. As withother theorems, refer to your course notes for the proof.

EXERCISE 19. Show the converse to Theorem 11.1 is not true, i.e. find functions (), (),  (, ), and () = ((), ()) such that (), (), and () are differentiable at 0 with

′(0) =  ((0), (0))′(0) +  ((0), (0))′(0),

yet   is not differentiable at ((0), (0)). Hint: Look at a previous exercise.

EXAMPLE 21. Suppose  (, ) = sin + cos , () = 4 and () = 2 + 3. Find  

at = 0.

SOLUTION. At = 0, we have ((0), (0)) = (4 , 0) We have

  = sin + cos ,   = cos − sin .

These are continuous at (4 , 0), so   is differentiable at (4 , 0). We also have , differentiable at = 0, with

′() = 4 , ′() = 2 + 3.

18

Page 19: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 19/31

WATERLOO SOS EXA M-AID: MATH237

Then by the chain rule,

 

(0) =  (4 , 0)′(0) +  (4 , 0)′(0)

= (sin(0) + cos(0))(4 0) + (4 cos(0) − 4 sin(0))(2(0) + 3)

=4 +

4 3 = .

EXERCISE 20. Define  (, ) = cos(2 + 2), = 1 , = sin . Verify the chain rule theorem by calculating  

at =

3 in two ways.

EXERCISE 21. Suppose   : ℝ2 → ℝ is differentiable, and define () =  (, ). Let () = 2

, () =ln(1 + 2). Write out the chain rule for ′(). If ∇ (1, 0) = (,

√ 2), calculate ′(0).

Notation: Recall for a function   : ℝ2 → ℝ defined by  (, ), and = (), = (), the chain rule gives

 

=

∂ 

+

∂ 

.

In vector notation, this reads 

= ∇  ⋅

,

or, to be clear about the action of  ,

 (()) = ∇ (()) ⋅

,

with () = ((), ()). This notation allows us to easily generalize the chain rule to dimensions. For

  :ℝ

→ℝ

defined by  (1(), 2(), . . . , ()) =  (), we have

 (()) = ∇ (()) ⋅

.

EXERCISE 22. Suppose   : ℝ3 → ℝ is differentiable, and define () =  (,,). Let () = sin(), () =cos(), () = + 1. Write out the chain rule for ′(). If ∇ (0, 1, 2) = (1, 2, 3), calculate ′(0).

12 Extensions of the Chain Rule (6.2)

EXAMPLE 22. We have shown the chain rule in a very specific setting, when a function   : ℝ → ℝ dependson intermediate variables, each of which are dependent on an independent variable . Now suppose thereare two independent variables, say

=  (, ), = (, ), = (, ),

where ,, are differentiable. What is the chain rule for ?

19

Page 20: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 20/31

WATERLOO SOS EXA M-AID: MATH237

SOLUTION. Since is a function of two variables and , we write a chain rule for each of  ∂∂ and ∂∂ .

∂=

∂+

∂,

∂=

∂+

∂.

It may help to draw a diagram of the chain of dependence. In the previous case of only one independentvariable,

This diagram represents how is dependent on and , each of which are dependent on the independent

variable . Now with two independent variables, we get

We can use these dependence diagrams to obtain a chain rule via the following algorithm:

(1) Consider all possible paths from the differentiated variable to the differentiating variable.

(2) For each link in a given path, differentiate the upper variable with respect to the lower variable.(3) Multiply all derivatives found in step 2.

(4) Add all products from step 3, summing over the possible paths.

REMARK 12.1. (a) Remember to hold the correct variables fixed when taking the partial deriva-tives. For example, ∂

∂ means regard as a function of , , differentiate with respect to whileholding fixed.

(b) As before, we need all partial derivatives we take to exist in to guarantee the validity of thechain rule.

EXAMPLE 23. Let   : ℝ2 → ℝ be differentiable and let =  (, ), where = 1 − 1

and = 1 − 1

. Compute

2 ∂∂ + 2 ∂∂ + 2 ∂∂ .

SOLUTION. The dependence diagram is:

20

Page 21: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 21/31

WATERLOO SOS EXA M-AID: MATH237

We can then use our algorithm to find the partial derivatives. To find ∂∂ , there are two paths: along the

path and along the path. We can make a similar argument for the partial derivatives with respect to and, and we get:

∂=

∂+

∂= ( )

− 1

2

+ ( )(0),

∂=

∂+

∂= ( )

1

2

+ ( )

− 1

2

,

∂=

∂+

∂= ( )(0) + ( )

1

2

.

Then

2∂

∂+ 2

∂+ 2

∂= −  +   −   +   = 0.

EXAMPLE 24. We can also have a function that depends directly on the independent variable, say

() =  (,,), = (), = (),

where ,, are differentiable, and the partial derivative of  with respect to exists. What is the chain rulefor ?

SOLUTION. The dependence diagram is

Then by our algorithm,

=

+

+

∂.

Notice is the ordinary derivative of  as a composite function of , while

∂∂ is the partial derivative of 

as a function of ,,, with , fixed. To avoid confusion, we recall =  (,,) and we might write

=  ((), (), )′() +  ((), (), )′() +  ((), (), )

′() =  ′() +  ′() +  .

21

Page 22: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 22/31

WATERLOO SOS EXA M-AID: MATH237

EXAMPLE 25. What happens if we have a function that depends directly on two independent variables? Forexample, suppose

(, ) =  (,, ,), = (, ), = (, ),

where all functions are differentiable. What is the chain rule for ?

SOLUTION. The dependence diagram is

Then by our algorithm,∂

∂=

∂+

∂+

∂.

In paticular, notice we have the symbol ∂

appearing on both sides of the equation - do not get confused by this! On the left hand side, we are considering as the composite function of  , and taking the partialderivative with respect to . On the right hand side, we are considering as a function of  ,, ,, andholding ,, fixed. To avoid confusion, we recall =  (,, ,) and we might write

∂=  ((, ), (, ), , )(, ) +  ((, ), (, ), , )(, ) +  ((, ), (, ), , )

(, ) =  (, ) +  (, ) +  .

EXERCISE 23. Suppose   : ℝ2 → ℝ, with. Let =  ( , ). Calculate + + . What assumptions

on   must be made?

EXAMPLE 26. Thus far we have only dealt with chain rule for the first (partial) derivative. Suppose = (, ), with =

√ 2 + 2, = , and   is twice differentiable. Find the chain rule for .

SOLUTION. To find the chain rule for the second derivative, we follow the same type of algorithm. To begin,we must calculate the first (partial) derivative using the chain rule. The dependence diagram is

Then by our algorithm,

(, ) =  (, )(, ) +  (, )(, )

=  (, ) √ 2+2

+  (, ).

Then is dependent on ,, ,, where , are each dependent on , . We get the dependence diagram

22

Page 23: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 23/31

WATERLOO SOS EXA M-AID: MATH237

Then by our algorithm,

=∂

∂+

∂+

∂.

We then calculate ∂∂ in the usual way. Since is fixed,

∂=

∂ √ 

2+2+  

=∂ ∂

√ 2 + 2

+∂ ∂

=  √ 

2+2+  .

Similarly,

∂=  

√ 2+2

+  .

Finally, holding ,, fixed gives

∂=  

(− √ 

2+23

)+  ( + ).

Then

=(

 √ 

2+2+  

)√ 

2+2+(

 √ 

2+2+  

) +  

(− √ 

2+23

)+  ( + ).

EXERCISE 24. Suppose   : ℝ2 → ℝ is twice differentiable. Define (, ) =  ( + , + ) for constants,,,. Find , , , , .

13 Directional Derivatives (7.1)

In this section, we generalize our notion of partial derivative. Recall   was the rate of change in   alongthe -direction, while   was the rate of change in   along the -direction. To get more information aboutthe behaviour of  , we would like to consider how it changes along arbitrary lines.

DEFINITION 13.1. The directional derivative of   : ℝ → ℝ at a point in the direction of a unit vector isdefined by

 () = lim→0

 ( + ) −  ()

,

provided this limit exists. Notice if  ( + ) is differentiable at = 0, this becomes

 () =

 ( + )

=0

.

23

Page 24: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 24/31

WATERLOO SOS EXA M-AID: MATH237

For 2 dimensions consider the intersection of the vertical plane parallel to the vector at , with thesurface =  (). Geometrically, the directional derivative is the slope of the tangent of this intersection atthe point (,  ()).

REMARK 13.2. (a) If we choose = (1, 0) or = (0, 1), then the directional derivative is thepartial derivatives   and   respectively.

(b) Remember that to apply the definition, we require to be a unit vector.

EXAMPLE 27. Define   : ℝ2 → ℝ by  (, ) = 3 + 2 + 2. Find the directional derivative of   at the point(2, 1) in the direction (5, 12).

SOLUTION. Since (5, 12) is not a unit vector, we must first normalize:

=(5, 12)

∥(5, 12)∥= 5

13

,12

13 .

Then since   is differentiable,

 (2, 1) =

 

(2, 1) +

5

13,

12

13

=0

=

 

2 +

5

13, 1 +

12

13

=0

=

2 +

5

13

3

+

2 +

5

13

21 +

12

13

+

1 +

12

13

2

=0

= 35

13

2 +

5

13

2

+ 25

13

2 +

5

13

1 +

12

13

+

2 +

5

13

212

13

+ 2

12

13

1 +

12

13

=0

=15

13⋅ 4 +

10

13⋅ 2 ⋅ 1 + 4 ⋅ 12

13+

24

13=

152

13.

There is an easier way to calculate directional derivatives, if    is differentiable. If it is not, you must go back to the limit definition, be careful of this (Recall the partial derivatives can exist and the function not bedifferentiable).

THEOREM 13.3. If   : ℝ → ℝ is differentiable at , then

 () = ∇ () ⋅ .

EXAMPLE 28. Define   : ℝ2 → ℝ by  (, ) = 3 + 2 + 2. Find the directional derivative of   at the point(2, 1) in the direction (5, 12) using Theorem 13.3.

SOLUTION. Since   is differentiable at (2, 1), Theorem 13.3 applies. Again, we must first normalize:

=(5, 12)

∥(5, 12)∥ =

5

13,

12

13

.

24

Page 25: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 25/31

WATERLOO SOS EXA M-AID: MATH237

We have∇  = (32 + 2,2 + 2),

so that

 ((2, 1)) =

∇ (2, 1)

= (3(2)2 + 2(2)(1), (2)2 + 2(1)) ⋅

513

,1213

= (16, 6) ⋅

5

13,

12

13

=

80

13+

72

13=

152

13.

EXERCISE 25. Define   : ℝ2 → ℝ by  (, ) =√ 

. Find the directional derivative of   at the point (1, 0) inthe direction (1, 1).

EXERCISE 26. Define   : ℝ3 → ℝ by  (,,) = cos + sin + tan . Find the directional derivative of   atthe point (3 ,

4 , 6 ) in the direction (1, 2, 2).

14 Gradient Vector Revisited (7.2-7.3)

Since there are infinitely many possible directions from a point , there are in general infinitely manyvalues for the directional derivative  (). We may want to find some special information about particulardirectional derivatives; in particular, we would like to know in which direction is the directional derivativemaximized. The following theorem allows us to answer this in certain cases.

THEOREM 14.1. If   : ℝ → ℝ is differentiable at and ∇ () ∕= 0, then the largest value of  () is ∥∇ ()∥,

and occurs when is the direction of ∇ ().More generally, with the hypothesis of Theorem 14.1 we have

∇ () ⋅ = ∥∇ ()∥ cos ,

so we can potentially determine directions in which the directional derivative is any proportion of themaximum value (between 0 and 1).

EXAMPLE 29. Define   : ℝ2 → ℝ by  (, ) = 3 + 2 + 2. Find the largest rate of change of    at the point(2, 1), and the direction in which it occurs.

SOLUTION. Recall example 28. Notice   is differentiable at (2, 1) and

∇ (2, 1) = (32 + 2,2 + 2)∣(,)=(2,1) = (16, 6) ∕= (0, 0).

Then Theorem 14.1 applies: the largest rate of change of   is

∥(16, 6)∥ =√ 

256 + 36 =√ 

292 = 2√ 

73,

and the direction in which it occurs is ∇ (2, 1) = (16, 6).

25

Page 26: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 26/31

WATERLOO SOS EXA M-AID: MATH237

EXERCISE 27. Define   : ℝ3 → ℝ by  (,,) = 2 + + . Find the largest rate of change of   at the point(2, 3, 4), and the direction in which it occurs.

EXERCISE 28. Define   : ℝ2 → ℝ by  (, ) = 2 + 2. Find the largest rate of change of   at the point ( 32 , 2),and the direction in which it occurs. Then determine the direction in which the directional derivative is half its maximum value.

The gradient vector will help with our graph sketching as well, by giving us information about the levelcurves.

THEOREM 14.2. If   : ℝ → ℝ is differentiable at and ∇ () ∕= 0, then ∇ () is orthogonal to the level surface () = through .

EXERCISE 29. Suppose we define

 (, ) = 2 + 2, (, ) = ,

((, ) ∕= (0, 0) if undefined there) for integers ,,,. What is the relationship between ,,, requiredsuch that the level curves of   and intersect orthogonally everywhere except possibly (0, 0)?

Recall we defined the tangent plane to a surface =  (, ) at the point (,, (, )) to be the planegiven by

=  (, ) +  (, )( − ) +  (, )( − ).

However, many interesting surfaces are not immediately in the form =  (, ). For example, we can lookat the sphere 2 + 2 + 2 = 1. Rather than attempt to break up this function into multiple parts, Theorem14.2 gives us a tool to find the tangent plane very easily, as long as the conditions are satisfied.

Suppose we have a surface in ℝ3 defined by  (,,) = . For any in the tangent plane to the surfaceat , − lies in the tangent plane so by Theorem 14.2 is orthogonal to ∇ (). This gives

0 = ∇ () ⋅ ( − ) =  ()( − ) +  ()( − ) +  ()( − ),

where = (,,). Notice this reduces to our original formula when =  (, ).

EXERCISE 30. Find the equation of the tangent plane to the hyperboloid 42 + 92 − 2 = 1 at the point(2, 1, 3).

15 Taylor Polynomials (8.1)

DEFINITION 15.1. The second degree Taylor polynomial  2, of   : ℝ2 → ℝ at = (, ) is given by

 2,(, ) = () +  ()( − ) +  ()( − )

+1

2[ ()( − )2 + 2 ()( − )( − ) +  ()( − )2].

26

Page 27: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 27/31

WATERLOO SOS EXA M-AID: MATH237

Generally speaking,  2, approximates  (, ) for (, ) sufficiently close to (, ), with better accuracythan the linear approximation.

EXAMPLE 30. Calculate tan(198

)−

cos(32

) approximately (Use ≈

3.14) using the second degree Taylorpolynomial. Compare with the calculator value.

SOLUTION. Compare with example 16. Let  (, ) = tan − cos and (, ) = ( 34 , 2 ). Differentiating  

gives us

∇ 

3

4,

2

= (2, 1),  

3

4,

2

=

−4 00 0

.

Then

 2,(, ) = −1 + 2

− 3

4

+(

2

)+

1

2

−4

− 3

4

2

.

We get the approximation

tan

198

− cos

32

≈  2,

198

, 32

≈ −1.031.

The calculator gives us a value of about −1.034, for an error of about 0.003 (when we used linear ap-proximation, the error was about 0.004).

EXERCISE 31. Calculate the following approximately (compare with the calculator value) using the seconddegree Taylor polynomial. Compare your results with those of exercise 9.

(a)√ 

120 + 4√ 

65.

(b) 2

−cos + sin at (, ) = (0.01, 3.10).

16 Taylor’s Theorem (8.2)

We have seen an example in which the error in approximating using the second degree Taylor polynomialis smaller than that of using the linear approximation. A nautral question to ask is, how small is the error?

THEOREM 16.1 [TAYLOR’S FORMULA]. Suppose   : ℝ2 → ℝ is such that   ∈  2 in some neighborhood of , say (). Then for all ∈  (), there exists a point on the line segment joining and such that

 () =  () +  ()( − ) +  ()( − ) + 1,(),

where

1,(, ) = 12

[ ()( − )2 + 2 ()( − )( − ) +  ()( − )2].

Recall the linear approximation to   at is given by

 () +  ()( − ) +  ()( − ).

Then this theorem is saying that there exists a such that  () differs from the linear approximation by1,. This gives us a useful tool in bounding the error on the linear approximation.

27

Page 28: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 28/31

WATERLOO SOS EXA M-AID: MATH237

EXAMPLE 31. If , > 0, show that

√ 2 + 2 + 1 ≈ 3 +

2

3( − 2) +

2

3( − 2),

with

∣error∣ ≤ 32

(( − 2)2 + ( − 2)2).

SOLUTION. Let  (, ) =√ 

2 + 2 + 1. Differentiating,

  =√ 

2 + 2 + 1,   =

√ 2 + 2 + 1

.

Then

(2,2)(, ) =  (2, 2) +  (2, 2)( − 2) +  (2, 2)( − 2)

= 3 +2

3( − 2) +

2

3( − 2).

Calculating the second partial derivatives,

  =1√ 

2 + 2 + 1− 2

(2 + 2 + 1)3/2,

  = −

(2 + 2 + 1)3/2,

  =1√ 

2 + 2 + 1− 2

(2 + 2 + 1)3/2.

For , > 0,   has continuous second partial derivatives, so we can apply Taylor’s theorem to get that thereexists a point on the line segment joining (2, 2) and such that

 (, ) = (2,2)(, ) + 1,(2,2)(, ),

where

∣1,(2,2)(, )∣ =

1

2[ ()( − 2)2 + 2 ()( − 2)( − 2) +  ()( − 2)2]

.

Since the theorem does not give us the value of  , we will simply find an upper bound for this error. Since2 + 2 + 1 ≥ 1, triangle inequality gives

∣ (, )∣ ≤ 1√ 

2 + 2 + 1

+

2

(2 + 2 + 1)3/2

≤ 1 +

2 + 2 + 1

(2 + 2 + 1)3/2

= 1 +

1

(2 + 2 + 1)1/2 ≤ 1 + 1 = 2,

so that∣ ()∣ ≤ 2.

By symmetry,∣ ()∣ ≤ 2,

28

Page 29: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 29/31

WATERLOO SOS EXA M-AID: MATH237

Finally,

∣ (, )∣ =

√ 2√ 

2

(2 + 2 + 1)3/2

√ 2 + 2 + 1

√ 2 + 2 + 1

(2 + 2 + 1)3/2

=

1

(2 + 2 + 1)1/2

≤ 1,

so that ∣ ()∣ ≤ 1.

Then by triangle inequality,

∣1,(2,2)(, )∣ ≤ 1

2[∣ ()∣( − 2)2 + 2∣ ()∣∣( − 2)( − 2)∣ + ∣ ()∣( − 2)2]

≤ 1

2[2( − 2)2 + 2∣( − 2)( − 2)∣ + 2( − 2)2] since 2∣∣ ≤ 2 + 2,

≤ 1

2[2( − 2)2 + ( − 2)2 + ( − 2)2 + 2( − 2)2]

=3

2(( − 2)2 + ( − 2)2)

as required.

COROLLARY 16.2. Suppose   : ℝ2 → ℝ is such that   ∈  2 in some closed neighborhood of , say

 () = { ∈ ℝ2 : ∥ − ∥ ≤  }.

Then there exists a positive constant   such that for all ∈  (), we have

∣1,()∣ ≤  ∥ − ∥2.

EXERCISE 32. If − ≤ ≤ and − ≤ ≤ , show that the error in the linear approximation (0,0)(, ) isat most 2(2 + 2).

29

Page 30: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 30/31

MATH 237 PRACTICE MIDTERM 1

1. Consider the function f , where f (x, y) = ln(2xy − y2).

(a) Write down the domain and range of f .

[2marks]

(b) Sketch the level curve of  f  on the x-y plane.

[3marks]

(d) Write down the equation of the tangent plane at (2,1).

[2marks]

2. Let F (x,y,z) = f (y−zx, z−x

y, x−y

z). Show that x∂F 

∂x+ y ∂F 

∂y+ z ∂F 

∂z= 0

[4marks]

3. Suppose g : R → R and f (x, y) = g(xy

). What are the mixed ordered partials of  f ?

[4marks]

4. Consider the following questions on directional derivatives.

(a) Suppose that Susan knows that the directional derivative is defined byD uf (x, y) = d

dsf (a + su) where a is a position vector and u is a direction

vector and s approaches 0. Prove to Susan that for differentiable f  at a,D uf (a, b) = ∇f (a, b) · u.

[4marks]

(b) Calculate the directional derivative of  f (x,y,z) = sin(xyz) at (1, 1, π4 ) in the

direction v = 1,−√ 2, 1.

[2marks]

(c) Suppose f  in part (b) is the path a car follows. Determine in what directionthe car must travel to experience no rate of change if we already know the cardoes not travel in the z-direction.

[4marks]

5. Let f : R2 → R where

f (x, y) = 1−e−|xy|√ 

x2+y2: (x, y) = (0, 0)

0 : (x, y) = (0, 0)Prove f  is continuous ∀(x, y) ∈ R2

[6marks]1

Page 31: Midterm SOS 237 Package Calculus

7/28/2019 Midterm SOS 237 Package Calculus

http://slidepdf.com/reader/full/midterm-sos-237-package-calculus 31/31

2 MATH 237 PRACTICE MIDTERM 1

6. Consider f (x, y) = |x| 12 |y| 23

(a) Determine whether f  is differentiable at (0,0).

[7marks]

(b) On the basis of part (a), can we draw a conclusion about the continuity of  f ?

[1mark]

(c) On the basis of part (a), can we draw a conclusion about the continuity of thepartials of f ?

[1mark]

7. Consider the approximation ln(x + 2y) = (x − 3) + 2(y + 1) for (x, y) sufficiently closeto (3, -1). Prove that if x ≥ 3 ∩ y ≥ −1, the error of the approximation is satisfied by:

|R1,(3,−1)(x, y)| ≤ 72 ((x− 3)2 + (y + 1)2)

[7marks]

MAXIMUM MARKS: 47