Mathcad - Lecture4C Directional Derivatives are the slopes of surfaces in specific directions at a...

16
GRADIENT Directional Derivatives are the slopes of surfaces in specific directions at a particular point on that surface. Example # 1: Find the directional derivative, " Df " at the point: " P " in the direction: " u ". fxy , ( ) 2x 3y + = P00 , ( ) u 1i = dz x z dx y z dy + = dz 2 () dx 3 () dy + = dy 0 = dz 2 () dx = x z d d 2 = D i f00 , ( ) 2 = Page 1 of 16

Transcript of Mathcad - Lecture4C Directional Derivatives are the slopes of surfaces in specific directions at a...

GRADIENT

Directional Derivatives are the slopes of surfaces in specific directions at a particular point on that surface. Example # 1: Find the directional derivative, " D f " at the point: " P " in the direction: "u

→ ".

f x y,( ) 2x 3 y⋅+= P 0 0,( ) u→

1 i→⋅=

dzx

z∂

⎛⎜⎝

⎞⎟⎠

dx⋅y

z∂

⎛⎜⎝

⎞⎟⎠

dy⋅+=

dz 2( ) dx⋅ 3( ) dy⋅+=

dy 0=

dz 2( ) dx⋅=

xzd

d2=

Di

→ f 0 0,( )⋅ 2=

Page 1 of 16

yx

z

Direction along x-axis

Example # 2: Find the directional derivative, " D f " at the point: " P " in the direction: "u

→".

f x y,( ) 2 x⋅ 3 y⋅+= P 0 0,( ) u→

1 j→⋅=

dzx

z∂

⎛⎜⎝

⎞⎟⎠

dx⋅y

z∂

⎛⎜⎝

⎞⎟⎠

dy⋅+=

Page 2 of 16

dz 2( ) dx⋅ 3( ) dy⋅+=

dx 0=

dz 3( ) dy⋅=

yzd

d3=

Dj

→ f 0 0,( )⋅ 3=

y

z

x

Direction along y-axis

Page 3 of 16

Example # 3: Find the directional derivative, " D f " at the point: " P " in the direction: "u

→".

f x y,( ) 2x 3 y⋅+= P 0 0,( )

u→ 2

13i

→⋅

313

j→⋅+=

dzx

z∂

⎛⎜⎝

⎞⎟⎠

dx⋅y

z∂

⎛⎜⎝

⎞⎟⎠

dy⋅+=

dz 2( ) dx⋅ 3( ) dy⋅+=

ds dx( )2 dy( )2+=

dzds

2( ) dxds⋅ 3( ) dy

ds⋅+=

szd

d2 dx

dx( )2 dy( )2+⋅ 3 dy

dx( )2 dy( )2+⋅+=

Page 4 of 16

uxdx

dx( )2 dy( )2+= uy

dy

dx( )2 dy( )2+=

szd

d2 ux⋅ 3 uy⋅+=

Du f⋅ 2( ) 213

⋅ 3( ) 313

⋅+⎡⎢⎣

⎤⎥⎦

= 3.606=

Du→ f 0 0,( )⋅ 3.606=

y x

z

Direction along "u"

Extend this approach to find the directional derivative of curved surfaces.

Page 5 of 16

szd

d xz∂

⎛⎜⎝

⎞⎟⎠

ux⋅y

z∂

⎛⎜⎝

⎞⎟⎠

uy⋅+= P x0 y0,( )

u→

ux i→⋅ uy j

→⋅+=

Example # 4: Find the directional derivative, " D f " at the point: " P " in the direction: "u

→".

f x y,( ) x2 y2−= P 1 1−,( )

u→ 1−

2i

→⋅

12

j→⋅+=

Du→ f⋅

xf∂

⎛⎜⎝

⎞⎟⎠

ux⋅y

f∂

⎛⎜⎝

⎞⎟⎠

uy⋅+=

xf∂

∂2 x⋅=

yf∂

∂2− y⋅=

Page 6 of 16

xf 1 1−,( )∂

∂2=

yf 1 1−,( )∂

∂2=

uy12

=ux1−2

=

Du→ f 1 1−,( )⋅ 2 1−

2⎛⎜⎝

⎞⎟⎠

⋅ 2 12

⎛⎜⎝

⎞⎟⎠

⋅+= 0=

y

z

x

f(x,y) with Contours

Page 7 of 16

The Directional Derivative at P 1 1−,( ) in the

direction: u→ 1−

2i

→⋅

12

j→⋅+= was found to be

zero. Verify this result graphically using the following contour plot of " f x y,( ) ".

Contour Plot

Page 8 of 16

Example # 5: Find the directional derivative, " D f " at the point: " P " in the direction: "u

→".

z f x y,( )= P x0 y0,( )

u→

ux i→⋅ uy j

→⋅+=

Du f fx x0 y0,( )⎡⎣ ⎤⎦ ux⋅ fy x0 y0,( )⎡⎣ ⎤⎦ uy⋅+=

Definition: This is the GRADIENT of " f ".

Δf( )→⎯

xf∂

⎛⎜⎝

⎞⎟⎠

i→⋅

yf∂

⎛⎜⎝

⎞⎟⎠

j→⋅+=

The Directional Derivative " Du f " is the Dot Product of the Gradient with the unit vector in the specified direction.

Du→ f Δf( )

→⎯u→⋅=

Page 9 of 16

Recall this formula for the Dot Product.

a→

b→⋅ a

→b→⋅ cos θ( )=

Δf( )→⎯

u→⋅ Δf( )

→⎯u→⋅ cos θ( )⋅=

Evidently, " f " has its steepest slope when θ 0= π, . Conversely, ALL Directional Derivatives are zero at a point where the Gradient is zero.

Example # 6: Find the directional derivative, " D f " at the point: " P " in the direction: "u

→".

f x y,( ) x y⋅ ey⋅= P 1 1,( )

u→

j→−=

Δf( )→⎯

xf∂

⎛⎜⎝

⎞⎟⎠

i→⋅

yf∂

⎛⎜⎝

⎞⎟⎠

j→⋅+=

Page 10 of 16

fx 1 1,( ) e2

= 1.36=x

f∂

12

yx

⋅ ey⋅=

fy 1 1,( ) 3 e⋅2

= 4.08=y

f∂

12

xy

⋅ x y⋅+⎛⎜⎝

⎞⎟⎠

ey⋅=

Δf( )→⎯

1.36( ) i→⋅ 4.08( ) j

→⋅+=

Δf( )→⎯

u→⋅ 1.36( ) i

→⋅ 4.08( ) j

→⋅+⎡⎣ ⎤⎦ j

→−( )⋅= 4.08−=

Du→ f 1 1,( ) 4.08−=

Page 11 of 16

Example # 7: Sketch the Level Curve of " f " that passes thru the point "P" and draw the Gradient Vector at "P".

f x y,( ) x2 4 y2⋅+= P 2− 0,( )

f 2− 0,( ) 4=

x2 4 y2⋅+ 4=

Page 12 of 16

Δf→⎯

xf∂

⎛⎜⎝

⎞⎟⎠

i→⋅

yf∂

⎛⎜⎝

⎞⎟⎠

j→⋅+=

yf∂

∂8 y⋅=

xf∂

∂2 x⋅=

fx 2− 0,( ) 4−= fy 2− 0,( ) 0=

Δf 2− 0,( )→⎯⎯⎯

4−( ) i→⋅ 0( ) j

→⋅+= 4− i

→⋅=

This, the Gradient Vector at the given point is normal or perpendicular to the level curve passing thru that point because the Directional Derivative in the direction of the gradient vector is a maximum.

Page 13 of 16

Gradient Vector@(-2,0)

Example # 8: Sketch the surface, " f x y,( ) ", and the tangent line that passes thru the point: " 2 0, 2,( ) " and has the steepest slope.

f x y,( ) 4 x2− y2−=

Page 14 of 16

z

xy

Steepest Slope Tangent

Infinity of tangents at point, all with differentslopes depending on chosen direction. Tangent in Gradient Direction is illustrated in the figure. Note that the level curves of the surface are concentric circles centered at the origin AND that the Gradient Direction is perpendicular to the level curve at the point.

Page 15 of 16

yx

z

Gradient Direction Illustrated

Page 16 of 16