Vector Calculus
Vector Calculus
Vector Calculus
𝜕𝐴⃗ 𝜕 𝜕 𝜕
= 𝐴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 𝑦𝑎̂𝑦
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.
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.
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
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);
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
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,
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(𝑉
⃗⃗ ) = (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
⃗⃗ × 𝑉
∇ ⃗⃗ = −(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
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 )
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,
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,3) (4,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)
(4,1,3) (4,1,3)
(2,3,3)
∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = 9
(1,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.
Introduction to Ordinary Differential Equations
∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = ∫ ⃗⃗ +
𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙𝑙 ∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗
(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)
(4,3,3)
∫ 𝐹⃗(𝑥,𝑦,𝑧) . 𝑑𝑙⃗ = 9 + 4 = 13
(1,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
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.
(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
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𝑡 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
∮ 𝐹⃗ . 𝑑𝑙⃗
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,√𝑥)
𝐹⃗ . 𝑑𝑙⃗ = 𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦
(𝑥=1,𝑥 2 ) (𝑥=0,√𝑥)
∫ (𝑥𝑦 2 𝑑𝑥 + 𝑦𝑥 2 𝑑𝑦)
(𝑥=0,𝑥 2 )
Along this path the 𝑦 coordinate changes with the 𝑥 coordinate according to the equation
1
𝑦 = √𝑥. Therefore, 𝑑𝑦 = 2 𝑑𝑥,
√𝑥
(𝑥=1,𝑥 2 ) 𝑥=1
(𝑥=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,√𝑥)
∮ 𝐹⃗ . 𝑑𝑙⃗ = 0
∫ 𝐹⃗ . 𝑑𝑙⃗𝐴 + ∫ 𝐹⃗ . 𝑑𝑙⃗𝐵 = 0
(𝑥𝑎 ,𝑦𝑎 ) (𝑥𝑏 ,𝑦𝑏 )
∫ 𝐹⃗ . 𝑑𝑙⃗𝐴 = − ∫ 𝐹⃗ . 𝑑𝑙⃗𝐵
(𝑥𝑎 ,𝑦𝑎 ) (𝑥𝑏 ,𝑦𝑏 )
∫ 𝐹⃗ . 𝑑𝑙⃗𝐴 = ∫ 𝐹⃗ . 𝑑𝑙⃗𝐵
(𝑥𝑎 ,𝑦𝑎 ) (𝑥𝑎 ,𝑦𝑎 )
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
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)
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
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
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,
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𝜋
⃗⃗ . 𝑑𝑙⃗ = 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𝑦) ) 𝑑𝑥𝑑𝑦
𝜕𝑥 𝜕𝑦
∮ 𝐹⃗ . 𝑑𝑙⃗ = 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
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,
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.
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
⃗⃗
𝑁 ⃗∇⃗𝑔(𝑥, 𝑦, 𝑧)
𝑛̂ = =
⃗⃗| |∇
|𝑁 ⃗⃗𝑔(𝑥, 𝑦, 𝑧)|
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.
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) = 𝑎̂𝑧 = 𝑛̂
∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −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
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
∬ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = −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𝜋
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.
Surface Integral of 𝐹⃗ over region 𝑆 = ∫ ∫ (2𝑢𝑎̂𝑥 + 5𝑣𝑎̂𝑦 ). (−4𝑎̂𝑥 − 3𝑎̂𝑦 + 𝑎̂𝑧 )𝑑𝑢 𝑑𝑣
𝑣=−8 𝑢=0
4 𝑢+4
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 𝑆 = ∬(2𝑢3 cos 2 𝑣 − 2𝑢3 sin2 𝑣 + 𝑢3 cos 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
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.
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𝑥 + 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 𝜃
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𝜋 𝜋
2𝜋 𝜋 2𝜋 𝜋
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [2 𝑅 3 ∫ cos 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃 + 4 𝑅 3 ∫ sin 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃
3
0 0 0 0
2𝜋 𝜋
2𝜋 𝜋 2𝜋 𝜋
1
∮ 𝐹⃗ . 𝑛̂ 𝑑𝐴 = [2 𝑅 3 ∫ cos 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃 + 4 𝑅 3 ∫ sin 𝜙 𝑑𝜙 ∫ sin2 𝜃 𝑑𝜃
3
0 0 0 0
2𝜋 𝜋
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𝜋 𝜋 𝜋
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
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
∭ ⃗∇⃗. 𝐵
⃗⃗ 𝑑𝑉
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
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
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,
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𝜋
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𝜋
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
2 1
𝑧 1 1
∬ 𝐹⃗ . 𝑑𝐴⃗ = (−2) (2𝑧 + ) = (2) (2 + + 2 − ) = 8
2 −1 2 2
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,
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
+ ∬ (𝑧𝑎̂𝑥 − 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (−𝑎̂𝑦 𝑑𝑥𝑑𝑧) + ∬(𝑧𝑎̂𝑥 + 𝑎̂𝑦 + 𝑥𝑧𝑎̂𝑧 ). (𝑎̂𝑦 𝑑𝑥𝑑𝑧)
𝑦=−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𝑥𝑑𝑥𝑑𝑦
−1 −1
The first two integrals cancel out and the third and fourth can be added together.
2 1 −1 1
Since the limits are rectangular, the integrals can be solved independently,
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
⃗⃗. 𝑉
∭∇ ⃗⃗ 𝑑𝑉
⃗∇⃗. 𝑉
⃗⃗ = 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
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
1
∬ 𝐹⃗ . 𝑑𝐴⃗ = ∬(𝑥 3 + 𝑦 3 )𝑑𝐴
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.
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,
⃗⃗ . 𝑑𝐴⃗ = 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),
𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉
⃗⃗ = ( 𝑦 − 𝑧 ) 𝑎̂𝑥 − ( 𝑥 − 𝑧 ) 𝑎̂𝑦 + ( 𝑥 − 𝑦 ) 𝑎̂𝑧
⃗∇⃗ × 𝑉
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉
⃗⃗ ). 𝑑𝐴⃗ = ∫ ∫ [( 𝑦 − 𝑧 ) 𝑎̂𝑥 − ( 𝑥 − 𝑧 ) 𝑎̂𝑦 + ( 𝑥 − 𝑦 ) 𝑎̂𝑧 ] . 𝑑𝐴⃗
⃗⃗ × 𝑉
∬(∇
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑥
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,
𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉 𝜕𝑉
∬(∇ ⃗⃗ ). 𝑑𝐴⃗ = ∫ ∫ [( 𝑦 − 𝑧 ) 𝑎̂𝑥 − ( 𝑥 − 𝑧 ) 𝑎̂𝑦 + ( 𝑥 − 𝑦 ) 𝑎̂𝑧 ] . 𝑁
⃗⃗ × 𝑉 ⃗⃗ 𝑑𝑢 𝑑𝑣
𝜕𝑧 𝜕𝑦 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑥
𝑣 𝑢
⃗⃗ ). 𝑑𝐴⃗
⃗⃗ × 𝑉
∬(∇
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 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.
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 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.
∬∇ ⃗⃗ . 𝑑𝐴⃗ = ∮ 𝐵
⃗⃗ × 𝐵 ⃗⃗ . 𝑑𝑟⃗
⃗⃗ . 𝑑𝐴⃗ = ∮ 𝐵
∬ ⃗∇⃗ × 𝐵 ⃗⃗ . 𝑑𝑟⃗ = 𝜇0 𝑖
We can re-write current in the form of current density i.e. the current per unit area 𝐽 i.e.
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
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,
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𝜋
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,
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 = 0, 𝐹𝑥,𝑦=3 = 3
𝐹𝑦 = −𝑥, 𝐹𝑦,𝑥=0 = 0, 𝐹𝑦,𝑥=3 = −3
3 3 0 0
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.
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,
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
This cane be solved through the parametric equations of a circle, 𝑥 = cos 𝜃 , 𝑦 = sin 𝜃.
𝜃=2𝜋
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. 𝐻
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
∫ 𝑓(𝑥)𝑑𝑥 = − ∮ 𝑦𝑑𝑥
𝑥=𝑎 C
Green’s Theorem
∫ ∫(𝑥 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
∫ 𝑓(𝑥)𝑑𝑥 = − ∮ 𝑦𝑑𝑥
𝑥=𝑎 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
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.