C ha pter 1
Intr od uction
Partial differential equations, or PDEs for short, are an important type of differential equation that
arise as natural mathematical models in many physical problems. They allow us to describe the
behavior of a system in terms of fu nctions that depend on multiple variables, such as time and space.
For example, consider the classical heat equation, which describes the distribution of heat in a
conducting material over time. This equation can be derived from Fourier's law of heat conduction,
which states that the rate of heat transfer through a material is proportional to the temperature
gradient. By applying this law to an infinitesimal volume element in the material, one obtains a
PDE for the temperature distribution.
Similarly, the wave equation can be derived from Newton's second law of motion, which relates
the force acting on a body to its acceleration. By applying this law to a small element of a string
or other vibrating object, one obtains a PDE for the displacement of the element as a function of
time and position.
In bo th of these examples, the PDEs are derived from fundamental physical laws and provide a
mathematical description of the underlying physical phenomenon. By solving these equations, we
can make predictions ab out how the system will behave under different conditions, such as changes
in tempe rature or initial conditions.
Our main focus is to introduce four imp ortant types of PDEs at an entry-level technicality,
1
without delving into their theoretical aspects. These include:
1. The transport equation, which describes how the density of a uid flow moving in the plane or
space changes according to a given velocity. This PDE is of first-order. The following figure
illustrates the variation of mass density of a fluid flow in the xy-plane with the velocity field
V = (¡y; x).
2. The heat problem, which involves determining how the temperature of a conductive medium
changes in time, given an initial heat distribution along a conductive r od or continuum. This
problem leads to a second-order PDE. The figure below shows the evolution of temperature
over time in a unit disk.
3. The wave equation, which describes how an elastic string or a 2D membrane responds to an
initial disturbance, leading to oscillations and the propagation o f the disturbance. This PDE
is also of second-order. The figure below illustrates how an initial disturbance propagates as
a bilateral wave, splitting into two branches moving with a given velocity to the left and right.
2 Introduction
-10 -5 0 5 10
0
0.2
0.4
0.6
0.8
1
1.2
-10 -5 0 5 10
0
0.2
0.4
0.6
0.8
1
1.2
4. The Poisson equation, which arises in the context of electrostatics and involves finding the
potential function generated in space by an electric charge distributed in a domain in the
plane or space. This problem is reduced to a second-order PDE.
1.1 From ODEs to PDEs
In the following discussion, we will explore the natural extension of well-known ordinary differential
equations to partial differential equations. We will focus on the derivation of some simple PDEs
and highlight how they arise from the ODE versions of the same problems. This will illustrate the
process of extending mathematical models of physical phenomena from one dimension to multiple
dimensions.
1.1.1 From mass-spring system to vibrating string
Remember that the dynamics of a single or finite set of quantities that depends on a single indepen-
dent variable leads to a single or set of differential equations called ordinary differential equations
(ODEs). An i mportant example of this type of equation is the harmonic oscillator: consider a set
of n point masses m; :::; m that are connected in series to n springs with stiffnesses k; :::; k, as
shown in the figure below.
m
3
k
2
m
1
k
1
m
2
k
3
x
1
x
2
x
3
The equation that describes the dynamics of m
1
is derived by Newton's second l aw f = ma as
m
1
d
2
x
1
dt
2
= ¡k
1
x
1
+ k
2
(x
2
¡ x
1
);
where ¡kx is the Hoo k's force exerted by the spring k, and k(x¡x) is the force exerted by k
on m. Similarly, the equation that describes the dynamics of m is:
m
2
d
2
x
2
dt
2
= ¡k
2
(x
2
¡ x
1
) + k
3
(x
3
¡ x
2
):
1.1 From ODEs to PDEs 3
The equation for m
3
; :::; m
n
are derived in a similar manner. In this way, we obtain a system of n
second-order ODEs
8
>
>
>
>
>
>
<
>
>
>
>
>
>
:
m
1
x¨
1
= ¡k
1
x
1
+ k
2
(x
2
¡ x
1
)
m
2
x¨
2
= ¡k
2
(x
2
¡ x
1
) + k
3
(x
3
¡ x
2
)
·
·
·
m
n
x¨
n
= ¡k
n
(x
n
¡ x
n¡1
)
:
Now, consider a vibrating string along the x-axis, which can be modeled a s an infinite mass-spring
system connected in series. For a control length δx with density ρ, the control mass is ρδx. Let
u(x; t) denote the position of this control length. This piece is under the forces of masses ρ(x ¡δx)δx,
which is posited at u(x + δx; t), and ρ(x + δx)δx at the position u(x + δx; t).
u(x + δx; t)u(x; t)u(x ¡ δx; t)
The force on the mass at x is
F = ¡
k
δx
[u(x; t) ¡ u (x ¡ δx; t)] +
k
δx
[u(x + δx; t) ¡ u(x; t)];
where k is the stiffness of the string, and according to the control length δx, the ratio
k
δx
reflects
the impact of this length on the motion of mass in δx. Therefore, we can write
ρδx u
tt
(x; t) = ¡k
u(x; t) ¡ u(x ¡ δx; t)
δx
+ k
u(x + δx; t) ¡ u(x; t)
δx
;
where u
tt
(x; t) :=
@
2
u
@t
2
is the acceleration of the control length δx. By using the relations
u(x; t) ¡ u(x ¡ δx; t)
δx
u
x
(x ¡ δx; t);
u(x + δx; t) ¡ u(x; t)
δx
u
x
(x; t);
we obtain
ρ δx u
tt
(x; t) ¡ku
x
(x ¡ δx; t) + ku
x
(x; t);
and by dividing by δx, we obtain
ρ u
tt
(x; t) k
u
x
(x; t) ¡ u
x
(x ¡ δx; t)
δx
;
where the right-hand side approaches ku
xx
when δx!0. Finally, we derive the following differential
equation for the oscillation of the vibrating string:
u
tt
(x; t) =
k
ρ
u
x x
(x; t):
Exercise 1.1. For a mass-spring system consists of n masses m
1
; :::; m
n
connected to n springs k
1
; :::;k
n
in series ,
the total energy is defined as
E(t) =
X
j=1
n
1
2
m
j
jx_
j
(t)j
2
+
1
2
k
1
jx
1
(t)j
2
+
X
j=2
n
1
2
k
j
jx
j
(t) ¡x
j ¡1
(t)j
2
:
Veri fy that the system conserves the ener gy, that is,
dE
dt
= 0, and conclude E(t) = E(0).
Exercise 1.2. The conser vation of energy also applies to the wave equation of a string. Let us consid er a string
of length L, fixed at two endpoints x = 0 and x = L. We denote the position of t he point x at time t by u(x; t).
The st ring forms a dyna mic system i f either its initi al ki netic or potential energy is nonzero. The i nitial kinetic
energy of the string can be de ned as follows:
K(t): =
1
2
mv
2
=
1
2
Z
0
L
ρ ju
t
(x; t)j
2
dx:
4 Introduction
The Hook's stretch potential energy is
U(t) =
k
2
Z
0
L
ju
x
(x; t)j
2
dx;
Veri fy that the tota l energy E(t)=K(t)+U(t) o f the str ing is constant, i.e .,
dE
dt
=0, and conclude t hat E(t)=E(0).
Thus, in order to solve a wave equation, we requir e the initial disturbance u(x; 0) and in itial velocity u
t
(x; 0).
1.1.2 General remarks
As we saw from the above example, ODEs and PDEs differ in some significant aspects. We can
summarize the differences a s follows.
The solution to an ODE is a function or a set of functions of only one independent variable,
whereas for a PDE, the solution depends on two or more independent variables. For the wave
equation, the solution u depends on two variables, x and t, and represents the position o f
point x at time t. For this reason, the derivatives in a partial differential equation are partial
derivatives instead of ordinary ones.
While ODEs are related to pointwise quantities, PDEs are mathematical models of distrib-
uted systems or continua. For this reason, PDEs are sometimes considered as an infinite set
of ODEs.
The general solution of an ODE depends on one or more constant parameters. For example,
the solution of the harmonic oscillator x¨ +
k
m
x = 0 can be expressed as a linear combination
of two fundamental solutions fc os(!
0
t); sin(!
0
t)g, where !
0
=
k
m
q
is the natural frequency
of the single mass-spring system. The solution is given by
x(t)=c
1
cos(!
0
t)+c
2
sin(!
0
t);
where c
1
and c
2
are arbitrary constant parameters. In contrast, the solution of PDEs usually
depends on arbitrary functions. For example, the solution of the wave equation u
tt
=
k
ρ
u
x x
for constant k and ρ can be of the form u(x; t)= f(x¡ct)+ g(x+ct), where c=
K
ρ
q
, and f
and g are arbitrary smooth functions.
The geometry of the solution to an ODE is a curve, while for a PDE it is a surface in space
or g enerally a hypersurface. For example, the graph of the solution u(x; t) of a wave equation
in the space (x; t; u) is a surface and not a curve.
The solution of the wave equation can be interpreted from a physical perspective as a trav-
eling wave moving to the right as f(x ¡ c t) and left as g(x +c t) with velocity c =
k
ρ
q
.
In contrast, the ordinary differential equations for a c oupled mass-spring system do not
reflect such a traveling speed. For example, consider a system of three masses connected to
three springs in series, where the initial displacement of the first mass is x
1
(0)=1 and the
other two are at rest without stretch. Assuming zero initial velocity for all three masses
(x_
1
(0)= x_
2
(0) = x_
3
(0)), the initial kinetic energy of the system is zero, and the system evolves
its dynamics based on its initial potential energy U(0) =
1
2
jx
1
(0)j
2
.
The following figure shows the motion of all three masses. As we observe, the motion of m
1
affects m
3
immediately, i.e., the pro pagation speed of the disturbance in the system is infinite.
1.1 From ODEs to PDEs 5
0 2 4 6 8 10
-1.5
-1
-0.5
0
0.5
1
1.5
x1
x2
x3
Exercise 1.3. For each of the following partial differential equation, verify that the given solution satisfies the
eq uation
a) y@
x
u ¡x@
y
u = 0, u = f (x
2
+ y
2
)
b) x@
x
u ¡ y@
y
u = 0, u = f(x; y)
c) @
x
u ¡@
y
u = ¡u, u = f (x + y) e
¡x
Exercise 1.4. For a multivariable function u = u(x; y), equations that involve only t he partial derivatives of o ne
variable are gene rally referred to as defective equations. One example is the equation u
x
+ u = 0, where u = u(x;
y). This equation can be solved by the methods outlined in ODEs, resulting in the solution u(x; y)= f(y)e
¡x
,
where f is an arbitrary function. The function f serves as a constant parame ter for integrating the ODE
du
dx
+ u = 0:
The following gure show the geometry of th e above argument
x
u = f (c
3
) e
¡x
u = f(c
1
) e
¡x
y
u = f (c
2
) e
¡x
y = c
3
du
dx
+ u = 0
y = c
2
du
dx
+ u = 0
y = c
1
du
dx
+ u = 0
Using the appro priate method, solve the following eq uations, where u is a two-variable function u = u(x; y):
a) u
xx
+ c
2
u = 0, c > 0 a constant.
b) u
x
+ u = y
c) @
y
u + u = u
2
d) u
xy
+ u
x
= 0
e) x
2
u
xx
+ x u
x
+ u = y.
1.1.3 From Newton cooling law to heat equation
Remember from ODEs that the temperature of a quantity located in an ambient space of temper-
ature T
e
follows the Newton's cooling rule:
dT
dt
= α(T
e
¡ T );
6 Introduction
where α>0 is a proportionality factor that depends on the conductivity of the material, and T =T (t)
is the temperature function of the material as a function of time t. The function T
e
¡ T is the
temperature gradient of the material compared to the temperature of the ambient space, T
e
. The
solution of the above ODE is an exponential function:
T (t) = T
e
+ (T
0
¡ T
e
) e
¡αt
;
where T
0
= T (0) is the initial temperature of the material.
Now, consider a conductive ro d that is insulated from the surrounding environment, with an
initial temperature profile given by the function f(x). The temperature at any point x of the rod
at time t is denoted by u(x; t). Consider the interval between points a and b on this rod. If q(x; t)
is the density of the thermal energy, then the total thermal energy in this interval is:
Q
[a;b]
(t) =
Z
a
b
cρq(x; t) dx;
where ρ is the mass density and c is the specific h eat capacity of the material. The change in energy
from t to t + δt is:
Q
[a;b]
(t + δt) ¡ Q
[a;b]
(t) =
Z
a
b
cρ [q(x; t + δ t) ¡ q(x; t)] dx;
and by thermodynamics:
q(x; t + δt)¡ q(x; t)u(x; t + δt)¡u(x; t):
In the limiting case as δt!0, we obtain:
dQ
[a;b]
dt
(t) =
Z
a
b
cρu
t
(x; t) dx:
On the other hand, if no thermal energy is produced or lost in the interval, the only factor that
contributes to the change of thermal energy in this interval is the energy escaping through the
endpoints x=a and x =b. The Fourier law states that the heat gradient is proportional to u
x
, that is:
dQ
[a;b]
dt
(t) = αu
x
(b; t) ¡ αu
x
(a; t);
where α is the conductivity factor of the material. Assuming α is a constant, the above relation can
be written as:
αu
x
(b; t) ¡ αu
x
(a; t) =
Z
a
b
αu
x x
(x; t) dx;
and finally:
Z
a
b
[cρu
t
(x; t) + αu
x x
(x; t)] dx = 0:
This integral equation holds for arbitrary interval [a; b], and if the integrand is continuous, we
conclude the following partial for u(x; t):
u
t
(x; t) = ku
x x
(x; t);
for k =
α
ρc
. This i s the one-dimensional heat equation, which governs the evolution of temperature in
a homogeneous material. The equation states that the time rate of change of the thermal energy in
any interval is prop ortional to the rate of change of temperature and to the second spatial derivative
of temperature.
1.1 From ODEs to PDEs 7
The heat equation has important applications in various fields such as physics, engineering,
and finance. In physics, it is used to model the diffusion of heat in a medium, the propagation of
electromagnetic waves, and the behavior of quantum systems. In engineering, it is used to design
and analyze heat transfer systems, and to model the behavior of materials subjected to thermal
stress. In finance, it is used to model the pricing of nancial derivatives, such as options and futures,
where the underlying asset price follows a random diffusion process.
Exercise 1.5. Consider the heat equation u
t
= ku
xx
where k > 0 is a constant.
a) Verify that the following function called the fundamental solution satisfies t he equation for t > 0
Φ(x; t) =
1
4πkt
p e
¡
x
2
4kt
:
b) Assume that f (x) is a smooth funct ion. Verify the following relation
lim
t! 0
Z
¡1
1
Φ(x; t) f (x) dx = f (0):
as long as the integral exists. The above relation implies that Φ(x; t) behaves like a Dirac delta function
when t !0.
Exercise 1.6. By Newton's cooling law, the h eat ows from hot spots to cold s pot.
a) Explain how this fact is embedded in the derivation of the heat equation. In particular, explain why k
must be a positive constant.
b) If k < 0, the equation is called a reve rse heat equation. Explain why in this case heat ows from cold spots
to hot spots.
Exercise 1.7. Consider a conductive rod of length L which is insulated along its length and are insulated at
the end points x = 0 and x = L. The i nsulation can be expressed mathematically as u
x
(0; t) = 0 and u
x
(L; t) = 0,
where u
x
denotes the temperature gradient. If so, show that the thermal energy in the system is conserved, that
is,
d Q
dt
= 0, where Q is
Q
[0;L]
(t) =
Z
0
L
u(x; t) dt:
1.1.4 From population d ynam ics to migration
The exponential equation, formulated in the eighteenth century, was the first mathematical model
for population dynamics. It describes the growth of a living species in a certain region through the
equation
dP
dt
= αP , where P =P (t) denotes the population and α is the growth rate. However, this
model has proven to b e inaccurate, and more sophisticated models, such as the logistic model, have
been suggested.
In this cont ext, we consider a possible extension of population dynamics for a living species that
migrates along a long strip. Specifically, we examine a living zone in the shape of a strip populated
with animals that have a fertility rate of α. We assume that these animals migrate along the strip
with a constant velocity of c. Our o bjective is to determine the population in an arbitrary segment
of the strip at any given time.
To achieve this, we need to define the population density function ρ(x;t) such that the population
in a segment [a; b] at time t is equal to
P
[a;b]
(t) =
Z
a
b
ρ(x; t) dx:
Here, we present the derivation through the following exercise.
8 Introduction
Exercise 1.8. Based on the above settings
a) Suppose th e offspring rat e is zero, α = 0. The rate of cha nge of P
[a;b]
in time is
dP
[a;b]
dt
=
d
dt
Z
a
b
ρ(x; t) dx =
Z
a
b
ρ
t
(x; t) dx:
By c onservation of population, this rate of change is equal to the rate of moving in this segment minus
the rate of animals leaving this segment. Show that
dP
[a;b]
dt
= cρ(a; t) ¡cρ(b; t);
and conclude
Z
a
b
[ρ
t
(x; t) + cρ
x
(x; t)] dx = 0:
The above relation holds for any segment [a; b], and thus we conclude the f ollowing differential equation
ρ
t
(x; t) + cρ
x
(x; t) = 0:
b) Verify that the function ρ = f(x ¡ ct) solves th e above PDE for ar bitrary smooth function f . Conclude
that if ρ(x; 0) = ρ
0
e
¡x
2
, then ρ(x; t) = ρ
0
e
¡(x¡ct)
2
. If c = 1, nd the population in the segment [¡1; 1] at
time t = 3.
c) Now, let us assume that α > 0 and
dt
= αρ. Verify that the PDE in this case is
ρ
t
+ cρ
x
= αρ:
Veri fy that t he functi on ρ = f (x ¡ct) e
αt
sol ve s the equation. For ρ(x; 0) = 100e
¡x
2
, c = 1 and α = 0.3,
draw the solu tion ρ(x; t) at t = 0; 1; 2; 3.
1.2 Differential operators in higher dimensions
In order to extend the study of partial differential equations to higher dimensional spaces, we require
the use of appropriate differential operators. Among the most crucial of these operators are the
gradient, divergence, and Laplacian. These operators enable us to express and manipulate partial
derivatives in these spaces, which is essential for solving many important problems in fields such as
physics, engineering, and mathematics.
Before we begin, let's establish some general notation used in this book. The set of real numbers
is denoted by R, and t he set of n-tuples by R
n
. In R
2
, a point is written a s (x; y) ; in R
3
, as (x; y; z);
and in R
n
, as x=(x
1
; :::; x
n
). The standard unit vectors in R
n
are denoted by
e^
1
; :::; e^
n
;
where e^
j
is a vector with zeros in all coordinates except the j-th coordinate, which is 1. Thus, a
point x can be considered as a vector x = x
1
e^
1
+ ··· + x
n
e^
n
. The set of all vectors in R
n
forms a
vector space with scalar multiplication given by
λ (x
1
; :::; x
n
) = (λx
1
; :::; λx
n
); λ 2 R
and vector addition defined as
(x
1
; :::; x
n
) + (y
1
; :::; y
n
) = (x
1
+ y
1
; :::; x
n
+ y
n
):
The magnitude of a vector x = (x
1
; :::; x
n
) is denoted as jxj and defined as
jxj =
0
@
X
j=1
n
x
j
2
1
A
1
2
1.2 Differential oper ators in higher dimensions 9
The standard dot product between two vectors x and y is denoted as x · y and defined as:
x · y =
X
j=1
n
x
j
y
j
:
Alternatively, we may use the more general notation h;i for the dot product, i.e., hx; yi=x · y. The
distance between two points x and y in R
n
is defined as
jx¡ yj = hx¡ y; x¡ y i
p
= (x¡ y)² +···+(x ¡ y)²
p
:
For a point a 2 R and r>0, B(a) denotes the r-ball centered at a. The unit ball with the center
at the origin is denoted by B. A set R is open if for any a 2, there exists an r > 0 such
that B
r
(a) . Equivalently, a set is open if that every point in the set has a neighborhood
that is contained entirely within the set. The boundary of a set is denoted by bnd(Ω), and
its closure by
¯
. For example, the set = f(x; y) ; r
1
< jx ¡ yj < r
2
g is open, with the closure
¯
= f(x; y); r
1
jx ¡ yj r
2
g. The set
1
= f(x; y); r
1
< jx ¡ yj r
2
g is neither open nor closed.
We use the notation u
x
; u
y
for the partial derivatives of a two-variable function u=u(x; y):
u
x
: =
@u
@x
; u
y
:=
@u
@x
:
On occasion, we also use the notation @
x
u and @
y
u for the partial derivatives. For a function u of
n variables, u=u(x; :::; x), the partial derivatives are denoted by @u for
@u
@x
j
. The second-order
partial derivatives are similarly denoted by @
ij
u =
@
2
u
@x
i
@x
j
.
1.2.1 Differential operat o rs in Cartesian coordinate
The differential operator r, called nabla, in R
n
is defined as:
r := e^
1
@
1
+ ··· + e^
n
@
n
Let u = u(x
1
; :::; x
n
) be a smooth scalar function defined on an open set R
n
. The gradient of u,
denoted by ru, is defined as:
ru = @
1
u e^
1
+ ··· + @
n
u e^
n
:
For a xed point x
0
2 , ru(x
0
) is a vector, and ru(x) for x 2 defines a vector field over
which assigns a vector to each point in . This vector field is called the gradient vector field. The
gradient of u, is a vector field that points in the direction of maximum increase of u at each point in
. The following figures illustrate the graph of the function u=xy exp(¡x
2
¡ y
2
) and the grad ient
trajectories which are the solutions of the following system:
d
dt
x
y
= ru(x; y);
or equivalently
8
<
:
dx
dt
= (1 ¡ 2x
2
)ye
¡x
2
¡y
2
dy
dt
= (1 ¡ 2y
2
)xe
¡x
2
¡y
2
:
10 Introduction
The direction of the gradient flow lines in heat flow or fluid dynamics is opposite to that of heat
or fluid flow. This is because heat and fluid tend to move from regions with higher temperatures or
pressures to those with lower temperatures or pressures, whereas the gradient vector field points in
the direction of maximum increase of the scalar f unction at each p oint.
In the context of a two-dimensional elastic membrane, the function u(x; y) represents the
vertical displacement of the membrane at point (x; y). The tension T (x; y) on the boundary of the
membrane, bnd(Ω), is defined as the product of a constant τ and the gradient of u(x; y), ru(x; y).
This means that the tension at a point on the boundary is proportional to the rate of change of the
displacement at that point.
The vertical Hook's force exerted at a point (x; y) in the interior of the membrane is defined as
the limit of the average tension along the boundary of a shrinking region around the point, as the
size of approaches zero. The force is given by the line integral of the tension over the boundary
bnd(Ω), with respect to the outward unit normal vector ν, divided by the area of
F ( x; y) = lim
jj!0
1
A(Ω)
I
bnd( Ω)
τ ru · νdS:
In other words, the Hook's force measures the rate of change of the tension with respect to the area
of the membrane. This force is important in studying the behavior of elastic membranes, such as
in the design of structures that use membranes as a supporting element.
Another important fact that we will use extensively in the next chapter of this book is the time
or mass derivative of a scalar function along a smooth curve. For a smooth parametrized curve
γ(t)=(x(t); y(t)), the derivative of u(x; y) along γ is defined as:
du
dt
(γ(t)) = ru(γ(t)) · γ
0
(t);
where γ
0
(t) is the tangent vector to γ at time t. This expression represents the instantaneous rate of
change of u(x; y) at the point γ(t) along the curve γ(t), and it takes into account both the direction
and magnitude of the tangent vector γ
0
(t). In other words, it tells us how quickly u(x; y) is changing
as we move along the curve γ(t).
In the context of fluid mechanics, if γ(t) denotes the trajectory of a fluid particle in the xy-
plane, then γ
0
(t) represents its velocity vector, and
du
dt
represents the instantaneous rate of change
of u(x; y) at each point on the trajectory of the particle as it moves through the fluid.
1.1. It appears that the natural world operates more justly than our modern economic system. In the context of money,
wealth tends to ow from poor individuals to those who already possess more, following the gradient of wealth inequality.
However, the laws of physics dictate the opposite behavior: heat, pressure, mass, and other quantities ow from regions of high
density to those of lower density.
1.2 Differential oper ators in higher dimensions 11
Exercise 1.9. Con sider the temperat ure distribution in the xy-plane given by T (x; y)=10 e xp(x
2
¡y
2
). Suppose
a runner is moving along the curve γ(t)=(cos(t); sin(t)), and weari ng a hand clock marked f rom 0 to 60. What is
the angular velocity of the hand of the runner's watch as they move along the curve? Find the angular velocity
of the hand clock if the runner runs given by the following funct ion γ(t) = (cos(!
0
t); sin(!
0
t)) for some !
0
> 0.
The divergence of a vector field F =(f ; :::; f) on a domain R is a scalar function denoted
by r · F , defined by
r · F =
X
j=1
n
@f
j
@x
j
:
Geometrically, the divergence of a vector field measures the extent to which the field “flows out”
from a given point in space. If r · F (x
0
)> 0, then the point x
0
b ehaves like a source for the field; that
is, the eld flows outward from x
0
. If r · F (x
0
) > 0, then x
0
b ehaves like a sink, and the field flows
inward toward x
0
. If r · F (x
0
) =0, then x
0
is a neutral point for the field. The concept of divergence
is fundamental in fluid dynamics, where it is used to study the behavior of fluids in motion.
For example, the vector eld F = ru, for u = xy exp(¡x
2
¡ y
2
), is equal to
r · F (x; y) = 4xy(x
2
+ y
2
¡ 3) exp(¡x
2
¡ y
2
):
For a vector field x 7! F (x) = (f
1
(x); :::; f
n
(x)) for x 2 R
n
, the divergence denoted by r · F is
defined as the scalar function
r · F =
X
j=1
n
@
j
f
j
:
The divergence of a vector field measures how much the vector field flows out from a given point
in space. If r · F (x
0
) is positive, t hen x
0
b ehaves like a source for the given field. If r · F (x
0
) is
negative, it behaves like a sink and if r · F (x
0
) is zero, the point is a neutral point for the field.
The following figure depicts the vector field F = ru, where u = xy exp(¡x
2
¡ y
2
), and the
corresponding contours of r · F .
-2 -1 0 1 2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
One of the important results related to the divergence of a vector field is the Gauss or divergence
theorem. The theorem relates the integral of the divergence of a vector field over a volume to the
flux o f the vector field through the surface e nclosing the volume. It is a fundamental theorem in
vector calculus and has many applications in physics and engineering.
Theorem 1.1. (Gauss) Assume that F is a smooth vector field in an open bounded set R
n
.
The following equality holds:
Z
r · FdV =
I
bnd( Ω)
F ·νdS;
12 Introduction
where dV is the volume element, dS is the surface element, ν is the unit normal vector to the surface,
and the dot product F · ν is the flux of the vector field through the surface.
Exercise 1.10. Let B
R
n
denote the ball o f radius R in R
n
and S
R
n¡1
the surface of the ball. Use divergence
theorem to show that
V (B
R
n
) =
A(S
R
n¡1
)
n
R;
where V (B
R
n
) and A(S
R
n¡1
) are the volume and surface area of B
R
n
and S
R
n¡ 1
respectively. Verify your formula
for n = 2; 3. (H int: consider the function u = x
1
2
+ ···+ x
n
2
).
Remark 1.1. The divergence of a vector field at a point x can be defined using the divergence
theorem. Specifically, let F be a smooth vector field in an open set containing x, and let be a
small, op en, three-dimensional ball centered at x. Then, the divergence of F at x is given by:
r · f(x) = lim
jj!0
1
vol(Ω)
I
bnd( Ω)
F ·νdS;
where vol(Ω) is the volume of , and the limit is taken as the size of approaches zero. In other
words, the divergence of F at x is equal to the flux of F across the boundary of a small ball centered
at x, divided by the volume of the ball.
Consider a homogeneous fluid with a constant density distributed in the regionx
2
+ y
2
< 1, which
is shown in the gure below:
Suppose the uid moves a ccording to the velocity vector field V
1
= (¡x; ¡y). As expected from
the shape of the vector field, the fluid will concentrate at the origin at later times, and the density
of the fluid will increase around the origin. In fact, the flow lines of this vector field are the solutions
of the following system of ODEs
8
<
:
dx
dt
= ¡x
dy
dt
= ¡y
;
which is solved for γ(t) = (x
0
e
¡t
; y
0
e
¡t
). The top figure in the following image depicts this scenario.
If the velocity eld changes to V
2
= (x; y), the fluid will spread out, according to the system
8
<
:
dx
dt
= x
dy
dt
= y
;
and the density will decrease around the origin, as shown in the bottom figure.
1.2 Differential oper ators in higher dimensions 13
Note that the behavior of the fluid is determined by the divergence of the velocity field. In the
first scenario, the divergence of V
1
is negative, indicating that the fluid is owing inward toward
the origin, while in the second scenario, the divergence of V
2
is positive, indicating that the fluid
is flowing outward from the origin. This observation is consistent with the divergence theorem
presented earlier, which shows the relationship between the flow of a vector field and its divergence.
Exercise 1.11. Let the initial density of a uid ow is given by the function
f(x; y) =
(
xy exp(¡x
2
¡ y
2
) x
2
+ y
2
< 1
0 otherwise
:
Find the ow lines of the fluid if the velocity vect or eld is given by V = (¡y; x). Round the following code in
Matlab and explain the change of density function in time.
[thet,r]=meshgrid(-pi:pi/1000:pi,0:0.005:1);
[x,y]=pol2cart(thet,r);
xt=@(t) x*cos(t)+y*sin(t);
yt=@(t) -x*sin(t)+y*cos(t);
zt=@(t) (xt(t).*yt(t).*exp(-x.^2-y.^2)).*(x.^2+y.^2<1)+0.*(x.^2+y.^2>=1);
for i=0:1:2
subplot(2,2,i+1)
surf(x,y,zt(i*pi/4)); shading interp; view(2); axis equal tight; grid off; colormap jet
clim([-0.25,0.25]); colorbar;
title(sprintf('density at $t=%.2f$',i*pi/4),'interpreter','latex','fontsize',10);
end
Exercise 1.12. A gradient vector field of the form F = ¡ru for a scalar led is also called conservative eld s.
The reason is due to the following fact. Consider mass particle m moving along an arbitrary path γ(t) in this
field. The total energy of the mass is
E =
1
2
m jv j
2
+ u(x):
Use the Newton's second law and show that the derivative of E along γ(t) is zero. Therefore, a conservative
force field conserves the total energy of a mass particle.
14 Introduction
Exercise 1.13. The line integral of a vector eld F alo ng an arbitrary smooth path γ(t) for t 2(a; b) is defined
as follows
Z
γ
F :=
Z
a
b
F (γ(t)) · γ
0
(t) dt:
Show that if F = ¡ru, then the integral is independent of γ and is equal to u(γ(b)) ¡ u(γ(a)). This integral
shows the amount o f work or kinet ic energy spend to move a particle from point γ(a) to γ(b) and as it is seen,
this amo unt is equal to the difference between the po tential at these two po ints.
Exercise 1.14. Show that the line integral of a vect or field is independent of the parametrizatio n, that is, if γ
1
:
(c; d) !C the n
Z
γ
F (γ(t)) · γ
0
(t) dt =
Z
γ
1
F (γ
1
(t)) · γ
1
0
(t) dt:
Exercise 1.15. The diver ge nce of a two dimensional smooth vector filed F = (f ; g) is
r·F = f
x
+ g
y
:
Let R be the rectangle R := [¡a; a] ×[¡b; b]. We prove the relation
r·F (0 ; 0) = lim
a;b! 0
lim
a;b! 0
1
A(R)
I
bnd(R)
F ·ν dl
a) Show that the net flux passing through the boundary of R is
Z
¡b
b
ff (a; y) ¡ f (¡a; y)gdy +
Z
¡a
a
fg(x; b) ¡ g(x; ¡b)gdx:
b) Use the r elations
f(a; y) ¡ f(¡a; y) =
Z
¡a
a
f
x
(x; y)dx; g(x; b) ¡ g(x; ¡b) =
Z
¡b
b
g
y
(x; y)dy;
and show the relation
Z
¡b
b
ff (a; y) ¡ f (¡a; y)gdy +
Z
¡a
a
fg(x; b) ¡ g(x; ¡b)gdx = 4abff
x
(ξ
1
; η
1
) + g
y
(ξ
2
; η
2
)g
for some ¡a < ξ
1
; ξ
2
< a, ¡ b < η
1
; η
2
< b a nd conclu de
lim
a;b!0
1
A(R)
I
bnd(R)
F ·νdl = f
x
(0; 0) + g
y
(0; 0) = r·F (0; 0):
c) Use the same argument a nd show that for the cube C := [¡a; a] × [¡b; b] × [¡c; c] a nd the smooth field
F = (f ; g; h), the followin g relation holds
lim
a;b;c!0
1
vol(C)
ZZ
bnd(C)
F ·νdS = f
x
+ g
y
+ h
z
(0;0;0)
:
Exercise 1.16. Let B
a
R
n
be a ball of radius a in n-dimensional space. Consider the vector field F (x) = x,
and use t he divergence theorem to conclude that the volum e of B
a
to its surface are a is equal to
a
n
.
Exercise 1.17. Let R
3
be a domain with sm ooth boundary su rface bnd(Ω). Use the divergence theorem
and show the fo llowing relations
a) Let F be a smooth vector field u a smoot h scalar functi on, then
div (uF ) = u div (F ) + F ·ru;
where div sta nds f or r·.
b) Use the above result and show the following relation
ZZZ
u div (F ) dV =
ZZ
bnd(Ω)
u F ·ν dS ¡
ZZZ
F ·ru dV :
c) If φ; are smooth functions de ned on , then
ZZZ
φdV =
ZZ
bnd(Ω)
@
n
φdS ¡
ZZZ
rφ ·r dV ;
1.2 Differential oper ators in higher dimensions 15
where @
n
φ stands for rφ ·ν.
d) Use the above result and show the following relation called the Green's formu la:
ZZZ
(φ ¡ φ) dV =
ZZ
bnd(Ω)
[φ @
n
¡ @
n
φ] dS:
The Laplacian operator := r · r is a differential operator that is commonly used in mathe-
matics and physics. As it is evident from its definition, the Laplacian of a scalar function u is equal
to the divergence of the gradient of u, and in the coordinate form is equal to
u =
X
j=1
n
@
jj
u;
for a smooth function u = u(x
1
; :::; x
n
).
The Laplacian ope rator has important applications in physics, such as in the study of the diffu-
sion e quation, wave equation, and S chrödinger equation. In these contexts, the Laplacian operator
describes the be havior of p hysical quantities such as temperature, pressur e, electric potential, and
wave functions. In the following discussion, we present an example of how the Laplacian operator
is applied in the field of electrostatics.
Let's consider an electric charge Q located at the origin of a three-dimensional space. The
potential eld generated by this charge at any po int r = (x; y; z) =/ (0; 0; 0) is given by
Φ(r) =
Q
4π"
0
jrj
;
where "
0
is the p ermittivity of the air and jrj is the distance of x to the origin
jrj = x
2
+ y
2
+ z
2
p
:
This potential field generates an electric field
E(r) := ¡rΦ(r) =
Qr
4π"
0
jrj
3
;
with a magnitude of jE(r)j =
Q
4π"
0
jrj
2
and direction of r^ =
r
jrj
. Let B
R
b e the ball with radius
R centered at the origin. We can calculate the net amount of electric field passing through the
boundary of this ball, denoted by S
R
, as follows:
ZZ
S
R
E(r) · ν(r) dS ;
where ν = r^ for r =/ 0. Hence,
ZZ
S
R
E(r) · ν(r) dS =
ZZ
S
R
Q
4π"
0
r
2
dS =
Q
4π"
0
R
2
ZZ
S
R
dS =
Q
"
0
:
As observed, the net amount of electric field passing through S
R
is independent of R and is equal
to
Q
"
0
.
Now, let's consider the divergence of the electric field E(r) for r =/ 0. By direct calculation, we
have
∆Φ = r · E(r) =
@
@x
Qx
4π"
0
jrj
3
+
@
@y
Qy
4π"
0
jrj
3
+
@
@z
Qz
4π"
0
jrj
3
=
Q
4π"
0
jrj
3
¡ 3x
2
jrj
jrj
5
+
jrj
3
¡ 3y
2
jrj
jrj
5
+
jrj
3
¡ 3z
2
jrj
jrj
5
= 0
:
16 Introduction
Therefore, ∆Φ = 0 everywhere except at r = 0.
Note that we can apply the divergence theorem to the integral of ∆Φ over the region between
two concentric balls B
R
1
and B
R
2
, which gives
ZZZ
B
R
2
∆Φ dV =
ZZZ
B
R
1
∆Φ d V +
ZZZ
B
R
2
¡B
R
1
∆Φ dV :
R
1
R
2
∆Φ = 0
y
z
x
By the result ∆Φ = 0 for r =/ 0, we conclude
ZZZ
B
R
2
∆ΦdV =
ZZZ
B
R
1
∆ΦdV ;
and by the Gauss theorem, we obtain
ZZ
S
R
2
E · νdS =
ZZ
S
R
1
E · νdS:
One can use the above results and solve the following problems.
Exercise 1.18. Let be any open b ounded domain with the smooth boundary bnd(Ω), and let and Φ be the
potential field of a pointwise Q-charge. Show that if Q is located insi de , then
ZZZ
∆ΦdV =
Q
"
;
and if Q is located outsi de
¯
, then
ZZZ
∆ΦdV = 0:
Exercise 1.19. Let two elec tric charges Q; ¡Q are loca ted inside an open bounded domain . Show
ZZZ
∆ΦdV = 0:
Exercise 1.20. Suppos e there is an open bounded set in R
3
, and it contains an electric charge density q. The
total electri c cha rge inside can be expressed as
Q =
ZZZ
q(r) dV :
Show the following relation
ZZZ
∆ΦdV =
Q
"
0
:
Hint : consider a differential elem ent qdV and le t E
q
(r) be the electric eld generated by qdV at point r.
1.2.2 Differential operat o rs in polar and spherical coordinates
Remember that the polar coordinate is defined through the transformation
T (r; θ) = (x; y) = (r cos(θ); r sin(θ) );
1.2 Differential oper ators in higher dimensions 17
where r 2 [0;1) and θ 2[¡π; π]. In order to nd the form of the operator nabla r in this coordinate,
wen need first to determine the vectors r^; θ
^
, the unit vector along r and θ directions. For fixed θ = θ
0
The transformation T (r; θ
0
) is a parameterized curve and then T
r
(r; θ
0
) is tangent to this curve.
The unit vector r
^
is then obtained as
r^ =
T
r
(r; θ
0
)
jT
r
(r; θ)j
= (cos(θ
0
); sin(θ
0
)):
As it is observed, the unit vector r^ depends on the chosen angle θ
0
, and then
r
^
= r
^
(θ) = (cos(θ); sin(θ)):
Now, fix r = r
0
, and determine θ
^
by the relation
θ
^
=
T
θ
(r
0
; θ)
jT
θ
(r
0
; θ)j
= (¡ sin(θ); cos(θ)):
As it is seen again, θ
^
= θ
^
(θ), is a function of θ and indepe ndent of r.
By the above calculations, it is evident that r^ · θ
^
= 0, and thus they are orthogonal. Transfor-
mations for which this property holds are said orthogonal transformations. Moreover, we have
@ r
^
= θ
^
;
@ θ
^
= ¡r^;
and
@ r^
@r
=
@ θ
^
@r
= 0. Note that
@ θ
^
= ¡r^ contributes to the centrifugal force experienced by a particle
moving in a circular path around the origin in the polar coordinate system. The vector
@ r^
= θ
^
, on
the other hand, points in the tangential direction to the curve traced out by a particle moving in a
circular path around the origin in the polar co ordinate system.
Now, let u(r; θ) be a given scalar function in polar coordinates. We can write ru in polar
coordinates as:
ru = α(r; θ) r^ + β(r; θ) θ
^
;
where we need to determine the appropriate functions α and β. To find α, we use the orthogonality
condition, which yields:
α(r; θ) = ru · r^ = (u
x
; u
y
) · (cos(θ); sin(θ)) = u
x
cos(θ) + u
y
sin(θ):
Using the chain rule, we can also write:
@u
@r
= u
x
@x
@r
+ u
y
@y
@r
= u
x
cos(θ) + u
y
sin(θ);
and so we see that α(r; θ)=u
r
. Similarly, we can find β as:
β(r; θ) = ru · θ
^
= ¡u
x
sin(θ) + u
y
cos(θ) =
1
r
u
θ
:
Therefore, we obtain:
r
(r;θ)
u(r; θ) = u
r
r
^
+
1
r
u
θ
θ
^
;
and we can express the differential op erator r
(r;θ)
as:
r
(r;θ)
= r
^
@
r
+
1
r
θ
^
@
θ
;
where @
r
; @
θ
denote partial derivatives with respect to r and θ, respectively.
18 Introduction
With the nabla operator in polar coordinates, we can determine the Laplacian := r · r, which
is crucial for our discussion of second-order partial differential equations. By u sing the Laplacian in
polar coordinates, we can solve a variety of problems involving circular or cylindrical domains. For
example, we can model the behavior of electric or magnetic fields inside a cylindrical conductor, or
the flow of fluids inside a circular pipe. The Laplacian also plays an important role in the study of
harmonic functions, which are solutions to the Laplace equation u=0.
Based on the relation :=r·r and the derived r
(r;θ)
, we can obtain the Laplacian in polar
coordinates as follows:
= r · r =
r^ @
r
+
1
r
θ
^
@
θ
·
r^ @
r
+
1
r
θ
^
@
θ
:
Using the orthogonality relation r^ · θ
^
= 0, and the partial derivative relations:
8
>
>
>
>
<
>
>
>
>
:
@
r
r^ = @
r
θ
^
= 0
@
θ
r^ = θ
^
@
θ
θ
^
= ¡r^
;
we can simplify the Laplacian to the following form in polar coordinates:
(r;θ)
= @
rr
+
1
r
@
r
+
1
r
2
@
θθ
:
Exercise 1.21. Find th e form of nabla r in th e cylindr ical coordinate and then find the Laplacian in this
coor dinat e syste m.
Let's now turn to the spherical co ordinate system. In this system, the transformation is defined
through the following relations:
T (ρ; θ; φ) = (x; y; z) = (r sin(θ) cos(φ); r sin(θ) sin(φ); r cos(θ)):
Here, r 2[0; 1) is the distance from the origin, θ 2[0; π] is the angle with respect to the z-axis, a nd
φ2[¡π; π] is the angle with respect to the x-axis.
p
r
φ
θ
x
y
z
The unit vector r^ is defined as
r^ =
T
r
(r; θ; φ)
jT
r
(r; θ; φ)j
= (sin(θ) cos(φ); sin(θ) sin(φ); cos(θ)):
Similarly, we have the following expressions for θ
^
and φ
^
:
θ
^
=
T
θ
(r; θ; φ)
jT
θ
(r; θ; φ)j
= (cos(θ) cos(φ); cos(θ) sin(φ); ¡sin(θ));
φ
^
=
T
φ
(r; θ; φ)
jT
φ
(r; θ; φ)j
= (¡sin(φ); cos(φ); 0):
1.2 Differential oper ators in higher dimensions 19
It can be easily verified that r^; θ
^
, and φ
^
are mutually orthogonal, and thus the transformation T
defines an orthogonal transformation.
Given a scalar function u = u(r; θ; φ), we can determine its gradient using the following
expression:
ru = α(r; θ; φ) r^ + β(r; θ; φ) θ
^
+ γ(r; θ; φ) φ
^
;
where functions α; β, and γ need to be determined. To find these functions, we can use the
orthogonality conditions:
α = ru · r^ = u
x
sin(θ) cos(φ) + u
y
sin(θ) sin(φ) + u
z
cos(θ) = u
r
;
β = ru · θ
^
= u
x
cos(θ) cos(φ) + u
y
cos(θ) sin(φ) ¡ u
z
sin(θ) =
1
r
u
θ
;
γ = ru · φ
^
= ¡u
x
sin(φ) + u
y
cos(φ) =
1
r sin(θ)
u
φ
:
Using these expressions, we can derive the form of r
(r;θ;φ)
:
r
(r;θ;φ)
= r
^
@
r
+
1
r
θ
^
@
θ
+
1
r sin(θ )
φ
^
@
φ
:
This can be used to determine the Laplacian in this coordinate system.
Exercise 1.22. To derive the Laplacian in the spherical coordinate:
a) Show the following relations f or the spherical tran sformation
@
r
r^ = 0; @
θ
r^ = θ
^
; @
φ
r^ = sin(θ) φ
^
@
r
θ
^
= 0; @
θ
θ
^
= ¡r^; @
φ
θ
^
= cos (θ)φ
^
@
r
φ
^
= 0; @
θ
φ
^
= 0; @
φ
φ
^
= ¡sin(θ) r^ ¡cos(θ) θ
^
:
b) Find the dive rgence of a vector led F = α(r; θ; φ)r^ + β(r; θ; φ) θ
^
+ γ(r; θ; φ)φ
^
in this coordinate syste m.
c) Use r
(r;θ ;φ)
and the result of the above problem, and derive
(r;θ; φ)
which is
(r;θ ;φ)
:=
1
r
2
@
r
(r
2
@
r
) +
1
r
2
sin (θ)
@
θ
(sin(θ) @
θ
) +
1
r
2
sin
2
(θ)
@
φφ
:
Exercise 1.23. In this exercise, we wi ll derive the form of the Laplacian for a general orthogonal curvilinear
coor dinat e syste m defi ned by the transformation:
T (q
1
; q
2
; q
3
) = (x( q
1
; q
2
; q
3
); y(q
1
; q
2
; q
3
); z(q
1
; q
2
; q
3
));
where q
1
; q
2
, and q
3
ar e the coordinates of a point i n the curvili near system, and x; y, and z are their Cartesian
counterpart s.
a) Find the unit vectors q^
1
; q^
2
, and q^
3
of the coordin ate system.
b) Use the ortho gonality condition and show the following relation for the nabla operator r
(q
1
;q
2
;q
3
)
r=
1
jT
1
j
q^
1
@
1
+
1
jT
2
j
q^
2
@
2
+
1
jT
3
j
q^
3
@
3
;
where @
j
=
@
@q
j
, and T
j
=
@T
@x
j
.
c) We use symbols γ
i; j
k
for the coordinates of the partial derivatives of
@ q^
i
@q
j
as follows
@ q^
i
@q
j
= γ
ij
1
q
1
^ + γ
ij
2
q
2
^ + γ
ij
3
q
3
^ :
Show that γ
ij
i
= 0.
d) Use the above notation and conclude
:= r·r=
X
i=1
3
1
jT
i
j
2
@
ii
+
X
i=1
3
1
jT
i
j
@
i
1
jT
i
j
@
i
+
X
i; j=1
3
1
jT
i
jjT
j
j
γ
i;j
j
@
i
e) For a given vector eld F = P q^
1
+ Q q^
2
+ R q^
3
, nd div (F ).
20 Introduction