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

directional derivative
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

DIRECTIONAL DERIVATIVE

MATH 200 WEEK 5 - WEDNESDAY

slide-2
SLIDE 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.

slide-3
SLIDE 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?

slide-4
SLIDE 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 (x0,y0) in the direction

  • f a unit vector <a,b>

▸ We can draw a line through

(x0,y0) in the direction of <a,b>

▸ And then a plane coming

straight up from the line

▸ The trace we get on that plane

is what we’re looking for

THIS IS TANGENT LINE WHOSE SLOPE WE WANT

slide-5
SLIDE 5

MATH 200

▸ The line on the xy-plane

through (x0,y0) in the direction of <a,b>:

▸ To get the trace, we want to

plug only the points on the line into the function f

▸ z=f(x(t),y(t)) ▸ The slope we want is the

derivative of z with respect to t

l :

  • x(t) = x0 + at

y(t) = y0 + bt

∂z ∂t = ∂f ∂x ∂x ∂t + ∂f ∂y ∂y ∂t = ∂f ∂xa + ∂f ∂y b

slide-6
SLIDE 6

MATH 200

THE DIRECTIONAL DERIVATIVE

▸ The directional derivative of the function f(x,y) at the point

(x0,y0) in the direction of the unit vector <a,b> is written and computed as follows:

D

uf(x0, y0) = ∂f

∂x(x0, y0)a + ∂f ∂y (x0, y0)b ▸ We can write this as a dot product: D

uf(x0, y0) =

∂f ∂x(x0, y0), ∂f ∂y (x0, y0)

  • · a, b

▸ We have unit vector u=<a,b> and the vector with the first

  • rder partial derivatives. We call this second vector the

gradient.

slide-7
SLIDE 7

MATH 200

THE GRADIENT

▸ We write and define the gradient as follows:

− → ∇F(x, y, z) = ∂f ∂x, ∂f ∂y , ∂f ∂z

  • = ⟨fx, fy, fz⟩

− → ∇f(x, y) = ∂f ∂x, ∂f ∂y

  • = ⟨fx, fy⟩

▸ E.g. Given f(x,y) = 3x2y3, the gradient is

− → ∇f(x, y) =

  • 6xy3, 9x2y2
slide-8
SLIDE 8

MATH 200

PUTTING IT ALL TOGETHER

▸ The directional derivative of

the function f(x,y) at the point (x0,y0) in the direction

  • f the unit vector u=<a,b> is

given by

D⃗

uf(x0, y0) = −

→ ∇f(x0, y0) · ⃗ u ▸ E.g.

f(x, y) = x3 − 2xy2

⃗ u = ⟨−1/ √ 2, 1/ √ 2⟩

▸ For the gradient, we have − → ∇f = ⟨3x2 − 2y2, −4xy⟩ ▸ Evaluate the gradient at the

given point

− → ∇f(1, −1) = ⟨1, 4⟩ (x0, y0) = (1, −1) ▸ Plugging everything in we

get…

D

uf(1, 1) = 1, 4 ·

  • 1
  • 2, 1
  • 2
  • = 1
  • 2 + 4
  • 2

= 3

  • 2
slide-9
SLIDE 9

MATH 200

EXAMPLE

▸ Consider the function

f(x,y) = eysin(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

D⃗

uf(x0, y0) = −

→ ∇f(x0, y0) · ⃗ u

slide-10
SLIDE 10

MATH 200

▸ We need a unit vector, so we have to normalize <2,3>: ||2, 3|| =

  • 13
  • u =

1

  • 132, 3

▸ The gradient of f is

  • f = ey cos x, ey sin x
  • f(π/6, 0) =
  • 3

2 , 1 2

  • ▸ To make the dot product easier to compute, we can factor
  • ut the fractions

D

uf(π/6, 0) =

1 2

  • 13
  • 2, 3 ·
  • 3, 1
  • =

1 2

  • 13
  • 2
  • 3 + 3
slide-11
SLIDE 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 direction vector is

  • 2

√ 13, 3 √ 13, 2 √ 3 + 3 2 √ 13

  • ▸ So we have:

l :        x = π

6 + 2 √ 13t

y =

3 √ 13t

z = 1

2 + 2 √ 3+3 2 √ 13 t

l :      x = π

6 + 4t

y = 6t z = 1

2 + (2

√ 3 + 3)t

The first two components are the unit vector u

slide-12
SLIDE 12

MATH 200

PROPERTIES OF THE GRADIENT

▸ Let’s take a closer look at the directional derivative:

D

uf(x0, y0) =

  • f(x0, y0) ·

u = ||

  • f(x0, y0)|| ||

u|| cos = ||

  • f(x0, y0)|| cos

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

IT’S A UNIT VECTOR SO ITS NORM IS 1! THIS QUANTITY IS LARGEST WHEN THETA IS 0…OR WHEN THE GRADIENT IS IN THE SAME DIRECTION AS U

slide-13
SLIDE 13

MATH 200

EXAMPLE

▸ Consider the function

f(x,y) = 4 - x2 - y2 at the point (1,1).

▸ We would expect the

directional derivative to be greatest when walking toward the z-axis

▸ Compute the gradient at

(1,1):

  • f = 2x, 2y
  • f(1, 1) = 2, 2

▸ It works! This vector points

directly at the z-axis from (1,1)

slide-14
SLIDE 14

d dt [f(x(t), y(t))] = d dx[k] f x dx dt + f y dy t = 0

  • f ·

r (t) = 0

MATH 200

ONE MORE GRADIENT PROPERTY

▸ Consider a level curve f(x,y) = k which contains the point (x0,y0).

We could represent this curve as a vector-valued function…

  • r(t) = x(t), y(t)

(x0, y0) ▸ So we have:

SO THE GRADIENT IS NORMAL TO THE LEVEL CURVE

  • r (t)
  • f
slide-15
SLIDE 15

MATH 200

EXAMPLE

▸ Consider the function

f(x,y) = x2 - y2

▸ 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 gradient at the point (2,1)

  • f = 2x, 2y
  • f(2, 1) = 4, 2

f(2, 1) = 3 x2 − y2 = 3

slide-16
SLIDE 16

MATH 200

ONE MORE EXAMPLE

▸ Consider the function f(x,y) = x2 - 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)

slide-17
SLIDE 17

MATH 200

▸ f increases most rapidly

in the direction of its gradient

  • f(x, y) = 2x, 1
  • f(2, 3) = 4, 1

▸ Normalizing the

gradient to get a unit vector, we get

  • f(2, 3)

||

  • f(2, 3)||

= 1

  • 174, 1

▸ Plugging everything in

to get the directional derivative…

D

uf(2, 3) =

1

  • 174, 1 · 4, 1

= 1

  • 17(17)

=

  • 17

NOTICE: THE DIRECTIONAL DERIVATIVE IN THE DIRECTION OF THE GRADIENT IS EQUAL TO THE MAGNITUDE OF THE GRADIENT

slide-18
SLIDE 18

MATH 200

▸ Some level curves: ▸ f = -1: ▸ -1 = x2 - y ▸ y = x2 + 1 ▸ f = 0: ▸ 0 = x2 - y ▸ y = x2 ▸ f = 1: ▸ 1 = x2 - y ▸ y = x2 - 1 ▸ f = 2: y = x2 - 2 ▸ f=3: y = x2 - 3

NOTICE: AT THE POINT (2,3), THE GRADIENT IS NORMAL TO THE LEVEL CURVE AND IS POINTING IN THE DIRECTION IN WHICH F IS INCREASING