You are on page 1of 29

Vector Algebra and Calculus

1. Revision of vector algebra, scalar product, vector product


2. Triple products, multiple products, applications to geometry
3. Differentiation of vector functions, applications to mechanics
4. Scalar and vector fields. Line, surface and volume integrals, curvilinear co-ordinates
5. Vector operators — grad, div and curl
6. Vector Identities, curvilinear co-ordinate systems
7. Gauss’ and Stokes’ Theorems and extensions
8. Engineering Applications
6. Vector Operators: Grad, Div and Curl

• We introduce three field operators which reveal interesting collective field properties, viz.
– the gradient of a scalar field,
– the divergence of a vector field, and
– the curl of a vector field.
• There are two points to get over about each:

– The mechanics of taking the grad, div or curl, for which you will need to brush up your calculus of several
variables.
– The underlying physical meaning — that is, why they are worth bothering about.
The gradient of a scalar field 6.2

• Recall the discussion of temperature distribution, where we wondered how a scalar would vary as we moved off in
an arbitrary direction ...
• If U(r) is a scalar field, its gradient is defined in Cartesians coords by
∂U ∂U ∂U
gradU = ı̂ + ̂ + k̂ .
∂x ∂y ∂z

• It is usual to define the vector operator ∇


 
∂ ∂ ∂
∇ = ı̂ + ̂ + k̂
∂x ∂y ∂z
which is called “del” or “nabla”. We can write gradU ≡ ∇ U
NB: gradU or ∇U is a vector field!
• Without thinking too hard, notice that gradU tends to point in the direction of greatest change of the scalar field U
The gradient of a scalar field 6.3

0.1

0.08

0.06

0.04

0.02

0
4

2 4
2
0
0
−2
−2
−4 −4
♣ Examples of gradient evaluation 6.4

1. U =hx 2 i
∂ ∂ ∂
∇ U = ı̂ ∂x + ̂ ∂y + k̂ ∂z x2
Only ∂/∂x exists so
∇ U = 2xı̂ .

2. U = r 2 = x 2 + y 2 + z 2, so
 
∂ ∂ ∂
∇ U = ı̂ + ̂ + k̂ (x 2 + y 2 + z 2)
∂x ∂y ∂z
= 2xı̂ + 2y̂ + 2z k̂
= 2r
.

3. U = c · r, where c is constant.
 
∂ ∂ ∂
∇ U = ı̂ + ̂ + k̂ (c1x + c2y + c3 z )
∂x ∂y ∂z
= c1 ı̂ + c2 ̂ + c3k̂ = c .
♣ Another Example ... 6.5
p
4. U = f (r ), where r = (x 2 + y 2 + z 2 )
U is a function of r alone so df /dr exists. As U = f (x, y , z ) also,
∂f df ∂r ∂f df ∂r ∂f df ∂r
= = = .
∂x dr ∂x ∂y dr ∂y ∂z dr ∂z
 
∂f ∂f ∂f df ∂r ∂r ∂r
⇒ ∇U = ı̂ + ̂ + k̂ = ı̂ + ̂ + k̂
∂x ∂y ∂z dr ∂x ∂y ∂z
p
But r = x 2 + y 2 + z 2, so ∂r /∂x = x/r and similarly for y , z .
!
df xı̂ + y̂ + z k̂ df  r 
⇒ ∇U = = .
dr r dr r

Note that f (r ) is spherically symmetrical and the resultant vector field is radial out of a sphere.
The significance of grad 6.6

• We know that the total differential and grad are defined as


∂U ∂U ∂U ∂U ∂U ∂U
dU = dx + dy + dz & ∇ U = ı̂ + ̂ + k̂
∂x ∂y ∂z ∂x ∂y ∂z
• So, we can rewrite the change in U as
dU = ∇ U · (dxı̂ + dy̂ + dz k̂) = ∇ U · dr

• Conclude that

∇ U · dr is the small change in U when we move by dr


Significance /ctd 6.7

• We also know (Lecture 3) that dr has magnitude ds.


• So divide by ds r
 
dU dr
⇒ = ∇U · gradU
ds ds U(r)
dr
U(r + dr)

• But dr/ds is a unit vector in the direction of dr.


• Conclude that

gradU has the property that the rate of change of U wrt distance in any direction d̂ is the projection of
gradU onto that direction d̂
Directional derivatives 6.8

• That is
dU
(in direction of d̂) = ∇ U · d̂
ds
• The quantity dU/ds is called a directional derivative.
• In general, a directional derivative
– had a different value for each direction,
– has no meaning until you specify the direction.
• We could also say that

At any point P, gradU


* points in the direction of greatest rate of change of U wrt distance at P, and
* has magnitude equal to the rate of change of U wrt distance in that direction.
Grad perpendicular to U constant surface 6.9

• Think of a surface of constant U — the locus (x, y , z ) for U(x, y , z ) = const


• If we move a tiny amount within the surface, that is in any tangential direction, there is no change in U, so
dU/ds = 0. So for any dr/ds in the surface
dr
∇U · = 0.
ds

gradU

Conclusion is that:
gradU is NORMAL to a surface
of constant U

Surface of constant U Surface of constant U


These are called Level Surfaces
The divergence of a vector field 6.10

• Let a be a vector field:


a(x, y , z ) = a1ı̂ + a2̂ + a3k̂
• The divergence of a at any point is defined in Cartesian co-ordinates by
∂a1 ∂a2 ∂a3
div a = + +
∂x ∂y ∂z

• The divergence of a vector field is a scalar field.


• We can write div as a scalar product with the ∇ vector differential operator:
 
∂ ∂ ∂
div a ≡ ı̂ + ̂ + k̂ ·a≡∇·a
∂x ∂y ∂z
♣ Worked examples of divergence evaluation 6.11

a diva
xı̂ 1
r(= xı̂ + y̂ + z k̂) 3
r/r 3 0
rc (r · c)/r where c is constant
Eg 3: div (r/r 3) = 0
The x component of r/r 3 is x.(x 2 + y 2 + z 2 )−3/2
We need to find ∂/∂x of it ...

∂ −3 −3 −3 2 −5
x.(x 2 + y 2 + z 2 ) 2 = 1.(x 2 + y 2 + z 2) 2 + x (x + y 2 + z 2) 2 .2x
∂x 2
−3 2 −2

= r 1 − 3x r
Adding this to similar terms for y and z gives
−3 −2
2 2 2
= r −3 (3 − 3) = 0

r 3 − 3(x + y + z )r
The significance of div 6.12

dz
• Consider vector field f(r) (eg water flow).
dS = dS =
This vector has magnitude equal to the mass of
water crossing a unit area perpendicular to the −dxdzj +dxdz j
direction of f per unit time.
• Take volume element dV and compute balance of
y
the flow of f in and out of dV .
dx
dy
x
• Look at the shaded face on the left
The contribution to OUTWARD flux from surface is
f(y ) · dS = [fx (y )ı̂ + fy (y )̂ + fz (y )k̂] · (−dx dz ̂) = − fy (y )dxdz .
Look at the shaded face on the right ... 6.13

• A similar contribution, but of opposite sign, will arise from the z


opposite face ...
dz
• BUT! we must remember that we have moved along y by an dS = dS =
amount dy . −dxdzj +dxdz j
• So that this OUTWARD amount is
f(y + dy ) · dS = fy (y + dy )dxdz y
 
∂fy dx
= fy + dy dxdz
∂y dy
x
• Hence the total outward amount from these two faces is
 
∂fy ∂fy ∂fy
−fy dxdz + fy + dy dxdz = dy dxdz = dV
∂y ∂y ∂y
The significance of div, ctd 6.14

z
• Repeat: Total efflux from these faces is
dz
∂fy ∂fy dS = dS =
dy dxdz = dV
∂y ∂y −dxdzj +dxdz j
• Summing the other faces gives a total outward flux

∂fx ∂fy ∂fz
 y
+ + dV = (∇ ∇ · f) dV
∂x ∂y ∂z dx
dy
x
• Conclusion:

The divergence of a vector field represents the flux generation per unit volume at each point of the field.
* Divergence because it is an efflux not an influx.
* We also saw that the total efflux from the infinitesimal volume was equal to the flux integrated over the surface
of the volume.
The Laplacian: div(gradU) of a scalar field 6.15

• gradU of any scalar field U is a vector field. We can take the div of any vector field. ⇒we can certainly compute
div(gradU)
    
∂ ∂ ∂ ∂ ∂ ∂
∇U) = ı̂ + ̂
∇ · (∇ + k̂ · ı̂ + ̂ + k̂ U
∂x ∂y ∂z ∂x ∂y ∂z
   
∂ ∂ ∂ ∂ ∂ ∂
= ı̂ + ̂ + k̂ · ı̂ + ̂ + k̂ U
∂x ∂y ∂z ∂x ∂y ∂z
 2 2 2

∂ U ∂ U ∂ U
= + + 2
∂x 2 ∂y 2 ∂z

• The operator ∇2 (del-squared) is called the Laplacian


 2 2 2

∂ ∂ ∂
∇2 U = + + U
∂x 2 ∂y 2 ∂z 2
and often appears in engineering in Laplace’s equation and Poisson’s equation
∇2 U = 0 and ∇2 U = ρ
♣ Examples of ∇2U evaluation 6.16

U ∇2 U
r 2(= x 2 + y 2 + z 2 ) 6
xy 2z 3 2xz 3 + 6xy 2z
1/r 0
Let’s prove the last example
1
1/r = (x 2 + y 2 + z 2)− 2 and so
∂2 2 2 2 − 12 ∂ 2 2 2 −3/2
(x + y + z ) = − x.(x + y + z )
∂x 2 ∂x
= −(x 2 + y 2 + z 2)−3/2 + 3x.x.(x 2 + y 2 + z 2 )−5/2
x2
 
1
= 3 −1 + 3 2
r r
Adding up similar terms for y and z
(x 2 + y 2 + x 2)
 
1 1
∇2 = 3 −3 + 3 =0
r r r2
The curl of a vector field 6.17

• So far we have seen the operator ∇ ...


(i) Applied to a scalar field ∇ U; and (ii) Dotted with a vector field ∇ · a.
• You are now overwhelmed by irrestible urge to ...
(iii) cross it with a vector field: ∇×a
• This gives the curl of a vector field
∇ × a ≡ curl(a)
• We can follow the pseudo-determinant recipe for vector products, so that

ı̂ ̂ k̂      

∂ ∂ ∂
∂a z ∂a y ∂a x ∂a z ∂a y ∂a x
∇ × a = ∂x ∂y ∂z = − ı̂ + − ̂ + − k̂
∂y ∂z ∂z ∂y ∂x ∂y

ax ay az

♣ Examples of curl evaluation 6.18

a ∇×a
−yı̂ + x̂ 2k̂
x 2y 2 k̂ 2x 2yı̂ − 2xy 2 ̂
2nd example:

ı̂ ̂ k̂

∇ × (x 2 y 2k̂) = ∂/∂x ∂/∂y ∂/∂z
0 0 x 2y 2
= ı̂x 22y − ̂2xy 2
= 2x 2yı̂ − 2xy 2 ̂
The signficance of curl 6.19

• First example gives a clue ... the field a = −yı̂ + x̂ is sketched below.
• This field has a curl of 2k̂, which is in the r-h screw direction out of the page.
H
• You can also see that a field like this must give a finite value to the line integral around the complete loop C a · dr.

y y

x x
The signficance of curl 6.20

• In fact curl is closely related to the line integral around a loop.


• The circulation of a vector field a round any closed curve C is defined to be
I
a · dr
C

The curl of the vector field a represents the


* the vorticity, or
* the circulation per unit area in the direction of the area’s normal
The signficance of curl, ctd 6.21
The signficance of curl, ctd 6.22

y a(x, y + dy , z) a(x + dx, y + dy , z)

y + dy

a(x + dx, y , z)

a(x, y , z) x
x + dx
The signficance of curl, ctd 6.23

y
dr = [−dx, 0, 0]
y + dy

dr = [0, −dy , 0] dr = [0, dy , 0]

x
dr = [dx, 0, 0] x + dx

• Consider the circulation round the perimeter of a rectangle dx by dy ...


The signficance of curl, ctd 6.24

y a(x, y + dy , z )

[−dx, 0, 0]
y + dy

[0, −dy , 0] [0, dy , 0]


a(x + dx, y , z )

a(x, y , z ) [dx, 0, 0] x
x + dx

I
   
a · dr = a(x, y , z ). dx 0 0 + a(x + dx, y , z ). 0 dy 0
C    
+a(x, y + dy , z ). −dx 0 0 + a(x, y , z ). 0 −dy 0
The signficance of curl, ctd 6.25

I
   
a · dr = a(x, y , z ). dx 0 0 + a(x + dx, y , z ). 0 dy 0
C    
+a(x, y + dy , z ). −dx 0 0 + a(x, y , z ). 0 −dy 0
= ax (x, y , z )dx + ay (x + dx, y , z )
−ax (x, y + dy , z )dx − ay (x, y , z )dy
∂ay
= ax dx + ay dy + dxdy
∂x
∂ax
−ax dx − dy dx − ay dy
∂y
 
∂ay ∂ax
= − dxdy
∂x ∂y
∇ × a) · dxdy k̂
= (∇
∇ × a) · dS
= (∇
The signficance of curl, ctd 6.26

• Rceapping: consider circulation round the perimeter of a rectangle dx by dy

y
ax (y+dy)
y+dy
• The fields in the x-direction at bottom and top are
∂ax

ay (x+dx)
ax (y ) and ax (y + dy ) = ax (y ) + dy
∂y dy

ay (x)
• The fields in the y -direction at left and right are
∂ay dx
ay (x) and ay (x + dx) = ay (x) + dx
∂x y x+dx
x

ax (y)
• Summing around from the bottom in anticlockwise order
dC = + [ax (y ) dx] + [ay (x + dx) dy ] − [ax (y + dy ) dx] − [ay (x) dy ]
 
∂ay ∂ax
= − dx dy = (∇ ∇ × a) · dxdy k̂ = (∇ ∇ × a) · dS
∂x ∂y
Some definitions involving div, curl and grad 6.27

• A vector field with zero divergence is said to be

solenoidal.
• A vector field with zero curl is said to be

irrotational.
• A scalar field with zero gradient is said to be

constant.
Summary 6.28

• Today we’ve introduced ...

– The gradient of a scalar field


– The divergence of a vector field
– The Laplacian
– The curl of a vector field

• We’ve described the grunt of working these out in Cartesian coordinates ...
If your partial differentiation is flaky, sort it.
• We’ve given some insight into what “physical” aspects of fields they relate too.
Worth spending time thinking about these. Vector calculus is the natural language of engineering in 3 vector spaces..

You might also like