Vector Calculus

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 62

Introduction to Ordinary Differential Equations

1 Applied Vector Calculus


Introduction to vector calculus.

Scalars and Vectors


Scalars are quantities that only require a number and an appropriate unit to describe
completely. Some common examples of scalar quantities are Temperature, Mass, etc. Up till
now all mathematical functions that you have studied are examples of scalar functions since
all these functions gave was a number describing some quantity as a function of another
independent variable. Similarly multivariable functions were also scalar functions which
define a scalar amount at every point in the space of functions. For example the temperature
in a room varies on different coordinates inside the room, but the temperature is not just a
function of that it can also depend on many other variables. Scalar functions are this written
and plotted like any other function.
Vectors, on the other hand, are quantities that require directional information to specify
them completely. Examples of such quantities include force, velocity, acceleration, position
vector. So far in your academic career, you have only encountered vectors which had
constant components such as,
𝐴⃗ = 3𝑎̂𝑥 + 2𝑎̂𝑦 + 4𝑎̂𝑧
However, just like scalars, vectors can also be functions. The most obvious example is the
position vector of a particle moving along a parametric curve 𝑥(𝑡), 𝑦(𝑡) and 𝑧(𝑡) it is given
as,
𝑟⃗(𝑡) = 𝑥(𝑡)𝑎̂𝑥 + 𝑦(𝑡)𝑎̂𝑦 + 𝑧(𝑡)𝑎̂𝑧
A vector function is equivalent to box in which an input number is given (in the above
example 𝑡) and in return you get a position vector at that instant of 𝑡. To differentiate a
vector you just simply differentiate every component of the vector i.e.
𝑑𝑟⃗(𝑡) 𝑑𝑥(𝑡) 𝑑𝑦(𝑡) 𝑑𝑧(𝑡)
= 𝑣⃗ = 𝑎̂𝑥 + 𝑎̂𝑦 + 𝑎̂
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑧
In general a vector can have components that depend on more than one variables e.g.

𝐴⃗ = 𝐴1 (𝑥, 𝑦, 𝑧)𝑎̂𝑥 + 𝐴2 (𝑥, 𝑦, 𝑧)𝑎̂𝑦 + 𝐴3 (𝑥, 𝑦, 𝑧)𝑎̂𝑧


Therefore, a vector can be partial differentiated as well e.g.

𝜕𝐴⃗ 𝜕 𝜕 𝜕
= 𝐴1 (𝑥, 𝑦, 𝑧)𝑎̂𝑥 + 𝐴2 (𝑥, 𝑦, 𝑧)𝑎̂𝑦 + 𝐴 (𝑥, 𝑦, 𝑧)𝑎̂𝑧
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥 3
Operator Functions
There is another category of functions called operator functions. While in a regular
function you give one or more numbers as an input and in return you get either a number or
a vector as a result. In an operator function takes another function as its input and gives out
another function. You have already seen one operator function; it is the differential operator.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

It takes in as an input a function and gives out a function which is its derivative. However,
one operator function that is important for this course is the vector operator function called
the Del operator,
𝜕 𝜕 𝜕
⃗∇⃗= 𝑎̂𝑥 + 𝑎̂𝑦 + 𝑎̂𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧
So if you give it a scalar function 𝑓(𝑥, 𝑦, 𝑧) we get,
𝜕𝑓 𝜕𝑓 𝜕𝑓
⃗∇⃗𝑓 = 𝑎̂𝑥 + 𝑎̂𝑦 + 𝑎̂
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝑧
Notice that the del operator returns a vector function when a scalar function fed as input.
The directional derivative of a scalar function is also called its gradient.
1.1.1.1 Sample Problem
Determine the directional derivative of the vector function 𝑓(𝑥, 𝑦, 𝑧) = 𝑥 2 + 𝑦 2 + 𝑧 2 ,
𝜕 2 𝜕 2 𝜕
⃗∇⃗𝑓 = (𝑥 + 𝑦 2 + 𝑧 2 )𝑎̂𝑥 + (𝑥 + 𝑦 2 + 𝑧 2 )𝑎̂𝑦 + (𝑥 2 + 𝑦 2 + 𝑧 2 )𝑎̂𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧
⃗∇⃗𝑓 = 2𝑧𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧
1.1.1.2 Sample Problem
2𝑦2
Determine the directional derivative of the scalar function 𝑓(𝑥, 𝑦) = 𝑒 𝑥
𝜕 𝑥2𝑦2 𝜕 𝑥2𝑦2 𝜕 2 2
⃗∇⃗𝑓 = (𝑒 )𝑎̂𝑥 + (𝑒 )𝑎̂𝑦 + (𝑒 𝑥 𝑦 )𝑎̂𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧
⃗∇⃗𝑓 = 𝑒 𝑥 2 𝑦 2 2𝑥𝑦 2 𝑎̂𝑥 + 𝑒 𝑥 2 𝑦 2 2𝑥 2 𝑦𝑎̂𝑦

⃗∇⃗𝑓 = 𝑒 𝑥 2 𝑦 2 2𝑥𝑦(𝑦𝑎̂𝑥 + 𝑥𝑎̂𝑦 )

Scalar and Vector Fields


Fields
Any region of space where a certain physical quantity is defined is called a field. When we
use the word defined it means that the quantity has a definite value at every point in that
region of space. Since there two kinds of physical quantities, consequently, there are two
kinds of fields: vector fields and scalar fields.

Scalar Fields
If the quantity defined in a region of space is a scalar, then the region of space constitutes a
scalar field. All scalar quantities can constitute a scalar field. For example, if in a particular
room, every point of the room has a specific temperature then the entire room represents a
temperature field. Similarly, a particular region of space can have density field defined at
every point in that space giving the mass per unit volume in that space. For example, if a
container contains a liquid of just one type then the density within the container is constant
at all locations. Therefore, it’s a constant scalar field.
All the function that you have studied so far in mathematics can be used to define a scalar
field of some kind.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

Vector Fields
Similarly, if the quantity defined in a given space is a vector quantity, then it has a vector
field defined there. But, since a vector quantity has a direction with it as well, every point in
the space also a direction. For example, at every point around a charge (or a charge
distribution) there is a direction and magnitude of electric force (or electric field). Therefore
the space around the charge defines a vector field of force or electric field. Other examples
could be the velocity of fluid elements in a flowing fluid.

2.3.1 Plotting a Vector field


Plotting a vector field is slightly complicated because in addition to a magnitude it also has
a direction and in some cases that direction might be different at different points. Therefore,
the direction of the vector might also change as you move along the space. As an example
consider a constant vector field,
⃗⃗ (𝑥, 𝑦) = 2𝑎̂𝑥 + 2𝑎̂𝑦
𝑉
If we calculate the magnitude and the angle it comes out to be,
⃗⃗ | = √8
𝑉(𝑥, 𝑦) = |𝑉
𝑦
𝜃 = tan−1 ( ) = 45
𝑥
Since the vector components are constant, and the angle of the vector is also constant the
resultant vector field has the same magnitude everywhere. Also, the vector field also has the
same direction everywhere, i.e. at all points of the space.

⃗⃗ (𝑥, 𝑦) = 2𝑎̂𝑥 + 2𝑎̂𝑦 . The arrows of


Figure 1: The vector plot of the constant vector field 𝑉
the vector field have the same direction and same length everywhere in the 𝑥𝑦 plane.

Suppose we think of another vector field,


⃗⃗ (𝑥, 𝑦) = 𝑥𝑎̂𝑥 + 2𝑎̂𝑦
𝑉
In this case, the 𝑥 component is variable, but the other part is constant. Hence the
magnitude and direction both will depend on the point 𝑥.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

⃗⃗ | = √4 + 𝑥 2
𝑉(𝑥, 𝑦) = |𝑉
2
𝜃 = tan−1 ( )
𝑥

⃗⃗(𝒙, 𝒚) = 𝒙𝒂
Figure 2: The vector plot of the vector field 𝑽 ̂𝒚 . Notice how the length
̂𝒙 + 𝟐𝒂
of the vector does not change as you move along the 𝒚 direction because the vector field
does not depend on the 𝒚 coordinate.

Moving on we can similarly make both components variable,


⃗⃗ = 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦
𝑉
⃗⃗ | = √𝑦 2 + 𝑥 2
𝑉(𝑥, 𝑦) = |𝑉
𝑦
𝜃 = tan−1 ( )
𝑥

⃗⃗ (𝑥, 𝑦) = 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 . Notice how both the size of


Figure 3: Vector plot of the vector field 𝑉
the vectors as well as their direction changes at different points in space.

2.3.2 Codes for plotting vector field in Matlab


To plot a vector field in Matlab, first we need to create the grid for it.
>> x = -5:1:5; %Range of x values

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

>> y = -5:1:5; %Range of y values


>> [X, Y] = meshgrid(x,y); % creating mesh of the x and y values on the 𝑥𝑦 plane.

Suppose we want to plot the vector field 𝑉⃗⃗ (𝑥, 𝑦) = 𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦 . We first create variable
for the 𝑥 component of the vector field and then for the 𝑦 component.
>> U=X.^2; %The x component of the vector field.
>> V=Y.^2; %The y component of the vector field.
Once all things are defined we just need to plot the field using the function. The function
which plots a 2D vector field is called quiver.
>> quiver(X,Y,U,V);

Vector Differential Calculus


The Divergence of a vector field
We have seen how the concept of direction is associated with the change of a multivariable
scalar field. Also, the change of a scalar field only means the value, or magnitude, of the
scalar field changes. But to talk of the rate of change of a vector can mean either the change
in the magnitude of the vector field from one point to another or the change in the direction
or even both. Hence the change in vector field can come about either in the change of
direction or the change of magnitude.
Mathematically, the divergence of a vector field 𝑃⃗⃗ is defined as the dot product of the
directional derivative operator and the vector field i.e.
⃗⃗. 𝑃⃗⃗

The divergence of a vector field can be written as,
𝜕 𝜕 𝜕
DIV(𝑃⃗⃗) = ( 𝑎̂𝑥 + 𝑎̂𝑦 + 𝑎̂𝑧 ) . (𝑃𝑥 𝑎̂𝑥 + 𝑃𝑦 𝑎̂𝑦 + 𝑃𝑧 𝑎̂𝑧 )
𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕𝑃𝑥 𝜕𝑃𝑦 𝜕𝑃𝑧
DIV(𝑃⃗⃗) = + +
𝜕𝑥 𝜕𝑦 𝜕𝑧
And, therefore, the divergence of a vector is a scalar number.
3.1.1.1 Sample Problem
Calculate the divergence of the vector field 𝑃⃗⃗ = 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 .

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Using the above definition of a vector field we get,


𝜕𝑃𝑥 𝜕𝑃𝑦 𝜕𝑃𝑧
DIV(𝑃⃗⃗) = + +
𝜕𝑥 𝜕𝑦 𝜕𝑧
But since there is no 𝑧 dependence, then the divergence is,
𝜕𝑃𝑥 𝜕𝑃𝑦
DIV(𝑃⃗⃗) = + = 1+1
𝜕𝑥 𝜕𝑦
Which shows that the divergence of the field is constant everywhere in the space.
3.1.1.2 Sample Problem
Suppose that the vector field is now,
𝑃⃗⃗ = 𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝜕𝑃𝑥 𝜕𝑃𝑦
DIV(𝑃⃗⃗) = + = 2𝑥 + 2𝑦
𝜕𝑥 𝜕𝑦

This time the divergence is not a constant number, but it depends on the coordinates of the
point in the grid. We will see in the next section what these results mean for a vector field.
3.1.1.3 Sample Problem
Let’s try to calculate the divergence of a 3D vector field which is slightly complicated.
Suppose that the vector field is,
𝑃⃗⃗ = 𝑥 2 𝑦𝑧𝑎̂𝑥 + 𝑥𝑦 2 𝑧𝑎̂𝑦 + 𝑥𝑦𝑧 2 𝑎̂𝑧

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

𝜕 𝜕 𝜕
DIV(𝑃⃗⃗) = ( 𝑎̂𝑥 + 𝑎̂𝑦 + 𝑎̂𝑧 ) . (𝑥 2 𝑦𝑧𝑎̂𝑥 + 𝑥𝑦 2 𝑧𝑎̂𝑦 + 𝑥𝑦𝑧 2 𝑎̂𝑧 )
𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕 2 𝜕 𝜕
DIV(𝑃⃗⃗) = (𝑥 𝑦𝑧) + (𝑥𝑦 2 𝑧) + (𝑥𝑦𝑧 2 )
𝜕𝑥 𝜕𝑦 𝜕𝑧
DIV(𝑃⃗⃗) = 2𝑥𝑦𝑧 + 2𝑥𝑦𝑧 + 2𝑥𝑦𝑧 = 6𝑥𝑦𝑧
So the divergence is not constant and varies all over the place. Suppose we want to know
the divergence at the point (1,1,2) then the divergence is,

DIV(𝑃⃗⃗) = 6(1)(1)(2) = 12 units


The units of divergence depend on the vector field in question.

The curl of a vector field


While the divergence of a vector field gives you the information about the rate of the
change in the magnitude of a vector field as you move from one point to another. The curl
of a vector field can roughly be imagined as the change in the direction of the vector field.

Mathematically the curl of a vector field 𝑉⃗⃗ is given as the cross product between the
directional derivative and the vector field i.e.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧


⃗⃗ × 𝑉
∇ ⃗⃗ = CURL(𝑉
⃗⃗ ) = |𝜕/𝜕𝑥 𝜕/𝜕𝑦 𝜕/𝜕𝑧|
𝑉𝑥 𝑉𝑦 𝑉𝑧
⃗⃗ . In the component
Here, 𝑉𝑥 , 𝑉𝑦 and 𝑉𝑧 are the 𝑥, 𝑦 and 𝑧 component of the vector field 𝑉
form, it can written as,
𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧
𝜕𝑉𝑧 𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑉𝑥 𝜕𝑉𝑦 𝜕𝑉𝑥
⃗∇⃗ × 𝑉
⃗⃗ = |𝜕/𝜕𝑥 𝜕/𝜕𝑦 𝜕/𝜕𝑧| = ( − ) 𝑎̂𝑥 + ( − ) 𝑎̂𝑦 + ( − ) 𝑎̂
𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝑧
𝑉𝑥 𝑉𝑦 𝑉𝑧
3.2.1.1 Sample Problem
⃗⃗ = 𝑦𝑖̂ − 𝑥𝑗̂.
Calculate the curl of the vector field 𝑉

𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧


⃗∇⃗ × 𝑉
⃗⃗ = CURL(𝑉
⃗⃗ ) = |𝜕/𝜕𝑥 𝜕/𝜕𝑦 𝜕/𝜕𝑧|
𝑦 −𝑥 0

𝜕 𝜕 𝜕 𝜕
⃗∇⃗ × 𝑉
⃗⃗ = CURL(𝑉
⃗⃗ ) = (0 − (−𝑥)) 𝑎̂𝑥 − (0 − (𝑦)) 𝑎̂𝑦 + ( (−𝑥) − (𝑦)) 𝑎̂𝑧
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑦

⃗∇⃗ × 𝑉
⃗⃗ = CURL(𝑉
⃗⃗ ) = 𝑎̂𝑧 (−1 − 1) = −2𝑎̂𝑧
So the curl of the field is constant everywhere in the space.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

3.2.1.2 Sample Problem


⃗⃗ = 𝑦 2 𝑎̂𝑥 − 𝑥𝑎̂𝑦 .
Calculate the curl of the vector field 𝑉

𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧


⃗⃗ × 𝑉
∇ ⃗⃗ = CURL(𝑉
⃗⃗ ) = |𝜕/𝜕𝑥 𝜕/𝜕𝑦 𝜕/𝜕𝑧|
𝑦2 −𝑥 0
𝜕 𝜕 𝜕 𝜕
⃗∇⃗ × 𝑉
⃗⃗ = 𝑎̂𝑥 (0 − (−𝑥)) − 𝑎̂𝑦 (0 − (𝑦 2 )) + 𝑎̂𝑧 ( (−𝑥) − (𝑦 2 ))
𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑦

⃗⃗ × 𝑉
∇ ⃗⃗ = −(1 + 2𝑦)𝑎̂𝑧
The curl of this field is not constant but instead depends on the 𝑦 coordinate.
3.2.1.3 Sample Problem
We can similarly talk about the curl of 3D vector field. For example, consider the vector
field,
⃗⃗ = 𝑦𝑧𝑎̂𝑥 + 𝑥𝑧𝑎̂𝑦 + 𝑥𝑦𝑎̂𝑧
𝑉

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧


⃗∇⃗ × 𝑉
⃗⃗ = CURL(𝑉
⃗⃗ ) = |𝜕/𝜕𝑥 𝜕/𝜕𝑦 𝜕/𝜕𝑧|
𝑦𝑧 𝑥𝑧 𝑥𝑦
𝜕(𝑥𝑦) 𝜕(𝑥𝑧) 𝜕(𝑥𝑦) 𝜕(𝑦𝑧) 𝜕(𝑥𝑧) 𝜕(𝑦𝑧)
⃗⃗ ) = (
CURL(𝑉 − ) 𝑎̂𝑥 + ( − ) 𝑎̂𝑦 + ( − ) 𝑎̂𝑧
𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑥 𝜕𝑦
⃗⃗ ) = (𝑥 − 𝑥)𝑎̂𝑥 + (𝑦 − 𝑦)𝑎̂𝑦 + (𝑧 − 𝑧)𝑎̂𝑧 = 0
CURL(𝑉
Which means that the field has no curl at all.
3.2.1.4 Sample Problem
Imagine the following vector field,
⃗⃗ = sin 𝑦𝑧 𝑎̂𝑥 + cos 𝑥𝑧 𝑎̂𝑦 + sin 𝑥𝑦 𝑎̂𝑧
𝑉

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

𝜕(sin 𝑥𝑦) 𝜕(cos 𝑥𝑧) 𝜕(sin 𝑥𝑦) 𝜕(sin 𝑦𝑧)


⃗⃗ ) = (
CURL(𝑉 − ) 𝑎̂𝑥 + ( − ) 𝑎̂𝑦
𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑧
𝜕(cos 𝑥𝑧) 𝜕(sin 𝑦𝑧)
+( − ) 𝑎̂𝑧
𝜕𝑥 𝜕𝑦
⃗⃗ ) = (𝑥 cos 𝑥𝑦 + 𝑥 sin 𝑥𝑧)𝑎̂𝑥 + (𝑦 cos 𝑥𝑦 − 𝑦 cos 𝑦𝑧)𝑎̂𝑦 + (−𝑧 cos 𝑥𝑧 − 𝑧 sin 𝑦𝑧)𝑎̂𝑧
CURL(𝑉
⃗⃗ ) = 𝑥(cos 𝑥𝑦 + sin 𝑥𝑧)𝑎̂𝑥 + 𝑦(cos 𝑥𝑦 − cos 𝑦𝑧)𝑎̂𝑦 − 𝑧(cos 𝑥𝑧 + sin 𝑦𝑧)𝑎̂𝑧
CURL(𝑉

Vector Integral Calculus


Line integrals in a vector field
You had worked with single integrals before where you just summed over the area under a
function to calculate the area bounded under a curve. A line integral sums the component of
a vector field in the direction of the tangent to a curve between given limits.
Suppose that a vector field in a region of space is 𝐹⃗(𝑥,𝑦,𝑧) . The line integral along a path
connecting points (𝑥1 , 𝑦1 , 𝑧1 ) and (𝑥2 , 𝑦2 , 𝑧2 ) is given as
(𝑥2 ,𝑦2 ,𝑧2 )

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ 1
(𝑥1 ,𝑦1 ,_𝑧1 )

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

In plain English, the integral adds the components of the field in the direction of 𝑑𝑙⃗ between
the points (𝑥1 , 𝑦1 ) and (𝑥2 , 𝑦2 ). To understand what 𝑑𝑙⃗ means consider the position of a
single point in space. The location is the vector pointing from the origin to that point in the
space. The distance of the point from the origin along the 𝑥 axis is 𝑥 and similarly for the 𝑦
and 𝑧 axis. Such a position vector can be given as,
𝑟⃗ = 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
Now imagine the point represent a particle that is moving along a particular curve so that
at different times 𝑡 the particle is located at various locations. Then the position vector is
also a function of time,
𝑟⃗(𝑡) = 𝑥(𝑡)𝑎̂𝑥 + 𝑦(𝑡)𝑎̂𝑦 + 𝑧(𝑡)𝑎̂𝑧
The infinitesimal displacement of the particle as it moves along the curve then becomes,

𝑑𝑟⃗ = 𝑑𝑙⃗ = 𝑑𝑥𝑎̂𝑥 + 𝑑𝑦𝑎̂𝑦 + 𝑑𝑧𝑎̂𝑧


So for a vector field defined as,
𝐹⃗ = 𝐹𝑥 𝑎̂𝑥 + 𝐹𝑦 𝑎̂𝑦 + 𝐹𝑧 𝑎̂𝑧
(𝑥2 ,𝑦2 ,𝑧2 ) (𝑥2 ,𝑦2 ,𝑧2 )

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ (𝐹𝑥 𝑎̂𝑥 + 𝐹𝑦 𝑎̂𝑦 + 𝐹𝑧 𝑎̂𝑧 ). (𝑑𝑥𝑎̂𝑥 + 𝑑𝑦𝑎̂𝑦 + 𝑑𝑧𝑎̂𝑧 )


(𝑥1 ,𝑦1 ,𝑧2 ) (𝑥1 ,𝑦1 ,𝑧1 )
(𝑥2 ,𝑦2 ,𝑧2 ) (𝑥2 ,𝑦2 ,𝑧2 )

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ (𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦 + 𝐹𝑧 𝑑𝑧)


(𝑥1 ,𝑦1 ,𝑧1 ) (𝑥1 ,𝑦1 ,𝑧1 )

The application of this integral can best be described by examples.

4.1.1 Sample Problem


Calculate the line integral in a constant vector field 𝐹⃗ = 3𝑎̂𝑥 + 2𝑎̂𝑦 − 𝑎̂𝑧 in moving along a
straight line between points (1,1,3) ≤ (𝑥, 𝑦, 𝑧) ≤ (4,1,3).

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

(𝑥2 ,𝑦2 ,𝑧2 ) (4,1,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ (3𝑎̂𝑥 + 2𝑎̂𝑦 − 𝑎̂𝑧 ). (𝑑𝑥𝑎̂𝑥 + 𝑑𝑦𝑎̂𝑦 + 𝑑𝑧𝑎̂𝑧 )


(𝑥1 ,𝑦1 ,𝑧1 ) (1,1,3)

(4,1,3) (4,1,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ (3𝑑𝑥 + 2𝑑𝑦 − 𝑑𝑧)


(1,1,3) (1,1,3)

Notice that in the limits, the line joining the point does not change in the 𝑧 or 𝑦 coordinate
therefore in the above integral, 𝑑𝑧 = 0, 𝑑𝑥 = 0. Hence the line integral becomes,
(4,1,3) (4,1,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ 3𝑑𝑥


(1,1,3) (1,1,3)

(4,1,3) (4,1,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = 3 ∫ 𝑑𝑥 = 3|𝑥|14 = 3(4 − 1) = 9


(1,1,3) (1,1,3)

(2,3,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = 9
(1,1,3)

4.1.2 Sample Problem


Calculate the line integral in a vector field 𝐹⃗ = 3𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 − 𝑧𝑎̂𝑧 in moving along a
straight line between points (1,1,3) ≤ (𝑥, 𝑦, 𝑧) ≤ (4,1,3) then (4,1,3) ≤ (𝑥, 𝑦, 𝑧) ≤ (4,3,3).
Since the line integral is between two lines

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

(4,3,3) (4,1,3) (4,3,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ ⃗⃗ +
𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙𝑙 ∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗
(1,1,3) (1,1,3) (4,1,3)

𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = 3𝑑𝑥 + 2𝑑𝑦 − 𝑑𝑧


(4,3,3) (4,1,3) (4,3,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ (3𝑑𝑥 + 2𝑑𝑦 − 𝑑𝑧) + ∫ (3𝑑𝑥 + 2𝑑𝑦 − 𝑑𝑧)


(1,1,3) (1,1,3) (4,1,3)

Looking at the limits, you can see that along both the lines the 𝑧 coordinate does not
change. However on the first line, additionally, the 𝑦 coordinate is also the same hence on
that line segment 𝑑𝑦 = 0, and on the other line the 𝑥 coordinate is the same hence on that
line segment 𝑑𝑥 = 0 too. Hence,
(4,3,3) (4,1,3) (4,3,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ (3𝑑𝑥) + ∫ (2𝑑𝑦) = 3|𝑥|14 + 2|𝑦|13 = 3(4 − 1) + 2(3 − 1)


(1,1,3) (1,1,3) (4,1,3)

(4,3,3)

∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = 9 + 4 = 13
(1,1,3)

4.1.3 Meaning of line integral in a vector field


The line integral can mean different things depending on the physical nature of the field.
For example, if the field has physical dimensions and units of force then the line integral

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

gives you the work done in moving in that field. But this is not true for general vector
fields, in which the nature of the vector is not physical Force with a unit of Newton, for
example. For example in case of Ampere’s law the line integral along the boundary of a
closed-loop surrounding a current-carrying wire is given as,

⃗⃗ . 𝑑𝑙⃗ = 𝜇0 𝐼
∮𝐵

And, the line integral is just the current enclosed in the boundary of the loop.

4.1.4 Line integral along intrinsic paths


Examples of line integrals in the previous lecture were limited to straight lines connecting
between points. We might not always have the luxury of moving along a straight line. You
might need to calculate the line integral along curves paths. An example of this kind is in
order, I believe.
4.1.4.1 Sample Problem
Calculate the line integral along the curve 𝑦 = √𝑥 between the 0 ≤ 𝑥 ≤ 5 of the vector field
𝐹⃗ = 𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦 .

(5,√𝑥)

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑥 2 𝑑𝑥 + 𝑦 2 𝑑𝑦)
(0,√𝑥)

In the previous example that we had encountered, we were only dealing with straight lines
connecting points on which either the 𝑥 coordinate or the 𝑦 coordinate did not change. Here
the 𝑦 coordinate along the curve depends on the 𝑥 coordinate hence they are not

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

independent. In this case we either convert the whole equation in the form of either 𝑦 or 𝑥.
We already know the along the curve,
1
𝑦 = √𝑥 ⇒ 𝑑𝑦 = 𝑑𝑥
2 √𝑥
(5,√𝑥) 𝑥=5
2 1
∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑥 2 𝑑𝑥 + (√𝑥) 𝑑𝑥)
2√𝑥
(0,√𝑥) 𝑥=0

(5,√𝑥) 𝑥=5
1
∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑥 2 + √𝑥 ) 𝑑𝑥
2
(0,√𝑥) 𝑥=0

(5,√𝑥)
𝑥=5
𝑥3 1 2 3 1 3 1 3 𝑥=5
∫ 𝐹⃗ . 𝑑𝑙⃗ = | + . 𝑥 |
2 = | 𝑥 + 𝑥2|
3 2 3 𝑥=0
3 3 𝑥=0
(0,√𝑥)

(5,√𝑥)
1 1 3
∫ 𝐹⃗ . 𝑑𝑙⃗ = ( (5)3 + (5)2 ) = 45.393
3 3
(0,√𝑥)

In this problem, you could just as well have converted the limits and the line integral in the
form of the coordinate 𝑦. In that case, 𝑥 = 𝑦 2 and 0 ≤ 𝑦 ≤ 2.236 and 𝑑𝑥 = 2𝑦𝑑𝑦. You get
the following integral,
𝑦=2.236
𝑦=2.236
1 1 1
∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (2𝑦 5 + 𝑦 2 )𝑑𝑦 = | 𝑦 6 + 𝑦 3 | = ((2.2366 ) + (2.2363 ))
3 3 𝑦=0 3
𝑦=0

1
∫ 𝐹⃗ . 𝑑𝑙⃗ = ((2.236 ) − (2.233 )) = 45.393
3
4.1.4.2 Sample Problem
𝑥
Find the line integral in moving in the range 0 ≤ 𝑥 ≤ 1 along a path given by 𝑦(𝑥) = 𝑒 10 +
sin 𝑥 in a field 𝐹⃗ = 𝑦𝑎̂𝑥 + 𝑥𝑎̂𝑦

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

The situation in this problem is also similar in which the 𝑦 coordinate depends on the 𝑥
coordinate.

𝑥=1

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦)


x
𝑥=0 along y(x)=e10 +sin x

Along the path,


1 𝑥
𝑑𝑦 = ( 𝑒 10 + cos 𝑥)𝑑𝑥
10
𝑥=1 𝑥=1
𝑥 1 𝑥
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = ∫ ((𝑒 10 + sin 𝑥) 𝑑𝑥 + 𝑥 (( 𝑒 10 + cos 𝑥) 𝑑𝑥))
10
𝑥=0 𝑥=0
𝑥=1 𝑥=1
𝑥 𝑥 𝑥
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = ∫ (𝑒 10 + sin 𝑥 + 𝑒 10 + 𝑥 cos 𝑥) 𝑑𝑥
10
𝑥=0 𝑥=0
𝑥=1 𝑥=1 𝑥=1 𝑥=1 𝑥=1
𝑥 𝑥 𝑥
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = ∫ 𝑒 10 𝑑𝑥 + ∫ sin 𝑥 𝑑𝑥 + ∫ 𝑒 10 𝑑𝑥 + ∫ 𝑥 cos 𝑥 𝑑𝑥
10
𝑥=0 𝑥=0 𝑥=0 𝑥=0 𝑥=0
𝑥=1 𝑥=1 𝑥=1
𝑥 𝑥=1 1 𝑥
𝑥=1
|cos 𝑥|𝑥=0
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = |10𝑒 10 | + + ∫ 𝑥𝑒 10 𝑑𝑥 + ∫ 𝑥 cos 𝑥 𝑑𝑥
𝑥=0 10
𝑥=0 𝑥=0 𝑥=0
𝑥=1
1 1 𝑥 𝑥=1 𝑥 𝑥=1
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = (10𝑒 10 − 1) + (cos 1 − 1) + (|𝑥10𝑒 10 | − |10.10𝑒 10 | )
10 𝑥=0 𝑥=0
𝑥=0
𝑥=1 𝑥=1 )
+ (|𝑥 sin 𝑥|𝑥=0 + |cos 𝑥|𝑥=0

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝑥=1
1 1 1 1
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = (10𝑒 10 − 1) + (cos 1 − 1) + (10𝑒 10 − 10.10𝑒 10 + 1) + (sin 1 + cos 1 − cos 0)
10
𝑥=0

𝑥=1
1
∫ (𝑦𝑑𝑥 + 𝑥𝑑𝑦) = 2 cos 1 − 2 + sin 1 + 𝑒 10
𝑥=0

4.1.5 Line integrals along parametrized paths


There might be situations in which you will be required to take the line integral along
curves which are parameterized by some parameter. In this case, the entire integral is
converted into the form of a single variable, i.e. the parameter. As you have already studied
that in a parametrized curve the 𝑥 and 𝑦 coordinate (and possibly also the 𝑧 coordinate) are
represented as a function of a standard parameter 𝑡. With this definition the position vector
of various points along the given curve also becomes a function of the parameter.
𝑟⃗(𝑡) = 𝑥(𝑡)𝑎̂𝑥 + 𝑦(𝑡)𝑎̂𝑦 + 𝑧(𝑡)𝑎̂𝑧
4.1.5.1 Sample Problem
Calculate the line integral of a vector field 𝐹⃗ = 𝑥𝑎̂𝑥 + 2𝑧𝑦𝑎̂𝑦 + 𝑥𝑎̂𝑧 along the parametrized
path 𝑟⃗ = 𝑡𝑎̂𝑥 + 𝑡 2 𝑎̂𝑦 + 𝑡 3 𝑎̂𝑧 between 1 ≤ 𝑡 ≤ 2.
The displacement vector is,

𝑑𝑙⃗ = 𝑑𝑟⃗ = 𝑑𝑡𝑎̂𝑥 + 2𝑡𝑑𝑡𝑎̂𝑦 + 3𝑡 2 𝑑𝑡𝑎̂𝑧


Along the parametric curve, the coordinates are the parametric equations, 𝑥(𝑡) = 𝑡, 𝑦(𝑡) =
𝑡 2 , 𝑧(𝑡) = 𝑡 3 . Therefore as a function of the parameter the vector field can be written as,

𝐹⃗ = 𝑡𝑎̂𝑥 + 2(𝑡 3 )(𝑡 2 )𝑎̂𝑦 + 𝑡𝑎̂𝑧 = 𝑡𝑎̂𝑥 + 2𝑡 5 𝑎̂𝑦 + 𝑡𝑎̂𝑧


𝑡=2

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑡𝑎̂𝑥 + 2𝑡 5 𝑎̂𝑦 + 𝑡𝑎̂𝑧 ). (𝑎̂𝑥 + 2𝑡𝑎̂𝑦 + 3𝑡 2 𝑎̂𝑧 )𝑑𝑡


𝑡=1
𝑡=2

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑡 + 4𝑡 6 + 3𝑡 3 )𝑑𝑡
𝑡=1
𝑡=2
𝑡2 4 3
∫ 𝐹⃗ . 𝑑𝑙⃗ = | + 𝑡 7 + 𝑡 4 |
2 7 4 𝑡=1
1 4 3
∫ 𝐹⃗ . 𝑑𝑙⃗ = (22 − 12 ) + (27 − 17 ) + (24 − 14 )
2 7 4
1 4 3
= (4 − 1) + (128 − 1) + (16 − 1)
2 7 4
3 4 3
∫ 𝐹⃗ . 𝑑𝑙⃗ = + (127) + (15) = 85.3214
2 7 4

∫ 𝐹⃗ . 𝑑𝑙⃗ = 85.3214

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

4.1.6 Line integral along a closed path


Line integrals are also evaluated along closed loops. A close-loop is as a path on which the
starting and endpoint are the same.

A closed line integral written as,

∮ 𝐹⃗ . 𝑑𝑙⃗

Let’s solve some line integrals along a closed curve.

4.1.7 Conservative Fields


Let’s try to calculate the line integral along the closed path defined by 𝑦 = √𝑥 and 𝑦 = 𝑥 2
between the points (0,0) ≤ (𝑥, 𝑦) ≤ (1,1) in a vector 𝐹⃗ = 𝑥𝑦 2 𝑎̂𝑥 + 𝑦𝑥 2 𝑎̂𝑦 .

We move from point (0, 0) to (1, 1) along the curve 𝑦 = 𝑥 2 and then back from (1,1) to
(0,0) along 𝑦 = √𝑥 (this keeps the bound area on the left hand side while traversing the
boundary). The closed line integral, therefore, is,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

(𝑥=1,𝑥 2 ) (𝑥=0,√𝑥)

∮ 𝐹⃗ . 𝑑𝑙⃗ = ∫ 𝐹⃗ . 𝑑𝑙⃗ + ∫ 𝐹⃗ . 𝑑𝑙⃗


(𝑥=0,𝑥 2 ) (𝑥=1,√𝑥)

Figure 1: Graph of the path 𝑦 = √𝑥 and 𝑦 = 𝑥 2 .

𝐹⃗ . 𝑑𝑙⃗ = 𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦
(𝑥=1,𝑥 2 ) (𝑥=0,√𝑥)

∮ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) + ∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) 1


(𝑥=0,𝑥 2 ) (𝑥=1,√𝑥)
We will solve the two integrals separately,
(𝑥=1,𝑥 2 )

∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦)
(𝑥=0,𝑥 2 )

Along this path the 𝑦 coordinate changes with the 𝑥 coordinate according to the equation
1
𝑦 = √𝑥. Therefore, 𝑑𝑦 = 2 𝑑𝑥,
√𝑥
(𝑥=1,𝑥 2 ) 𝑥=1

∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) = ∫ [𝑥(𝑥 2 )2 𝑑𝑥 + (𝑥 2 )𝑥 2 (2𝑥𝑑𝑥)]


(𝑥=0,𝑥 2 ) 𝑥=0

(𝑥=1,𝑥 2 ) 𝑥=1 𝑥=1

∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) = ∫ (𝑥 5 + 2𝑥 5 )𝑑𝑥 = 3 ∫ (𝑥 5 )𝑑𝑥


(𝑥=0,𝑥 2 ) 𝑥=0 𝑥=0

(𝑥=1,√𝑥)
𝑥=1
1 1 1
∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) = 3 | 𝑥 6 | = 3( ) =
6 𝑥=0 6 2
(𝑥=0,√𝑥)
1
For the other path, 𝑦 = √𝑥, 𝑑𝑦 = 2 𝑑𝑥 we go from (1,1) ≤ (𝑥, 𝑦) ≤ (0,0).
√𝑥

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

(𝑥=0,√𝑥) (𝑥=0,√𝑥)
2 1
∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) = ∫ [𝑥(√𝑥) 𝑑𝑥 + (√𝑥)𝑥 2 ( 𝑑𝑥)]
2√𝑥
(𝑥=1,√𝑥) (𝑥=1,√𝑥)

(𝑥=0,√𝑥) (𝑥=0,√𝑥)
2 2 2
𝑥2
∫ (𝑥𝑦 𝑑𝑥 + 𝑦𝑥 𝑑𝑦) = ∫ [𝑥 𝑑𝑥 + ] 𝑑𝑥
2
(𝑥=1,√𝑥) (𝑥=1,√𝑥)

(𝑥=0,√𝑥) (𝑥=0,√𝑥)
3 3 1 3 𝑥=0 1 1
∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦) = ∫ 2
𝑥 𝑑𝑥 = | 𝑥 | = (0 − 1) = −
2 2 3 𝑥=1 2 2
(𝑥=1,√𝑥) (𝑥=1,√𝑥)

Putting both these line integrals in eq. 1,


1 1
∮ 𝐹⃗ . 𝑑𝑙⃗ = − =0
2 2
Hence the total round trip along a curve in this field gives you a zero. Fields in which the
line integral along a closed path is zero are called conservative fields. The line integral, in
this case, is zero regardless of the size, shape or symmetry of the path; if the field is
conservative then the closed line integral along ANY path will always be zero.
Suppose that you have a conservative field 𝐹⃗ and you move along this field from point
(𝑥𝑎 , 𝑦𝑎 ) to point (𝑥𝑏 , 𝑦𝑏 ) and then back along two arbitrary paths defined by 𝑟⃗𝐴 and 𝑟⃗𝐵 .
Since the field is conservative,

∮ 𝐹⃗ . 𝑑𝑙⃗ = 0

The integral is broken into integrals,


(𝑥𝑏 ,𝑦𝑏 ) (𝑥𝑎 ,𝑦𝑎 )

∫ 𝐹⃗ . 𝑑𝑙⃗𝐴 + ∫ 𝐹⃗ . 𝑑𝑙⃗𝐵 = 0
(𝑥𝑎 ,𝑦𝑎 ) (𝑥𝑏 ,𝑦𝑏 )

Which can also be re-written as,


(𝑥𝑏 ,𝑦𝑏 ) (𝑥𝑎 ,𝑦𝑎 )

∫ 𝐹⃗ . 𝑑𝑙⃗𝐴 = − ∫ 𝐹⃗ . 𝑑𝑙⃗𝐵
(𝑥𝑎 ,𝑦𝑎 ) (𝑥𝑏 ,𝑦𝑏 )

Which can then, of course, be rewritten as,


(𝑥𝑏 ,𝑦𝑏 ) (𝑥𝑏 ,𝑦𝑏 )

∫ 𝐹⃗ . 𝑑𝑙⃗𝐴 = ∫ 𝐹⃗ . 𝑑𝑙⃗𝐵
(𝑥𝑎 ,𝑦𝑎 ) (𝑥𝑎 ,𝑦𝑎 )

This, implies that given that the line integral along a closed loop in a conservative field is
zero, hence the line integral along any two curves connecting the same two points must
necessarily be equal.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

4.1.7.1 Sample Problem


Calculate the closed line integral moving along the boundary of a unit square in the vector
field, 𝐹⃗ = sin 𝑥 𝑎̂𝑥 + cos 𝑦 𝑎̂𝑦 .

Since the line integral is closed and the boundary is that of a unit square, therefore, we will
travel along the boundary from (0,0) to (0,1) to (1,1) to (1,0) to (0,0). The closed line
integral then consists of,
(0,1) (1,1) (1,0) (0,0)

∮ 𝐹⃗ . 𝑑𝑙⃗ = ∫ 𝐹⃗ . 𝑑𝑙⃗ + ∫ 𝐹⃗ . 𝑑𝑙⃗ + ∫ 𝐹⃗ . 𝑑𝑙⃗ + ∫ 𝐹⃗ . 𝑑𝑙⃗ 2


(0,0) (0,1) (1,1) (1,0)

𝐹⃗ . 𝑑𝑟⃗ = sin 𝑥 𝑑𝑥 + cos 𝑦 𝑑𝑦


(0,1) (0,1)

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (sin 𝑥 𝑑𝑥 + cos 𝑦 𝑑𝑦)


(0,0) (0,0)

Since on this path 𝑥 is constant then 𝑑𝑥 = 0,


(0,1) (0,1)

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ cos 𝑦 𝑑𝑦 = sin 1


(0,0) (0,0)

Similarly,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

(1,1) (1,1) (1,1)

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (sin 𝑥 𝑑𝑥 + cos 𝑦 𝑑𝑦) = ∫ sin 𝑥 𝑑𝑥 = − cos 1 + 1


(0,1) (0,1) (0,1)

(1,0) (1,0) (1,0)

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (sin 𝑥 𝑑𝑥 + cos 𝑦 𝑑𝑦) = ∫ cos 𝑦 𝑑𝑦 = − sin 1


(1,1) (1,1) (1,1)
(0,0) (0,0) (0,0)

∫ 𝐹⃗ . 𝑑𝑙⃗ = ∫ (sin 𝑥 𝑑𝑥 + cos 𝑦 𝑑𝑦) = ∫ sin 𝑥 𝑑𝑥 = −1 + cos 1


(1,0) (1,0) (1,0)

Putting all these integrals in eq. 2,

∮ 𝐹⃗ . 𝑑𝑙⃗ = sin 1 + − cos 1 + 1 − sin 1 − 1 + cos 1 = 0

Hence the field also has a conservative.

4.1.8 Implications of Work done in a vector field of Force


As was previously explained, and you must have seen in your previous classes, that the line
integral of a vector field with physical dimensions of force gives you the work done in
moving from one point to another in that field. So if the force field is conservative, then the
above analysis implies that work done in moving along a closed loop in a conservative field
is zero which means no energy is gained or lost by the particle moving in that field (an
electron for example). It also implies that when moving between two points in such a field,
the work done will only depend on the initial and the final position of the particle in that
field.

The Green’s Theorem


Consider a vector field confined to two dimensions,
𝐹⃗ = 𝐹𝑥 𝑎̂𝑥 + 𝐹𝑦 𝑎̂𝑦
Let’s try to evaluate the following double integral over the area enclosed in a simple closed
curve in fig. 4,
𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦
𝜕𝑥 𝜕𝑦

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

Figure 4: A simple close curve. The curve can be broken into two parts, as two curves
connecting the two points a and b. Moreover, the two curves can be written as 𝑓(𝑥) or
𝑔(𝑦) depending on how they need to be used.

You might be wondering where this double integral came from and why on Earth you will
ever need to evaluate it, but you will find the usefulness of this. I promise. So let’s see where
this integral leads. The above double integral can be broken into two parts, and we will deal
with the two parts independently,
𝜕𝐹𝑦 𝜕𝐹𝑥 𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∬ 𝑑𝑥𝑑𝑦 − ∬ 𝑑𝑥𝑑𝑦
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦
𝑑 𝑝(𝑦) 𝑏 𝑣(𝑥)
𝜕𝐹𝑦 𝜕𝐹𝑥 𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∫ ∫ 𝑑𝑥 𝑑𝑦 − ∫ ∫ 𝑑𝑦 𝑑𝑥
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦
𝑐 𝑞(𝑦) 𝑎 𝑢(𝑥)

𝑑 𝑝(𝑦) 𝑏 𝑣(𝑥)
𝜕𝐹𝑦 𝜕𝐹𝑥 𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∫ ( ∫ 𝑑𝑥) 𝑑𝑦 − ∫ ( ∫ 𝑑𝑦) 𝑑𝑥
𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑦
𝑐 𝑞(𝑦) 𝑎 𝑢(𝑥)

Differentiation and subsequent integration of a function with respect to the same variable
gives you the difference of the function at the limits. The above integrals, can thus, be
simplified to,
𝑑 𝑏
𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∫ (𝐹𝑦 (𝑝(𝑦), 𝑦) − 𝐹𝑦 (𝑞(𝑦), 𝑦)) 𝑑𝑦 − ∫ (𝐹𝑥 (𝑥, 𝑢(𝑥)) − 𝐹𝑥 (𝑥, 𝑣(𝑥))) 𝑑𝑥
𝜕𝑥 𝜕𝑦
𝑐 𝑎

The above integral can be simplified by re-arranging the integration limits of some of the
terms,
𝑑 𝑐 𝑎 𝑏
𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∫ 𝐹𝑦 (𝑝(𝑦), 𝑦) 𝑑𝑦 + ∫ 𝐹𝑦 (𝑞(𝑦), 𝑦) 𝑑𝑦 + ∫ 𝐹𝑥 (𝑥, 𝑢(𝑥))𝑑𝑥 + ∫ 𝐹𝑥 (𝑥, 𝑣(𝑥))𝑑𝑥
𝜕𝑥 𝜕𝑦
𝑐 𝑑 𝑏 𝑎

It can be easily seen that this is just a closed line integral around the entire closed loop.
𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∮ 𝐹𝑦 𝑑𝑦 + ∮ 𝐹𝑥 𝑑𝑥 = ∮(𝐹𝑥 𝑑𝑥 + 𝐹𝑦 𝑑𝑦) = ∮ 𝐹⃗ . 𝑑𝑟⃗
𝜕𝑥 𝜕𝑦
So to simplify and summarize,
𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦 = ∮ 𝐹⃗ . 𝑑𝑙⃗
𝜕𝑥 𝜕𝑦
This is Green’s theorem. So, what does it mean? It means that task of taking a closed line
integral of a vector field 𝐹⃗ has been reduced to calculating the double integral in the left
side of the above equation. This is useful circumstances, and geometries, in which the left
side of the equation is easier to evaluate then the closed line integral itself. Below, you will
find some interesting example exploiting the usefulness of Green’s theorem. A subtle point
here, which has been implicitly used and glossed over, is that the region of double integral,
R, must be on the left-hand side as the closed boundary of the curve is traversed.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

4.2.1.1 Sample Problem


A magnetic field of a certain configuration of current-carrying wires is given as,
⃗⃗ = (𝑦 2 − 7𝑦)𝑎̂𝑥 + (2𝑥𝑦 + 2𝑥)𝑎̂𝑦
𝐵

The closed line integral of the field is called Ampere’s law. Let’s try to calculate the closed
line integral around a circle of unit radius, i.e. along the path 𝑥 2 + 𝑦 2 = 1. Let’s first do it
directly,

⃗⃗ . 𝑑𝑙⃗ = ∮ ((𝑦 2 − 7𝑦)𝑎̂𝑥 + (2𝑥𝑦 + 2𝑥)𝑎̂𝑦 ) . (𝑑𝑥𝑎̂𝑥 + 𝑑𝑦𝑎̂𝑦 )


∮𝐵

⃗⃗ . 𝑑𝑙⃗ = ∮((𝑦 2 − 7𝑦)𝑑𝑥 + (2𝑥𝑦 + 2𝑥)𝑑𝑦)


∮𝐵

Since the closed curve is continuous, we can parametrize it and say that 𝑥 = 𝑟 cos 𝜃 =
cos 𝜃 , 𝑦 = 𝑟 sin 𝜃 = sin 𝜃. Consequently, 𝑑𝑥 = − sin 𝜃 𝑑𝜃, 𝑑𝑦 = cos 𝜃 𝑑𝜃. The above
equation then becomes, after calculating the limit of 𝜃,
𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = ∫ ((sin2 𝜃 − 7 sin 𝜃)(− sin 𝜃 𝑑𝜃) + (2 cos 𝜃 sin 𝜃 + 2 cos 𝜃)(cos 𝜃 𝑑𝜃))
∮𝐵
𝜃=0

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝜃=2𝜋

⃗⃗ . 𝑑𝑙⃗ = ∫ ((sin2 𝜃 − 7 sin 𝜃)(− sin 𝜃 𝑑𝜃) + (2 cos 𝜃 sin 𝜃 + 2 cos 𝜃)(cos 𝜃 𝑑𝜃))
∮𝐵
𝜃=0
𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = ∫ (− sin3 𝜃 + 7 sin2 𝜃 + 2 cos2 𝜃 sin 𝜃 + 2 cos 2 𝜃)𝑑𝜃
∮𝐵
𝜃=0
𝜃=2𝜋

⃗⃗ . 𝑑𝑙⃗ = ∫ (− sin3 𝜃 + 2 + 5 sin2 𝜃 + 2(1 − sin2 𝜃) sin 𝜃)𝑑𝜃


∮𝐵
𝜃=0
𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = ∫ (− 3sin3 𝜃 + 2 + 5 sin2 𝜃 + 2 sin 𝜃)𝑑𝜃
∮𝐵
𝜃=0
𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = ∫ (sin 𝜃 (− 3sin2 𝜃 + 2) + 5 sin2 𝜃 + 2)𝑑𝜃
∮𝐵
𝜃=0
𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = ∫ (sin 𝜃 (− 3sin2 𝜃 + 2) + 5 sin2 𝜃 + 2)𝑑𝜃
∮𝐵
𝜃=0
𝜃=2𝜋 𝜃=2𝜋

⃗⃗ . 𝑑𝑙⃗ = ∫ sin 𝜃 (− 3sin2 𝜃 + 2)𝑑𝜃 + ∫ (5 sin2 𝜃 + 2)𝑑𝜃


∮𝐵
𝜃=0 𝜃=0
𝜃=2𝜋 𝜃=2𝜋 𝜃=2𝜋

⃗⃗ . 𝑑𝑙⃗ = ∫ sin 𝜃 (3cos2 𝜃 − 1)𝑑𝜃 + 5 ∫ sin2 𝜃 𝑑𝜃 + 2 ∫ 𝑑𝜃


∮𝐵
𝜃=0 𝜃=0 𝜃=0
𝜃=2𝜋 𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = ∫ sin 𝜃 (3cos2 𝜃 − 1)𝑑𝜃 + 5 ∫ sin2 𝜃 𝑑𝜃 + 4𝜋
∮𝐵
𝜃=0 𝜃=0

Using substitution on the first integral gives,


𝜃=2𝜋
⃗⃗ . 𝑑𝑙⃗ = |cos3 𝜃 − cos 𝜃|𝜃=2𝜋
∮𝐵 2
𝜃=0 + 5 ∫ sin 𝜃 𝑑𝜃 + 4𝜋
𝜃=0

The other integral is relatively straightforward application of half-angle formula.


That will give you,

⃗⃗ . 𝑑𝑙⃗ = 0 + 5𝜋 + 4𝜋 = 9𝜋
∮𝐵

We can agree that the calculation took a while!! Green’s theorem gives you an easier way to
do the same thing by evaluating the following double integral instead. The double integral
in some cases can significantly simple that calculating the closed integral. Let’s see if it is
true for our problem.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

𝜕 2 𝜕
∮ 𝐹⃗ . 𝑑𝑙⃗ = ∬ ( (𝑦 − 7) − (2𝑥𝑦 + 2𝑥)) 𝑑𝑥𝑑𝑦
𝜕𝑥 𝜕𝑦
𝜕 𝜕
∮ 𝐹⃗ . 𝑑𝑙⃗ = ∬ ( (2𝑥𝑦 + 2𝑥) − (𝑦 2 − 7𝑦) ) 𝑑𝑥𝑑𝑦
𝜕𝑥 𝜕𝑦

∮ 𝐹⃗ . 𝑑𝑙⃗ = ∬((2𝑦 + 2) − (2𝑦 − 7) ) 𝑑𝑥𝑑𝑦

∮ 𝐹⃗ . 𝑑𝑙⃗ = 9 ∬ 𝑑𝑥𝑑𝑦

The double integral on the left is simply the area of the enclosed loop, which in this case is a
circle. The area of a circle is 𝜋𝑟 2 which, for a unit radius is just 𝜋.

∮ 𝐹⃗ . 𝑑𝑙⃗ = 9𝜋

And you have the same answer, but with a lot less mathematics. This is why using Green’s
theorem in specific geometries significantly simplifies the math.
4.2.1.2 Sample Problem
Green’s theorem can be used to calculate the area bounded inside a closed loop. The area of
an arbitrary region is given as,
𝑥2 𝑣(𝑥) 𝑦2 𝑝(𝑦)
∫ ∫ 𝑑𝑦 𝑑𝑥 = ∫ ∫ 𝑑𝑥 𝑑𝑦
𝑥1 𝑢(𝑥) 𝑦1 𝑞(𝑦)

Given that,
𝜕𝐹𝑦 𝜕𝐹𝑥
− =1
𝜕𝑥 𝜕𝑦
By green’s theorem, this is equivalent to evaluation the closed line integral,
1
∮(−𝑦)𝑑𝑥 = ∮ 𝑥𝑑𝑦 = ∮(𝑥𝑑𝑦 − 𝑦𝑑𝑥)
2
Suppose, you wish to find the area bounded in a circle, 𝑥 2 + 𝑦 2 ≤ 𝑟 2 . In double integrals,
this is given as,
2𝜋
1 1
Area = ∬ 𝑑𝐴 = ∮(𝑥𝑑𝑦 − 𝑦𝑑𝑥) = ( ∫ 𝑟 2 (sin2 𝑡 + cos2 𝑡)𝑑𝑡) = 𝜋𝑟 2
2 2
𝑡=0

Another, slightly more complicated example, would be the area in the following region,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

The region is bounded on the parametric curve, 𝑐(𝑡) = sin 2𝑡 𝑎̂𝑥 + sin 𝑡 𝑎̂𝑦 between 0 ≤
𝑡 ≤ 𝜋. We use the same equation as we did before,
𝜋
1 1
Area in C(t) = ∬ 𝑑𝐴 = ∮(𝑥𝑑𝑦 − 𝑦𝑑𝑥) = ( ∫(sin 2𝑡 cos 𝑡 − 2 sin 𝑡 cos 2𝑡)𝑑𝑡)
2 2
𝑡=0

𝜋
1
Area in C(t) = ∬ 𝑑𝐴 = ( ∫(sin 2𝑡 cos 𝑡 − 2 sin 𝑡 cos 2𝑡)𝑑𝑡)
2
𝑡=0

𝜋 𝜋
1
Area in C(t) = ( ∫ sin 2𝑡 cos 𝑡 𝑑𝑡 − ∫ 2 sin 𝑡 cos 2𝑡 𝑑𝑡)
2
𝑡=0 𝑡=0
𝜋
1 2 cos3 𝑡 cos 3𝑡 + 3 cos 𝑡 4
Area in C(t) = |− + | =
2 3 3 0
3
4.2.1.3 Sample problem
Among all smooth, simple closed curves in the plane, oriented counter-clockwise, find the
1 1
curve along which the work done by 𝐹⃗ = ( 𝑥 2 𝑦 + 𝑦 3 ) 𝑎̂𝑥 + 𝑥𝑎̂𝑦 is maximum.
4 3

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

The closed line integral of this vector field in xy-plane can be given as,

∮ 𝐹⃗ . 𝑑𝑙⃗
C

This by Green’s theorem is equal to,


𝜕𝐹𝑦 𝜕𝐹𝑥
∬( − ) 𝑑𝑥𝑑𝑦
𝜕𝑥 𝜕𝑦
𝜕𝐹𝑦 𝜕𝐹
Now the above integral is going to be maximum when the term ( 𝜕𝑥 − 𝜕𝑦𝑥 ) is positive
through-out the bounded region (since you are only summing it up over the whole region, if
it had an infinitesimally small negative value it would be less than the most it can have). I
can write the above equation in another way,
⃗⃗ × 𝐹⃗ ). 𝑎̂𝑧 𝑑𝑥𝑑𝑦
∬(∇
Hence, the closed line integral will be maximum when the curl of the vector field 𝐹⃗ has a
positive curl in the direction of 𝑎̂𝑧 throughout the region bounded by the curve C.

Surface Integrals
Just like in the previous lectures you had seen the concept of summing over the components
of a vector field along direction of tangent of the path of a curve in space. Similarly, one can
also calculate the component of a vector field in the direction of normal vector and sum over
region of space. This is called the Surface Integral. A surface integral is given as,

Surface Integral of 𝐹⃗ over region 𝑆 = ∫ 𝐹⃗ . 𝑑𝐴⃗ = ∬ 𝐹⃗ . 𝑛̂𝑑𝐴

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

Here, 𝑑𝑆 is the infinitesimal area vector to a surface element of the surface and 𝑛̂ is the unit
normal in the direction of the area vector. Consequently, 𝑑𝐴⃗ = 𝑛̂𝑑𝐴. The Surface integral of
a vector field over a surface gives you the flux of the vector field over the surface 𝑆.

Describing a Surface
We have seen in the topics on line integral that a curve can be parametrized by a single
parameter (in many cases that parameter is time). A single parameter suffices in the case of
line integral because there is only one way to move on a curve i.e. along the curve. However,
when we move to surfaces, in a three dimensional space, there are two dimensions in which
we can use therefore a surface can be parameterized by using two parameters (𝑢, 𝑣). In this
case, the coordinates on the 3 dimensional surface can be written in the form of the
parameters on the surface i.e. 𝑥(𝑢, 𝑣), 𝑦(𝑢, 𝑣), 𝑧(𝑢, 𝑣). The position vector from an arbitrary
origin, just like for a curve, 𝑟⃗, can also be written as a function of the parameters (𝑢, 𝑣).
𝑟⃗(𝑢, 𝑣) = 𝑥(𝑢, 𝑣)𝑎̂𝑥 + 𝑦(𝑢, 𝑣)𝑎̂𝑦 + 𝑧(𝑢, 𝑣)𝑎̂𝑧
Just like a curve, the surface can also be written in the form of an equation (though not
always!). In such case the surface is represented by an intrinsic equation 𝑔(𝑥, 𝑦, 𝑧) = 0. For
example, a plane parallel to the 𝑥𝑦 coordinate plane can be written as 𝑧 − 𝑎 = 0 where 𝑎 is
any constant. Another example is a sphere of radius 𝑎 which can be written as 𝑥 2 + 𝑦 2 +
𝑧 2 − 𝑎2 = 0.

Normal and Unit normal of a surface


Over a a parametrized surface, the position vector 𝑟⃗(𝑢, 𝑣). The tangent plane of this surface
at any point is spanned by tangent vectors,
𝜕𝑟⃗ 𝜕𝑟⃗
𝑟⃗𝑢 =
, 𝑟⃗𝑣 =
𝜕𝑢 𝜕𝑣
The normal vector to this plane can, thus, be found from the cross product of these tangent
vectors.
⃗⃗ (𝑢, 𝑣) = 𝑟⃗𝑢 × 𝑟⃗𝑣
𝑁
The unit normal in the direction of the normal can, of course, be found by,
⃗⃗
𝑁 𝑟⃗𝑢 × 𝑟⃗𝑣
𝑛̂ = =
⃗⃗ | |𝑟⃗𝑢 × 𝑟⃗𝑣 |
|𝑁
The surface integral in this case is then simply given as,

Surface Integral of 𝐹⃗ over region 𝑆 = ∫ ∫ 𝐹⃗ . 𝑁


⃗⃗ 𝑑𝑢 𝑑𝑣
𝑣 𝑢

The direction normal to a surface 𝑔(𝑥, 𝑦, 𝑧) = 0 is calculated by taking the gradient of the
equation of the surface. This is justified because the direction of the gradient of a scalar field
is always normal to the surfaces (or curves, if the space is two dimensional) where the scalar
field has a constant value. The unit vector in the direction of the normal vector is, thus,
given as,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

⃗⃗
𝑁 ⃗∇⃗𝑔(𝑥, 𝑦, 𝑧)
𝑛̂ = =
⃗⃗| |∇
|𝑁 ⃗⃗𝑔(𝑥, 𝑦, 𝑧)|

4.5.1 Sample Problem


Find the unit normal of the following surfaces,
1. 𝑔(𝑥, 𝑦, 𝑧) = 3𝑥 + 2𝑦 − 𝑧 = 0
𝜕 𝜕 𝜕
⃗⃗𝑔(𝑥, 𝑦, 𝑧) = ( 𝑎̂𝑥 +
∇ 𝑎̂𝑦 + 𝑎̂ ) (3𝑥 + 2𝑦 − 𝑧)
𝜕𝑥 𝜕𝑦 𝜕𝑦 𝑧
⃗∇⃗𝑔(𝑥, 𝑦, 𝑧) = 3𝑎̂𝑧 + 2𝑎̂𝑦 − 𝑎̂𝑧

And then the unit normal is just,


(3𝑎̂𝑥 + 2𝑎̂𝑦 − 𝑎̂𝑧 ) (3𝑎̂𝑥 + 2𝑎̂𝑦 − 𝑎̂𝑧 )
̂=
𝑁 =
√(32 ) + (22 ) + 1 √14
As you can see that the unit normal is a constant vector which signifies that the surface is
flat.
2. 𝑔(𝑥, 𝑦, 𝑧) = 8𝑥 + 𝑦 2 − 4𝑧 = 0
𝜕 𝜕 𝜕
⃗⃗ = ⃗∇⃗𝑔(𝑥, 𝑦, 𝑧) = ( 𝑎̂𝑥 +
𝑁 𝑎̂𝑦 + 𝑎̂𝑧 ) (8𝑥 + 𝑦 2 − 4𝑧)
𝜕𝑥 𝜕𝑦 𝜕𝑦
⃗⃗ = ⃗∇⃗𝑔(𝑥, 𝑦, 𝑧) = 8𝑖̂ + 2𝑦𝑗̂ − 4𝑘̂
𝑁
(3𝑎̂𝑥 + 2𝑎̂𝑦 − 𝑎̂𝑧 ) (3𝑎̂𝑥 + 2𝑎̂𝑦 − 𝑎̂𝑧 )
̂=
𝑁 =
√(32 ) + (22 ) + 1 √14

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

3. 𝑔(𝑥, 𝑦, 𝑧) = 𝑦𝑥 2 + 𝑧𝑦 2 + 𝑥𝑧 2 − 9 = 0
𝜕 𝜕 𝜕
⃗∇⃗𝑔(𝑥, 𝑦, 𝑧) = ( 𝑎̂𝑥 + 𝑎̂𝑦 + 𝑎̂ ) (𝑦𝑥 2 + 𝑧𝑦 2 + 𝑥𝑧 2 − 9)
𝜕𝑥 𝜕𝑦 𝜕𝑦 𝑧
⃗∇⃗𝑔(𝑥, 𝑦, 𝑧) = (2𝑥𝑦 + 𝑧 2 )𝑖̂ + (𝑥 2 + 2𝑦𝑧)𝑗̂ + (𝑦 2 + 2𝑥𝑧)𝑘̂
(2𝑥𝑦 + 𝑧 2 )𝑎̂𝑥 + (𝑥 2 + 2𝑦𝑧)𝑎̂𝑦 + (𝑦 2 + 2𝑥𝑧)𝑎̂𝑧
̂
𝑁=
√(2𝑥𝑦 + 𝑧 2 )2 + (𝑥 2 + 2𝑦𝑧)2 + (𝑦 2 + 2𝑥𝑧)2
4. Parametrized position vector 𝑟⃗(𝑢, 𝑣) = (𝑎 cos 𝑢 , 𝑎 sin 𝑢 , 0),
𝜕𝑟⃗
𝑟⃗𝑢 = = −𝑎 sin 𝑢 𝑎̂𝑥 + 𝑎 cos 𝑢 𝑎̂𝑦 + 𝑎̂𝑧
𝜕𝑢
𝜕𝑟⃗
𝑟⃗𝑣 = = 𝑎̂𝑧
𝜕𝑣
𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧
⃗⃗ (𝑢, 𝑣) = 𝑟⃗𝑢 × 𝑟⃗𝑣 = (−𝑎 sin 𝑢 𝑎 cos 𝑢 0 ) = 𝑎 cos 𝑢 𝑎̂𝑥 − 𝑎 sin 𝑢 𝑎̂𝑦
𝑁
0 0 1
5. Parametrized position vector 𝑟⃗(𝑢, 𝑣) = 𝑢 cos 𝑣 𝑎̂𝑥 + 𝑢 sin 𝑣 𝑎̂𝑦 + 𝑢2 𝑎̂𝑧
𝜕𝑟⃗
𝑟⃗𝑢 = = cos 𝑣 𝑎̂𝑥 + sin 𝑣 𝑎̂𝑦 + 2𝑢𝑎̂𝑧
𝜕𝑢
𝜕𝑟⃗
𝑟⃗𝑣 = = −𝑢 sin 𝑣 𝑎̂𝑥 + 𝑢 cos 𝑣 𝑎̂𝑦
𝜕𝑣
𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧
⃗⃗ (𝑢, 𝑣) = 𝑟⃗𝑢 × 𝑟⃗𝑣 = ( cos 𝑣
𝑁 sin 𝑣 2𝑢 )
−𝑢 sin 𝑣 𝑢 cos 𝑣 0
⃗𝑁⃗ (𝑢, 𝑣) = 2𝑢2 cos 𝑣 𝑎̂𝑥 − 2𝑢2 sin 𝑣 𝑎̂𝑦 + 𝑢(cos 2 𝑣 − sin2 𝑣)𝑎̂𝑧
𝑁⃗⃗(𝑢, 𝑣) = 2𝑢2 cos 𝑣 𝑎̂𝑥 − 2𝑢2 sin 𝑣 𝑎̂𝑦 + 𝑢 cos 2𝑣 𝑎̂𝑧

It is worth mentioning that the normal vector for a 2D surface (for example a circle) surface
is not uniquely defined. Similarly, for a 3D surface the normal vector could point in two
directions. However, in case of a closed surface the standard is to chose the normal pointing
outward from the surface.

Calculating the surface integral of a vector field over a surface


Let’s calculate the area integral of some simple geometries and some simple vector fields.
4.6.1.1 Solved Problems
Calculate the surface integral of a constant field 𝐹⃗ = 4𝑎̂𝑥 − 3𝑎̂𝑦 − 2𝑎̂𝑧 over the surface 𝑧 −
4 = 0 bounded by a rectangular region between 0 ≤ 𝑥 ≤ 3, 0 ≤ 𝑦 ≤ 5.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Towards the solution we first need to find the unit normal. Since the surface is just 𝑧 = 4 it
means that the surface must be parallel to the 𝑥𝑦 plane. Calculating the unit normal of the
surface we take the gradient of the surface,
⃗⃗ = ∇
𝑁 ⃗⃗(𝑧 − 4) = 𝑎̂𝑧 = 𝑛̂

𝐹⃗ . 𝑛̂ = (4𝑎̂𝑥 − 3𝑎̂𝑦 − 2𝑎̂𝑧 ). 𝑎̂𝑧 = −2

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −2 ∬ 𝑑𝐴

Now the question is the region on the surface which is bounding the area of interest. The
question says that it is a rectangular region hence the limits can be evaluated irrespective of
each other.
3 5

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −2 ∫ ∫ 𝑑𝐴
0 0

Since the region is just on the 𝑥𝑦 plane then the area element is just 𝑑𝐴 = 𝑑𝑥𝑑𝑦
3 5

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −2 ∫ ∫ 𝑑𝑦𝑑𝑥 = −2(|𝑥|30 |𝑦|50 ) = −2(3 − 0)(5 − 0) = −30


0 0

The negative sign just shows the direction of flux.


4.6.1.2 Solved Problem
Repeat the same problem as before but instead calculate the surface integral over the region
bounded by a circle of radius 3 located at the origin.

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Since the circle is still located on the same plane 𝑧 − 4 = 0 then the unit normal will be the
same as before.

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −2 ∬ 𝑑𝐴

The only thing that will change in the above solution are the limits of the region. Since the
region is a circle on the 𝑥𝑦 plane the equation of the circle will be 𝑥 2 + 𝑦 2 = 9. On the 𝑥
axis (where 𝑦 = 0) the limits of the 𝑥 coordinate change from −3 ≤ 𝑥 ≤ 3. And along the 𝑦
axis the limits will change according to the equation of the circle i.e. −√9 − 𝑥 2 ≤ 𝑦 ≤
√9 − 𝑥 2 . Therefore the limits of the integration will be,
3 √9−𝑥 2

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −2 ∫ ∫ 𝑑𝑦𝑑𝑥
−3 −√9−𝑥 2
3

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −4 ∫ √9 − 𝑥 2 𝑑𝑥
−3

This can be solved by trigonometric substitution,


𝑥 = 3 sin 𝜃
𝜋/2

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −4 ∫ 3√1 − sin2 𝜃 3 cos 𝜃 𝑑𝜃


−𝜋/2
𝜋/2

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −36 ∫ cos 2 𝜃 𝑑𝜃
−𝜋/2
𝜋/2
1 + cos 2𝜃
∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −36 ∫ 𝑑𝜃
2
−𝜋/2
𝜋
1 2 𝜋 𝜋
∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −18 |𝜃 + sin 2𝜃| 𝜋 = −18 ( + ) = −18𝜋
2 − 2 2
2

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −18𝜋

Notice the surface integral has the same sign only the magnitude has changed because the
direction of the components is still the same but the area has not changed. This problem
could be a lot simpler had we just converted the area element to polar coordinates i.e.
2𝜋 3 2𝜋 3
𝑟2

∬ 𝐹 . 𝑛̂ 𝑑𝐴 = −2 ∬ 𝑑𝐴 = −2 ∫ ∫ 𝑟𝑑𝑟𝑑𝜃 = −2 ∫ 𝑑𝜃 ∫ 𝑟𝑑𝑟 = −2(2𝜋) ( )
2
0 0 0 0
9
= −2(2𝜋) ( )
2

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −18𝜋

4.6.1.3 Solved Example


Find the surface integral of vector field 𝐹⃗ = 𝑒 𝑦 𝑎̂𝑥 − 𝑒 𝑧 𝑎̂𝑦 + 𝑒 𝑥 𝑎̂𝑧 over a surface, 𝑥 2 + 𝑦 2 =
9, 𝑥 ≥ 0, 𝑦 ≥ 0 and 0 ≤ 𝑧 ≤ 2.

From the look of the equation it seems that the surface is one quarter of a cylinder (confined
in the positive quarter, 𝑥 ≥ 0, 𝑦 ≥ 0 and the 𝑧 coordinate goes from 0 to 2). The unit
normal around the curved surface is can be calculated as,
𝑁⃗⃗ = ⃗∇⃗(𝑥 2 + 𝑦 2 − 9) = (2𝑥, 2𝑦)
𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦
𝑛̂ =
3
(𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 ) 1
𝐹⃗ . 𝑛̂ = (𝑒 𝑦 𝑎̂𝑥 − 𝑒 𝑧 𝑎̂𝑦 + 𝑒 𝑥 𝑎̂𝑧 ). = (𝑥𝑒 𝑦 − 𝑦𝑒 𝑧 )
3 3
1
∬ ( (𝑥𝑒 𝑦 − 𝑦𝑒 𝑧 )) 𝑑𝐴
3
Since the geometry is a cylinder then the most obvious coordinates to deal with it is
cylindrical coordinate system,
𝑥 = 3 cos 𝜃
𝑦 = 3 sin 𝜃

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

0≤𝑧≤2
For a constant radius the infinitesimal area element in cylindrical coordinate system is 𝑑𝐴 =
3𝑑𝜃𝑑𝑧 (sometimes z is also used in place of ℎ in cylindrical coordinate system)
𝜋 𝜋
2 2 2 2
1
∫ ∫ 3(cos 𝜃 𝑒 3 sin 𝜃 − sin 𝜃 𝑒 𝑧 ) 3𝑑𝜃𝑑𝑧 = 3 ∫ ∫ (cos 𝜃 𝑒 3 sin 𝜃 − sin 𝜃 𝑒 𝑧 ) 𝑑𝜃𝑑𝑧
3
0 𝜃=0 0 𝜃=0

Notice that the limit is chosen because the cylinder exists in the first quadrant where both 𝑥
and 𝑦 are positive. Also, by converting the coordinates the limits are not independent and
separate because the radius of the cylinder was a constant.
4.6.1.4 Solved Example
Calculate the surface integral of 𝐹⃗ = 2𝑥𝑎̂𝑥 + 5𝑦𝑎̂𝑦 , 𝑟⃗ = 𝑢𝑎̂𝑥 + 𝑣𝑎̂𝑦 + (4𝑢 + 3𝑣)𝑎̂𝑧 within
the limits 0 ≤ 𝑢 ≤ 4, −𝑢 ≤ 𝑣 ≤ 𝑢 + 4.

Here the parametric equation for the surface is,


𝑥 = 𝑢, 𝑦 = 𝑣, 𝑧 = 4𝑢 + 3𝑣
𝜕𝑟⃗
𝑟⃗𝑢 = = 𝑎̂𝑥 + 4𝑎̂𝑧
𝜕𝑢
𝜕𝑟⃗
𝑟⃗𝑣 = = 𝑎̂𝑦 + 3𝑎̂𝑧
𝜕𝑣
𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧
⃗𝑁⃗(𝑢, 𝑣) = 𝑟⃗𝑢 × 𝑟⃗𝑣 = ( 1 0 4 )
0 1 3
⃗⃗(𝑢, 𝑣) = −4𝑎̂𝑥 − 3𝑎̂𝑦 + 1𝑎̂𝑧
𝑁

Surface Integral of 𝐹⃗ over region 𝑆 = ∬ 𝐹⃗ . 𝑁


⃗⃗𝑑𝑢𝑑𝑣 = ∫ ∫ 𝐹⃗ . 𝑁
⃗⃗ 𝑑𝑢 𝑑𝑣
𝑣 𝑢
8 1

Surface Integral of 𝐹⃗ over region 𝑆 = ∫ ∫ (2𝑢𝑎̂𝑥 + 5𝑣𝑎̂𝑦 ). (−4𝑎̂𝑥 − 3𝑎̂𝑦 + 𝑎̂𝑧 )𝑑𝑢 𝑑𝑣
𝑣=−8 𝑢=0
4 𝑢+4

Surface Integral of 𝐹⃗ over region 𝑆 = ∫ ∫ (−8𝑢 − 15𝑣)𝑑𝑢 𝑑𝑣


𝑢=0 𝑣=−𝑢

Since the limits are not rectangular (independent) which means 𝑣 integral should be solved
first.
4.6.1.5 Solved Problem
Calculate the surface integral of the vector field 𝐹⃗ = 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧 over the surface
vector 𝑟⃗(𝑢, 𝑣) = 𝑢 cos 𝑣 𝑎̂𝑥 + 𝑢 sin 𝑣 𝑎̂𝑦 + 𝑢2 𝑎̂𝑧 between the limits 0 ≤ 𝑢 ≤ 4, −𝜋 ≤ 𝑣 ≤
𝜋.
The parametrized coordinates are,
𝑥 = 𝑢 cos 𝑣 , 𝑦 = 𝑢 sin 𝑣 , 𝑧 = 𝑢2

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

The unit normal of the surface was found in a previous problem and it came out to be,
𝑁⃗⃗(𝑢, 𝑣) = 2𝑢2 cos 𝑣 𝑎̂𝑥 − 2𝑢2 sin 𝑣 𝑎̂𝑦 + 𝑢 cos 2𝑣 𝑎̂𝑧
The parametrized vector field is,
𝐹⃗ = 𝑢 cos 𝑣 𝑎̂𝑥 + 𝑢 sin 𝑣 𝑎̂𝑦 + 𝑢2 𝑎̂𝑧

Surface Integral of 𝐹⃗ over region 𝑆 = ∬ 𝐹⃗ . 𝑁


⃗⃗ 𝑑𝑢𝑑𝑣

Surface Integral of 𝐹⃗ over region 𝑆


= ∬(𝑢 cos 𝑣 𝑎̂𝑥 + 𝑢 sin 𝑣 𝑎̂𝑦 + 𝑢2 𝑎̂𝑧 ). (2𝑢2 cos 𝑣 𝑎̂𝑥 − 2𝑢2 sin 𝑣 𝑎̂𝑦
+ 𝑢 cos 2𝑣 𝑎̂𝑧 )𝑑𝑢𝑑𝑣

Surface Integral of 𝐹⃗ over region 𝑆 = ∬(2𝑢3 cos 2 𝑣 − 2𝑢3 sin2 𝑣 + 𝑢3 cos 2𝑣)𝑑𝑢𝑑𝑣

Surface Integral of 𝐹⃗ over region 𝑆 = ∬ 3𝑢3 cos 2 2𝑢 𝑑𝑢𝑑𝑣


𝜋 4

Surface Integral of 𝐹⃗ over region 𝑆 = ∫ ∫ 3𝑢3 cos2 2𝑢 𝑑𝑢 𝑑𝑣


−𝜋 0

Hence the limits are independent so they can be solved individually.

4.6.2 Surface Integrals of closed surfaces


In the previous examples we had fixed ourselves to surfaces on a flat plane for which the
unit normal of the surface was a constant. In general surfaces can be curved and bend due to
which the unit normal is not constant in space and its direction continuously changes. A
obvious example of it is the case of a sphere. The equation of the surface of a sphere is,
𝑔(𝑥, 𝑦, 𝑧) = 𝑥 2 + 𝑦 2 + 𝑧 2 − 𝑟 2 = 0
The normal of this surface is given as,
⃗⃗ = ⃗∇⃗𝑔(𝑥, 𝑦, 𝑧) = 2𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧
𝑁
2𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
𝑛̂ = =
√4𝑥 2 + 4𝑦 2 + 4𝑦 2 √𝑥 2 + 𝑦 2 + 𝑦 2
Using the equation of a sphere we get 𝑥 2 + 𝑦 2 + 𝑧 2 = 𝑟 2 ,
2𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
𝑛̂ = =
√4𝑥 2 + 4𝑦 2 + 4𝑦 2 𝑟
As obvious, unlike before, the unit normal has a different direction because it depends on the
coordinates in the Cartesian coordinate space, as shown in figure 1.
4.6.2.1 Sample Problem
Calculate the surface integral of a vector field 𝐹⃗ = 𝑥𝑖̂ + 𝑦𝑗̂ + 𝑧𝑘̂ over the surface of a sphere
centered around the origin and having a radius of 3 units.
As illustrated in the last example the unit normal of the sphere is given as,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Figure 1: Unit normal on the surface of a sphere

2𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧


𝑛̂ = =
√4𝑥 2 + 4𝑦 2 + 4𝑦 2 3
The component of the vector field in the direction of the unit normal is then given as,
𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
𝐹⃗ . 𝑛̂ = (𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧 ). ( )
3
1
𝐹⃗ . 𝑛̂ = (𝑥 2 + 𝑦 2 + 𝑧 2 )
3
Since by the equation of the surface the sum of the square of the coordinates is equal to a
constant 9, square of the radius, hence,
1
𝐹⃗ . 𝑛̂ = (9) = 3
3
Hence, the surface integral over the surface of the sphere is then,

∫ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = 3 ∫ 𝑑𝐴 = 3 × Area of the sphere = 3 × 4πR2 = 12 × 9𝜋 = 108𝜋

Since the integral runs over the entire surface of the sphere then, following the trend of
having closed line integrals which bound an area, this is a closed surface integral which
bounds a volume. And just like using a circle to donate a closed line integral, a similar
symbol is used to write a closed surface/area integral i.e.

∮ 𝐹⃗ . 𝑛̂𝑑𝐴 = ∯ 𝐹⃗ . 𝑛̂𝑑𝐴 = 108𝜋

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

4.6.2.2 Sample problem


Suppose we repeat the same problem but with the case where the vector field is a constant
i.e. 𝐹⃗ = 2𝑖̂ + 4𝑗̂ + 6𝑘̂ . Since the sphere is the same the unit normal will remain the same but
𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
𝐹⃗ . 𝑛̂ = (2𝑎̂𝑥 + 4𝑎̂𝑦 + 6𝑎̂𝑧 ). ( )
3
1
𝐹⃗ . 𝑁
̂= (2𝑥 + 4𝑦 + 6𝑧)
3
So the area integral is then,

1
∫ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = ∫ (2𝑥 + 4𝑦 + 6𝑧) 𝑑𝐴
3
Over the sphere

Here we run into the same problem in which the surface element 𝑑𝐴 cannot be just some
𝑑𝑥𝑑𝑦 or 𝑑𝑦𝑑𝑧 since all three coordinates in this space and changing over the surface of the
sphere. It is helpful to transform the whole problem into spherical coordinates. In a
spherical coordinate system, the surface of the sphere will have a constant radius hence one
coordinate would be a constant over the surface of the sphere. For the surface of a sphere
where the radius coordinate 𝑟 is a constant then, 𝑑𝐴 = 𝑅 2 sin 𝜙 𝑑𝜃𝑑𝜙 (see figure 2). Here 𝑅
is the constant radius over the surface. Using the equations of transformation of
coordinates,
𝑥 = 𝑅 sin 𝜃 cos 𝜙
𝑦 = 𝑅 sin 𝜃 sin 𝜙
𝑧 = 𝑅 cos 𝜃

Figure 2: Area and volume elements of an infinitesimal element on the surface of a


sphere.

1
= ∮ (2𝑥 + 4𝑦 + 6𝑧) 𝑑𝐴
3

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = ∯ (2𝑅 sin 𝜃 cos 𝜙 + 4𝑅 sin 𝜃 sin 𝜙 + 6𝑅 cos 𝜃) 𝑅 2 sin 𝜃 𝑑𝜃𝑑𝜙
3
Now over the surface of the sphere the coordinates must change so that the entire surface of
the sphere is covered. The entire surface will be covered if the angle 𝜙 changes from 0 ≤
𝜙 ≤ 2𝜋 that is for a constant value of 𝜃 we draw a semicircle over the surface of the sphere
with the 𝑧 axis as its radius. To cover the entire surface of the sphere this semicircle must be
rotated around the 𝑧 such that the coordinate 0 ≤ 𝜃 ≤ 𝜋.
2𝜋 𝜋 2𝜋 𝜋
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [2 𝑅 3 ∫ ∫ sin2 𝜃 cos 𝜙 𝑑𝜃𝑑𝜙 + 4 𝑅 3 ∫ ∫ sin2 𝜃 sin 𝜙 𝑑𝜃𝑑𝜙
3
0 0 0 0
2𝜋 𝜋

+ 6𝑅 3 ∫ ∫ cos 𝜃 sin 𝜃 𝑑𝜃𝑑𝜙]


0 0

2𝜋 𝜋 2𝜋 𝜋
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [2 𝑅 3 ∫ cos 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃 + 4 𝑅 3 ∫ sin 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃
3
0 0 0 0
2𝜋 𝜋

+ 6𝑅 3 ∫ 𝑑𝜙 ∫ cos 𝜃 sin 𝜃 𝑑𝜃]


0 0

2𝜋 𝜋 2𝜋 𝜋
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [2 𝑅 3 ∫ cos 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃 + 4 𝑅 3 ∫ sin 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃
3
0 0 0 0
2𝜋 𝜋

+ 6𝑅 3 ∫ 𝑑𝜙 ∫ cos 𝜃 sin 𝜃 𝑑𝜃]


0 0

And as before, the limits have separated themselves and the integrals can be solved
independent of each other. Since the sine and cosine function average to zero over a full
cycle, the integral,
2𝜋 2𝜋

∫ sin 𝜙 𝑑𝜙 = ∫ cos 𝜙 𝑑𝜙 = 0
0 0

Hence,
2𝜋 𝜋
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [0 + 0 + 6𝑅 3 ∫ 𝑑𝜙 ∫ cos 𝜃 sin 𝜃 𝑑𝜃 ]
3
0 0
2𝜋 𝜋 𝜋

∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = 𝑅 [∫ 𝑑𝜙 ∫ sin 2𝜃 𝑑𝜃] = 𝜋𝑅 ∫ sin 2𝜃 𝑑𝜃 = 0


3 3

0 0 0

The first two integrals are zero because the integral of both cos 𝜃 and sin 𝜃 are actually
1
zero. In the last integral sin 𝜙 cos 𝜙 = 2 sin 2𝜙 and integral of this would be just something

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

proportional to cos 2𝜙 and this would be zero under the limits of 0 ≤ 𝜙 ≤ 𝜋.Therefore the
surface integral of a constant vector field over the closed surface of a sphere is actually zero.

∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = 0

We will talk more about this result because it has particular significance as it is a remnant
of evaluating the integral over the surface of a full sphere as we see in the sample problem
below.
4.6.2.3 Sample Problem
Consider the vector field in the above sample problem but instead evaluate the surface
integral over the half sphere.
So everything remains the same as in the previous sample problem. This means that 𝜙 still
goes from to zero to 2𝜋 but limits on 𝜃now goes to 0 ≤ 𝜃 ≤ 𝜋/2. And since the surface is
no longer closed, because the integrals no longer cover the whole surface then the area
integral is no longer closed. We write eq. 1 under the new limits,
2𝜋 𝜋/2 2𝜋 𝜋/2
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [2 𝑅 3 ∫ ∫ sin2 𝜃 cos 𝜙 𝑑𝜃𝑑𝜙 + 4 𝑅 3 ∫ ∫ sin2 𝜃 sin 𝜙 𝑑𝜃𝑑𝜙
3
0 0 0 0
2𝜋 𝜋/2

+ 6𝑅 3 ∫ ∫ cos 𝜃 sin 𝜃 𝑑𝜃𝑑𝜙]


0 0

The first two integrals are still zero because the limits of 𝜙 are still the same however due
to the limits of 𝜃, the last integral is no longer zero. Hence,
2𝜋 𝜋/2
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [0 + 0 + 6𝑅 3 ∫ 𝑑𝜙 ∫ cos 𝜃 sin 𝜃 𝑑𝜃]
3
0 0

2𝜋 𝜋/2
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [0 + 0 + 6𝑅 3 ∫ 𝑑𝜙 ∫ cos 𝜃 sin 𝜃 𝑑𝜃] = 4𝜋𝑅 3
3
0 0

The Divergence Theorem


Let’s try to calculate the triple volume integration of the divergence of a vector field 𝐸⃗⃗ ,
inside the volume enclosed in a closed surface, either given as intrinsic equation 𝑔(𝑥, 𝑦, 𝑧) =
0 or a set of parametric equations. This can be mathematically written as,

∭ ⃗∇⃗. 𝐵
⃗⃗ 𝑑𝑉

Let’s work in a Cartesian coordinate system and for the sake of simplicity. However, the
same method of derivation can be easily replicated in any coordinate system. Hence, in
Cartesian coordinate system one can write the above equation as,
𝜕𝐵𝑥 𝜕𝐵𝑦 𝜕𝐵𝑧
∫ ∫ ∫ ⃗∇⃗. 𝐵
⃗⃗ 𝑑𝑥 𝑑𝑦 𝑑𝑧 = ∫ ∫ ∫ ( + + ) 𝑑𝑥 𝑑𝑦 𝑑𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

𝜕𝐵𝑥 𝜕𝐵𝑦 𝜕𝐵𝑧


∫ ∫ ∫ ⃗∇⃗. 𝐵
⃗⃗ 𝑑𝑥 𝑑𝑦 𝑑𝑧 = ∫ ∫ (∫ 𝑑𝑥) 𝑑𝑦 𝑑𝑧 + ∫ ∫ ∫ 𝑑𝑦 𝑑𝑥 𝑑𝑧 + ∫ ∫ ∫ 𝑑𝑧 𝑑𝑥 𝑑𝑦
𝜕𝑥 𝜕𝑦 𝜕𝑧
The surface can also be written as set of parametric equation. This can be written as,
𝑥=ℎ(𝑦,𝑧) 𝑦=ℎ′ (𝑥,𝑧) ℎ ′′ (𝑥,𝑦)
𝜕𝐵𝑥 𝜕𝐵𝑦 𝜕𝐵𝑧
⃗⃗. 𝐵
∫∫∫∇ ⃗⃗ 𝑑𝑥 𝑑𝑦 𝑑𝑧 = ∫ ∫ ( ∫ 𝑑𝑥) 𝑑𝑦 𝑑𝑧 + ∫ ∫ ∫ 𝑑𝑦 𝑑𝑥 𝑑𝑧 + ∫ ∫ ∫ 𝑑𝑧 𝑑𝑥 𝑑𝑦
𝜕𝑥 𝜕𝑦 𝜕𝑧
𝑥=𝑔(𝑦,𝑧) 𝑦=𝑔′ (𝑥,𝑧) 𝑧=𝑔′′ (𝑥,𝑦)

Consider the following integral in the above equation,


𝑥=ℎ(𝑦,𝑧)
𝜕𝐵𝑥
∫∫( ∫ 𝑑𝑥 ) 𝑑𝑦 𝑑𝑧
𝜕𝑥
𝑥=𝑔(𝑦,𝑧)

Using the same trick we used in evaluation of Green’s theorem,

∫ ∫(𝐵𝑥 (ℎ(𝑦, 𝑧), 𝑦, 𝑧) − 𝐵𝑥 (𝑔(𝑦, 𝑧), 𝑦, 𝑧)) 𝑑𝑦 𝑑𝑧

= ∫ ∫ 𝐵𝑥 (ℎ(𝑦, 𝑧), 𝑦, 𝑧) 𝑑𝑦 𝑑𝑧 − ∫ ∫ 𝐵𝑥 (𝑔(𝑦, 𝑧), 𝑦, 𝑧) 𝑑𝑦 𝑑𝑧

Furthermore, the above integral can be written as two surface integrals along two oppositely oriented
surfaced,
𝑥=ℎ(𝑦,𝑧)
𝜕𝐵𝑥
∫∫( ∫ ⃗⃗𝑑𝑦 𝑑𝑧 + ∫ ∫ 𝐵𝑥 (𝑔(𝑦, 𝑧), 𝑦, 𝑧)𝑎̂ 𝑥 . (−𝑁
𝑑𝑥 ) 𝑑𝑦 𝑑𝑧 = ∫ ∫(𝐵𝑥 (ℎ(𝑦, 𝑧), 𝑦, 𝑧)𝑎̂ 𝑥 . 𝑁 ⃗⃗′)𝑑𝑦 𝑑𝑧
𝜕𝑥
𝑥=𝑔(𝑦,𝑧)

Here, 𝑁⃗⃗ and 𝑀⃗⃗⃗ are the normal vectors on the surfaces ℎ(𝑦, 𝑧) and 𝑔(𝑦, 𝑧) respectively. Both
the integrals on the right hand side constitute two surface of the same closed surface. Doing
this for all the surface would give in total of size terms,

∫ ∫ ∫ ⃗∇⃗. 𝐵
⃗⃗ 𝑑𝑥 𝑑𝑦 𝑑𝑧

⃗⃗ 𝑑𝑦 𝑑𝑧 + ∫ ∫ 𝐵𝑥 (𝑔(𝑦, 𝑧), 𝑦, 𝑧)𝑎̂𝑥 . (−𝑀


= ∫ ∫(𝐵𝑥 (ℎ(𝑦, 𝑧), 𝑦, 𝑧)𝑎̂𝑥 . 𝑁 ⃗⃗⃗)𝑑𝑦 𝑑𝑧

+ ⃗⃗′𝑑𝑥 𝑑𝑧 + ∫ ∫ 𝐵𝑦 (𝑥, 𝑔′(𝑦,𝑧) , 𝑧)𝑎̂𝑦 . (−𝑀


∫ ∫(𝐵𝑦 (𝑥, ℎ′(𝑥, 𝑧), 𝑧)𝑎̂𝑦 . 𝑁 ⃗⃗⃗′)𝑑𝑥 𝑑𝑧

+ ⃗⃗′′𝑑𝑥 𝑑𝑦
∫ ∫(𝐵𝑧 (𝑥, , 𝑦, ℎ′′(𝑥, 𝑦))𝑎̂𝑧 . 𝑁

⃗⃗⃗′′)𝑑𝑥 𝑑𝑦
+ ∫ ∫ 𝐵𝑧 (𝑥, 𝑦, 𝑔′′(𝑥.𝑦) )𝑎̂𝑧 . (−𝑀

All the six integral on the right hand side combined together to form a closed surface
integral of the vector field B over the entire closed surface. This can be summarized
as,

⃗⃗. 𝐵
∫∫∫∇ ⃗⃗ 𝑑𝑥 𝑑𝑦 𝑑𝑧 = ∯ 𝐵
⃗⃗ . 𝑛̂ 𝑑𝐴

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

It is importance to mention again that although the above derivation is done in


Cartesian coordinates, the same would hold for any other coordinate system for any
arbitrary closed surface.

Application of Divergence Theorem


Suppose that the vector field 𝐸⃗⃗ is the electric field around some charge distribution. We
know by Gauss’s law that the flux from a charge distribution is given as,
𝑄
𝜙𝐸 = ∬ 𝐸⃗⃗ . 𝑑𝐴⃗ =
𝜖0
𝑄 is the total charge producing the said electric field. The total charge can be written in the
form a volume integral and volume charge density.
1
∬ 𝐸⃗⃗ . 𝑑𝐴⃗ = ∭ 𝜌 𝑑𝑉
𝜖0
According to the divergence theorem, the right hand side can be rewritten as,

∬ 𝐸⃗⃗ . 𝑑𝐴⃗ = ∭ ⃗∇⃗. 𝐸⃗⃗ 𝑑𝑉

1
∭ ⃗∇⃗. 𝐸⃗⃗ 𝑑𝑉 = ∭ 𝜌 𝑑𝑉
𝜖0
Since there is a volume integral on both sides and the volume integral can run over
arbitrary volume space. Hence the only way the integral can generally be equal is when the
integrand are equal as well,
𝜌
⃗∇⃗. 𝐸⃗⃗ =
𝜖0
This is called the differential form of Gauss’s law.
If the total flux emerging from within a closed surface is zero i.e.

∬ 𝐸⃗⃗ . 𝑑𝐴⃗ = 0

Then it either means that the vector field is zero (𝐸⃗⃗ = 0) or that the positive flux (flux
entering the surface) is equal to the negative flux (flux leaving the surface). This can happen
if that the field lines have no beginning or an end within the volume enclosed by the surface.
The divergence theorem then implies,

∭ ⃗∇⃗. 𝐸⃗⃗ 𝑑𝑉 = ∬ 𝐸⃗⃗ . 𝑑𝐴⃗ = 0

Since the volume can be arbitrary any surface or shape, then the divergence should identically
vanish i.e.
⃗⃗. 𝐸⃗⃗ = 0

This means that field lines without any origin or sink form closed loops and for them the
divergence vanishes everywhere. If flux is defined as the flow of something (e.g. mass) per
unit time. Then according to the Stoke’s theorem then the divergence is the amount of

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

quantity flowing per unit time per unit volume. It should be mentioned that the definition,
and thus the units, of flux vary greatly with the area of application and study.

Application 1: Suppose the flow of fluid from a source is defined by the vector field 𝑉 ⃗⃗ =
3𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 . We wish to calculate the flux across the sphere defined by 𝑥 2 + 𝑦 2 + 𝑧 2 = 9.

According to the divergence theorem, the flux through the sphere can be calculated by
integrating the divergence over the volume of the sphere. The divergence of the vector field,
𝜕 𝜕
⃗⃗. 𝑉
∇ ⃗⃗ = 3 𝑥+2 𝑦 =5
𝜕𝑥 𝜕𝑦
The integral,

∭ 5 𝑑𝑥𝑑𝑦𝑑𝑧 = 5 ∭ 𝑑𝑥𝑑𝑦𝑑𝑧

The integral is to be solved over the surface of a sphere, which means that the 𝑥, 𝑦 and 𝑧
cannot be changed independently. You could solve each of the integrals normally i
However, we also know the integral will also just give the volume of a sphere of radius 3
units.
4 20 3
5 ∭ 𝑑𝑥𝑑𝑦𝑑𝑧 = 5 ( 𝜋𝑟 3 ) = 𝜋3 = 180𝜋
3 3
This is the mass of fluid passing through the sphere i.e. 𝑘𝑔/𝑠. You could also try to solve
this equation using the area integral, but it is not simple. Let’s check what I mean by this.
The direction of normal to the sphere can be written calculated as by taking the directional
derivative,
⃗⃗⃗⃗𝑓(𝑥, 𝑦, 𝑧)
𝑛⃗⃗ = ∇
Here, 𝑓(𝑥, 𝑦, 𝑧) = 𝑥 2 + 𝑦 2 + 𝑧 2 − 9 which the equation of the sphere,
𝑛⃗⃗ = 2𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧
And the unit normal can be calculated by dividing the vector by its magnitude,
𝑛⃗⃗ 2𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 + 2𝑧𝑎̂𝑧 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
𝑛̂ = = =
|𝑛⃗⃗| √4𝑥 2 + 4𝑦 2 + 4𝑧 2 3
Now, the left hand side of the divergence theorem gives,
𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧
⃗⃗ . 𝑑𝐴⃗ = ∬ 𝑉
∬𝑉 ⃗⃗ . 𝑛̂𝑑𝐴 = ∬(3𝑥𝑎̂𝑥 + 2𝑦𝑎̂𝑦 ). ( ) 𝑑𝐴
3
3𝑥 2 + 2𝑦 2
∬ 𝑑𝐴
3
The complication here is that the surface over which you have to integrate is a sphere,
which means that the limits of 𝑥 and 𝑦 cannot change independent of each other. Secondly,
in the case of cube or rectangular coordinates, 𝑑𝐴 has a very simple form but it is not so
simple on a sphere because the direction continuously changes over the sphere (as shown in
the picture).
Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

Normal area vectors over the surface of a sphere. Source: Rejbrand Encyclopædia

One simple way around this problem is solve the problem in spherical coordinates. This
demonstrates an important aspect of the Divergence theorem. The choice of whether to use
the right side or the left of the equation is a matter of convenience. Sometimes it is possible
easier to do the volume integral and sometimes it is easier to the rectangular integral. In
spherical coordinate system, for a constant radius sphere, the area element over the surface
is,
𝑑𝐴 = 𝑟 2 sin 𝜙 𝑑𝜙𝑑𝜃
You can immediately see that integrating this over the whole surface of the sphere, 0 ≤ 𝜙 ≤
𝜋 and 0 ≤ 𝜃 ≤ 2𝜋 gives for a constant radius,
𝜋 2𝜋

∫ 𝑑𝐴 = 𝐴 = 𝑟 2 ∫ sin 𝜙 ∫ 𝑑𝜃 = 4𝜋𝑟 2 = 𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝑎𝑟𝑒 𝑜𝑓 𝑠𝑝ℎ𝑒𝑟𝑒


0 0

You can use the transformation equations from Cartesian coordinates to spherical
coordinates,
𝑥 = 3 cos 𝜙 sin 𝜃
𝑦 = 3 sin 𝜙 sin 𝜃
𝑧 = 3 cos 𝜃
𝜋 2𝜋
3𝑥 2 + 2𝑦 2
⃗⃗ . 𝑑𝐴⃗ = ∬
∯𝑉 𝑑𝐴 = 27 ∫ ∫ [3 cos 2 𝜙 sin3 𝜃 + 2 sin2 𝜙 sin3 𝜃](𝑑𝜙𝑑𝜃)
3
0 0

You can see what happened here, by converting to a spherical polar coordinates the limits
become independent of each other and so the integrals can be calculated independently.
𝜋 2𝜋

⃗⃗ . 𝑑𝐴⃗ = 27 ∫ ∫ (3 cos 2 𝜙 sin3 𝜃 + 2 sin2 𝜙 sin3 𝜃)(𝑑𝜙𝑑𝜃)


∯𝑉
0 0
𝜋 2𝜋 𝜋 2𝜋
⃗⃗ . 𝑑𝐴⃗ = 27 [3 ∫ sin3 𝜃 𝑑𝜃 ∫ cos 2 𝜙 𝑑𝜙 + 2 ∫ sin3 𝜃 𝑑𝜃 ∫ sin2 𝜙 𝑑𝜙]
∯𝑉
0 0 0 0

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

4 4
⃗⃗ . 𝑑𝐴⃗ = 27 [3 ( ) 𝜋 + 2 ( ) 𝜋]
∯𝑉
3 3
These integrals can be easily integrated to get,

⃗⃗ . 𝑑𝐴⃗ = 180𝜋 = ∭ ∇
∯𝑉 ⃗⃗. 𝑉
⃗⃗ 𝑑𝑉

Application 2: Evaluate the flux through the surface of a cube located about −1 ≤ 𝑥 ≤
1, −1 ≤ 𝑦 ≤ 1, 0 ≤ 𝑧 ≤ 2 due to a vector field 𝐹⃗ = 𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ,

⃗⃗. 𝐹⃗ 𝑑𝑉 = ∯ 𝐹⃗ . 𝑑𝐴⃗ = 𝑇𝑜𝑡𝑎𝑙 𝑓𝑙𝑢𝑥


∭∇

⃗∇⃗. 𝐹⃗ = 3𝑦 2 + 𝑥

∭(3𝑦 2 + 𝑥)𝑑𝑥𝑑𝑦𝑑𝑧

Since you are moving along a cube, the integral limits can change independently,
2 1 1

∬ 𝐹⃗ . 𝑑𝐴⃗ = ∫ ∫ ∫(3𝑦 2 + 𝑥)𝑑𝑥𝑑𝑦𝑑𝑧


0 −1 −1
2 1 1

∬ 𝐹⃗ . 𝑑𝐴⃗ = ∫ 𝑑𝑧 ∫ ∫(3𝑦 2 + 𝑥)𝑑𝑦𝑑𝑥


0 −1 −1
1

∬ 𝐹⃗ . 𝑑𝐴⃗ = (2) ∫|𝑦 3 + 𝑧𝑦|1−1 𝑑𝑥


−1
1

∬ 𝐹⃗ . 𝑑𝐴⃗ = (2) ∫(2 + 𝑥)𝑑𝑥


−1

2 1
𝑧 1 1
∬ 𝐹⃗ . 𝑑𝐴⃗ = (−2) (2𝑧 + ) = (2) (2 + + 2 − ) = 8
2 −1 2 2

∬ 𝐹⃗ . 𝑑𝐴⃗ = 8 = 𝑇𝑜𝑡𝑎𝑙 𝐹𝑙𝑢𝑥

The same integral can be evaluated as a surface area integral. The only problem with
evaluating the area integral is that a cube has six faces which means that we need to evaluate
the integral over the six faces of the cube. The six faces of the cube are bound by the
integration limits i.e. one face is 𝑥 = 1 and its opposite face is 𝑥 = −1. Similarly, 𝑦 = −1 and
𝑦 = 1 constitutes another side of the cube and similar for the 𝑧 limits. So, we actually get,

∮ 𝐹⃗ . 𝑑𝐴⃗ = ∬ 𝐹⃗ . 𝑑𝐴⃗ + ∬ 𝐹⃗ . 𝑑𝐴⃗ + ∬ 𝐹⃗ . 𝑑𝐴⃗ + ∬ 𝐹⃗ . 𝑑𝐴⃗ + ∬ 𝐹⃗ . 𝑑𝐴⃗ ∬ 𝐹⃗ . 𝑑𝐴⃗


𝑥−1 𝑥=1 𝑦=−1 𝑦=1 𝑧=0 𝑧=2

The plane where 𝑥 is constant is the 𝑦𝑧 plane and unit vector is the unit vector of 𝑥 ie. 𝑖̂.
This means,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

∮ 𝐹⃗ . 𝑑𝐴⃗ = ∬ (𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (−𝑎̂𝑥 𝑑𝑧𝑑𝑦) + ∬(𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (𝑎̂𝑥 𝑑𝑧𝑑𝑦)
𝑥=−1 𝑥=1

+ ∬ (𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (−𝑎̂𝑦 𝑑𝑥𝑑𝑧) + ∬(𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (𝑎̂𝑦 𝑑𝑥𝑑𝑧)
𝑦=−1 𝑦=1

+ ∬(𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (−𝑎̂𝑧 𝑑𝑥𝑑𝑦) + ∬(𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (𝑎̂𝑎𝑧 𝑑𝑥𝑑𝑦)
𝑧=0 𝑧=2

Putting in the constant values of the 𝑥, 𝑦 & 𝑧

∮ 𝐹⃗ . 𝑑𝐴⃗ = ∬ (𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 − 𝑧𝑎̂𝑧 ). (−𝑎̂𝑥 𝑑𝑧𝑑𝑦)


𝑥=−1

+ ∬(𝑦 2 𝑧𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 𝑧𝑎̂𝑧 ). (𝑎̂𝑥 𝑑𝑧𝑑𝑦)


𝑥=1

+ ∬ (𝑧𝑎̂𝑥 − 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (−𝑎̂𝑦 𝑑𝑥𝑑𝑧) + ∬(𝑧𝑎̂𝑥 + 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (𝑎̂𝑦 𝑑𝑥𝑑𝑧)
𝑦=−1 𝑦=1

+ ∬(𝑦 3 𝑎̂𝑦 ). (−𝑎̂𝑧 𝑑𝑥𝑑𝑦) + ∬(2𝑦 2 𝑎̂𝑥 + 𝑦 3 𝑎̂𝑦 + 2𝑥𝑎̂𝑧 ). (𝑎̂𝑧 𝑑𝑥𝑑𝑦)
𝑧=0 𝑧=2

Now we take the dot product of the vector field with the unit vectors.
2 1 2 1 2 1 2 −1

∯ 𝐹⃗ . 𝑑𝐴⃗ = ∫ ∫(−𝑦 2 𝑧𝑑𝑦𝑑𝑧) + ∫ ∫(𝑦 2 𝑧𝑑𝑦𝑑𝑧) + ∫ ∫ 𝑑𝑥𝑑𝑧 + ∫ ∫ 𝑑𝑥𝑑𝑧


0 −1 0 −1 0 −1 0 −1
−1 1

+ ∫ ∫ 2𝑥𝑑𝑥𝑑𝑦
−1 −1

The first two integrals cancel out and the third and fourth can be added together.
2 1 −1 1

∯ 𝐹⃗ . 𝑑𝐴⃗ = 2 ∫ ∫ 𝑑𝑥𝑑𝑧 + ∫ ∫ 2𝑥𝑑𝑥𝑑𝑦


0 −1 −1 −1

Since the limits are rectangular, the integrals can be solved independently,

∯ 𝐹⃗ . 𝑑𝐴⃗ = 2|𝑥|1−1 |𝑧|20 + |𝑥 2 |1−1 |𝑧|20 = 8

Hence this also verifies divergence theorem i.e. the left side and the right side are equal to
each other. So generally you can see it is much simpler to calculate the volume integral than
it is to calculate the area integral. That is where the usefulness of the divergence theorem
comes.
Application 3: Suppose there is a vector field which only resides on the 𝑥𝑦 plane.
𝐹⃗ = 𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Suppose, the volume over which the field is to be integrated is a half sphere,
𝑥 2 + 𝑦 2 + 𝑧 2 = 𝑎2

Flat surface on the XY plane.

Te left side volume integral of the divergence theorem is very simple,

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉

⃗∇⃗. 𝑉
⃗⃗ = 2𝑥 + 2𝑦

∭ ⃗∇⃗. 𝑉
⃗⃗ 𝑑𝑉 = ∭ (2𝑥 + 2𝑦)𝑑𝑥𝑑𝑦𝑑𝑧

𝑎 √𝑎2 −𝑥 2 √𝑎2 −𝑥 2 −𝑦 2

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ ∫ ∫ (2𝑥 + 2𝑦)𝑑𝑧𝑑𝑦𝑑𝑧
−𝑎 −√𝑎2 −𝑥 2 0

You could evaluate this integral but the complication is that the integrals are very
complicated in Cartesian coordinates 𝑥, 𝑦 & 𝑧 since the limits are not independent, if you
change 𝑥 on the surface of the sphere, you will also invariably change 𝑦 & 𝑧. The integrand
of 𝑧 and its limits depends on 𝑧 so we will solve that integral first,
𝑎 √𝑎2 −𝑥 2

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ ∫ (2𝑥 + 2𝑦)(√𝑎2 − 𝑥 2 − 𝑦 2 )𝑑𝑥𝑑𝑦
−𝑎 −√𝑎2 −𝑥 2

𝑎 √𝑎2 −𝑥 2 𝑎 √𝑎2 −𝑥 2

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ ∫ (𝑥√𝑎2 − 𝑥 2 − 𝑦 2 )𝑑𝑥𝑑𝑦 + ∫ ∫ 𝑦√𝑎2 − 𝑥 2 − 𝑦 2 𝑑𝑥𝑑𝑦
−𝑎 −√𝑎2 −𝑥 2 −𝑎 −√𝑎2 −𝑥 2

𝑎 √𝑎2 −𝑥2 𝑎 √𝑎2 −𝑥 2

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ 𝑥𝑑𝑥 ∫ √𝑎2 − 𝑥 2 − 𝑦 2 𝑑𝑦 + ∫ 2𝑑𝑥 ∫ 𝑦√𝑎2 − 𝑥 2 − 𝑦 2 𝑑𝑦
−𝑎 −√𝑎2 −𝑥 2 −𝑎 −√𝑎2 −𝑥 2

We simplify the limits by saying 𝑏 = √𝑎2 − 𝑥 2 ,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝑎 𝑏 𝑎 𝑏

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ 𝑥𝑑𝑥 ∫ √𝑏 2 − 𝑦 2 𝑑𝑦 + ∫ 𝑑𝑥 ∫ 2𝑦√𝑏 2 − 𝑦 2 𝑑𝑦
−𝑎 −𝑏 −𝑎 −𝑏

The 𝑦 integral in the first term gives you (refer to previous lecture notes),
𝑎 𝑎 𝑏
⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ 𝑥𝜋𝑏 𝑑𝑥 + ∫ 𝑑𝑥 ∫ 𝑦√𝑏 2 − 𝑦 2 𝑑𝑦
2

−𝑎 −𝑎 −𝑏

The integral in the second term can be calculates in a similar way by substituting 𝑦 =
𝑏 sin 𝜃
𝑎 𝑎 𝜋/2

∭ ⃗∇⃗. 𝑉
⃗⃗ 𝑑𝑉 = ∫ 𝑥𝜋𝑏 2 𝑑𝑥 + ∫ 𝑑𝑥 ∫ 𝑏 sin 𝜃 √𝑏 2 − 𝑏 2 sin2 𝜃 (𝑏 cos 𝜃 𝑑𝜃)
−𝑎 −𝑎 −𝜋/2

𝑎 𝑎 𝜋/2

∭ ⃗∇⃗. 𝑉
⃗⃗ 𝑑𝑉 = ∫ 𝑥𝜋𝑏 2 𝑑𝑥 + ∫ 𝑑𝑥 ∫ 𝑏 sin 𝜃 𝑏 cos 𝜃 𝑏 cos 𝜃 𝑑𝜃
−𝑎 −𝑎 −𝜋/2

𝑎 𝑎 𝜋/2

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ 𝑥𝜋𝑏 2 𝑑𝑥 + ∫ 𝑏 3 𝑑𝑥 ∫ sin 𝜃 cos2 𝜃 𝑑𝜃
−𝑎 −𝑎 −𝜋/2
𝑎 𝑎 𝜋
cos 3 𝜃 2
⃗⃗ ⃗⃗ 2 3
∭ ∇. 𝑉 𝑑𝑉 = ∫ 𝑥𝜋𝑏 𝑑𝑥 + ∫ 𝑏 𝑑𝑥 | |
3 −𝜋
−𝑎 −𝑎 2
𝜋
Since cos 2 is zero the last integral is actually zero,
𝑎

∭ ⃗∇⃗. 𝑉
⃗⃗ 𝑑𝑉 = 𝜋 ∫ 𝑥(𝑎2 − 𝑥 2 )𝑑𝑥
−𝑎

This integral is of the same form which means that solution will also be zero just like the
last integral. This is a particularly interesting result. The divergence of the field is non-zero
but its sum over all volume is zero. This means that the divergence is some how not zero
but the flux passing through the closed volume is zero.
This volume integral can be made very simple if we convert this into spherical coordinates,

∭ ⃗∇⃗. 𝑉
⃗⃗ 𝑑𝑉 = ∭ (2𝑥 + 2𝑦)𝑑𝑥𝑑𝑦𝑑𝑧

We use the transformation equation mentioned before. The volume element 𝑑𝑉 in spherical
coordinate is equal to,
𝑑𝑉 = 𝜌2 sin 𝜙 𝑑𝜌𝑑𝜙𝑑𝜃

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∭ (2𝜌 cos 𝜃 sin 𝜙 + 2𝜌 sin 𝜙 sin 𝜃 )𝜌2 sin 𝜙 𝑑𝜌𝑑𝜙𝑑𝜃

Again, the real benefit of doing this transformation is that the limits becomes independent
of each other,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

𝑎 𝜋 2𝜋

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = ∫ ∫ ∫ (2𝜌3 cos 𝜃 sin2 𝜙 𝑑𝜌𝑑𝜙𝑑𝜃 + 2𝜌3 sin2 𝜙 sin 𝜃 𝑑𝜌𝑑𝜙𝑑𝜃)
0 0 0
𝑎 𝜋/2 2𝜋

⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉 = 2 ∫ 𝜌 𝑑𝜌 ∫ sin 𝜙 𝑑𝜙 ∫ (cos 𝜃 + sin 𝜃) 𝑑𝜃
3 2

0 0 0

Again, notice how nicely the integrals separate. First two integrals might give you a non-
zero answer but the last integral on 𝜃 will give you a zero total integral which causes the
whole thing to become zero which is what we expect since the integral in Cartesian
coordinate was also zero and changing coordinate system will not change the reality of the
field i.e. the field lines form closed loops.
If we want to solve the same question using the right hand side of the equation,

∯ 𝐹⃗ . 𝑑𝐴⃗

Now there are two surfaces that enclose the volume, one of the surface of the hemisphere
the other is the circular region which is bottom of the dome.

The surface of the sphere has the same unit vector as before,
𝑥𝑖̂ + 𝑦𝑗̂ + 𝑧𝑘̂
𝑛̂1 =
3

∮ 𝐹⃗ . 𝑑𝐴⃗ = ∬ 𝐹⃗ . 𝑑𝐴⃗ + ∬ 𝐹⃗ . 𝑑𝐴⃗


𝑂𝑣𝑒𝑟 𝑡ℎ𝑒 𝑤ℎ𝑜𝑙𝑒 𝑂𝑣𝑒𝑟 𝑡ℎ𝑒 𝑂𝑣𝑒𝑟 𝑡ℎ𝑒
𝑐𝑙𝑜𝑠𝑒𝑑 𝑠𝑢𝑟𝑓𝑎𝑐𝑒 ℎ𝑒𝑚𝑖𝑠𝑝ℎ𝑒𝑟𝑒 𝑏𝑜𝑡𝑡𝑜𝑚 𝑝𝑙𝑎𝑛𝑒

First, let’s do the integral over the hemisphere surface,

𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧


∬ 𝐹⃗ . 𝑑𝐴⃗ = ∬(𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦 ). ( ) 𝑑𝐴
3
𝑂𝑣𝑒𝑟 𝑡ℎ𝑒
ℎ𝑒𝑚𝑖𝑠𝑝ℎ𝑒𝑟𝑒

1
∬ 𝐹⃗ . 𝑑𝐴⃗ = ∬(𝑥 3 + 𝑦 3 )𝑑𝐴
3
𝑂𝑣𝑒𝑟 𝑡ℎ𝑒
ℎ𝑒𝑚𝑖𝑠𝑝ℎ𝑒𝑟𝑒

This integral can again be solved better in spherical coordinate system,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝜋
2 2𝜋
1
∬ 𝐹⃗ . 𝑑𝐴⃗ = (33 ) ∫ sin3 𝜙 𝑑𝜙 ∫ (cos3 𝜃 + sin3 𝜃) 𝑑𝜃
3
𝑂𝑣𝑒𝑟 𝑡ℎ𝑒 0 0
ℎ𝑒𝑚𝑖𝑠𝑝ℎ𝑒𝑟𝑒

Notice that 𝜃 has the same limits but since we have half a sphere, 𝜙 goes upto to 𝜋/2 not 𝜋.
The last integral sums up to zero.
For the other integral, over the plan surface. Since the circle is oriented on the plane where
𝑧 = 0, the area vector of the circle is along the 𝑘̂ direction. The vector field has no
component in the 𝑘 direction which immediately means that the dot product between the
area vector and the field will be zero. Hence,

∬ 𝐹⃗ . 𝑑𝐴⃗ = ∬(𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦 ). 𝑎̂𝑧 𝑑𝐴 = 0


𝑂𝑣𝑒𝑟 𝑡ℎ𝑒
𝑏𝑜𝑡𝑡𝑜𝑚 𝑝𝑙𝑎𝑛𝑒

Hence, the right hand sided of the equation is zero as well.

⃗⃗ . 𝑑𝐴⃗ = 0 = ∭ ⃗∇⃗. 𝑉
∯𝑉 ⃗⃗ 𝑑𝑉

Stoke’s Theorem
The curl of a vector field encodes the information on how and where the vector field lines
rotate. If the vector field lines form closed loops then the curl is non zero at the point and if
the form straight lines then the curl is zero, for example. The curl of a vector field is also a
vector field which means that it also has a flux. If we have open plane, like a square or a
hemisphere (remember if the plane is closed like a cube and since the field lines form closed
loops then then flux entering one part of the surface would also exit from some surface
making the flux zero) the flux of the curl through that open surface is,

⃗⃗ . 𝑑𝐴⃗
⃗⃗ × 𝑉
∬∇

Stoke’s theorem says that this flux can be calculated by integrating the vector field around
the boundary of the surface, that is to say,

⃗⃗ . 𝑑𝐴⃗ = ∮ 𝑉
∬ ⃗∇⃗ × 𝑉 ⃗⃗ . 𝑑𝑟⃗

Suppose you calculate the flux of the curl through a open surface (suppose a rectangle in a
Cartesian coordinate system),

∬(∇ ⃗⃗ ). 𝑑𝐴⃗ = Flux of CURL(V


⃗⃗ × 𝑉 ⃗⃗)

𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉
⃗⃗ = ( 𝑦 − 𝑧 ) 𝑎̂𝑥 − ( 𝑥 − 𝑧 ) 𝑎̂𝑦 + ( 𝑥 − 𝑦 ) 𝑎̂𝑧
⃗∇⃗ × 𝑉
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉
⃗⃗ ). 𝑑𝐴⃗ = ∫ ∫ [( 𝑦 − 𝑧 ) 𝑎̂𝑥 − ( 𝑥 − 𝑧 ) 𝑎̂𝑦 + ( 𝑥 − 𝑦 ) 𝑎̂𝑧 ] . 𝑑𝐴⃗
⃗⃗ × 𝑉
∬(∇
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑥

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Say, the open surface is parametrized by the parameters, say (𝑢, 𝑣), then, as described in
previous section, then the direction of the area element on the paramterized surface is
givem by the position vector is given as,
𝑟⃗ = 𝑟⃗(𝑢, 𝑣) = 𝑥(𝑢, 𝑣)𝑎̂𝑥 + 𝑦(𝑢, 𝑣)𝑎̂𝑦 + 𝑧(𝑢, 𝑣)𝑎̂𝑧
𝑎̂𝑥 𝑎̂𝑦 𝑎̂𝑧
𝜕𝑟⃗ 𝜕𝑟⃗ 𝜕𝑥(𝑢, 𝑦) 𝜕𝑦(𝑢, 𝑦) 𝜕𝑥(𝑢, 𝑦)
⃗⃗ (𝑢, 𝑣) = | |
𝑁 × = 𝑟⃗𝑢 × 𝑟⃗𝑣 = 𝜕𝑢 𝜕𝑢 𝜕𝑢
𝜕𝑢 𝜕𝑣 | |
𝜕𝑥(𝑢, 𝑦) 𝜕𝑦(𝑢, 𝑦) 𝜕𝑧(𝑢, 𝑦)
𝜕𝑣 𝜕𝑣 𝜕𝑣
𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
⃗⃗ (𝑢, 𝑣) = (
𝑁 − ) 𝑎̂𝑥 − ( − ) 𝑎̂𝑦 + ( − ) 𝑎̂
𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝑧
So the surface integral becomes,

𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉
∬(∇ ⃗⃗ ). 𝑑𝐴⃗ = ∫ ∫ [( 𝑦 − 𝑧 ) 𝑎̂𝑥 − ( 𝑥 − 𝑧 ) 𝑎̂𝑦 + ( 𝑥 − 𝑦 ) 𝑎̂𝑧 ] . 𝑁
⃗⃗ × 𝑉 ⃗⃗ 𝑑𝑢 𝑑𝑣
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑥
𝑣 𝑢

⃗⃗ ). 𝑑𝐴⃗
⃗⃗ × 𝑉
∬(∇

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑉𝑥 𝜕𝑉𝑧 𝜕𝑉𝑥 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑧


= ∫ ∫ [( − ) 𝑎̂𝑥 − ( − ) 𝑎̂𝑦 + ( − ) 𝑎̂𝑧 ] . [(
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑥 𝜕𝑢 𝜕𝑣
𝑣 𝑢
𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
− ) 𝑎̂𝑥 − ( − ) 𝑎̂𝑦 + ( − ) 𝑎̂ ] 𝑑𝑢 𝑑𝑣
𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝑧
⃗⃗ ). 𝑑𝐴⃗
⃗⃗ × 𝑉
∬(∇

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑉𝑥 𝜕𝑉𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑥 𝜕𝑧


= ∫ ∫ [( − )( − )+( − )( − )
𝜕𝑧 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑧 𝜕𝑥 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢
𝜕𝑉𝑥 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
+( − )( − )] 𝑑𝑢 𝑑𝑣
𝜕𝑦 𝜕𝑥 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
To solve this, rather, complicated integral, lets look at ome particular term at a time and
solve it, we can then extrapolate the results for the other terms. Consider the first term,

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧


∫∫( − )( − ) 𝑑𝑢 𝑑𝑣 = ∫ ∫ ( − − + ) 𝑑𝑢 𝑑𝑣
𝜕𝑧 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑧 𝜕𝑢 𝜕𝑣 𝜕𝑧 𝜕𝑣 𝜕𝑢 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑦 𝜕𝑣 𝜕𝑢
𝑣 𝑢 𝑣 𝑢

On simplifying the left hand side,

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑧 𝜕𝑉𝑧 𝜕𝑧


∫∫( − )( − ) 𝑑𝑢 𝑑𝑣 = ∫ ∫ ( − − + ) 𝑑𝑢 𝑑𝑣
𝜕𝑧 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢 𝑣 𝑢

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧
∫∫( − )( − ) 𝑑𝑢 𝑑𝑣
𝜕𝑧 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢

𝜕𝑉𝑦 𝜕𝑦 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑉𝑧 𝜕𝑧


= ∫ [∫ 𝑑𝑣 ] ( ) 𝑑𝑢 − ∫ [∫ ( ) 𝑑𝑢] 𝑑𝑣 − ∫ [∫ ( ) 𝑑𝑢] 𝑑𝑣
𝜕𝑣 𝜕𝑢 𝜕𝑢 𝜕𝑣 𝜕𝑢 𝜕𝑣
𝑢 𝑣 𝑣 𝑢 𝑣 𝑢

𝜕𝑉𝑧 𝜕𝑧
+ ∫ [∫ 𝑑𝑣] ( ) 𝑑𝑢
𝜕𝑣 𝜕𝑢
𝑢 𝑣

The left-side further solves to give,

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧
∫∫( − )( − ) 𝑑𝑢 𝑑𝑣
𝜕𝑧 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢

= ∫ [ ∫ 𝑑𝑉𝑦 ] 𝑑𝑦 − ∫ [ ∫ 𝑑𝑉𝑦 ] 𝑑𝑦′ − ∫ [ ∫ 𝑑𝑉𝑧 ] 𝑑𝑧′ + ∫ [ ∫ 𝑑𝑉𝑧 ] 𝑑𝑧


𝑦 𝑉𝑦 𝑦′ 𝑉𝑦 𝑧′ 𝑉𝑧 𝑧 𝑉𝑧

𝜕𝑉𝑦 𝜕𝑉𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑦 𝜕𝑧
∫∫( − )( − ) 𝑑𝑢 𝑑𝑣 = ∫ 𝑉𝑦 𝑑𝑦 − ∫ 𝑉𝑦 𝑑𝑦′ − ∫ 𝑉𝑧 𝑑𝑧′ + ∫ 𝑉𝑧 𝑑𝑧
𝜕𝑧 𝜕𝑦 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢 𝑦 𝑦′ 𝑧′ 𝑧

The prime on one of the integral of 𝑦 signifies that the change in 𝑦 occurs due to the change in two
different parameters. However, ultimately, you get a closed line integral in the yz-plane of the
Cartesian system. The same mathematics can be applied to other terms and you get a similar result.

𝜕𝑉𝑥 𝜕𝑉𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑥 𝜕𝑧
∫∫( − )( − ) 𝑑𝑢 𝑑𝑣 = ∫ 𝑉𝑥 𝑑𝑥 − ∫ 𝑉𝑥 𝑑𝑥′ − ∫ 𝑉𝑧 𝑑𝑧′ + ∫ 𝑉𝑧 𝑑𝑧
𝜕𝑧 𝜕𝑥 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢 ′
𝑥 𝑥 𝑧 𝑧

𝜕𝑉𝑥 𝜕𝑉𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥
∫∫( − )( − ) 𝑑𝑢 𝑑𝑣 = ∫ 𝑉𝑥 𝑑𝑥 − ∫ 𝑉𝑥 𝑑𝑥′ − ∫ 𝑉𝑦 𝑑𝑦′ + ∫ 𝑉𝑦 𝑑𝑦
𝜕𝑦 𝜕𝑥 𝜕𝑢 𝜕𝑣 𝜕𝑣 𝜕𝑢
𝑣 𝑢 ′𝑥 𝑥 𝑧 𝑦

Combining all these gives you, on the right hand side, the closed line integral along the boundary of
the open surface,

∬(∇ ⃗⃗ ). 𝑑𝐴⃗ = ∮ 𝑉
⃗⃗ × 𝑉 ⃗⃗ . 𝑑𝑟⃗

This is called the Stoke’s theorem. It states that the flux of the curl of a vector field across a
surface is equivalent to evaluating the same vector field the boundary of the surface.

∬(∇ ⃗⃗ ). 𝑑𝐴⃗ = ∮ 𝑉
⃗⃗ × 𝑉 ⃗⃗ . 𝑑𝑟⃗

If this derivation looks very similar to Green’s theorem then you have good observation
because Green’s theorem is just a limit, 2D, version of Stoke’s theorem.

Applications of Stoke’s Theorem


Application 1: Suppose that the vector field is produced by a isolated charge, just like
before. We already know that that the curl of an electric field due to a stationary charge is
zero. Then the Stoke’s theorem implies that,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

∬ ⃗∇⃗ × 𝐸⃗⃗ . 𝑑𝐴⃗ = 0 = ∮ 𝐸⃗⃗ . 𝑑𝑟⃗

The right hand side of the equation represents the work done in moving another charge in
this electric field along a closed loop, which is zero.

∮ 𝐸⃗⃗ . 𝑑𝑟⃗ = 𝑊 = 0

This is nothing surprising because the electric field is a conservative field which means that
the work done along a closed path is zero. It can then be concluded that field lines of a
conservative form do not form closed loops hence their curl will be zero. It is interesting to
note that the electric field produced by changing magnetic field forms closed loops. This
means that the curl of the field is NOT zero. Hence by Stoke’s theorem the work done along
a closed loops in such a field is not zero either.
The curl of the magnetic field is always non-zero, on the contrary.

∬∇ ⃗⃗ . 𝑑𝐴⃗ = ∮ 𝐵
⃗⃗ × 𝐵 ⃗⃗ . 𝑑𝑟⃗

The left hand side of the equation is the Ampere’s law,

⃗⃗ . 𝑑𝐴⃗ = ∮ 𝐵
∬ ⃗∇⃗ × 𝐵 ⃗⃗ . 𝑑𝑟⃗ = 𝜇0 𝑖

We can re-write current in the form of current density i.e. the current per unit area 𝐽 i.e.

⃗⃗ . 𝑑𝐴⃗ = 𝜇0 𝑖 = 𝜇0 ∬ 𝐽⃗. 𝑑𝐴⃗


⃗⃗ × 𝐵
∬∇

Since the area integral might run on arbitrary area elements, the only way these integrals
are to be equal is that if the integrands are equal, which gives you
⃗∇⃗ × 𝐵
⃗⃗ = 𝜇0 𝐽⃗
This is the differential form of Ampere’s law.
As it was before, the choice of which side of equation to solve largely depends on the
problem. In some cases it is easier to solve the left side (the area integral) other times it is
easier to solve the right side (the line integral).
Application 2: Let’s calculate the Stoke’s theorem for the following simple vector field,

𝐹⃗ = 𝑦𝑖̂ − 𝑥𝑗̂
The curl of this vector field is constant,
⃗∇⃗ × 𝐹⃗ = 2𝑘̂
The left side of the Stoke’s theorem says,

∬ ⃗∇⃗ × 𝐹⃗ . 𝑑𝐴⃗

Suppose the open surface is a circle oriented on the 𝑥𝑦 plane 𝑥 2 + 𝑦 2 = 9. This means that
the area vector are parallel to the 𝑧 axis. Hence,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

∬ ⃗∇⃗ × 𝐹⃗ . 𝑑𝐴⃗ = ∬ 2𝑘̂. 𝑘̂𝑑𝑥𝑑𝑦 = 2 ∬ 𝑑𝑥𝑑𝑦

You could evaluate the limits or even convert this into spherical coordinates to calculate the
area. But you already know that it will just give you the area of the circle which is 𝜋𝑟 2
where 𝑟 = 3,

∬ ⃗∇⃗ × 𝐹⃗ . 𝑑𝐴⃗ = ∬ 𝑑𝑥𝑑𝑦 = 2(𝜋𝑟 2 ) = 18𝜋

Now let’s calculate the right hand side of the Stoke’s theorem,

∮ 𝐹⃗ . 𝑑𝑟⃗ = ∮(𝑦𝑖̂ − 𝑥𝑗̂). (𝑑𝑥𝑖̂ − 𝑑𝑦𝑗̂)

∮ 𝐹⃗ . 𝑑𝑟⃗ = ∮(𝑦𝑑𝑥 − 𝑥𝑑𝑦)

The line integral runs along the boundary of the circle. We could solve this integral by
using the parametric equations of a circle,
𝑥(𝑡) = 3 cos 𝑡 ⇒ 𝑑𝑥 = −3 sin 𝑡 𝑑𝑡
𝑦(𝑡) = 3 sin 𝑡 ⇒ 𝑑𝑦 = 3 cos 𝑡 𝑑𝑡
And along the path of a complete circle the parameter will change from 0 to 2𝜋
2𝜋

∮ 𝐹⃗ . 𝑑𝑟⃗ = ∫ ((3 sin 𝑡)(−3 sin 𝑡 𝑑𝑡) − (3 cos 𝑡)(3 cos 𝑡 𝑑𝑡))
0
2𝜋

∮ 𝐹⃗ . 𝑑𝑟⃗ = −9 ∫ (sin2 𝑡 + cos 2 𝑡)𝑑𝑡 = −9(2𝜋) = −18𝜋


0

The negative sign is curious in this case. It basically stems from the fact that the circle is
oriented in the direction of the positive 𝑧 axis i.e. the area vector of the surface points to the
positive 𝑧 axis. And the parametric equations point out that the circle is being traversed in
counter clockwise rotation (decreasing 𝑥). This can be fixed simply be changing the
direction of traversing the circle from counter clockwise to clockwise.
It is interesting to note here that in the right hand side of the area integral the dot product
means that only those components matter which have components in the direction of the
curl of the field.
Application 3: Lets change the boundary of the region the last question from a circle to a
square in the 𝑥𝑦 plane between 0 ≤ 𝑥 ≤ 3 and 0 ≤ 𝑦 ≤ 3. The area integral on the left
hand side,

∬ ⃗∇⃗ × 𝐹⃗ . 𝑑𝐴⃗ = ∬ 𝑑𝑥𝑑𝑦 = 2(𝑥𝑦) = −18

The line integral on the left hand side then becomes four integrals along the four lines of
the square,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

3 3 0 0

∮ 𝐹⃗ . 𝑑𝑟⃗ = ∫ 𝐹𝑥,𝑦=0 𝑑𝑥 + ∫ 𝐹𝑦,𝑥=3 𝑑𝑦 − ∫ 𝐹𝑥,𝑦=3 𝑑𝑥 − ∫ 𝐹𝑦,𝑥=0 𝑑𝑦


0 0 3 3

𝐹𝑥 = 𝑦, 𝐹𝑥,𝑦=0 = 0, 𝐹𝑥,𝑦=3 = 3
𝐹𝑦 = −𝑥, 𝐹𝑦,𝑥=0 = 0, 𝐹𝑦,𝑥=3 = −3
3 3 0 0

∮ 𝐹⃗ . 𝑑𝑟⃗ = ∫(0)𝑑𝑥 − ∫ 3𝑑𝑦 − ∫ 3𝑑𝑥 − ∫ 0𝑑𝑦


0 0 3 3

The negative sign in the last two integrals area result of the fact that upon returning the
sign of 𝑑𝑥 & 𝑑𝑦 change because of the direction of travel.

∮ 𝐹⃗ . 𝑑𝑟⃗ = −3(3 − 0) − 3(0 − 3) = −18

Which is what you get earlier.


4.10.1.1 Sample Problem
Suppose S is a “light-bulb-shaped region” as follows. Imagine
a light-bulb cut off at the base so that its boundary is the unit
circle 𝑥 2 + 𝑦 2 = 1, oriented with the outward-pointing
normal. (You can use either an old-fashioned light-bulb or a
compact fluorescent if you’re feeling green.). For the vector
field 𝐹⃗ = (𝑒𝑧 2 − 2𝑧𝑥)𝑎̂𝑥 + (sin 𝑥𝑦𝑧 + 𝑦 + 1)𝑎̂𝑦 +
2
𝑒 𝑧 𝑠𝑖𝑛(𝑧 2 )𝑎̂𝑧 , compute the flux of Curl(𝐹⃗ ) or ⃗∇⃗ × 𝐹⃗ .

For this problem, you could use the brute force method and
directly calculate the curl of the vector field and then calculate its flux across the weird
shaped surface. But that will be visibly very complicated because the surface will have a
complicated equation and an equally complicated unit normal. Since the surface is open with
a boundary located at the 𝑧 = Constant surface, we can be smart and use Stoke’s theorem.
This means that the problem of calculating,

⃗⃗ × 𝐹⃗ ). 𝑑𝐴⃗ =
∬(∇ ∮ 𝐹⃗ . 𝑑𝑟⃗
𝑆 C,on z=Constnat plane

Notice the generality of applying Stoke’s theorem: Surface above the boundary 𝑥 2 + 𝑦 2 = 1
can be any kind of surface the line integral would still be the same as long as it is a circle of
radius 𝑟.

⃗⃗ × 𝐹⃗ ). 𝑑𝐴⃗ = ∮ [(𝑒𝑧 2 − 2𝑧𝑥)𝑎̂𝑥 + (sin(𝑥𝑦𝑧) + 𝑦 + 1)𝑎̂𝑦 + 𝑒 𝑧 2 𝑠𝑖𝑛(𝑧 2 )𝑎̂𝑧 ]. (𝑑𝑥𝑎̂𝑥 + 𝑑𝑦𝑎̂𝑦 + 𝑑𝑧𝑎̂𝑧 )
∬(∇
𝑆 C,

Since 𝑧 = Constant, hence 𝑑𝑧 = 0. Furthermore we can take that constant to be 𝑧 = 0. Therefore,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

⃗⃗ × 𝐹⃗ ). 𝑑𝐴⃗ = ∮ [(1 )𝑎̂𝑥 + ( 𝑦 + 1)𝑎̂𝑦 ]. (𝑑𝑥𝑎̂𝑥 + 𝑑𝑦𝑎̂𝑦 ) = ∮[𝑑𝑥 + ( 𝑦 + 1)𝑑𝑦]


∬(∇
𝑆 C, C

This cane be solved through the parametric equations of a circle, 𝑥 = cos 𝜃 , 𝑦 = sin 𝜃.
𝜃=2𝜋

⃗⃗ × 𝐹⃗ ). 𝑑𝐴⃗ = ∫ (− sin 𝜃 + sin 𝜃 cos 𝜃 + cos 𝜃)𝑑𝜃


∬(∇
𝑆 𝜃=0

Given the limits of the full cycle of sine and cosine, the first and the last integral is zero,
𝜃=2𝜋 𝜃=2𝜋
1 1
⃗⃗ × 𝐹⃗ ). 𝑑𝐴⃗ = ∫ (sin 𝜃 cos 𝜃)𝑑𝜃 =
∬(∇ ∫ sin 2𝜃 𝑑𝜃 = − |cos 2𝜃|𝜃=2𝜋
𝜃=0 = 0
2 4
𝑆 𝜃=0 𝜃=0

Practice Problems
Determing Divergence and Curl of a vector field
1. Find the divergence of the following vector field,
a. 𝐹⃗ = 𝐹⃗ (𝑥, 𝑦, 𝑧) = 𝑥 2 𝑦𝑎̂𝑥 + 2𝑦 3 𝑧𝑎̂𝑦 + 3𝑧𝑎̂𝑧
b. 𝑉⃗⃗(𝑥,𝑦,𝑧) = √1 + 𝑦 2 + 𝑥 2 𝑎̂𝑥 + √1 + 𝑦 2 + 𝑧 2 𝑎̂𝑦 + √1 + 𝑥 2 + 𝑧 2 𝑎̂𝑧
c. 𝑉⃗⃗(𝑥,𝑦,𝑧) = √1 + 𝑦 2 + 𝑧 2 𝑎̂𝑥 + √1 + 𝑥 2 + 𝑧 2 𝑎̂𝑦 + √1 + 𝑥 2 + 𝑦 2 𝑎̂𝑧

Also, find the intrinsic equation of the surface where the field has no divergence.
2. Find the divergence of the following two fields at the point (2, 1, −1)
a. 𝐹⃗ = 𝑥 2 𝑎̂𝑥 + 𝑦𝑧 𝑎̂𝑦 + 𝑦 2 𝑎̂𝑧 (Answer = 3)
𝑟⃗ 𝑥 𝑖̂+𝑦 𝑗̂ +𝑧 𝑘 ̂
b. 𝐺⃗ = = ( 2 2 2) (Answer = √6/3 )
𝑟 √𝑥 +𝑦 +𝑧
3. The electric field of a point charge is given as,
𝑘𝑞 𝑞 𝑟⃗
𝐸⃗⃗ = 2
𝑟̂ = 𝑘 2
𝑟 𝑟 𝑟
Here, 𝑘 = constant, 𝑟⃗ = 𝑥𝑎̂𝑥 + 𝑦𝑎̂𝑦 + 𝑧𝑎̂𝑧 and |𝑟⃗| = √𝑥 2 + 𝑦 2 + 𝑧 2 . Check if the
curl of this field is zero.
4. Calculate the curl of the following magnetic field, 𝐵(𝑥,𝑦,𝑧) = 𝑥𝑦𝑎̂𝑥 + 𝑦𝑧𝑎̂𝑦 + 𝑧𝑥𝑎̂𝑧
5. Find the curl of each of the following vector fields at the point (2, 4, −1)
a. 𝐹⃗ = 𝑥 2 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦 + 𝑧 2 𝑎̂𝑧
⃗⃗ = 𝑥𝑦 𝑎̂𝑥 + 𝑦 2 𝑎̂𝑦 + 𝑥𝑧 𝑎̂𝑧
b. 𝐻

Answers: a) 0, b) −𝑎̂𝑥 + 2𝑎̂𝑧

6. What is 𝛻⃗⃗ ⋅ (𝛻⃗⃗ × 𝐹⃗ ) for 𝐹⃗ = 𝐹⃗ (𝑥, 𝑦, 𝑧) = 3𝑥 3 𝑒 𝑦 𝑎̂𝑥 + (𝑧 2 + 8𝑦 − 2𝑥)𝑎̂𝑦 +


cos(𝑥 2 + 𝑦 + 5𝑧 3 ) 𝑎̂𝑧
7. For 𝐹⃗ = 𝐹⃗ (𝑥, 𝑦, 𝑧) and 𝐺⃗ = 𝐺⃗ (𝑥, 𝑦, 𝑧). For, 𝐹⃗ = (𝑥 2 + 𝑦 2 )𝑎̂𝑥 + (𝑥 2 − 𝑦 2 )𝑎̂𝑦 +
𝑒 𝑧 𝑎̂𝑧 and 𝐺⃗ = (𝑒 𝑥 cos 𝑦 − 𝑒 𝑥 sin 𝑦)𝑎̂𝑥 + 2 cos 𝑧 sin 𝑧 𝑎̂𝑧 . Fine 𝐹⃗ × 𝐺⃗ and then
determine 𝛻⃗⃗ × (𝐹⃗ × 𝐺⃗ ).

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

8. For what values, if any, of the constants 𝑎 and 𝑏 is the following vector irrotational?
(curl is 0)
𝐹⃗ = (𝑦 𝑐𝑜𝑠 𝑥 + 𝑎𝑥𝑧) 𝑎̂𝑥 + (𝑏 𝑠𝑖𝑛 𝑥 + 𝑧) 𝑎̂𝑦 + (𝑥 2 + 𝑦) 𝑎̂𝑧
Answer: 𝑎 = 2, 𝑏 = 1
9. Check if the following vector field is conservative (the curl of the field is zero),
𝐹⃗ = (2𝑥𝑦 + 3)𝑎̂𝑥 + (𝑥 2 − 4𝑧)𝑎̂𝑦 − 4𝑦 𝑎̂𝑧
Determine the line integral
1. Find the area bounded between the following curves,
a. 𝑦 = 𝑥 2 and 𝑦 = 2𝑥 + 3 between the points −1 ≤ 𝑥 ≤ 1
1
b. 𝑥 = √2𝑦 and 𝑥 = 2 𝑦 between the points 0 ≤ 𝑥 ≤ 4
2. Find the area enclosed in the following ellipse between −𝑎 ≤ 𝑥 ≤ 𝑎,
𝑥2 𝑦2
+ =1
𝑎2 𝑏 2
Using the direct evaluation of the area.
3. Calculate the closed line integral of a constant vector field around ANY closed loop.
What do you infer from your calculation?
4. A vector field is defined by 𝐹⃗ = 𝐹⃗ (𝑥, 𝑦, 𝑧) = ∇⃗⃗𝜙 where 𝜙(𝑥, 𝑦, 𝑧) =
𝑦 2 𝑧
𝑥𝑒 sin 𝑧 + sin(𝑥 + 𝑦) + cos 𝑦 𝑒 . Determine the closed line integral along
any curve of your choice.
5. Use the fundamental theorem of line integrals for a conservative field and
prove that for a conservative field 𝐹⃗ , 𝐹⃗ = ⃗∇⃗𝜙 where,

𝜙 = ∫ 𝐹⃗ . 𝑑𝑟⃗
C

6. Suppose that a non-negative function 𝑦 = 𝑓(𝑥) has continuous first derivative on


[𝑎, 𝑏]. Let 𝐶 be the boundary of the region that is bounded below by the 𝑥-axis, above
by the graph of 𝑓 and on sides by line 𝑥 = 𝑎 and 𝑥 = 𝑏.
By direct integration along the curve, prove that,
𝑥=𝑏

∫ 𝑓(𝑥)𝑑𝑥 = − ∮ 𝑦𝑑𝑥
𝑥=𝑎 C

Green’s Theorem

1. Find the area enclosed in the following ellipse between −𝑎 ≤ 𝑥 ≤ 𝑎,


𝑥2 𝑦2
+ =1
𝑎2 𝑏 2
Using Green’s theorem
2. Evaluate the following double integral under the limits −2 ≤ 𝑦 ≤ 2, 0 ≤ 𝑥 ≤ 1,
1 2

∫ ∫(𝑥 2 𝑦 + 𝑦 2 𝑥)𝑑𝑦𝑑𝑥
0 −2
Using Green’s theorem.
3. Evaluate the following double integrals on the rectangular region,

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Introduction to Ordinary Differential Equations

𝜋 𝜋
∬(𝑥 sin 𝑦 − 𝑦 sin 𝑥) 𝑑𝑥𝑑𝑦 , 0 ≤ 𝑥 ≤ ,0 ≤ 𝑦 ≤
2 3
See if the solution will be more straightforward if you use Green’s theorem.
4. Evaluate the following double integrals on the non-rectangular region,

∬ 𝑦 2 𝑥 𝑑𝑦𝑑𝑥, −𝑥 ≤ 𝑦 ≤ 𝑥 2 , 0 ≤ 𝑥 ≤ 1

Using Green’s theorem.


5. A conservative field is a field for which the closed line integral around ANY
closed path is zero. Use this fact together with Green’s theorem to find a
condition on the components of the vector field.
6. Suppose that a non-negative function 𝑦 = 𝑓(𝑥) has continuous first derivative on
[𝑎, 𝑏]. Let 𝐶 be the boundary of the region that is bounded below by the 𝑥-axis, above
by the graph of 𝑓 and on sides by line 𝑥 = 𝑎 and 𝑥 = 𝑏.
Prove that, using Green’s theorem,
𝑥=𝑏

∫ 𝑓(𝑥)𝑑𝑥 = − ∮ 𝑦𝑑𝑥
𝑥=𝑎 C
7. The area of any region is given by,
1
𝐴 = ∮ 𝑥 𝑑𝑦 − 𝑦 𝑑𝑥
2
𝐶

where C is the curve around the region enclosing the area. Use this formula to
find the area of a triangle

Surface Integral and Divergence Theorem


1. Using the Divergence theorem, evaluate the surface integrals of the given vector field
on the given surfaces,
a. On a sphere S given by 𝑥 2 + 𝑦 2 + 𝑧 2 = 9, 𝐹⃗ = 𝑥 𝑎̂𝑥 + 𝑦 𝑎̂𝑦 + 𝑧 𝑎̂𝑧 .
Answers: 108 π
b. On the surface S of cylinder, 𝑥 2 + 𝑦 2 = 9, 0 ≤ 𝑧 ≤ 8, 𝐹⃗ = 𝑥 𝑎̂𝑥 + 𝑥 𝑎̂𝑦 +
𝑧 2 𝑎̂𝑧 .Answers: 288 π
c. On the surface S of the cylinder 𝑥 2 + 𝑦 2 + (𝑧 − 2)2 = 1, 𝐹⃗ = 𝑥𝑠𝑖𝑛𝑦 𝑎̂𝑥 +
𝑐𝑜𝑠 2 𝑥 𝑎̂𝑦 + 𝑧𝑠𝑖𝑛𝑦 𝑎̂𝑧 . Answers: 0
d. On the surface S is the hemisphere 𝑥 2 + 𝑦 2 + 𝑧 2 = 1, 𝑧 > 0 and 𝑛̂ is the
outward unit normal [Note that the surface is not closed] for the vector
field 𝐹⃗ = (𝑥 + 𝑦)𝑎̂𝑥 + 𝑧 2 𝑎̂𝑦 + 𝑥 2 𝑎̂𝑧 .

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.
Lectures on Applied Differential Equations Shahbaz Ahmed Alvi

Stoke’s Theorem

Do not use, reproduce, copy, print or distribute without the consent and permission of the author, Shahbaz Ahmed Alvi.
All rights of this publication are reserved.

You might also like