You are on page 1of 44

Chapter 3

Vector Analysis

Contents
3.1 Basic Laws of Vector Algebra . . . . . . . . . . . . . . 3-3
3.1.1 Equality of Two Vectors . . . . . . . . . . . . . 3-4
3.1.2 Vector Addition and Subtraction . . . . . . . . . 3-5
3.1.3 Position and Distance Vectors . . . . . . . . . . 3-6
3.1.4 Vector Multiplication . . . . . . . . . . . . . . . 3-7
3.1.5 Scalar and Vector Triple Products . . . . . . . . 3-9
3.2 Orthogonal Coordinate Systems . . . . . . . . . . . . 3-13
3.2.1 Cartesian Coordinates . . . . . . . . . . . . . . 3-14
3.2.2 Cylindrical Coordinates . . . . . . . . . . . . . 3-15
3.2.3 Spherical Coordinates . . . . . . . . . . . . . . 3-20
3.3 Coordinate Transformations . . . . . . . . . . . . . . 3-24
3.3.1 Cartesian to Cylindrical Transformations . . . . 3-25
3.3.2 Cartesian to Spherical Transformations . . . . . 3-26
3.3.3 Cylindrical to Spherical Transformations . . . . 3-27
3.3.4 Distance Between Two Points . . . . . . . . . . 3-27
3.4 Gradient of a Scalar Field . . . . . . . . . . . . . . . . 3-28
3.4.1 Gradient Operator in Cylindrical and Spherical
Coordinates . . . . . . . . . . . . . . . . . . . . 3-31

3-1
CHAPTER 3. VECTOR ANALYSIS

3.4.2 Properties of the Gradient Operator . . . . . . . 3-31


3.5 Divergence of a Vector Field . . . . . . . . . . . . . . 3-32
3.6 Curl of a Vector Field . . . . . . . . . . . . . . . . . . 3-40
3.7 Laplacian Operator . . . . . . . . . . . . . . . . . . . 3-44

3-2
3.1. BASIC LAWS OF VECTOR ALGEBRA

This chapter departs from the study and analysis of electromag-


netic concepts where 1D scalar quantities was sufficient. Voltage,
current, time, and 1D position will continue to be quantities of inter-
est, but more is needed to prepare for future chapters.
In what lies ahead the vector field quantities E and H are of cen-
tral importance. To move forward with this agenda we will start with
a review of vector algebra, review of some analytic geometry, review
the orthogonal coordinate systems Cartesian (rectangular), cylindri-
cal, and spherical, then enter into a review of vector calculus. The
depth of this last topic will likely be more intense than any earlier
experiences you can remember.

3.1 Basic Laws of Vector Algebra


 The Cartesian coordinate system should be familiar to you from
earlier math and physics courses
 The vector A is readily written in terms of the cartesian unit
vectors xO , yO , and zO
A D xO Ax C yO Ay C zO Az

 In linear algebra xO , yO , and zO are known as basis vectors, each


having unit length, i.e., jOxj and mutually orthogonal
 Also, the length of A is
q
A D A2x C Ay2 C A2z
and the unit vector in the A direction is
A xO Ax C yO Ay C zO Az
aO D D q
A A2 C A2 C A2
x y z

3-3
CHAPTER 3. VECTOR ANALYSIS

3
2
1 z
y
y
1 1 2 3
2 x
3
x
(a) Base vectors

Az

A
Az

Ay
y
Ax Ar

x
(b) Components of A

Figure 3.1:Figure
Expressing3-2 the A in termssystem:
vectorcoordinate
Cartesian the Cartesian
(a) base unit vec-
tors. vectors x , y , and z , and (b) components of vector A.

3.1.1 Equality of Two Vectors

 Vectors A and B are equal if their components are equal, i.e.,


Ax D Bx , etc.

3-4
3.1. BASIC LAWS OF VECTOR ALGEBRA

3.1.2 Vector Addition and Subtraction


 Addition of vectors means that the individual components are
added together, that is

CDACB
D xO .Ax C Bx / C yO .Ay C By / C zO .Az C Bz /;

thus Cx D Ax C Bx , etc.

 Visually you can utilize the head-to-tail or parallelogram rules

C A
A C

B B
(a) Parallelogram rule (b) Head-to-tail rule

Figure 3-3Figure 3.2: Vector addition rules.


Vector addition by (a) the parallelogram rule
and (b) the head-to-tail rule.

 Vector subtraction is similar

DDA B
D xO .Ax Bx / C yO .Ay By / C zO .Az Bz /;

thus Dx D Ax Bx , etc.

3-5
CHAPTER 3. VECTOR ANALYSIS

3.1.3 Position and Distance Vectors


z

z2
P1 = (x1, y1, z1)

z1 R12 P2 = (x2, y2, z2)

R1 R2

y1 y2
O y
x1
x2

x
Figure 3.3: The notion of the position vector a point, P , R , and
to
Figure 3-4 Distance vector R12 = P1 P2 = R2 Ri 1 , i
distancewhere
between, Pi and
R and Pj , the
R are Rij position
are vectors.
vectors of points P
1 2 1
and P2 , respectively.
 Formally a position vector starts at the origin, so we use the
notation
!
Ri D OPi D xO xi C yO yi C zO zi
where xi , yi , and zi correspond to the point Pi D .xi ; yi ; zi /

 The scara distance between two points is just d D jRij j


q
d D .xj xi /2 C .yj yi /2 C .zj zi /2

3-6
3.1. BASIC LAWS OF VECTOR ALGEBRA

3.1.4 Vector Multiplication


 Vector multiplication takes the form

scalar  vector:

B D kA D element-by-element multiply by k

scalar product or dot product:

A  B D AB cos AB

where AB is the angle between the vectors (as in linear


algebra)
Note: A cos AB is the component of A along B and B cos AB
is the component of B along A
Also,

A  A D jAj2 D A2
p
A D jAj D A  A

Using the inverse cosine


 
1 AB
AB D cos p p
AA BB
Finally,

A  A D Ax Bx C Ay By C Az Bz

Commutative and Distributive


ABDBA
A  .B C C/ D A  B C A  C
3-7
CHAPTER 3. VECTOR ANALYSIS

 Vector product or cross product:

O
A  B D nAB sin AB

where nO is a unit vector normal to the plane containing A and


B (see picture below for details)
z
A B = n AB sin AB

n B
AB
y

x A
(a) Cross product

AB

A
(b) Right-hand rule
Figure 3.4: The
Figure 3-6 cross product
Cross AA
product B
andB the right-hand
points in the rule.
which is perpendicular to the plane
direction n,
containing
The crossAproduct is anticommuntative
and B and defined by the right-hand rule.

ABD BA
3-8
3.1. BASIC LAWS OF VECTOR ALGEBRA

The cross product is distributive

A  .B C C/ D A  B C A  C

To calculate use the determinant formula



xO yO zO

A  B D Ax Ay Az

Bx By Bz
D xO .Ay Bz Az By / C yO .Az Bx A x Bz /
C zO .Ax By Ay Bx /

3.1.5 Scalar and Vector Triple Products


 Certain, make sense, vector products arise in electromagnetics

Scalar Triple Product


 Definition:
A  .B  C/ D B  .C  A/ D C  .A  B/

Ax Ay Az

D Bx By Bz
Cx Cy Cz

Vector Triple Product


 Definition
A  .B  C/

 Note:
A  .B  C/ .A  B/  C/

3-9
CHAPTER 3. VECTOR ANALYSIS

 It can however be shown that

A  .B  C/ D B.A  C/ C.A  B/;

which is known as the bac-cab rule

Example 3.1: Numpy for Vector Numerics

 To make things more convenient define the helper function


vec_fmt (see Chapter 3 Jupyter notebook)

Figure 3.5: Using Numpy for basic vector numerical calculations.

3-10
3.1. BASIC LAWS OF VECTOR ALGEBRA

Figure 3.6: Using Numpy for more vector numerical calculations.

3-11
CHAPTER 3. VECTOR ANALYSIS

Example 3.2: TI Nspire CAS

 The TI nspire CAS can do both numerical and symbolic calcu-


lations

 Numerical examples are given below

TI Nspire CAS: Portions of Text Example 3-1

Figure 3.7: Using the TI Nspire CAS for vector numerics.

3-12
3.2. ORTHOGONAL COORDINATE SYSTEMS

3.2 Orthogonal Coordinate Systems


 There three orthogonal coordinate systems in common usage
in electromagnetics:

The Cartesian or rectangular system: xO Ax C yO Ay C zO Az


O  C zO Az
The cylindrical system: rO Ar C A
O R C A
The spherical system: RA O  C A
O 

Table 3.1: Vector relations in the three common coordinate systems.


Table 3-1 Summary of vector relations.
Cartesian Cylindrical Spherical
Coordinates Coordinates Coordinates
Coordinate variables x, y, z r, , z R, ,
Vector representation A = x Ax + y Ay + z Az r Ar + A + z Az R + A + A
RA
( ( (
Magnitude of A |A| = +
A2x + A2y + A2z + A2 + A2 + A2 + A2 + A2 + A2
r z R

1,
Position vector OP1 = x x1 + y y1 + z z1 , r r1 + z z1 , RR
for P(x1 , y1 , z1 ) for P(r1 , 1 , z1 ) for P(R1 , 1 , 1 )
Base vectors properties x x = y y = z z = 1 r r = = z z = 1
RR = = = 1
x y = y z = z x = 0 r = z = z r = 0 = = R
R =0
x y = z r = z =
R
y z = x z = r = R
z x = y z r = R =
Dot product AB = Ax Bx + Ay By + Az Bz Ar Br + A B + Az Bz AR BR + A B + A B
4 4 4 4 4 4
4 x z 44 4 r z 44 4 R 44
4 y 4 4
Cross product B =
A 4 Ax Ay Az 4 4 Ar A Az 4 4 AR A A 4
4 4 4 4 4 4
4 Bx By Bz 4 4 Br B Bz 4 4 BR B B 4

Differential length dl = x dx + y dy + z dz r dr + r d + z dz dR + R d + R sin d


R
Differential surface areas dsx = x dy dz dsr = r r d dz dsR = RR 2 sin d d
dsy = y dx dz ds = dr dz ds = R sin dR d

dsz = z dx dy dsz = z r dr d ds = R dR d
Differential volume d v = dx dy dz r dr d dz R2 sin dR d d

 The three systems are needed to best fit the problem geometry
at hand

3-13
CHAPTER 3. VECTOR ANALYSIS

3.2.1 Cartesian Coordinates

 We will have need of differential quantities of length, area and


volume

Differential Length

d l D xO d lx C yO d ly C zO d lz D xO dx C yO dy C zO dz

Differential Area

 A vector, d s, that is normal to the two coordinates describing


the scalar area ds

 There are three different differential areas, d s, to consider:

d sx D xO d ly d lz D xO dy dz (y z-plane)
d sy D xO dx dz (x z-plane)
d sz D xO dx dy (x y-plane)

Differential Volume

d V D dx dy dz

3-14
3.2. ORTHOGONAL COORDINATE SYSTEMS

z dsz = z dx dy

dy
dx

dsy = y dx dz
dz
dz
dl dv = dx dy dz
dsx = x dy dz

dy
y
dx
x

Figure3-8
Figure 3.8: Differential
Differential length,
length, area,
area, and
and volume.
volume in
Cartesian coordinates.
3.2.2 Cylindrical Coordinates
 The cylindrical system is used for problems involving cylindri-
cal symmetry

 It is composed of: (1) the radial distance r 2 0; 1/, (2) the


azimuthal angle,  2 0; 2/, and z 2 . 1; 1/, which can
be thought of as height
O and zO are mutually
 As in the case of the Cartesian system, rO ; ,
perpendicular or orthogonal to each other, e.g., rO  O D 0, etc.

 Likewise the cross product of the unit vectors produces the


cyclical result

rO  O D zO ; O  zO D rO ; zO  rO D O
3-15
CHAPTER 3. VECTOR ANALYSIS

z = z1 plane

z1 P = (r1, 1, z1)

R1

r = r1 cylinder
O y
1 r1 z

= 1 plane
r
x

Figure 3-9 Point P(r1 , 1 , zFigure 3.9: coordinates;


1 ) in cylindrical A point in the
r1 is the cylindrical the origin in the xy plane, 1 is the
system.
radial distance from
angle in the xy plane measured from the x axis toward the y axis, and z1 is the vertical distance from the xy plane.

 The general vector expansion

O  C zO Az
A D aO jAj D rO Ar C A

is obvious, as is the scalar length


q
jAj D A2r C A2 C A2z

 Looking at 3.9 it is interesting to note that O is absent in the


position vector
!
OP D rO r1 C zO z1;

but is present in the point P .r1; 1; z1/ itself

3-16
3.2. ORTHOGONAL COORDINATE SYSTEMS

dz dsz = z r dr d

r d dr
ds = dr dz

dz dv = r dr d dz

dsr = r r d dz

O y

r

x r d
dr

Figure 3.10: Differential


Figure 3-10 quantitiesareas
Differential in theand
cylindical
volumesystem.
in
cylindrical coordinates.
Differential Quantities

 The differential quantities do not follow from the Cartesian


system

 The differential length of the azimuthal component is also a


function of the radial component, i.e.,

d lr D dr; d l D rd; d lz D dz

 In the end
O
d l D rO dr C rd C zO dz

3-17
CHAPTER 3. VECTOR ANALYSIS

 The differential surface follows likewise

d sr D rO r d dz . z cylindrical surface/
d s D O dr dz .r z plane/
d sz D zO dr d .r  plane/

 The differential area is likely the most familiar from calculus

d V D r dr  dz

Example 3.3: Distance Vector from z-Axis to r -Plane

 When making field calculations due to charge or current along


a line, we need the distance vector shown below:
z

P1 = (0, 0, h)
a

A
O y
0 r 0
P2 = (r0, 0, 0)

Figure 3.11: Distance vector


Figure 3-11 from z-axis
Geometry in r
to point3-3.
of Example  plane.
3-18
3.2. ORTHOGONAL COORDINATE SYSTEMS

 The vector from a point P1 on the z-axis, .0; 0; h/, to a point


P2 in the r-plane, .r0; 0; 0/, is
! !
A D OP 2 OP 1 D rO r0 zO h

 The unit vector is


rO r0 zO h
aO D q
r02 C h2
Note:  is not present!

 Once  D 0 is specified the unambiguous point direction


resolved

Example 3.4: Volume of a Cylinder

 Consider a cylinder of height 2 cm and diameter 3 cm

 Using simple calculus, the surface area of the cylinder is


Z 2 Z 2
D 6 (cm)2

SD r d dz
0 0 rD3=2

 The volume of the cylinder is


3=2 Z 2 Z 2
r 2 3=2 9
Z
VD r d dz dr D 4  D (cm)3
0 0 0 2 0 2

3-19
CHAPTER 3. VECTOR ANALYSIS

3.2.3 Spherical Coordinates


 In this coordinate system a single range variable R plus two
angle variables  and  are employed


R


P = (R1, 1, 1)
R1
= 1
conical 1
surface
y
1



x
Figure 3.12:
FigureThe spherical
3-13 coordinate system showing a point P1
Point P(R1 , 1 , 1 ) in spherical coordi-
O
nates.vector R1 .
and position

 It is composed of: (1) the radial distance r 2 0; 1/, (2) the


azimuthal angle (same as cylindrical),  2 0; 2/, and the
zenith angle  2 0; , which is measured from the positive
z-axis

 All coordinates are again mutually orthogonal to span a 3D


space

3-20
3.2. ORTHOGONAL COORDINATE SYSTEMS

 The cross product of the unit vectors produces the cyclical re-
sult

O  O D ;
R O O
O  O D R; O D O
O  R

 The general vector expansion


O R C A
A D aO jAj D RA O  C A
O 

is obvious, as is the scalar length


q
jAj D A2R C A2 C A2

 The position vector R1 (3.12) is


! O 1;
R1 D OP D RR

but needs knowledge of 1 and 1 to be complete

Differential Quantities
 The differential quantities are different yet again from the Cat-
estian and the cylindrical systems

 The differential length of the zenith component is like the az-


imuthal component in the cylindrical system

 The differential length of the azimuthal component is now a


function of both the radial component and the zenith compo-
nent, i.e.,

d lR D dR; d l D Rd; d l D R sin d

3-21
CHAPTER 3. VECTOR ANALYSIS

 In the end
O
d l D Rdr O
C Rd O sin dz
C R

 The differential surface follows


O 2 sin  d d .  spherical surface/
d sR D RR
d s D O R sin dR d .R  conical plane/
O dR d .R  plane/
d s D R

 Again the differential area is likely the most familiar from cal-
culus
d V D R2 sin  dR d d
z

R sin d
d = R2 sin dR d d

dR R d
R

d
y

d

x
Figure 3.13:3-14
Figure The spherical coordinate differential volume.
Differential volume in spherical coordi-
3-22
nates.
3.2. ORTHOGONAL COORDINATE SYSTEMS

Example 3.5: Preview of Chapter 4 - A Charge density

 A volume charge density

v D 4 cos2  .C/m3/

is present in a sphere of radius 2 cm

 To find the total charge in the sphere we integrate the charge


density over the volume
Z
Q D v d V
ZV 2 Z  Z 0:02
4 cos2  R2 sin  dR d d

D
D0 D0 RD0
Z 2 Z   3  0:02
R
D4 sin  cos2  d d
0 0 3
Z 2  0 3  
32 6 cos 
D  10 d
3 0 3 0
Z 2
64 128
D  10 6 d D  10 6
9 0 9
D 44:68 .C/

Just a little calculus review, especially the anti-derivative of


sin  cos2 

3-23
CHAPTER 3. VECTOR ANALYSIS

3.3 Coordinate Transformations


 Overview of the various transformations: .x; y; x/ , .r; ; z/,
.x; y; z/ , .R; ; /, and .r; ; z/ , .R; ; /

TableTable
3.2: Coordinate transformations.
3-2 Coordinate transformation relations.

Transformation Coordinate Variables Unit Vectors Vector Components


+
Cartesian to r = + x2 + y2 r = x cos + y sin Ar = Ax cos + Ay sin
cylindrical = tan1 (y/x) = x sin + y cos A = Ax sin + Ay cos
z=z z = z Az = Az
Cylindrical to x = r cos x = r cos sin Ax = Ar cos A sin
Cartesian y = r sin y = r sin + cos Ay = Ar sin + A cos
z=z z = z Az = Az
+
Cartesian to R = + x2 + y2 + z2 R = x sin cos AR = Ax sin cos
spherical + + y sin sin + z cos + Ay sin sin + Az cos
= tan1 [ + x2 + y2/z] = x cos cos A = Ax cos cos
+ y cos sin z sin + Ay cos sin Az sin
= tan1 (y/x) = x sin + y cos A = Ax sin + Ay cos
Spherical to x = R sin cos x = R sin cos Ax = AR sin cos
Cartesian + cos cos sin + A cos cos A sin
y = R sin sin y = R sin sin Ay = AR sin sin
+ cos sin + cos + A cos sin + A cos
z = R cos z = R cos sin
Az = AR cos A sin

Cylindrical to R = + r2 + z2 R = r sin + z cos AR = Ar sin + Az cos
spherical = tan1 (r/z) = r cos z sin A = Ar cos Az sin
= = A = A
Spherical to r = R sin r = R sin + cos Ar = AR sin + A cos
cylindrical = = A = A
z = R cos z = R cos sin Az = AR cos A sin

 There are three aspects of each to and from coordinate trans-


formations:

1. The coordinate variables .x; y; z/, .r; ; z/, and .R; ; /


O ;
O zO /, and .R;
2. The unit vectors .Ox; yO ; zO /, .Or; ; O /
O
3. The vector components .Ax ; Ay ; Az /, .Ar ; A ; Az /, and
.AR ; A ; A /

3-24
3.3. COORDINATE TRANSFORMATIONS

3.3.1 Cartesian to Cylindrical Transformations


 This is the most obvious and most familiar
p y 
1
r D x 2 C y 2;  D tan (watch the quadrant)
x
x D r cos ; y D r sin 
zDz

P(x, y, z)
z
y
3

r
2

x = r cos
1

123
y = r sin
x
Figure 3.14: Cartesian and cylindrical variable relationships.
Figure 3-16 Interrelationships between Cartesian
coordinates (x, y, z) and cylindrical coordinates (r, , z).
y


r
y
r

x
x
Figure 3.15: Cartesian and cylindrical unit vector relationships.
Figure 3-17 Interrelationships between base vectors
(x, y ) and (r, ). 3-25
CHAPTER 3. VECTOR ANALYSIS

3.3.2 Cartesian to Spherical Transformations

 These are less familiar, but very useful in this course

p !
p
1 x2 C y2
RD x 2 C y 2 C z 2;  D tan
z
y 
1
 D tan (watch the quadrants)
x
x D R sin  cos ; y D R sin  sin 
z D R cos 

z

z

R
(/2 )
R r

z = R cos
y
x = r cos
r


y = r sin
r
x
Figure 3.16: Cartesian and spherical variable and unit vector rela-
Figure 3-18 Interrelationships between (x, y, z) and
tionships.
(R, , ).
3-26
3.3. COORDINATE TRANSFORMATIONS

3.3.3 Cylindrical to Spherical Transformations


 See Table 3.2
p
R D r 2 C z 2;  D tan 1.r=z/; D
r D R sin ;  D ; z D R sin 

3.3.4 Distance Between Two Points


 The distance between two points, P1 D .x1; y1; z1/ and P2 D
.x2; y2; z2/, arises frequently

 In Cartesian coordinates the answer is obvious

d D jR12j D .x2 x1/2 C .y2 y1/2 C .z2 z1/2


 

 For the case of cylindrical coordinates we apply the variable


transformations to arrive at
d D .r2 cos 2 r1 cos 1/2 C .r2 sin 2 r1 sin 1/2

1=2
C .z2 z1/2
2 1=2
 2 2

D r2 C r1 2r1r2 cos.2 1/ C .z2 z1/

 Finally, for the spherical coordinates

d D R22 C R12 2R1R2cos 2 cos 1



1=2
C sin 2 sin 1 cos.2 1/

3-27
CHAPTER 3. VECTOR ANALYSIS

3.4 Gradient of a Scalar Field


 In this section we deal with the rate of change of a scalar quan-
tity with respect to position in all three coordinates .x; y; z/

 The result will be a vector quantity as the maximum rate of


change of the scalar quantity will have direction

Think of skiing down a mountain; if you want to descend


as quickly as possible you ski the path the follows the
negative of the maximum rate of change in elevation
The route corresponds to the negative of the gradient

 Suppose T represent the scalar variable of temperature in a


material as a function of .x; y; z/

 The gradient of temperature T is written as

@T @T @T
rT D grad T D xO C yO C zO
@x @y @z

 Note: A differential change in the distance vector d l dotted


with the gradient gives the scalar change in temperature, d T ,
i.e.

d T D rT  d l

D rT  xO dx C yO dy C zO dz
@T @T @T
D dx C dy C dz
@x @y @z

3-28
3.4. GRADIENT OF A SCALAR FIELD

 As an operator we can write the so-called del operator in Carte-


sian coordinates as
@ @ @
r D xO C yO C zO
@x @y @z

Directional Derivative
 In calculus you learn about the directional derivative

dT
D rT  aO l
dl
as the derivative of T along aO , which is the unit vector of the
differential distance d dl D aO l d l

 A nice extension is to find the difference T2 T1, which corre-


sponds to points P1 D .x1; y1; z1/ and P2 D .x2; y2; z2/

 We integrate both side of the directional derivative definition


to obtain Z P2
T2 T1 D rT  d l
P1

Example 3.6: Directional Derivative of T D x 2 C y 2z

 We seek the directional derivative of T along the direction xO 2C


yO 3 zO 2 evaluated at .1; 1; 2/

 Start by finding the gradient

rT D xO 2x C yO 2yz C zO y 2

3-29
CHAPTER 3. VECTOR ANALYSIS

 Note that
l D xO 2 C yO 3 zO 2;
so
xO 2 C yO 3 zO 2
aO l D p
17
 The directional derivative is

O O O

dT x 2 C y 3 z 2
D xO 2x C yO 2yz C zO y 2 

p
dl 17
2
4x C 6yz 2y
D p ;
17
 At the point .1; 1; 2/ we finally have

d T 10
D p D 0:588
d l .1; 1;2/ 17

The surface is dT/dl


dT/dl at z = 2

dT/dl

The point
(1, -1, 2)
dT/dl

Figure 3.17: The directional derivative, d T =d l, as a surface over


.x; y/ with z fixed at 2.

3-30
3.4. GRADIENT OF A SCALAR FIELD

3.4.1 Gradient Operator in Cylindrical and Spher-


ical Coordinates
 To move forward with the expressing gradient in the other two
coordinate systems, requires a bit of calculus

 For cylindrical coordinates it can be shown that


@ 1 @ @
r D rO C O C zO
@r r @ @z

 For spherical coordinates it can be shown that

O @ C O 1 @ C O
rDR
1 @
@R R @ R sin  @

3.4.2 Properties of the Gradient Operator


 From basic calculus it follows that

r U C V D rU C rV

r U V D U rU C V rU
rV n D nV n 1 rV; for any n

Example 3.7: Gradiant of V


 Consider the scalar function
V D x 2y C xy 2 C xz 2

 The gradient is simply


rV D xO .2xy C y 2 C z 2/ C yO .x 2 C 2xy/ C zO .2xz/

3-31
CHAPTER 3. VECTOR ANALYSIS

 At the point P1 D .1; 1; 2/ the gradiant vector is

rV .1; 1; 2/ D xO 3 yO C zO 4

3.5 Divergence of a Vector Field


 The divergence of a vector field is in a sense complementary
to the gradient:

Gradient of a scalar function ) Vector function


Divergence of a vector function ) Scalar function

 So what is it? Take a look at https://en.wikipedia.org/


wiki/Divergence

 For a 3D vector field it measures the extent to which the vector


field behaves as a source or sink

 A 3D field has field lines and corresponding flux density, which


defines the outward flux crossing a unit surface ds

For the EE: Consider a point charge Cq; if we place a


sphere (infinitesimally small) around it, there will be a
net flow of flux over the surface of the sphere; move the
sphere away from the charge location and the net flow of
flux (in/out) is zero
For the ME: Consider heating or cooling of air in a re-
gion; the velocity of the air, which is influenced by the
heating, is a vector field; the velocity points outward from

3-32
3.5. DIVERGENCE OF A VECTOR FIELD

the heated region just like the electric field from the Cq
charge

+q

Imaginary
spherical
surface
E

Figure 3.18: The electric field flux lines due to a point charge Cq
Figure 3-20 Flux lines of the electric field E due to a
O centered on the charge.
are normal to a sphere (n)
positive charge q.

 In more detail the Cq charge produces flux density (outward


flux crossing a unit surface)

E  ds
Flux density of E D D E  nO
jd sj

where d s includes the orientation of the surface via s and the


dot product insures that only the flux normal to the surface
is accounted for; nO is the outward normal to the surface, i.e.,
d s=jd sj

3-33
CHAPTER 3. VECTOR ANALYSIS

 The total flux crossing a closed surface S (e.g., a sphere) is


I
Total flux D E  d sO
S

 For a general vector field, say E.x; y; z/OxEx C yO Ey C zO Ez ,


we can sum the outward flux through each of the faces of a
differential cube as shown in Figure3.18

E
n 4
E
(x, y + y, z) x
Face 4
z
E
Face 1 Face 2
n 1 n 2
y (x, y, z)
(x + x, y, z)
Face 3
y
(x, y, z + z)

n 3 x
z
Figure 3.19: Detailing divergence by considering the flux exiting the
Figure 3-21 Flux lines of a vector field E passing
six facesthrough
of a differential cube (parallelpiped).
a differential rectangular parallelepiped of
volume v = x y z.
 In the end we have
 
@Ex @Ey @Ez
I

E  ds D C C D divE V
S @x @y @z
3-34
3.5. DIVERGENCE OF A VECTOR FIELD

 Now, we take the limit as V ! 0 to obtain the formal defini-


tion of divergence

@Ex @Ey @Ez


r  E D div E D C C
@x @y @z

 If r  E > 0 a source if present, while r  E < 0 means a sink


is present, and r  E D 0 means the field is divergenceless

Divergence Theorem
 Moving forward into Chapter 4 we will quickly bump into the
divergence theorem, which states that
Z I
r  E dV D E  ds
V S

Example 3.8: Divergence in Cartesian Coordinates

 Consider E D xO 3x 2 C yO 2z C zO x 2z at the point P1 D .2; 2; 0/

 Using the definition in Cartesian coordinates

@3x 2 @2z @x 2z
r ED C C
@x @y @z
D 6x C 0 C x 2 D x 2 C 6x

 Evaluating at .2; 2; 0/ we have




r  E D 16
.2; 2;0/

3-35
CHAPTER 3. VECTOR ANALYSIS

 The positive diverge at .2; 2; 0/ can be seen in a 3D vector


slice plot from Mathematica

Out[50]=

Figure 3.20: 3D vector field plot from Mathematica with a cut-


sphere centered at .2; 2; 0/; the positive divergence is clear.

3-36
3.5. DIVERGENCE OF A VECTOR FIELD

Example 3.9: Divergence in Spherical Coordinates


 Working a diverge calculation in cylindical or spherical re-
quires the formulas inside the back cover of the text

 For the problem at hand we have


O 3 cos =R2/
E D R.a O 3 sin =R2/;
.a

which is in spherical coordinates

 Find the divergence at P2 D .a=2; 0; /


1 @ 2
 1 @ 
r ED 2 R ER C E sin 
R @R R sin  @
1 @E
C
R sin  @ !
3 2
1 @ 3  1 @ a sin 
D 2 a cos  C
R @R R sin  @ R2
2a3 cos 
D
R3
 At the point .a=2; 0; / we have


r  E D 16
.a=2;0;/

 Since the divergence is negative at this point, we conclude that


a field sink is present

 A 2D vector plot (Python, Mathematica, or MATLAB) can be


used to review the field behavior using arrows

3-37
CHAPTER 3. VECTOR ANALYSIS

a = 10

3.0

2.5

2.0

Out[64]= 1.5

1.0

0.5

0.0

4.0 4.5 5.0 5.5 6.0


R

Figure 3.21: 2D vector field plot for a D 10 in just the R and  axes
making the negative divergence at .5; 0; / clear.

3-38
3.5. DIVERGENCE OF A VECTOR FIELD

Example 3.10: Ulaby 3.44b

 Each of the following vector fields is displayed below in the


form of a vector representation. Determine r  A analytically
and then compare the results with your expectations on the ba-
sis of the displayed pattern.

 Worked using the Jupyter notebook (screen shots)

Figure 3.22: Ulaby problem 3.44b set-up in the Jupyter notebook.


3-39
CHAPTER 3. VECTOR ANALYSIS

Figure 3.23: Ulaby problem 3.44b vector (quiver) plot in Jupyter


notebook to verify divegence of zero.

3.6 Curl of a Vector Field


 Moving forward, the next vector operator, Curl, applies more
often to magnetic fields; See https://en.wikipedia.org/
wiki/Curl_(mathematics)

 The Curl describes the rotation of a 3D field, in an infinitesimal


sense

3-40
3.6. CURL OF A VECTOR FIELD

 A field B has circulation if the line integral


I
Circulation D B  dl 0
C

 For the case of a uniform field, e.g., B D xO B0, forming a line


integral around a closed rectangular contour in the x y plane
yields zero, i.e.,
Z b Z c
Circulation D xO B0  xO dx C xO B0  yO dy
a b
Z d Z a
C xO B0  xO dx C xO B0  yO dy
c d
D B0 x B0 x D 0

 Futhermore, a small fictitious paddle wheel placed in the uni-


form field will not rotate, no matter the orientation of the wheel
rotation axis

y
a d
Contour C
x x

b c

B
x
(a) Uniform field
Figure 3.24: A uniform field, B D xO B0 with circulation over C zero.
z
3-41
CHAPTER 3. VECTOR ANALYSIS

 Consider the azimuthal field of a wire carrying current I along


the z-axis
y
 The magnetic flux in thex y plane follows O with strength
a d
0I =.2 r/
Contour C
x we consider
 To compute the circulation x differential length d l D
O d and determine the circulation to be
r
b c
2
0 I O
Z
Circulation D O  r d D 0I
0 2 r
B
x placed in this field will rotate!
 Clearly a paddle wheel
(a) Uniform field
z

Current I



Contour C

y
r
B

(b) Azimuthal field


O 0I =.2 r/ with circulation
Figure 3.25: An azimuthal field, B D 
around the z-axis.3-22 Circulation is zero for the uniform field
Figure
in (a), but it is not zero for the azimuthal field in (b).
3-42
3.6. CURL OF A VECTOR FIELD

 Finally we cab defined curl as


 I 
1
r  B D curl B D lim nO B  dl
s!0 s C max

 Note: The contour C is oriented to given the maximum circu-


lation; position the paddle wheel so it spins the fastest

O the unit normal of


 Since r  B is a vector, its direction is n,
surface s (use the right-hand rule with the fingers curling in
O
the direction of C and the thumb pointing along n)

 In rectangular coordinates we compute the curl via



xO yO zO

@ @ @
r  B D @x @y @z

Bx By Bz

 For other coordinate systems consult the back page of the text

Stokes Theorem
 Stokes theorem converts a surface integral of the curl to a line
integral of a vector along a contour C bounding surface S
Z I

r  B  ds D B  dl
S C

3-43
CHAPTER 3. VECTOR ANALYSIS

3.7 Laplacian Operator


 The Laplacian operator shows up in a number of contexts

 The text mentions the divergence of the gradiant, .r  .rV //


as one possibility

 The result is known as del square

2 @2V @2 V @2V
r V D C 2 C 2
@x 2 @y @z

 In Chapter 4 Laplaces equation, r 2V D 0, arises when deter-


mining the electrostatic potential in 1D, 2D, and 3D problems

3-44

You might also like