Chapter 1 - 2 - 3
Chapter 1 - 2 - 3
Email: [email protected]
Spring 2024
Part I: Vectors
The first part of this course will be a review on vectors. The sequence of topics are as follows:
i
Chapter 1
Vector Algebra
A vector is a quantity that has a magnitude and a direction. Examples are velocity, acceleration, force,
and momentum.
A scalar is a quantity that has a magnitude only. Examples include mass, charge, and temperature.
The vector âA is called a unit vector because its magnitude is unity.
Vector Expansion:
where âx , ây , and âz are unit vectors in the direction of the x axis, the y axis, and the z axis,
respectively. These unit vectors are often called basis vectors. Ax , Ay , and Az are components of
the vector A in the direction of the x axis, the y axis, and the z axis, respectively; see Fig. 1.1.
1
ELEC 325 Hamad M. Alkhoori Spring 2024
Given the vectors A = Ax âx + Ay ây + Az âz and B = Bx âx + By ây + Bz âz , we obtain A + B as
where θ is the angle between A and B when placed tail-to-tail; see Fig. 1.2.
2
ELEC 325 Hamad M. Alkhoori Spring 2024
When θ = 0◦ or θ = 180◦ , A and B are parallel to each other, whereas when θ = 90◦ , A and B are
Note that âx • âx = ây • ây = âz • âz = 1, whereas âx • ây = 0, etc.
A • B = Ax B x + Ay B y + Az B z . (1.5)
q
|A| = A2x + A2y + A2z . (1.6)
Example 1: Let A = 3âx + 4ây + âz and B = 2ây − 5âz . Find the angle θ between A and B.
√ √
Solution: We have A • B = (3)(0) + (4)(2) − (5)(1) = 3, |A| = 32 + 4 2 + 1 2 = 26, and |B| =
√ √
22 + 52 = 29. Therefore, θ = cos−1 √ 3
26×29
= 83.7◦ .
where ân is a unit vector perpendicular (normal) to the plane formed by A and B.
Bx By Bz
If we set A = âx and B = ây in Eq. (1.8), one finds that âx × ây = âz .
3
ELEC 325 Hamad M. Alkhoori Spring 2024
Suppose that another point is represented by (x′ , y ′ , z ′ ), with a corresponding position vector
R = r − r′ . (1.11)
The magnitude of the distance vector |R| gives the distance between the two points.
Component of a Vector:
The scalar component (projection) of a vector A in the direction of a vector B is written as AB , which
AB = A • âB . (1.12)
4
ELEC 325 Hamad M. Alkhoori Spring 2024
The vector component of a vector A in the direction of a vector B is written as AB , which is given by
the formula
AB = AB âB . (1.13)
5
Chapter 2
In this course, we will be dealing with spatial variables. These variables are referred to as coordinates.
In three dimensions, a set of three coordinates is called a coordinate system. We introduce here the
most common three coordinate systems. These are the Cartesian coordinates, cylindrical coordinates, and
spherical coordinates.
Cartesian coordinates are the most simplest coordinate system and are represented by (x, y, z). The cylin-
drical coordinates of a point P are defined in Fig. 2.1. These coordinates can take on any real value; that
is, x ∈ (−∞, ∞), y ∈ (−∞, ∞), and z ∈ (−∞, ∞). In addition, Cartesian coordinate system has a set of
constant unit vectors (âx , ây , âz ) whereby vectors can be expanded. By the word constant, I mean âx does
6
ELEC 325 Hamad M. Alkhoori Spring 2024
Constant Coordinates
The equation x = x0 is the equation of an infinite plane parallel to the yz plane with a coordinate
x = x0 .
The equation y = y0 is the equation of an infinite plane parallel to the xz plane with a coordinate
y = y0 .
The equation z = z0 is the equation of an infinite plane parallel to the xy plane with a coordinate
z = z0 .
The equation {x = x0 , y ∈ [a, b], z ∈ [c, d]}, is the equation of a plane parallel to the yz plane from
The equation {x ∈ [a, b], y = y0 , z ∈ [c, d]}, is the equation of a plane parallel to the xz plane from
The equation {x ∈ [a, b], y ∈ [c, d], z = z0 }, is the equation of a plane parallel to the xy plane from
7
ELEC 325 Hamad M. Alkhoori Spring 2024
where ρ ∈ [0, ∞) is the distance from the z axis to the point P , and ϕ ∈ [0, 2π], called the azimuthal angle,
Equations (2.1) can be used when converting from Cartesian coordinates to cylindrical coordinates. To
Constant Coordinates
8
ELEC 325 Hamad M. Alkhoori Spring 2024
The equation ϕ = ϕ0 is the equation of an infinite plane making an angle ϕ0 with respect to the positive
x axis.
The equation z = z0 is the equation of an infinite plane parallel to the xy plane with a coordinate
z = z0 .
The equation {ρ = ρ0 , ϕ = [0, 2π), z ∈ [a, b]}, is the equation of a finite cylinder of radius ρ0 and from
z = a to z = b.
The equation {ρ = [a, b], ϕ = ϕ0 , z = [c, d]}, is the equation of a plane from ρ = a to ρ = b and z = c
to z = d, with coordinate ϕ = ϕ0 .
The equation {ρ = [a, b], ϕ = [c, d], z = z0 }, is the equation of a plane from ρ = a to ρ = b and ϕ = c
to ϕ = d, with coordinate z = z0 .
9
ELEC 325 Hamad M. Alkhoori Spring 2024
Cylindrical Bases
Cylindrical coordinate system has a set of bases (âρ , âϕ , âz ) whereby vectors can be expanded. These are
where Aρ is the projection of A into âρ , Aϕ is the projection of A into âϕ , and Az is the projection of A
into âz . The cylindrical unit vectors (âρ , âϕ , âz ) are related to the Cartesian unit vector (âx , ây , âz ) through
âρ cos ϕ sin ϕ 0 âx
â = − sin ϕ cos ϕ 0 â . (2.5)
ϕ y
âz 0 0 1 âz
Note that âρ should have been written as âρ (ϕ), but for the sake of compactness, we omit the ϕ dependence.
The same holds for âϕ . An inverse relation for Eq. (2.5) exists as
âx cos ϕ − sin ϕ 0 âρ
â = sin ϕ cos ϕ 0 â , (2.6)
y ϕ
âz 0 0 1 âz
10
ELEC 325 Hamad M. Alkhoori Spring 2024
where r ∈ [0, ∞) is the distance from the origin to the point P , θ ∈ [0, π], called the colatitude (or polar)
angle, is an angle drawn from the z axis, and ϕ is defined as before. Equations (2.7) can be used when
converting from Cartesian coordinates to spherical coordinates. To convert from spherical coordinates to
Constant Coordinates
The equation ϕ = ϕ0 is the equation of an infinite plane making an angle ϕ0 with respect to the positive
x axis.
11
ELEC 325 Hamad M. Alkhoori Spring 2024
Spherical Bases
Spherical coordinate system has a set of bases (âr , âθ , âϕ ) whereby vectors can be expanded. These are
where Ar is the projection of A into âr , Aθ is the projection of A into θ, and Aϕ is the projection of A into
âϕ . The spherical unit vectors (âr , âθ , âϕ ) are related to the Cartesian unit vectors (âx , ây , âz ) through
âr sin θ cos ϕ sin θ sin ϕ cos θ âx
â = cos θ cos ϕ cos θ sin ϕ ây .
− sin θ (2.11)
θ
âϕ − sin ϕ cos ϕ 0 âz
Note that we write âr instead of âr (θ, ϕ) for the sake of compactness. The same holds for âθ , as well as for
12
ELEC 325 Hamad M. Alkhoori Spring 2024
âϕ (without the θ dependence). An inverse relation for Eq. (2.11) exists as
âx sin θ cos ϕ cos θ cos ϕ − sin ϕ âr
â = sin θ sin ϕ cos θ sin ϕ cos ϕ âθ , (2.12)
y
âz cos θ − sin θ 0 âϕ
Given a surface with unit normal ân , the vector component normal to that surface, denoted by A⊥ , is
z
Example 1 Given f (x, y, z) = x2 y + , express f (x, y, z) in spherical coordinates [i.e., obtain f (r, θ, ϕ)].
x
Ans:
Example 2: Given A = yâx , express A in (a) cylindrical coordinates and in (b) spherical coordinates.
Ans: (a)
A = yâx = ρ sin ϕ(cos ϕ âρ − sin ϕ âϕ ) = ρ sin ϕ cos ϕ âρ − ρ sin2 ϕ âϕ .
(b)
A = yâx = r sin θ sin ϕ(sin θ cos ϕ âr + cos θ cos ϕ âθ − sin ϕ âϕ )
= r sin2 θ sin ϕ cos ϕ âr + r sin θ cos θ sin ϕ cos ϕ âθ − r sin θ sin2 ϕ âϕ .
Example 3: Given A = A0 âr , where A0 is a constant, determine A • âx .
we see that âx = sin θ cos ϕ âr + cos θ cos ϕ âθ − sin ϕ âϕ . Thus,
âr • âx = (sin θ cos ϕ âr + cos θ cos ϕ âθ − sin ϕ âϕ ) • âr = sin θ cos ϕ.
13
ELEC 325 Hamad M. Alkhoori Spring 2024
Example 4: Given E = −5âρ + 10âϕ + 3âz and F = âρ + 2âϕ − 6âz , determine: (a) |E × F|, and (b) the
scalar component of E parallel to the y axis when ρ = 5, ϕ = π/2, and z = 3 [i.e., E • ây at (5, π/2, 3)].
Ans: (a)
1 2 −6
Thus, |E × F| = 74.
(b)
Using
âx cos ϕ − sin ϕ 0 âρ
â = sin ϕ cos ϕ 0 âϕ ,
y
âz 0 0 1 âz
E • ây = (−5âρ + 10âϕ + 3âz ) • ây = (−5âρ + 10âϕ + 3âz ) • (sin ϕ âρ + cos ϕâϕ ) = −5 sin ϕ + 10 cos ϕ.
But this expression needs to be evaluated at ρ = 5, ϕ = π/2, and z = 3. Substituting these, we get
Example 5: Given H = ρz cos ϕ âρ + e−2 sin ϕ2 âϕ + ρ2 âz , determine (a) H • âx , (b) the vector component of
H normal to the surface ρ = 1 [i.e., (H • âρ )âρ when ρ = 1], and (c) the vector component of H tangential
to the plane z = 0.
Ans:
(a)
ϕ
H • âx = (ρz cos ϕ âρ + e−2 sin âϕ + ρ2 âz ) • âx .
2
14
ELEC 325 Hamad M. Alkhoori Spring 2024
Using
âx cos ϕ − sin ϕ 0 âρ
â = sin ϕ cos ϕ 0 âϕ ,
y
âz 0 0 1 âz
ϕ
H • âx = ρz cos2 ϕ − e−2 sin sin ϕ
2
(b)
(c)
ϕ
H∥ = H − H⊥ = H − (H • âz )âz = ρz cos ϕ âρ + e−2 sin âϕ .
2
Example 6: Given D = r sin ϕâr − 1r sin θ cos ϕâθ + r2 âϕ , determine (a) the vector component of D tangential
to the surface r = 10, and (b) the vector component normal to the surface θ = π/3.
Ans:
(a)
1
D∥ = D − D⊥ = D − (D • âr )âr = − sin θ cos ϕâθ + r2 âϕ
r
But this has to be evaluated at r = 10. Hence, D∥ = −0.1 sin θ cos ϕâθ + 100âϕ .
r=10
(b)
1
D⊥ = (D • âθ )âθ = − sin θ cos ϕâθ .
r
√
3
But this has to be evaluated at θ = π/3. Hence, D ⊥ =− cos ϕâθ .
θ=π/3 2r
Example 7: Express the position vector r = x âx + y ây + z âz in (a) cylindrical coordinates, and in (b)
spherical coordinates.
r = ρ cos ϕ âx + ρ sin ϕ ây + z âz = ρ(cos ϕ âx + sin ϕ ây ) + z âz = ρ âρ + z âz .
15
ELEC 325 Hamad M. Alkhoori Spring 2024
r = r sin θ cos ϕ âx + r sin θ sin ϕ ây + r cos θ âz = r(sin θ cos ϕ âx + sin θ sin ϕ ây + cos θ âz ) = r âr .
16
Chapter 3
Vector Calculus
• Differential length:
In Cartesian coordinates,
Since âx , ây , and âz are constant, the differential position vector dr can be written as
Here, we call dr → dl the differential length element instead of the differential position vector. Therefore,
In cylindrical coordinates,
dl = d(ρ âρ ) + d(z âz ) = dρ âρ + ρdâρ + z âz = dρ âρ + ρdϕ âϕ + z âz , (3.5)
where
dâρ
dâρ = dϕ = dϕ âϕ . (3.6)
dϕ
17
ELEC 325 Hamad M. Alkhoori Spring 2024
In spherical coordinates,
r = r âr . (3.7)
where
∂âr ∂âr
dâr = dθ + dϕ = dθ âθ + sin θ âϕ . (3.9)
∂θ ∂ϕ
• Differential surface:
dS = dSân , (3.10)
where dS is the area of the surface element, and ân is a unit vector normal to the element.
In Fig. 3.1, the following differential surface elements in Cartesian coordinates are defined:
dS = dydzâx
x=constant
dS = dxdzây . (3.11)
y=constant
dS = dxdyâz
z=constant
18
ELEC 325 Hamad M. Alkhoori Spring 2024
In Fig. 3.2, the following differential surface elements in cylindrical coordinates are defined:
dS = ρdϕdzâρ
ρ=constant
dS = dρdzâϕ . (3.12)
ϕ=constant
dS = ρdρdϕâ
z
z=constant
19
ELEC 325 Hamad M. Alkhoori Spring 2024
In Fig. 3.3, the following differential surface elements in spherical coordinates are defined:
dS = r2 sin θdθdϕâr
r=constant
dS = r sin θdrdϕâθ . (3.13)
θ=constant
dS = rdrdθâϕ
ϕ=constant
• Differential volume:
The differential volume elements in Cartesian, cylindrical, and spherical coordinates are given, respec-
tively, by
dV = dxdydz, (3.14)
dV = ρdρdϕdz, (3.15)
and
A line integral is an integral whose domain is a curve in space. There are two types of line integrals: scalar
Z
A • dl, (3.17)
L
where L is the domain of integration. Note that only the tangential component of A contributes to this
integral; see Fig. 3.4. If L represents a closed path, the line integral becomes
I
A • dl. (3.18)
L
20
ELEC 325 Hamad M. Alkhoori Spring 2024
A • dl, where A = x2 âx − xzây − y 2 âz and L is the boundary (in the counter-
H
Example 1: Calculate L
Ans: I Z Z Z Z
A dl = • A dl +
• A dl +
• A dl + • A • dl
L 1 2 3 4
Z Z1
A • dl = A • dyây {x = 1, z = 0} = 0
1
−1
Z Z−1
A • dl = A • dxâx {y = 1, z = 0} = −2/3
2
1
Z Z−1
A • dl = A • dyây {x = −1, z = 0} = 0
3
1
Z Z1
A • dl = A • dxâx {y = −1, z = 0} = 2/3
4
−1
I
⇒ A • dl = 0.
L
A • dl, where A = z cos ϕâρ + ρ sin2 ϕâϕ and L is a circle of radius a (in the
H
Example 2: Calculate L
Ans:
I Z2π Z2π
A dl = • A ρdϕ âϕ {ρ = a, z = 0} = a
• 2
sin2 ϕdϕ = πa2 .
L
0 0
• Vector line integrals:
21
ELEC 325 Hamad M. Alkhoori Spring 2024
where L is the domain of integration. For these integrals, we always need to make sure that the vector A is
(a)
Z1 Z1
âx dx = âx dx = âx .
0 0
(b)
Z2π Z2π Z2π Z2π
âρ dϕ = (cos ϕ âx + sin ϕ ây ) dϕ = âx cos ϕ dϕ + ây sin ϕ dϕ = 0.
0 0 0 0
(c)
A surface integral is an integral whose domain is a surface in space. There are two types of surface integrals:
Z
A • dS, (3.20)
S
where S is the domain of integration. Note that only the normal component of A contributes to this integral;
see Fig. 3.5. If S represents a closed surface, the surface integral becomes
I
A • dS. (3.21)
S
Such an integral is interpreted as the flux of A from S and is given the symbol Ψ.
22
ELEC 325 Hamad M. Alkhoori Spring 2024
Ans: I Z Z Z
A • dS = A • dS + A • dS + A • dS
S 1 2 3
Z Z1 Z2π
A • dS = A • ρdρdϕ âz = 10πe−2
1 z=1
0 0
Z Z1 Z2π
A • dS = A • ρdϕdz âρ = 10π(1 − e−2 )
2 ρ=1
0 0
Z Z1 Z2π
A • dS = A • ρdρdϕ (−âz ) = −10π
3 z=0
0 0
I
⇒ A • dS = 0.
S
• Vector surface integrals:
where S is the domain of integration. Again, for these integrals, we always need to make sure that the vector
The volume integral is an integral whose domain is a volume in space. The volume integral of a vector A is
given by
Z
A dV, (3.23)
V
23
ELEC 325 Hamad M. Alkhoori Spring 2024
R
Example 5: Determine V
A dV , where A = z(ρâρ + âz ), and V is the cylinder {ρ ∈ [0, 1], z ∈ [0, 1]}.
Ans:
Z Z1 Z2πZ1 Z1 Z2πZ1
π
A dV = z(ρâρ + âz ) ρdρdϕdz = 0 + âz zρdρdϕdz = âz .
V 2
0 0 0 0 0 0
In single-variable calculus, the total derivative for a scalar field V (x) is given by
dV (x)
dV (x) = dx. (3.24)
dx
In three-variable calculus, the total derivative for a scalar field V (r) * is given by
∂V ∂V ∂V
dV (r) = dx + dy + dz, (3.25)
∂x ∂y ∂z
The gradient of a scalar field is a vector field whose magnitude is the highest rate of change of the scalar
field, and whose direction points to the highest rate of increase (or decrease) of the scalar field. In Cartesian
∂V ∂V ∂V
∇V = âx + ây + âz . (3.27)
∂x ∂y ∂z
∂V 1 ∂V ∂V
∇V = âρ + âϕ + âz . (3.28)
∂ρ ρ ∂ϕ ∂z
∂V 1 ∂V 1 ∂V
∇V = âr + âθ + âϕ . (3.29)
∂r r ∂θ r sin θ ∂ϕ
* V (r) ≡ V (x, y, z)
24
ELEC 325 Hamad M. Alkhoori Spring 2024
Theorem: Given a surface described by f (x, y, z) = 0, the unit normal to the surface is given by
∇f
ân = . (3.30)
|∇f |
Example 6: Determine the unit normal to the surfaces (a) x = a, (b) ρ = a, and (c) r = a.
Ans: (a) ân = âx , (b) ân = âρ , and (c) ân = âr .
The divergence of a vector field A is represented by ∇ • A. Divergence means how much the vector field A
spreads out (diverge) from a given point. Mathematically, the divergence can be described by
H
S
A • dS
∇ • A = lim . (3.31)
∆v→0 ∆v
Equation (3.31) indicates that the divergence of a vector field A at a point P is the outward flux per unit
volume as the volume shrinks about the point P . Divergence can be positive (P is a source), negative (P is
a sink), or zero.
1 ∂ 1 ∂Aϕ ∂Az
∇•A= (ρAρ ) + + . (3.33)
ρ ∂ρ ρ ∂ϕ ∂z
1 ∂ 2 1 ∂ 1 ∂Aϕ
∇•A= (r Ar ) + (Aθ sin θ) + . (3.34)
r2 ∂r r sin θ ∂θ r sin θ ∂ϕ
25
ELEC 325 Hamad M. Alkhoori Spring 2024
The divergence theorem: The divergence theorem states that the total outward flux of a vector field A
through a closed surface S is equal to the volume integral of the divergence of A. Mathematically,
I Z
A • dS = ∇ • A dV. (3.35)
S V
1 ∂ 1 ∂Aϕ ∂Az 1 ∂ ∂
∇•A= (ρAρ ) + + = (ρ10e−2z ρ) + (10e−2z ) = 0.
ρ ∂ρ ρ ∂ϕ ∂z ρ ∂ρ ∂z
Thus,
Z Z1 Z2πZ1
∇ • A dV = 0 ρdρdϕdz = 0.
V
0 0 0
The curl of a vector field A is represented by ∇ × A. Mathematically, the curl can be described by
H
L
A • dl
∇ × A = lim ân . (3.36)
∆s→0 ∆s
Equation (3.36) indicates that the curl of a vector field A at a point P is the circulation of A per unit area
as the area shrinks to zero. The magnitude of the curl is a measure of how much the vector field A rotates
about the point P , and its direction is normal to the area and is determined from the right-hand rule.
26
ELEC 325 Hamad M. Alkhoori Spring 2024
Stokes’s theorem: Stokes’s theorem states that the circulation of a vector field A around a closed path L
counter-clockwise direction) of the plane z = 0, x ∈ [−1, 1], and y ∈ [−1, 1], and S is the surface enclosed by
L.
27
ELEC 325 Hamad M. Alkhoori Spring 2024
H
Ans: We found that L
A • dl = 0. Now,
∂Az ∂Ay ∂Ax ∂Az ∂Ay ∂Ax
∇×A= − âx + − ây + − âz
∂y ∂z ∂z ∂x ∂x ∂y
∂(−y 2 ) ∂(−xz)
2
∂(−y 2 ) ∂(−xz) ∂x2
∂x
= − âx + − ây + − âz = (x − 2y)âx − zâz .
∂y ∂z ∂z ∂x ∂x ∂y
Thus,
Z Z1 Z1 Z1 Z1
(∇ × A) • dS = [(x − 2y)âx − zâz ] • dxdy âz =− z dxdy = 0.
S z=0 z=0
−1 −1 −1 −1
3.3.4 Laplacian
The Laplacian (∇2 ) can operate on a scalar field V or on a vector field A. For a scalar field, the Laplacian
is
∇2 V = ∇ • ∇V, (3.41)
∇2 A = ∇(∇ • A) − ∇ × ∇ × A. (3.42)
∇ • A = 0. (3.43)
In general,
∇ • (∇ × F) = 0. (3.44)
A = ∇ × F. (3.45)
∇ × A = 0. (3.46)
28
ELEC 325 Hamad M. Alkhoori Spring 2024
In general,
∇ × (∇V ) = 0. (3.47)
A = ∇V. (3.48)
Section 3.6: Example 3.6 and Practice Exercises 3.6 and 3.7.
29