directional derivative
play

DIRECTIONAL DERIVATIVE MATH 200 GOALS Be able to compute a - PowerPoint PPT Presentation

MATH 200 WEEK 5 - WEDNESDAY DIRECTIONAL DERIVATIVE MATH 200 GOALS Be able to compute a gradient vector, and use it to compute a directional derivative of a given function in a given direction. Be able to use the fact that the gradient


  1. MATH 200 WEEK 5 - WEDNESDAY DIRECTIONAL DERIVATIVE

  2. MATH 200 GOALS ▸ Be able to compute a gradient vector, and use it to compute a directional derivative of a given function in a given direction. ▸ Be able to use the fact that the gradient of a function f(x,y) is perpendicular (normal) to the level curves f(x,y)=k and that it points in the direction in which f(x,y) is increasing most rapidly.

  3. MATH 200 INTRODUCTION ▸ So far, we’ve been able to figure out the rate of change of a function of two variables in only two directions : the x- direction or the y-direction. ▸ Now, what if we want to find the rate of change of a function in any other direction? ▸ How do we point to things in 3-Space? ▸ A: Vectors ▸ So the question is this: How do we compute the rate of change of a function in the direction of a given vector at a given point?

  4. MATH 200 ▸ Consider a surface given by z=f(x,y) ▸ Say we want to find the rate at which f is changing at the point (x 0 ,y 0 ) in the direction of a unit vector <a,b> ▸ We can draw a line through (x 0 ,y 0 ) in the direction of <a,b> ▸ And then a plane coming straight up from the line THIS IS TANGENT LINE ▸ The trace we get on that plane WHOSE SLOPE WE WANT is what we’re looking for

  5. MATH 200 ▸ The line on the xy-plane through (x 0 ,y 0 ) in the direction of <a,b>: � x ( t ) = x 0 + at l : y ( t ) = y 0 + bt ▸ To get the trace, we want to plug only the points on the line into the function f ∂ z ∂ t = ∂ f ∂ x ∂ t + ∂ f ∂ y ▸ z=f(x(t),y(t)) ∂ x ∂ y ∂ t ▸ The slope we want is the = ∂ f ∂ xa + ∂ f derivative of z with ∂ y b respect to t

  6. MATH 200 THE DIRECTIONAL DERIVATIVE ▸ The directional derivative of the function f(x,y) at the point (x 0 ,y 0 ) in the direction of the unit vector <a,b> is written and computed as follows: u f ( x 0 , y 0 ) = ∂ f ∂ x ( x 0 , y 0 ) a + ∂ f ∂ y ( x 0 , y 0 ) b D � ▸ We can write this as a dot product: � ∂ f � ∂ x ( x 0 , y 0 ) , ∂ f u f ( x 0 , y 0 ) = ∂ y ( x 0 , y 0 ) · � a, b � D � ▸ We have unit vector u =<a,b> and the vector with the first order partial derivatives. We call this second vector the gradient .

  7. MATH 200 THE GRADIENT ▸ We write and define the gradient as follows: � ∂ f � − → ∂ x, ∂ f ∇ f ( x, y ) = = ⟨ f x , f y ⟩ ∂ y � ∂ f � → − ∂ x, ∂ f ∂ y , ∂ f ∇ F ( x, y, z ) = = ⟨ f x , f y , f z ⟩ ∂ z ▸ E.g. Given f(x,y) = 3x 2 y 3 , the gradient is − → 6 xy 3 , 9 x 2 y 2 � � ∇ f ( x, y ) =

  8. MATH 200 PUTTING IT ALL TOGETHER ▸ The directional derivative of ▸ For the gradient, we have → − the function f(x,y) at the ∇ f = ⟨ 3 x 2 − 2 y 2 , − 4 xy ⟩ point (x 0 ,y 0 ) in the direction ▸ Evaluate the gradient at the of the unit vector u =<a,b> is given point given by → − ∇ f (1 , − 1) = ⟨ 1 , 4 ⟩ u f ( x 0 , y 0 ) = − → ▸ Plugging everything in we ∇ f ( x 0 , y 0 ) · ⃗ D ⃗ u get… ▸ E.g. � � � 1 2 , 1 u f (1 , � 1) = � 1 , 4 � · � � D � f ( x, y ) = x 3 − 2 xy 2 2 = � 1 2 + 4 � � ( x 0 , y 0 ) = (1 , − 1) 2 √ √ 3 u = ⟨− 1 / 2 , 1 / 2 ⟩ ⃗ = � 2

  9. MATH 200 EXAMPLE ▸ Consider the function f(x,y) = e y sin(x) ▸ Compute the directional derivative of f at ( π /6,0) in the direction of the vector <2,3> ▸ Find a set of parametric equations for the tangent line whose slope you found above u f ( x 0 , y 0 ) = − → ∇ f ( x 0 , y 0 ) · ⃗ D ⃗ u

  10. MATH 200 ▸ We need a unit vector, so we have to normalize <2,3>: � 1 � 13 � 2 , 3 � � u = || � 2 , 3 � || = 13 ▸ The gradient of f is � � � f = � e y cos x, e y sin x � � � � 2 , 1 3 � � � f ( π / 6 , 0) = 2 ▸ To make the dot product easier to compute, we can factor out the fractions � 1 � � � D � u f ( π / 6 , 0) = � 2 , 3 � · � 3 , 1 � 2 13 � 1 � � � = 2 3 + 3 2 13

  11. MATH 200 ▸ For the tangent line, we need a point (of tangency) and a direction vector. ▸ The point is ( π /6,0,f( π /6,0)) = ( π /6,0,1/2) The first two components ▸ The direction vector is are the unit vector u � � √ 2 3 13 , 2 3 + 3 13 , √ √ √ 2 13 ▸ So we have:  2 x = π 13 t 6 +  x = π 6 + 4 t  √     3 y = 13 t l : l : y = 6 t √ z = 1 √ √  2 + (2 3 + 3) t  z = 1 2 + 2 3+3  13 t   √ 2

  12. MATH 200 PROPERTIES OF THE GRADIENT ▸ Let’s take a closer look at the directional derivative: IT’S A UNIT VECTOR SO ITS NORM IS 1! u f ( x 0 , y 0 ) = � � � f ( x 0 , y 0 ) · � D � u = || � � THIS QUANTITY IS � f ( x 0 , y 0 ) || || � u || cos � LARGEST WHEN THETA = || � � IS 0…OR WHEN THE � f ( x 0 , y 0 ) || cos � GRADIENT IS IN THE SAME DIRECTION AS U THE GRADIENT POINTS IN THE DIRECTION IN WHICH THE DIRECTIONAL DERIVATIVE IS GREATEST OR AT ANY GIVEN POINT, A FUNCTION’S GRADIENT POINTS IN THE DIRECTION IN WHICH THE FUNCTION INCREASES MOST RAPIDLY

  13. MATH 200 EXAMPLE ▸ Consider the function ▸ We would expect the f(x,y) = 4 - x 2 - y 2 at the directional derivative to be point (1,1). greatest when walking toward the z-axis ▸ Compute the gradient at (1,1): � � � f = �� 2 x, � 2 y � � � � f (1 , 1) = �� 2 , � 2 � ▸ It works! This vector points directly at the z-axis from (1,1)

  14. MATH 200 ONE MORE GRADIENT PROPERTY ▸ Consider a level curve f(x,y) = k which contains the point (x 0 ,y 0 ). We could represent this curve as a vector-valued function… � � � f r � ( t ) � ( x 0 , y 0 ) r ( t ) = � x ( t ) , y ( t ) � � ▸ So we have: dt [ f ( x ( t ) , y ( t ))] = d d dx [ k ] SO THE GRADIENT � f dt + � f dx dy IS NORMAL TO THE � t = 0 � x � y LEVEL CURVE � � r � ( t ) = 0 � f · �

  15. MATH 200 EXAMPLE f (2 , 1) = 3 ▸ Consider the function x 2 − y 2 = 3 f(x,y) = x 2 - y 2 ▸ Draw the level curve of f that contains the point (2,1) ▸ Compute the gradient of f at the point (2,1) ▸ Sketch the level curve � � and then draw the � f = � 2 x, � 2 y � gradient at the point (2,1) � � � f (2 , 1) = � 4 , � 2 �

  16. MATH 200 ONE MORE EXAMPLE ▸ Consider the function f(x,y) = x 2 - y ▸ Compute the directional derivative of f at (2,3) in the direction in which it increases most rapidly ▸ Draw level curves for f(x,y) = -1, 0, 1, 2, 3 ▸ Draw the gradient of f at (2,3)

  17. MATH 200 ▸ f increases most rapidly ▸ Plugging everything in in the direction of its to get the directional gradient derivative… � � 1 � f ( x, y ) = � 2 x, � 1 � � u f (2 , 3) = 17 � 4 , � 1 � · � 4 , � 1 � D � � � � f (2 , 3) = � 4 , � 1 � 1 � = 17(17) ▸ Normalizing the � = 17 gradient to get a unit vector, we get NOTICE: THE DIRECTIONAL � � DERIVATIVE IN THE DIRECTION OF � f (2 , 3) 1 � = 17 � 4 , � 1 � THE GRADIENT IS EQUAL TO THE || � � � f (2 , 3) || MAGNITUDE OF THE GRADIENT

  18. MATH 200 ▸ Some level curves: ▸ f = -1: ▸ -1 = x 2 - y ▸ y = x 2 + 1 ▸ f = 0: ▸ 0 = x 2 - y ▸ y = x 2 ▸ f = 1: ▸ 1 = x 2 - y ▸ y = x 2 - 1 NOTICE: AT THE POINT (2,3), THE GRADIENT IS NORMAL TO THE LEVEL CURVE AND IS ▸ f = 2: y = x 2 - 2 POINTING IN THE DIRECTION IN WHICH F IS ▸ f=3: y = x 2 - 3 INCREASING

Recommend


More recommend