Vector Calculus1
Vector Calculus1
LECTURE NOTES
Mgr. Mwale C
2024/2025
1 Vector Fields
3 Line Integrals
4 Green’s Theorem
6 Parametric Surfaces
7 Surface Integrals
or
F(x , y , z) = M(x , y , z)i + N(x , y , z)j + P(x , y , z)k
depending on whether we are in two or three dimensions.
Vector fields can be sketched to be able to visualize them. However, vector
fields consist of infinitely many vectors. Thus,it is not possible to create a
sketch of the entire field. Instead, when you sketch a vector field, your
goal is to sketch representative vectors that help you visualize the field.
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 3 / 69
Example 1
Sketch the following vector vector fields
1 F(x , y ) = −y i + x j
2 F(x , y , z) = zk
Solution
1 F(x , y ) = −y i + x j
Solution
1 Substitute x = 1, y = 2:
⃗ (1, 2) = ⟨3(1)2 , 2(2)⟩ = ⟨3, 4⟩
F
⃗ (1, 2, 3) = ⟨2 · 3, 1 · 3, 1 · 2⟩ = ⟨6, 3, 2⟩
F
Definition
A vector field F is called conservative if there exists a differentiable
function f such that F = ∇f . The function f is called the potential
function for F.
The Theorem below helps us in testing whether the given vector field is a
conservative vector field in the plane.
Theorem
Let M and N have continuous first partial derivatives on an open disk R.
The vector field given by F(x , y ) = Mi + Nj is conservative if and only if
∂N ∂M
= .
∂x ∂y
2 f (x , y ) = 5x 2 + 3xy + y 2
3 f (x , y ) = sin 3x cos 4y
Solution
After taking partial derivatives we have:
1 F(x , y ) = 2x i + 4y j
2 F(x , y ) = 3x 2 y 2 i + 2x 3 y j
3 f (x , y ) = e x cos y + K
Similarly, we can test for the conservative of a vector field in 3D. The
Theorem below gives the conditions.
∂P ∂N ∂P ∂M ∂N ∂M
= , = , and = .
∂y ∂z ∂x ∂z ∂x ∂y
Example
Determine whether the vector field F is conservative. If so, find its
potential function.
1 F(x , y , z) = 2xy i + (x 2 + y 2 )j + 2yzk
2 F(x , y , z) = xy 2 z 2 i + x 2 yz 2 j + x 2 y 2 zk
5 F(x , y , z) = ye z i + ze x j + xe y k
6 F(x , y , z) = z i − xz j + x k
y y2 y
7 F(x , y , z) = x y
x 2 +y 2
i + x 2 +y 2
j+k
However, for the evaluation of the line integrals of the scalar function f
along the smooth curve C is as shown in the Theorem below.
Z Z b q
f (x , y , z)ds = f (x (t), y (t), z(t)) [x ′ (t)]2 + [y ′ (t)]2 + [z ′ (t)]2 dt.
C a
(1, 2, 1).
8192
xy 4 ds =
R
2
C 5
Let us now look at how to find the line integral over the piecewise smooth
curves.
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 13 / 69
Definition
A piecewise smooth curve is any curve that can be written as the union of
a finite number of smooth curves, C1 , · · · , Cn where the end point of Ci is
the starting point of Ci+1 .
Solution
Begin by integrating up the line y = x , using the following parametrization.
C1 : x = t, y = t, 0≤t≤1
For this curve, r(t) = ti + tj, which implies that x ′ (t) = 1 and y ′ (t) = 1.
So,
q √
[x ′ (t)]2 + [y ′ (t)]2 = 2
and you have
Z 1 √ √ #1 √
2 2 2
Z
xds = t 2dt = t =
C1 0 2 0
2
C2 : x = 1 − t, y = (1 − t)2 , 0≤t≤1
For this curve, r(t) = (1 − t)i + (1 − t)2 j, which implies that x ′ (t) = −1
and
Let us now turn into the line integral of the vector fields. We assume that
the path of integration is the piecewise smooth curve.
Definition - Line Integral of Vector Fields
If F is the continuous vector field on the smooth curve C : r(t), a ≤ t ≤ a,
then the line integral of F over C is given by
Z Z b
F · dr = F(r(t)) · r′ (t)dt
C a
Note that F(r(t)) · r′ (t) is the usual dot product as we know it.
Now, we demonstrate this by looking at the following examples.
Example
y 2 dx + xdy where C is a line segment from (−5, −3) to (0, 2).
R
Evaluate C
Solution
After some computations, we find that
5
Z
y 2 dx + xdy = −
C 6
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 20 / 69
The Fundamental Theorem for Line Integrals
The above form is for F on the plain. In space it will take the following
form:
Example
R
Evaluate C F · dr, where C is a piecewise smooth curve from (1, 1, 0) to
(0, 2, 3) and F(x , y , z) = 2xy i + x 2 + z 2 j + 2yzk.
THEOREM
SupposeR
F is a vector field that is continuous on an open connected region
D. If C F · dr is independent of path in D, then F is a conservative vector
field on D; that is, there exists a function f such that ∇f = F.
THEOREM
R R
F · dr is independent of path in D if and only if
C C F · dr = 0 for every
closed path C in D.
Example
R R
Show that the integral C F · dr = C (2xdx + 2ydy + 4zdz) is path
independent in any domain in space and find its value in the integration
from A : (0, 0, 0) to B : (2, 2, 2).
Example
For the force field given by
∂P ∂N
=0=
∂y ∂z
∂P ∂M
=0=
∂x ∂z
∂N ∂M
= −e x sin y =
∂x ∂y
So, F is conservative. If f is a potential function of F, then
fx (x , y , z) = e x cos y
fy (x , y , z) = −e x sin y
fz (x , y , z) = 2
f (x , y , z) = e x cos y + 2z + K
∂N ∂M
Z ZZ
Mdx + Ndy = − dA
C D ∂x ∂y
Example
Use Green’s Theorem to evaluate the line integral
Z
y 3 dx + x 3 + 3xy 2 dy
C
where C is the path from (0, 0) to (1, 1) along the graph of y = x 3 and
from (1, 1) to (0, 0) along the graph of y = x .
Solution
Because M = y 3 and N = x 3 + 3xy 2 , it follows that
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 28 / 69
Solution cont...
∂N ∂M
= 3x 2 + 3y 2 and = 3y 2
∂x ∂y
Applying Green’s Theorem, you then have
∂N ∂M
Z Z Z
3 3 2
y dx + x + 3xy dy = − dA
C R ∂x ∂y
Z 1Z x h i
= 3x 2 + 3y 2 − 3y 2 dydx
0 x3
Z 1Z x
= 3x 2 dydx
0 x3
Z 1 x
2
= 3x y dx
0 x3
Z 1
= 3x 3 − 3x 5 dx
0
" #1
3x 4 x 6 1
= − =
4 2 0
4
Solution
The region D bounded by C is the disk x 2 + y 2 ⩽ 9, so let’s change to
polar coordinates after applying Green’s Theorem:
Z q
3y − e sin x dx + 7x + y 4 + 1 dy
C
∂ ∂
ZZ q
= 7x + y4 + 1 − 3y − e sin x dA
D ∂x ∂y
Z 2π Z 3 Z 2π Z 3
= (7 − 3)rdrdθ = 4 dθ rdr = 36π
0 0 0 0
∂ ∂ ∂
∇=i +j +k .
∂x ∂y ∂z
The curl of a vector field is the cross product of the vector differential
operator and the vector field as shown below.
Curl of a Vector Field
The curl of F(x , y , z) = Mi + Nj + Pk is
curl F(x , y , z) = ∇ × F(x , y , z)
i j k
∂ ∂ ∂
= ∂x ∂y ∂z
M N P
∂P ∂N ∂P ∂M ∂N ∂M
= − i− − j+ − k.
∂y ∂z ∂x ∂z ∂x ∂y
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 31 / 69
Note: If F is conservative, then curl F = 0 .
The divergence of a vector field is the dot product of the vector differential
operator and the vector field.
Divergence of a vector field
The divergence of F(x , y ) = Mi + Nj is
∂M ∂N
div F(x , y ) = ∇ · F(x , y ) = +
∂x ∂y
The divergence of F(x , y , z) = Mi + Nj + Pk is
∂M ∂N ∂P
div F(x , y , z) = ∇ · F(x , y , z) = + +
∂x ∂y ∂z
If div F = 0, then F is said to be divergence free.
Solution
Given F = xy 2 i + 2x 2 yzj − 3yz 2 k
∂ 2 ∂ 2 ∂
∇·F= xy + 2x yz + −3yz 2
∂x ∂y ∂z
2 2
= y + 2x z − 6yz
∇ · F(1,−1,1) = 1 + 2 + 6 = 9
i j k
∂ ∂ ∂
∇×F= ∂x ∂y ∂z
xy 2 2x 2 yz −3yz 2
= i −3z 2 − 2x 2 y − j(0) + k(4xyz − 2xy )
∇ × F(1,−1,1) = i(−3 + 2) + k(−4 + 2)
= −i − 2k
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 33 / 69
Exercise
1 Find (a) the curl and (b) the divergence of the vector field.
(a) F(x , y , z) = xyzi − x 2 y k
(b) F(x , y , z) = x 2 yzi + xy 2 zj + xyz 2 k
(c) F(x , y , z) = cos xzj − sin xy k
1
(d) F(x , y , z) = √ (x i + y j + zk)
x 2 +y 2 +z 2
find
→
− →
− →
− →
− →
−
∇ · F , ∇(∇ · F ), ∇ × F , ∇ · (∇ × F ), and ∇ × (∇ × F ) at the
point (1, 1, 1).
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 34 / 69
Parametric Surfaces
Definition
Let x , y and z be functions of u and v that are continuous on a domain D
in the uv − plane. The set of points (x , y , z) given by
looks like?
2 How do we find a parametrization for a given surface?
Solution
1 (a) Writing down the parametric equations, we have
x =u y = u cos v z = u sin v
y =u and z = v, then x = 5u 2 + 2v 2 − 10
Thus, the parametric representation is then,
r(u, v ) = 5u 2 + 2v 2 − 10 i + uj + v k
∂x ∂y ∂z
ru = (u, v )i + (u, v )j + (u, v )k
∂u ∂u ∂u
and
∂x ∂y ∂z
rv = (u, v )i + (u, v )j + (u, v )k.
∂v ∂v ∂v
is given by
i j k
∂x ∂y ∂z
N = ru (u0 , v0 ) × rv (u0 , v0 ) = ∂u ∂u ∂u = N1 i + N2 j + N3 k.
∂x ∂y ∂z
∂v ∂v ∂v
N1 (x − x0 ) + N2 (y − y0 ) + N3 (z − z0 ) = 0
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 40 / 69
Example
1 Find an equation of the tangent plane to the paraboloid given by
r(u, v ) = ui + v j + u 2 + v 2 k
√
1 1 2
2 Find the tangent plane to the unit sphere at , ,
2 2 2 .
x = u2, y = v 2, z = u + 2v
ru = i + 2uk and rv = j + 2v k
The normal vector is given by
i j k
ru × rv = 1 0 2u = −2ui − 2v j + k
0 1 2v
which implies that the normal vector at (1, 2, 5) is
ru × rv = −2i − 4j + k. So, an equation of the tangent plane at
(1, 2, 5) is
−2(x − 1) − 4(y − 2) + (z − 5) = 0
−2x − 4y + z = −5
r(u, v ) = ⟨sin(u) cos(v ), sin(u) sin(v ), cos(u)⟩, for (u, v ) ∈ [0, π]×[0, 2π].
√
π π 1 1 2
Note that r 4, 4 = 2 2 2 .
, , Then, we have
and
rv (u, v ) = ⟨− sin(u) sin(v ), sin(u) cos(v ), 0⟩
π π
Therefore, for u = 4 and v = 4 we have
* √ +
π π 1 1 2
ru , = , ,−
4 4 2 2 2
π π 1 1
rv , = − , ,0
4 4 2 2
i j k
ru × rv = 2u 0 1 = −2v i − 4uj + 4uv k
0 2v 2
−2i − 4j + 4k
or
x + 2y − 2z + 3 = 0
where
∂x ∂y ∂z ∂x ∂y ∂z
ru = i+ j+ k rv = i+ j+ k
∂u ∂u ∂u ∂v ∂v ∂v
In the special case that S is the graph of a function f (x , y ), (x , y ) ∈ D, we
may parametrize S by
The equation above can be very useful because surfaces are very
frequently expressed as graphs of functions.
We shall demonstrate this in the following example. We will first use
equation (6.1) (where we parametrize the sphere) and then equation (6.2)
(where we write that sphere as a graph of a function by considering the
half sphere.)
Solution
Using equation (6.1). We can assume that the sphere is centered at the
origin. The equation of the sphere is then
x2 + y 2 + z2 = R2
z = 0 ⇒ x2 + y 2 = R2
and
−2y
fy (x , y ) = p
2 R − x2 − y2
2
A(S) = 4πR 2
Z Z Z q
f (x , y , z)dS = f (x , y , g(x , y )) 1 + [gx (x , y )]2 + [gy (x , y )]2 dA
S R
and
Z Z Z Z q
f (x , y , z)dS = f (g(y , z), y , z) 1 + [gy (y , z)]2 + [gz (y , z)]2 dA
S R
respectively.
Example
1 Evaluate the surface integral
ZZ
y 2 + 2yz dS
S
where S isRRthe first-octant portion of the plane 2x + y + 2z = 6.
2 Evaluate S 6xydS where S is the portion of the plane x + y + z = 1
that lies in front of the yz-plane.
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 53 / 69
Solution
1 First we write S as
1
z = (6 − 2x − y )
2
1
g(x , y ) = (6 − 2x − y )
2
Using the partial derivatives gx (x , y ) = −1 and gy (x , y ) = − 12 , you
can write
s
1 3
q
2 2
1 + [gx (x , y )] + [gy (x , y )] = 1+1+ =
4 2
1 3
Z Z Z Z
2 2
y + 2yz dS = y + 2y (6 − 2x − y ) dA
S R 2 2
Z 3 Z 2(3−x )
=3 y (3 − x )dydx
0 0
243
Mgr. Mwale C (MU/SNAS/DMS) = EGM 312 2024/2025 54 / 69
Solution cont...
2 Since we are looking for the portion of the plane that lies in front of
the yz−plane we write the equation of the surface in the form
x = g(y , z) . That is x = 1 − y − z To determine the limits of
integration, sketch the graph and these will give us
Thus, we have
s 2 2
∂g ∂g
ZZ ZZ
f (x , y , z)dS = f (g(y , z), y , z) 1 + + dA
S D ∂y ∂z
ZZ ZZ q
6xydS = 6(1 − y − z)y 1 + (−1)2 + (−1)2 dA
S D
Let us now look at evaluating surface integral for the other method, where
the surface is given as a parametrization.
Example
1 Compute the surface integral S x 2 dS, where S is the unit sphere
RR
x 2 + y 2 + z 2 = 1. R R
2 Evaluate the surface integral S (x + z)dS, where S is the
first-octant portion of the cylinder y 2 + z 2 = 9 between x = 0 and
x = 4.
that is,
r(ϕ, θ) = sin ϕ cos θi + sin ϕ sin θj + cos ϕk
We can compute that
|rϕ × rθ | = sin ϕ
Therefore,
ZZ ZZ
2
x dS = (sin ϕ cos θ)2 |rϕ × rθ | dA
S D
Z 2π Z π Z 2π Z π
= sin2 ϕ cos2 θ sin ϕdϕdθ = cos2 θdθ sin3 ϕdϕ
0 0 0 0
Z 2π Z π
1
= (1 + cos 2θ)dθ sin ϕ − sin ϕ cos2 ϕ dϕ
0 2 0
2π π
1 1 1 4π
= θ + sin 2θ − cos ϕ + cos3 ϕ =
2 2 0EGM 312 3 0 3
Mgr. Mwale C (MU/SNAS/DMS) 2024/2025 58 / 69
Solution cont...
2 In parametric form, the surface is given by
Thus,
Z Z Z 4 Z π/2
(x + 3 sin θ)3dA = (3x + 9 sin θ)dθdx
D 0 0
4
3π 2
= x + 9x
4 0
= 12π + 36
where n = |rruu ×r
×rv | called the unit normal vector.
v
Example
Find the flux of the vector field F(x , y , z) = zi + y j + x k across the unit
sphere x 2 + y 2 + z 2 = 1.
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 60 / 69
Solution
Using the parametric representation
we have
F(r(ϕ, θ)) = cos ϕi + sin ϕ sin θj + sin ϕ cos θk
and,
rϕ × rθ = sin2 ϕ cos θi + sin2 ϕ sin θj + sin ϕ cos ϕk
Therefore
F(r(ϕ, θ)) · (rϕ × rθ ) = cos ϕ sin2 ϕ cos θ + sin3 ϕ sin2 θ + sin2 ϕ cos ϕ cos θ
i j k
∂ ∂ ∂
curl F = ∂x ∂y ∂z = (1 + 2y )k
−y 2 x z2
Although there are many surfaces with boundary C , the most convenient
choice is the elliptical region S in the plane y + z = 2 that is bounded by
C . If we orient S upward, then C has the induced positive orientation.
The projection D of S on the xy -plane is the disk x 2 + y 2 ⩽ 1 and thus
z = g(x , y ) = 2 − y .
Solution
The region E for the triple integral is then the region enclosed by these
surfaces. Note that cylindrical coordinates would be a perfect coordinate
system for this region. If we do that here are the limits for the ranges.
0 ≤ z ≤ 4 − 3r 2
0≤r ≤1
0 ≤ θ ≤ 2π
We’ll also need the divergence of the vector field so let’s get that.
⃗ =y −y +1=1
div F
Mgr. Mwale C (MU/SNAS/DMS) EGM 312 2024/2025 68 / 69
Solution cont...
The integral is then,
ZZ ZZZ
⃗ · d ⃗S =
F ⃗ dV
div F
S E
Z 2π Z 1 Z 4−3r 2
= rdzdrdθ
0 0 0
Z 2π Z 1
= 4r − 3r 3 drdθ
0 0
Z 2π 1
3
= 2r 2 − r 4 dθ
0 4 0
Z 2π
5
= dθ
0 4
5
= π
2