You are on page 1of 4

Engineering Mathematics I Lecture 11: Gradient, Prof. Dr.

Emad Al-Hemiary
Second Year, First Semester Divergence, and Curl
2021-2022

Gradient of a scalar field


Given a scalar function 𝑓(𝑥, 𝑦, 𝑧) that is defined and differentiable in a domain in 3-space with
Cartesian coordinates 𝑥, 𝑦, 𝑧. We denote the gradient of that function by 𝑔𝑟𝑎𝑑 𝑓 or ∇𝑓 (read
nabla). Then the gradient of 𝑓(𝑥, 𝑦, 𝑧),
𝜕𝑓 𝜕𝑓 𝜕𝑓 𝜕𝑓 𝜕𝑓 𝜕𝑓
grad 𝑓 = ∇𝑓 = [ , , ]= 𝑖⃑ + 𝑗⃑ + ⃑⃑
𝑘 (11.1)
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
The ∇ operator is defined as:
𝜕 𝜕 𝜕
∇= 𝑖⃑ + 𝑗⃑ + 𝑘 ⃑⃑ (11.2)
𝜕𝑥 𝜕𝑦 𝜕𝑧

Directional Derivative
𝑑𝑓
The directional derivative ⃑⃑⃑⃑⃑
𝐷𝑏 𝑓 or 𝑑𝑠 of a function 𝑓(𝑥, 𝑦, 𝑧) at a point 𝑃 in the direction of a vector
𝑏⃑⃑ is defined by:
𝑑𝑓 𝑓(𝑄) − 𝑓(𝑃)
⃑⃑⃑⃑⃑
𝐷𝑏 𝑓 = = lim (11.3)
𝑑𝑠 𝑠→0 𝑠
Representing the Line L in the figure by a vector function:
⃑⃑ = 𝑝⃑0 + 𝑠𝑏⃑⃑
𝑟⃑(𝑠) = 𝑥(𝑠)𝑖⃑ + 𝑦(𝑠)𝑗⃑ + 𝑧(𝑠)𝑘 (|𝑏⃑⃑| = 1) (11.4)

𝑝⃑0 is the position of the vector at point 𝑃. Therefor Eq. (11.3) is the derivative of the function
𝑓(𝑥(𝑠), 𝑦(𝑠), 𝑧(𝑠)) with respect to the arc length 𝑠 of 𝐿. Hence:

𝑑𝑓
⃑⃑⃑⃑⃑
𝐷𝑏 𝑓 = = 𝑏⃑⃑ ∙ ∇𝑓 (𝑏⃑⃑ 𝑖𝑠 𝑎 𝑢𝑛𝑖𝑡 𝑣𝑒𝑐𝑡𝑜𝑟 |𝑏⃑⃑| = 1) (11.5)
𝑑𝑠

𝑑𝑓 1
⃑⃑⃑⃑⃑
𝐷𝑎 𝑓 = = 𝑎⃑ ∙ ∇𝑓 (𝑎⃑ 𝑖𝑠 𝑎 𝑣𝑒𝑐𝑡𝑜𝑟 𝑜𝑓 𝑎𝑛𝑦 𝑙𝑒𝑛𝑔𝑡ℎ) (11.6)
𝑑𝑠 |𝑎⃑|

Example 11.1: Find the directional derivative of 𝑓(𝑥, 𝑦, 𝑧) = 2𝑥 2 + 3𝑦 2 + 𝑧 2 at 𝑃: (2,1,3) in the


direction of 𝑎⃑ = [1,0, −2].
Solution:
1 The minus sign indicates
⃑⃑⃑⃑⃑
𝐷𝑎 𝑓 = 𝑎⃑ ∙ ∇𝑓
|𝑎⃑| that at P the function 𝑓 is
decreasing in the direction
∇𝑓 = [4𝑥, 6𝑦, 2𝑧] → ∇𝑓|𝑃:(2,1,3) = [4(2),6(1),2(3)] = [8,6,6] of 𝑎⃑
1 1 1
𝑎⃑ = [1,0, −2] = [1,0, −2]
|𝑎⃑| √12 + 02 + (−2)2 √5

1
Engineering Mathematics I Lecture 11: Gradient, Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Divergence, and Curl
2021-2022

1 1 1 1 4
⃑⃑⃑⃑⃑
𝐷𝑎 𝑓 = 𝑎⃑ ∙ ∇𝑓 = [1,0, −2] ∙ [8,6,6] = {(1)(8) + (0)(6) + (−2)(6)} = (−4) = −
|𝑎⃑| √5 √5 √5 √5
Use of Gradient: Direction of Maximum Increase
From Eq. (11.5):
𝑑𝑓
⃑⃑⃑⃑⃑
𝐷𝑏 𝑓 = = 𝑏⃑⃑ ∙ ∇𝑓 (𝑏⃑⃑ 𝑖𝑠 𝑎 𝑢𝑛𝑖𝑡 𝑣𝑒𝑐𝑡𝑜𝑟 |𝑏⃑⃑| = 1)
𝑑𝑠
Which is the dot product between the unit vector 𝑏⃑⃑ and the gradient of 𝑓. Recalling that the dot
product is defined by multiplying the magnitudes of the two vectors and cosine of the angle
between them. Therefore:

𝐷𝑏 𝑓 = |𝑏⃑⃑| ∙ |∇𝑓| cos 𝜑 = |∇𝑓| cos 𝜑


⃑⃑⃑⃑⃑ (11.7)

Setting 𝜑 = 0 → ⃑⃑⃑⃑⃑
𝐷𝑏 𝑓 = |∇𝑓| which is the direction of maximum increase of 𝑓 at 𝑃 provided that
∇𝑓 ≠ 0.

Gradient as Surface Normal Vector


Let 𝑓 be a differentiable scalar function in space. Let
𝑓(𝑥, 𝑦, 𝑧) = 𝑐 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 represent a surface 𝑆. Then if
the gradient of 𝑓 at a point 𝑃 of 𝑆 is not the zero vector, it
is a normal vector of 𝑺 at 𝑷.
Example 11.2: Find a unit normal vector 𝑛⃑⃑ of the cone of
revolution 𝑧 2 = 4(𝑥 2 + 𝑦 2 ) at the point 𝑃: (1,0,2)
Solution:
The cone is the level surface 𝑓 = 0:
𝑓(𝑥, 𝑦, 𝑧) = 4(𝑥 2 + 𝑦 2 ) − 𝑧 2
∇𝑓 = [8𝑥, 8𝑦, −2𝑧] → ∇𝑓|𝑃:(1,0,2) = [8(1), 8(0), −2(2)]
= [8,0, −4]
Thus:
1 1 1
𝑛⃑⃑ = ∇𝑓 = [8,0, −4] = [8,0, −4]
|∇𝑓| √82 + 02 + (−4)2 √80
1
= [2,0, −1]
√5
𝑛⃑⃑ points downward since it has a negative z-component.

2
Engineering Mathematics I Lecture 11: Gradient, Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Divergence, and Curl
2021-2022

Divergence of a Vector Field


Let 𝑣⃑(𝑥, 𝑦, 𝑧) be a differentiable vector function, where 𝑥, 𝑦, 𝑧 are Cartesian coordinates, and let
𝑣1 , 𝑣2 , 𝑣3 be the components of 𝑣. Then the function
𝜕 𝜕 𝜕 𝜕𝑣1 𝜕𝑣2 𝜕𝑣3
div 𝑣⃑ = ∇ ∙ 𝑣⃑ = [ , , ] ∙ [𝑣1 , 𝑣2 , 𝑣3 ] = + + (11.8)
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
Is the divergence of the vector field defined by 𝑣.

Laplacian: The divergence of the gradient of a scalar function 𝒇


𝜕 2𝑓 𝜕 2𝑓 𝜕 2𝑓
div(grad 𝑓) = ∇ ∙ ∇𝑓 = ∇2 𝑓 = + + (11.9)
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2
Example 11.3: Given the vector field 𝑣⃑ = [3𝑥𝑧, 2𝑥𝑦, −𝑦𝑧 2 ]. Find the divergence.
Solution:
𝜕𝑣1 𝜕𝑣2 𝜕𝑣3
∇ ∙ 𝑣⃑ = + + = 3𝑧 + 2𝑥 − 2𝑦𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

Curl of a Vector Field


Let 𝑣⃑(𝑥, 𝑦, 𝑧) = [𝑣1 , 𝑣2 , 𝑣3 ] be a differentiable vector function of the Cartesian coordinates 𝑥, 𝑦, 𝑧.
Then the curl of the vector function 𝑣⃑ or of the vector field given by 𝑣⃑ is defined by the
“symbolic” determinant:

𝑖⃑ 𝑗⃑ ⃑⃑
𝑘 𝜕 𝜕 𝜕 𝜕 𝜕 𝜕
curl 𝑣⃑ = ∇ × 𝑣⃑ = | 𝜕 𝜕 𝜕 ⃑⃑
| = |𝜕𝑦 𝜕𝑧| 𝑖⃑ − |𝜕𝑥 𝜕𝑧| 𝑗⃑ + |𝜕𝑥 𝜕𝑦| 𝑘
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝑣2 𝑣3 𝑣1 𝑣3 𝑣1 𝑣2
𝑣1 𝑣2 𝑣3
𝜕𝑣3 𝜕𝑣2 𝜕𝑣1 𝜕𝑣3 𝜕𝑣2 𝜕𝑣1
=( − ) 𝑖⃑ + ( − ) 𝑗⃑ + ( − )𝑘⃑⃑ (11.10)
𝜕𝑦 𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑥 𝜕𝑦
Example 11.4: Let 𝑣⃑ = [𝑦𝑧, 3𝑧𝑥, 𝑧]. Find the curl.
Solution:

3
Engineering Mathematics I Lecture 11: Gradient, Prof. Dr. Emad Al-Hemiary
Second Year, First Semester Divergence, and Curl
2021-2022

𝑖⃑ 𝑗⃑ 𝑘⃑⃑ 𝑖⃑ 𝑗⃑ 𝑘⃑⃑

∇ × 𝑣⃑ = | 𝜕 𝜕 𝜕|=|𝜕 𝜕 𝜕| ⃑⃑ = −3𝑥𝑖⃑ + 𝑦𝑗⃑ + 2𝑧𝑘


⃑⃑
| | = (0 − 3𝑥)𝑖⃑ + (𝑦 − 0)𝑗⃑ + (3𝑧 − 𝑧)𝑘
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝑣1 𝑣2 𝑣3 𝑦𝑧 3𝑧𝑥 𝑧

𝑮𝒓𝒂𝒅, 𝑫𝒊𝒗, 𝑪𝒖𝒓𝒍

Gradient fields are irrotational. That is, if a continuously differentiable vector function is the
gradient of a scalar function , then its curl is the zero vector,

curl(grad 𝑓) = ∇ × ∇𝑓 = ⃑0⃑ (11.11)

The divergence of the curl of a twice continuously differentiable vector function 𝑣⃑ is zero,
div(curl 𝑣⃑) = ∇ ∙ (∇ × 𝑣⃑) = 0 (11.12)

You might also like