Directional Derivatives
YASIR ALI VECTOR CALCULUS
Derivatives
Derivative of f (x) at point a along x-axis
f (a + h) − f (a)
f 0 (x)|at x=a = lim
h→0 h
YASIR ALI VECTOR CALCULUS
Derivatives
Derivative of f (x) at point a along x-axis
f (a + h) − f (a)
f 0 (x)|at x=a = lim
h→0 h
Partial Derivative of f (x, y ) at point
(a, b) along x-axis
∂f f (a + h, b) − f (a, b)
(a, b) = lim
∂x h→0 h
YASIR ALI VECTOR CALCULUS
Derivatives
Derivative of f (x) at point a along x-axis
f (a + h) − f (a)
f 0 (x)|at x=a = lim
h→0 h
Partial Derivative of f (x, y ) at point Partial Derivative of f (x, y ) at point
(a, b) along x-axis (a, b) along y -axis
∂f f (a + h, b) − f (a, b) ∂f f (a, b + k) − f (a, b)
(a, b) = lim (a, b) = lim
∂x h→0 h ∂y k→0 k
YASIR ALI VECTOR CALCULUS
Derivatives
Derivative of f (x) at point a along x-axis
f (a + h) − f (a)
f 0 (x)|at x=a = lim
h→0 h
Partial Derivative of f (x, y ) at point Partial Derivative of f (x, y ) at point
(a, b) along x-axis (a, b) along y -axis
∂f f (a + h, b) − f (a, b) ∂f f (a, b + k) − f (a, b)
(a, b) = lim (a, b) = lim
∂x h→0 h ∂y k→0 k
Partial Derivative of f (x, y ) at point (a, b) along unit
vector u = [u1 , u2 ]
f (a + hu1 , b + hu2 ) − f (a, b)
Du f (a, b) = lim
h→0 h
YASIR ALI VECTOR CALCULUS
Directional Derivatives
Partial Derivative of f (x, y ) at point (a, b) along
unit vector u = [u1 , u2 ]
f (a + hu1 , b + hu2 ) − f (a, b)
Du f (a, b) = lim
h→0 h
YASIR ALI VECTOR CALCULUS
Directional Derivatives
Given a unit vector u = [u1 , u2 ] and let Q(x, y ) be any point on the line
through P(a, b) in the direction of u.
YASIR ALI VECTOR CALCULUS
Directional Derivatives
Partial Derivative of f (x, y ) at point (a, b) along
unit vector u = [u1 , u2 ]
f (a + hu1 , b + hu2 ) − f (a, b)
Du f (a, b) = lim
h→0 h
∂f ∂f
Du f (a, b) = u1 + u 2 = fx u 1 + fy u 2
∂x ∂y
Du f (a, b) = fx u1 + fy u2
Du f (a, b) = [fx , fy ] ·[u1 , u2 ]
| {z }
∇f
YASIR ALI VECTOR CALCULUS
Gradient of Function
The gradient of f (x, y ) is the vector-valued function
∇f = [fx , fy ] = fx^i+ fy^j
Directional Derivative and Gradient of Function
Du f = ∇f · u
YASIR ALI VECTOR CALCULUS
Directional Derivatives and Gradient
The gradient of f (x, y ) is the vector-valued function
∇f = [fx , fy , fz ] = fx^i+ fy^j + fz ^
k
Directional Derivative and Gradient of Function
Du f = ∇f · u = fx u1 + fy u2 + fz u3
YASIR ALI VECTOR CALCULUS
For f (x, y ) = x 2 y − 4y 3 , compute Du f (2, 1) for the directions
√
3 1
1 u=[ 2 , 2]
2 u in the direction from (2, 1) to (4, 0).
u1 u2
√ z}|{
z}|{
3 1
Du f = fx u1 + fy u2 , where u = [ , ]
2 2
1 fx = 2xy and fy = x 2 − 12y 2 . fx (2, 1) = 4, fy (2, 1) = −8
√
3 1 √
Du f (2, 1) = 4( ) − 8( ) = 2 3 − 4
2 2
−1
2 unit vector from (2,1) to (4,0) is v = [ √25 , √ 5
].
2 −1 16
Dv f (2, 1) = 4( √ ) − 8( √ ) = √
5 5 5
YASIR ALI VECTOR CALCULUS
For f (x, y , z) = x 2 y − yz 3 + z, at the point (1, −2, 0) in the direction of
v = 2iˆ + jˆ − 2k̂
YASIR ALI VECTOR CALCULUS
For f (x, y , z) = x 2 y − yz 3 + z, at the point (1, −2, 0) in the direction of
v = 2iˆ + jˆ − 2k̂
v 2 1 2
Du f = fx u1 + fy u2 + fz u3 , where u = = [ , ,− ]
|v| 3 3 3
fx = 2xy , fy = x 2 − z 3 and fz = −3yz 2 + 1.
fx (1, −2, 0) = −4, fy (1, −2, 0) = 1, fz (1, −2, 0) = 1
2 1 2
Du f (1, −2, 0) = −4( ) + − = −3
3 3 3
YASIR ALI VECTOR CALCULUS
Properties of Directional Derivative Du f = ∇f · u = |∇f | cos θ
YASIR ALI VECTOR CALCULUS
Properties of Directional Derivative Du f = ∇f · u = |∇f | cos θ
1 The function f increases most rapidly when cos θ = 1 or when
θ = 0 and u is the direction of ∇f . That is, at each point P in
its domain, f increases most rapidly in the direction of the
gradient vector ∇f at P. The derivative in this direction is
Du f = ∇f · u = |∇f | cos 0 = |∇f |
2 Similarly, f decreases most rapidly in the direction of −∇f . The
derivative in this direction is
Du f = |∇f | cos π = −|∇f |
3 Any direction u orthogonal to a gradient ∇f 6= 0 is a direction of
zero change in f because θ = π2 and
π
Du f = |∇f | cos =0
2
YASIR ALI VECTOR CALCULUS
Example of DD
YASIR ALI VECTOR CALCULUS
Directional Derivatives
YASIR ALI VECTOR CALCULUS
Let f (x, y ) = x 2 e y . Find the maximum value of a directional derivative at
(-2, 0), and find the unit vector in the direction in which the maximum
value occurs.
If ∇f 6= 0 at P, then among all possible directional derivatives of f at P,
the derivative in the direction of ∇f at P has the largest value. This value
is |∇f | at P.
∇f (x, y ) = [fx (x, y ), fy (x, y )] =⇒ ∇f (x, y ) = [2xe y , x 2 e y ]
The Gradient of f at (-2,0) is
√
∇f (−2, 0) = [−4, 4], and |∇f | = 4 2
This maximum occurs in the direction of ∇f (−2, 0). The unit vector in
this direction is
∇f 1 1
u= = [− √ , √ ]
|∇f | 2 2
YASIR ALI VECTOR CALCULUS
A heat-seeking particle is located at the point (2, 3) on a flat metal plate
whose temperature at a point (x, y) is T (x, y ) = 10 − 8x 2 − 2y 2 . Find
an equation for the trajectory of the particle if it moves continuously in the
direction of maximum temperature increase.
YASIR ALI VECTOR CALCULUS
A heat-seeking particle is located at the point (2, 3) on a flat metal plate
whose temperature at a point (x, y) is T (x, y ) = 10 − 8x 2 − 2y 2 . Find
an equation for the trajectory of the particle if it moves continuously in the
direction of maximum temperature increase.
Assume that the trajectory is represented parametrically by the equations
x = x(t), y = y (t), at t = the particle is at (2,3)
Because the particle moves in the direction of maximum temperature
increase, its direction of motion at time t is in the direction of the gradient
of T (x, y ), and hence its velocity vector v(t) at time t points in the
direction of the gradient. v(t) = k∇T
dx dx
, = k[−16, −4]
dt dt
YASIR ALI VECTOR CALCULUS
Gradient, Tangent Plane and Normal Line of the Surface
Tangent Plane
The tangent plane at point
P0 (x0 , y0 , z0 ) on the level surface
f (x, y , z) = c of a differentiable
function f is the plane through
P0 with normal vector ∇f |P0
Normal Line
The normal line of the surface at
P0 is the line through P0 parallel
to vector ∇f |P0 .
YASIR ALI VECTOR CALCULUS
Find the tangent plane and normal line of the surface
f (x, y , z) = x 2 + y 2 + z − 9 = 0 at (1,2,4).
∇f (x, y , z) = [2x, 2y , 1] ∇f (1, 2, 4) = [2, 4, 1]
Equation of Tangent Plane to f (x, y , z) at P0 (x0 , y0 , z0 )
fx (P0 )(x − x0 ) + fy (P0 )(y − y0 ) + fz (P0 )(z − z0 ) = 0
Normal Line to f (x, y , z) at
P0 (x0 , y0 , z0 )
x = x0 + fx (P0 )t,
y = y0 + fy (P0 )t,
z = z0 + fz (P0 )t
YASIR ALI VECTOR CALCULUS
Level Curves or Contours
Level curves are traces in xy -planes z = c of the surface z = f (x, y ).
YASIR ALI VECTOR CALCULUS
Level Curves or Contours
YASIR ALI VECTOR CALCULUS
Contours and Gradient
Theorem
Assume that f (x, y ) has continuous first-order partial derivatives in an
open disk centered at (x0 , y0 ) and that ∇f (x0 , y0 ) 6= 0. Then ∇f (x0 , y0 ) is
normal to the level curve of f through (x0 , y0 ).
YASIR ALI VECTOR CALCULUS
Contours and Gradient
Contours along the Hudson River in New York show streams, which follow paths
of steepest descent, running perpendicular to the contours.
YASIR ALI VECTOR CALCULUS
Gradient as Surface Normal
dx dy dz
Tangent Vector r0 = [ , , ]
dt dt dt
YASIR ALI VECTOR CALCULUS
Gradient as Surface Normal
dx dy dz
Tangent Vector r0 = [ , , ]
dt dt dt
∇f .r0 = 0
YASIR ALI VECTOR CALCULUS
Gradient as Surface Normal
YASIR ALI VECTOR CALCULUS
Divergence and Curl
YASIR ALI VECTOR CALCULUS
Find the divergence and the curl of the vector field
F (x, y , z) = x 2 y iˆ + 2y 3 z jˆ + 3z k̂.
∂F1 ∂F2 ∂F3
div F = + + = 2xy + 6y 2 z + 3
∂x ∂y ∂z
i j k
∂ ∂ ∂ 3 2
curl F = ∂x ∂y ∂z = −2y i − x k
x 2 y 2y 3 z 3z
YASIR ALI VECTOR CALCULUS
Divergence and Curl
YASIR ALI VECTOR CALCULUS
Divergence and Curl
YASIR ALI VECTOR CALCULUS
Divergence of F~ = [F1 , F2 , F3 ]
∂F1 ∂F2 ∂F3
Div F~ = ∇.F~ = + +
∂x ∂y ∂z
Source Sink
∇ · F~ > 0 =⇒ source, ∇ · F~ < 0 =⇒ sink.
When ∇ · F~ = 0, then the point (x, y , z) is neither a source nor a sink.
A fluid whose flow field has zero divergence is said to be incompressible.
YASIR ALI VECTOR CALCULUS
Divergence
We show physical examples of a fluid flow field, where we represent the
fluid by a finite number of particles to show the structure of the flow. In
Figure (a), particles (fluid elements) appear at the center and then flow
downward under the effect of gravity. That is, we create particles at the
origin, and they subsequently flow away from their creation point. We also
call this a diverging flow, since the particles appear to “diverge" from the
creation point. Figure (b) is the converse of this, a converging flow, or a
“sink" of particles.
YASIR ALI VECTOR CALCULUS
Roughly speaking, the divergence measures outflow minus
inflow.
YASIR ALI VECTOR CALCULUS
Curl
CurlF = ∇ × F
CurlF = ∇ × F = 0 Irrotational Flow
YASIR ALI VECTOR CALCULUS
Curl and Conservative Field
If F is conservative, then ∇ × F = 0.
Determine whether the following vector fields are conservative:
1 F = [cos x − z, y 2 , xz]
2 G = [2xz, 3z 2 , x 2 + 6yz]
1 ∇ × F = [0, −1 − z, 0] 6= 0,
YASIR ALI VECTOR CALCULUS
Curl and Conservative Field
If F is conservative, then ∇ × F = 0.
Determine whether the following vector fields are conservative:
1 F = [cos x − z, y 2 , xz]
2 G = [2xz, 3z 2 , x 2 + 6yz]
1 ∇ × F = [0, −1 − z, 0] 6= 0,F is not conservative.
2 ∇ × G = 0.
YASIR ALI VECTOR CALCULUS
Curl and Conservative Field
If F is conservative, then ∇ × F = 0.
Determine whether the following vector fields are conservative:
1 F = [cos x − z, y 2 , xz]
2 G = [2xz, 3z 2 , x 2 + 6yz]
1 ∇ × F = [0, −1 − z, 0] 6= 0,F is not conservative.
2 ∇ × G = 0. Above result is not applicable to test that Field is
conservative.
YASIR ALI VECTOR CALCULUS
Conservative Field and Potential Function
Laplacian ∇.(∇f ) ∇ × ∇f
∇.(∇f ) = ∇2 f ∇ × ∇f = 0
For scalar function f , the vector field G = ∇f is called the gradient
field for the function f . We call f a potential function for G.
Whenever G = ∇f , for some scalar function f , we refer to G as a
conservative vector field.
Notice that
G = [2xz, 3z 2 , x 2 + 6yz] = ∇ x 2 z + 3yz 2
Since we have found a potential function for G, so G conservative field.
YASIR ALI VECTOR CALCULUS
Curl
YASIR ALI VECTOR CALCULUS