EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
1
Lecture6. Partial Differential Equations
6.1 Review of Differential Equation
We have studied the theoretical aspects of the solution of linear homogeneous differential equations with
constant coefficient equation 𝑎𝑦’’+ 𝑏𝑦’ + 𝑐𝑦 = 0 in practice.
We have the sum of a function and its derivatives equal to zero, so the derivatives must have the same
form as the function. Therefore we expect the function to be ex. If we insert this in the equation, we
obtain:
𝑎𝑚2 + 𝑏𝑚 + 𝑐 = 0
This is called the auxiliary equation of the homogeneous differential equation 𝑎𝑦’’ + 𝑏𝑦’ + 𝑐𝑦 = 0. If we solve the characteristic equation, we will see three different possibilities: Two real roots, double real
root and complex conjugate roots.
6.2 Partial Differential Equations
A differential equation in which partial derivatives occur is called a partial differential equation.
Mathematical models of physical phenomena involving more than one independent variable often include
partial differential equations. They also arise in such diverse areas as epidemiology (for example,
multivariable predator/prey models of AIDS), traffic flow studies and the analysis of economies.
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
2
We will be primarily concerned in this part with three broadly defined kinds of phenomena: wave
motion, radiation or conduction of energy, and potential theory. Models of these phenomena involve
partial differential equations called, respectively, the wave equation, the heat equation, and the potential
equation, or Laplace's equation.
Partial differential equations are much more complicated compared with the ordinary differential
equations. There is no universal solution technique for nonlinear equations, even the numerical
simulations are usually not straightforward. Thus, we will mainly focus on the linear partial differential
equations and the equations of special interests in engineering and computational sciences. A partial
differential equation (PDE) is a relationship containing one or more partial derivatives. Similar to the
ordinary differential equation, the highest nth partial derivative is referred to as the order n of the partial
differential equation. The general form of a partial differential equation can be written as
𝜑(𝑥,𝑦,𝜕𝑢
𝜕𝑥,𝜕𝑢
𝜕𝑦,𝜕2𝑢
𝜕𝑥2,𝜕2𝑢
𝜕𝑦2,𝜕2𝑢
𝜕𝑥𝜕𝑦,……… ) = 0
where u is the dependent variable and x, y, ... are the independent variables. A simple example of partial
differential equations is the linear first order partial differential equation, which can be written as
𝑎 𝑥,𝑦 𝜕𝑢
𝜕𝑥+ 𝑏 𝑥,𝑦
𝜕𝑢
𝜕𝑦= 𝑓(𝑥,𝑦)
for two independent variables and one dependent variable u. If the right hand side is zero or simply
f(x, y) = 0, then the equation is said to be homogeneous. The equation is said to be linear if a, b and f are
unctions of x, y only, not u itself.
For simplicity in notations in the studies of partial differential equations, compact subscript forms are
often used in the literature. They are
𝑢𝑥 ≡𝜕𝑢
𝜕𝑥,𝑢𝑦 ≡
𝜕𝑢
𝜕𝑦,𝑢𝑥𝑥 ≡
𝜕2𝑢
𝜕𝑥2,𝑢𝑦𝑦 ≡
𝜕2𝑢
𝜕𝑦2,𝑢𝑥𝑦 ≡
𝜕2𝑢
𝜕𝑥𝜕𝑦
and thus we can write the general of one dimensional PDE as
a ux + b uy = f.
In this chapter generally we deal with second order differential equation.
6.3 Classification of PDE
A linear second-order partial differential equation can be written in the generic form in terms of two
independent variables x andy,
a uxx + b uyx + c uyy + g ux + h uy +k u = f.
where a, b, c, g, h, k and f are functions of x and y only. If f ( x, y, u) is also a function of u, then we say
that this equation is quasi-linear.
If, ∆= 𝑏2 − 4𝑎𝑐 < 0 the equation is elliptic. One famous example is the Laplace equation uxx + uyy = 0
If Δ > 0, it is hyperbolic. One example is the wave equation utt =c2 uxx.
If Δ = 0, it is parabolic. Diffusion and heat conduction equations are of the parabolic type ut =k uxx.
Examples of PDEs
Many physical processes in engineering are governed by three classic partial differential equations so they
are widely used in a vast range of applications. Among the most frequently encountered PDEs are the
following:
1. Laplace's equation ∇2𝜑 = 0
This very common and very important equation occurs in studies of
a. electromagnetic phenomena including electrostatics, dielectrics, steady
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
3
currents, and magnetostatics,
b. hydrodynamics (irrotational flow of perfect fluid and surface waves),
с. heat flow, and
d. gravitation.
2. Poisson's equation ∇2𝜑 = −𝜌/𝜀0.
In contrast to the homogeneous Laplace equation, Poisson's equation is non-homogeneous with a source
term -𝜌/𝜀0.
3. The wave (Helmholtz) and time-independent diffusion equations
∇2𝜑 ∓ 𝑘2𝜑 = 0
These equations appear in such diverse phenomena as
a. elastic waves in solids including vibrating strings, bars, membranes,
b. sound or acoustics,
с electromagnetic waves, and
d. nuclear reactors.
4. The time-dependent diffusion equation
∇2𝜑 =1
𝑎2
𝜕𝜑
𝜕𝑡
and the corresponding four-dimensional forms involving the d'Alembertian, a four-dimensional analog of
the Laplacian in Minkowski space
5. The time-dependent wave equation, 𝜕2𝜑 = 0
6. The scalar potential equation ∂2𝜑 = −𝜌
𝜀0.
Like Poisson's equation this equation is nonhomogeneous with a source term 𝜌
𝜀0.
7. The Klein-Gordon equation 𝜕2𝜑 = −𝜇2𝜑 and the corresponding vector equations in which the
scalar function 𝜑 is replaced by a vector function. Other more complicated forms are common.
8. The Schrodinger wave equation
and
for the time-independent case.
9. The equations for elastic waves and viscous fluids and the telegraphy equation.
10. Maxwell's coupled partial differential equations for the electric and magnetic fields and those of
Dirac for relativistic electron wavefunctions.
6.4 Techniques for Solving PDEs
Different types of equations usually require different solution techniques. However, there are some
methods that work for most of the linearly partial differential equations with appropriate boundary
conditions on a regular domain. These methods include separation of variables, series expansions,
similarity solutions, hybrid methods, and integral transform methods.
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
4
i) Solution by direct integration
The simplest form of partial differential equation is such that a solution can be determined by direct
partial integration.
Example 1:
Solve the differential equation uxx = 12 x2 (t+1) given that x = 0, u = cos(2t) and ux = sint.
Notice that the boundary conditions are functions of t and not just constants. Integrating the equation
uxx = 12 x2 (t+1) partially with respect to x, we have ux = 4 x
3 (t+1) + f(t) where the arbitrary function f(t)
takes the place of the normal arbitrary constant in ordinary integration. Integrating partially again with
respect to x gives
u = x4 (t+1) + x f(t)+ g(t)
where g(t) is a second arbitrary function.
To find the two arbitrary functions, we apply the given initial conditions that x = 0, u = cos(2t) and
ux = sint. Subtituting in the relevant equations gives
f(t) = sint and g(t) = cos(2t)
then the solution becomes
u = x4 (t+1) + x sint + cos(2t)
Example 2:
Solve the differential equation uxy = sin(x+y) given that at y = 0, ux =1 and at x = 0, u = (y-1)2.
Initial conditions and boundary conditions:
As with any differential equation, the arbitrary constants or arbitrary functions in any particular case are
determines from the additional information given concerning the variables of the equation. These extra
facts are called the initial conditions or, more generally the boundary conditions since they do not lways
refer to zero values of the independent variables.
Example 3:
Solve the differential equation uxy = sin(x)cos(y), subject to the boundary conditions that at y = π/2,
ux =2x and at x = π, u = 2sin(y).
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
5
ii) Separation of Variables
The separation of variables attempts a solution of the form
u = X(x)Y(y)Z(z)T(t)
where X(x), Y(y), Z(z) and T(t) are functions of x, y, z, t, respectively. In order to determine these
functions, they have to satisfy the partial differential equation and the required boundary conditions. As a
result, the partial differential equation is usually transformed into two or three ordinary differential
equations (ODEs), and these ordinary differential equations often appear as eigenvalue problems. The
final solution is then obtained by solving these ODEs.
A solution that has this form is said to be separable in x, y, z and t, and seeking solutions of this form is
called the method of separation of variables.
As simple examples we may observe that, of the functions
(i) xyz2 sin bt, (ii) xy + zt, (iii) (x
2 + y
2)z cos ωt,
(i) is completely separable, (ii) is inseparable in that no single variable can be separated out from it and
written as a multiplicative factor, whilst (iii) is separable in z and t but not in x and y.
The following examples are to illustrate the method of solution by studying the wave equation, the heat
equation and the Laplace equation.
a) The wave equation
The wave equation is
𝑐2∇2𝑢 =𝜕2𝜑
𝜕2𝑡= 𝑢𝑡𝑡
governs a wide variety a wave phenomena such as electromagnetic waves, water waves, supersonic flow,
pulsatile blood flow, acoustics, elastic waves in solids, and vibrating strings and membranes. In this
introductory section we derive the wave equations governing the vibrating string and vibrating membrane
and outline, in the exercises, several other such cases leading to wave equations.
Vibrating String with Zero Initial Velocity
Consider an elastic string of length L, fastened at its ends on the x axis at x = 0 and x = L. The string is
displaced, then released from rest to vibrate in the x, y plane. We want to find the displacement function
y(x, t), whose graph is a curve in the x, y plane showing the shape of the string at time t. If we took a
snapshot of the string at time t, we would see this curve. The boundary value problem for the
displacement function is
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
6
The Fourier method, or separation of variables, consists of attempting a solution of the form y(x, t) =
X(x)T(t) . Substitute this into the wave equation to obtain
XT" = c2X" T,
where T' = dT/dt and X' = dX/dx. Then
The left side of this equation depends only on x, and the right only on t . Because x and t are independent,
we can choose any to we like and fix the right side of this equation at the constant value T"(to)/c2 T(to),
while varying x on the left side. Therefore X"/X must be constant for all x in (0, L). But then T"/c2 T must
equal the same constant for all t > 0. Denote this constant - . (The negative sign is customary and
convenient, but we would arrive at the same final solution if we used just ) . A is called the separation
constant, and we now have
Then
X" + X = 0 and T" + c2T = 0.
The wave equation has separated into two ordinary differential equations.
Now consider the boundary conditions. First,
y(0, t) = X(0)T(t) = 0
for t ≥ 0. If T(t) = 0 for all t ≥ 0, then y(x, t) = 0 for 0 ≤ x ≤ L and t ≥ 0. This is indeed the solution if
f(x) = 0, since in the absence of initial velocity or a driving force, and with zero displacement, the string
remains stationary for all time. However, if T(t) ≠ 0 for any time, then this boundary condition can be
satisfied only if
X(0)=0
Similarly,
y(L, t) = X(L)T(t) = 0
for t ≥ 0 requires that
X(L)=0.
We now have a boundary-value problem for X:
X" + X = 0 ; X (0) = X (L) = 0.
The values of for which this problem has nontrivial solutions are the eigenvalues of this problem, and
the corresponding nontrivial solutions for X are the eigenfunctions. By solving we get
The eigenfunctions are nonzero constant multiples of
𝑋𝑛 𝑥 = 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿
for n = 1, 2, . . . . At this point we therefore have infinitely many possibilities for the separatio n
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
7
constant and for X(x) .
Now turn to T(t). Since the string is released from rest,
This requires that T' (0) = 0. The problem to be solved for T is therefore
T" + c2 T = 0; T' (0) = 0.
However, we now know that A can take on only values of the form n2π
2/L
2, so this problem is really
T" +( n2π
2 c
2/L
2)T = 0; T’(0) = 0.
The differential equation for T has general solution
𝑇 𝑡 = 𝑎 𝑐𝑜𝑠 𝑛𝜋𝑐𝑡
𝐿 + 𝑏 𝑠𝑖𝑛
𝑛𝜋𝑐𝑡
𝐿
Now
𝑇 ′ 0 =𝑛𝜋𝑐
𝐿𝑏 = 0
so b = 0. We therefore have solutions for T(t) of the form
𝑇𝑛 𝑡 = 𝑐𝑛 𝑐𝑜𝑠 𝑛𝜋𝑐𝑡
𝐿
for each positive integer n, with the constants c, as yet undetermined.
We now have, f o r n = 1, 2, . . .., functions
𝑦𝑛 𝑥, 𝑡 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 𝑐𝑜𝑠
𝑛𝜋𝑐𝑡
𝐿
Each of these functions satisfies both boundary conditions and the initial condition yt(x, 0) = 0. We need
to satisfy the condition y(x, 0) = f(x).
It may be possible to choose some n so that yn(x, t) is the solution for some choice of cn. For example,
suppose the initial displacement is
𝑓 𝑥 = 14𝑠𝑖𝑛 3𝜋𝑥
𝐿
Now choose n = 3 and c3 = 14 to obtain the solution
𝑦 𝑥, 𝑡 = 14 𝑠𝑖𝑛 3𝜋𝑥
𝐿 𝑐𝑜𝑠
3𝜋𝑐𝑡
𝐿
This function satisfies the wave equation, the conditions y(0) = y(L) = 0, the initial condition
y(x, 0) = 14sin(3 x/L), and the zero initial velocity condition yt (x, 0) = 0
However, depending on the initial displacement function, we may not be able to get by simply by
picking a particular n and cn. For example, if we initially pick the string up in the middle and have initial
displacement function
(as in Figure ), then we can never satisfy y(x, 0) = f(x) with one of the y’n s. Even if we try a finite linear
combination
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
8
we cannot choose c1, . . . , cN to satisfy y(x, 0) = f(x) for this function, since f(x) cannot be written as a
finite sum of sine functions. We are therefore led to attempt an infinite superposition
𝑦 𝑥, 𝑡 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 𝑐𝑜𝑠
𝑛𝜋𝑐𝑡
𝐿
∞
𝑛=1
We must choose the cN to satisfy
𝑦 𝑥, 0 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿
∞
𝑛=1
We can do this! The series on the right is the Fourier sine expansion of f(x) on [0, L]. Thus choose the
Fourier sine coefficients
𝑐𝑛 =2
𝐿 𝑓(𝑥)𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
With this choice, we obtain the solution
𝑦 𝑥, 𝑡 = 2
𝐿 𝑓(𝑥)𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 𝑐𝑜𝑠
𝑛𝜋𝑐𝑡
𝐿
∞
𝑛=1
This strategy will work for any initial displacement function f which is continuous with a piecewise
continuous derivative on [0, L], and satisfies f(0) = f(L) = 0. These conditions ensure that the Fourier sine
series of f(x) on [0, L] converges to f(x) for 0 ≤ x ≤ L.
In specific instances, where f(x) is given, we can of course explicitly compute the coefficients in this
solution . For example, if L = π and the initial position function is f(x) = x cos(5x/π) on [0, π], then the nth
coefficient in the solution is
𝑐𝑛 =2
𝜋 cos
5𝑥
2 sin
𝑛𝜋𝑥
𝐿 𝑑𝑥 =
𝜋
0
8
𝜋
𝑛(−1)𝑛+1
𝜋(5 + 2𝑛)2(5 − 2𝑛)2
The solution for this initial displacement function, and zero initial velocity, is
𝑦 𝑥, 𝑡 = 8
𝜋
𝑛(−1)𝑛+1
𝜋(5 + 2𝑛)2(5 − 2𝑛)2 sin(𝑛𝑥)cos(𝑛𝑐𝑡)
∞
𝑛=1
Vibrating String with Given Initial Velocity and Zero Initial Displacement
Now consider the case that the string is released from its horizontal position (zero initial displacement),
but with an initial velocity given at x by g(x) . The boundary value problem for the displacement function
is
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
9
We begin as before with separation of variables. Put y(x, t) = X(x)T(t). Since the partial differential
equation and boundary conditions are the same as before, we again obtain
X" + X = 0; X (0) = X(L) = 0,
with eigenvalues
and eigenfunctions constant multiples of
𝑋𝑛 𝑥 = sin 𝑛𝜋𝑥
𝐿
Now, however, the problem for T is different and we have
y(x, 0) = 0 = X(x)T(0),
so T(0) = 0. The problem for T is
T" +( n2π
2 c
2/L
2)T = 0; T(0) = 0.
(In the case of zero initial velocity we had T'(0) = 0) . The general solution of the differential
equation for T is
𝑇 𝑡 = 𝑎 cos 𝑛𝜋𝑐𝑡
𝐿 + 𝑏 sin
𝑛𝜋𝑐𝑡
𝐿
Since T(0) = a = 0, solutions for T(t) are constant multiples of sin(nπct/L) . Thus, for n = 1 , 2, . . . , we
have functions
𝑦𝑛 𝑥, 𝑡 = 𝑐𝑛 sin 𝑛𝜋𝑥
𝐿 cos
𝑛𝜋𝑐𝑡
𝐿
Each of these functions satisfies the wave equation, the boundary conditions and the zero initial
displacement condition. To satisfy the initial velocity condition yt (x, 0) = g(x), we generally must attempt
a superposition
𝑦 𝑥, 𝑡 = 𝑐𝑛 sin 𝑛𝜋𝑥
𝐿 sin
𝑛𝜋𝑐𝑡
𝐿
∞
𝑛=1
Assuming that we can differentiate this series term by term, then
𝜕𝑦
𝜕𝑥 𝑥, 0 = 𝑐𝑛 sin
𝑛𝜋𝑥
𝐿 𝑛𝜋𝑐
𝐿= 𝑔(𝑥)
∞
𝑛=1
This is the Fourier sine expansion of g(x) on [0, L]. Choose the entire coefficient of sin(nπx/L) to be the
Fourier sine coefficient of g(x) on [0, L] :
𝑐𝑛𝑛𝜋𝑐
𝐿=
2
𝐿 𝑔 𝑥 sin
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
10
Or
𝑐𝑛 =2
𝑛𝜋𝑐 𝑔 𝑥 sin
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
The solution is
𝑦 𝑥, 𝑡 = 2
𝑛𝜋𝑐 𝑔 𝑥 sin
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
sin 𝑛𝜋𝑥
𝐿 sin
𝑛𝜋𝑐𝑡
𝐿
∞
𝑛=1
For example, suppose the string is released from its horizontal position with an initial
velocity given by g(x) = x (1 + cos(a π x/L)). Compute
𝑔 𝑥 sin 𝑛𝜋𝑥
𝐿 𝑑𝑥 = 𝑥(1 + cos(𝜋𝑥/𝐿)) sin
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
𝐿
0
The solution corresponding to this initial velocity function is
If we let c = 1 and L = π, the solution becomes
Example 4:
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
11
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
12
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
13
b) The Heat equation
The conduction of heat in a uniform bar depends on the initial distribution of temperature and on the
physical properties of bar, i.e. the thermal conductivity and specific heat of material, and the mass per unit
length of the bar.
Ends of the Bar Kept at Temperature Zero
Suppose we want the temperature distribution u(x, t) in a thin, homogeneous (constant density) bar of
length L, given that the initial temperature in the bar at time zero in the cross section at x perpendicular to
the x axis is f(x). The ends of the bar are maintained at temperature zero for all time.
The one dimensional heat equation is written as
where k = K/ is a positive constant depending on the material of the bar. The number k is called the
diffusivity of the bar.
The boundary value problem modeling this temperature distribution is
We will use separation of variables. Substitute u(x, t) = X(x)T(t) into the heat equation to get
X T' = k X" T
or
The left side depends only on time, and the right side only on position, and these variables are
independent. Therefore for some constant ,
Now
u(0, t) = X(0)T(t) = 0.
If T(t) = 0 for all t, then the temperature function has the constant value zero, which occurs if the initial
temperature f(x) = 0 for 0 ≤ x ≤ L. Otherwise T(t) cannot be identically zero, so we must have X(0) = 0.
Similarly, u(L, t) = X(L)T(t) = 0 implies that X(L) = 0. The problem for X is therefore
X" +X = 0; X(0) = X(L) = 0.
We seek values of A (the eigenvalues) for which this problem for X has nontrivial solutions (the
eigenfunctions).
This problem for X is exactly the same one encountered for the space-dependent function in separating
variables in the wave equation. There we found that the eigenvalues are
for n = 1, 2, . . ., and corresponding eigenfunctions are nonzero constant multiples of
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
14
𝑋𝑛 𝑥 = 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿
The problem for T becomes
T’ +( n2π
2 k /L
2)T = 0
which has general solution
𝑇𝑛 𝑡 = 𝑐𝑛 𝑒−𝑛2𝜋2𝑘𝑡/𝐿2
For n = 1, 2, • • • , we now have functions
𝑢𝑛 𝑥, 𝑡 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
which satisfy the heat equation on [0, L] and the boundary conditions u(0, t) = u(L, t) = 0. There remains
to find a solution satisfying the initial condition. We can choose n and cn, so that
𝑢𝑛 𝑥, 0 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 = 𝑓(𝑥)
only if the given initial temperature function is a multiple of this sine function. This need not be the case.
In general, we must attempt to construct a solution using the superposition
𝑢𝑛 𝑥, 𝑡 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2∞𝑛=1 .
Now we need
𝑢 𝑥, 0 = 𝑐𝑛 𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 = 𝑓(𝑥)
∞
𝑛=1
which we recognize as the Fourier sine expansion of f(x) on [0, L]. Thus choose
𝑐𝑛 =2
𝐿 𝑓(𝑥)𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
With this choice of the coefficients, we have the solution for the temperature distribution function:
𝑢 𝑥, 𝑡 = 2
𝐿 𝑓(𝑥)𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
𝑠𝑖𝑛 𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
Example 5:
Suppose the initial temperature function is constant A for 0 < x < L, while the temperature at the ends is
maintained at zero. To write the solution for the temperature distribution function, we need to compute
𝑐𝑛 =2
𝐿 𝐴𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑑𝑥 =
2𝐴
𝑛𝜋 1 − cos 𝑛𝜋 =
2𝐴
𝑛𝜋 1 − (−1)n
𝐿
0
Then, the solution is
𝑢 𝑥, 𝑡 = 2𝐴
𝑛𝜋 1 − (−1)n 𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
Since 1 - (-1)n is zero if n is even, and equals 2 if n is odd, we need only sum over the odd integers and
can write
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
15
𝑢 𝑥, 𝑡 =4𝐴
𝜋
1
2𝑛 − 1 𝑠𝑖𝑛
(2𝑛 − 1)𝜋𝑥
𝐿 𝑒−(2𝑛−1)2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
Temperature in a Bar with Insulated Ends
Consider heat conduction in a bar with insulated ends, hence no energy loss across the ends. If the initial
temperature is f(x), the temperature function is modeled by the boundary value problem
Attempt a separation of variables by putting u(x, t) = X(x)T(t). We obtain, as in the preceding subsection,
X" + X = 0,T' +k T=0.
Now
implies (except in the trivial case of zero temperature) that X'(0) = 0. Similarly,
implies that X'(L) = 0. The problem for X(x) is therefore
X" + X = 0 ; X' (0) = X' (L) = 0 .
The eigenvalues are
for n = 0, 1, 2, . . ., with eigenfunctions nonzero constant multiples of
𝑋𝑛 𝑥 = 𝑐𝑜𝑠 𝑛𝜋𝑥
𝐿
The equation for T is now
T’ +( n2π
2 k /L
2)T = 0
When n = 0 we get
To(t) = constant.
For n = 1, 2, . . . ,
𝑇𝑛 𝑡 = 𝑐𝑛 𝑒−𝑛2𝜋2𝑘𝑡/𝐿2
We now have functions
𝑢𝑛 𝑥, 𝑡 = 𝑐𝑛 𝑐𝑜𝑠 𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
16
for n = 0, 1, 2, . . ., each of which satisfies the heat equation and the insulation boundary conditions. To
satisfy the initial condition we must generally use a superposition
𝑢 𝑥, 𝑡 =1
2𝑐0 + 𝑐𝑛 𝑐𝑜𝑠
𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
Here we wrote the constant term (n=0) as co/2 in anticipation of a Fourier cosine expansion. Indeed, we
need
𝑢 𝑥, 0 = 𝑓(𝑥) =1
2𝑐0 + 𝑐𝑛 𝑐𝑜𝑠
𝑛𝜋𝑥
𝐿
∞
𝑛=1
the Fourier cosine expansion of f(x) on [0, L] . (This is also the expansion of the initial temperature
function in the eigenfunctions of this problem.) We therefore choose
𝑐𝑛 =2
𝐿 𝑓(𝑥)𝑐𝑜𝑠
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
With this choice of coefficients, equation of differential equation gives the solution of this boundary value
problem as
𝑢 𝑥, 𝑡 =1
2𝑐0 +
2
𝐿 𝑓(𝑥)𝑐𝑜𝑠
𝑛𝜋𝑥
𝐿 𝑑𝑥
𝐿
0
𝑐𝑜𝑠 𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
Example 6:
Suppose the left half of the bar is initially at temperature A, and the right half is kept at temperature zero.
Thus
Then
𝑐0 =2
𝐿 𝐴𝑑𝑥 = 𝐴𝐿/2
0
and, for n = 1, 2, . . .,
𝑐𝑛 =2
𝐿 𝐴𝑐𝑜𝑠
𝑛𝜋𝑥
𝐿 𝑑𝑥 =
2𝐴
𝑛𝜋sin(𝑛𝜋/2)
𝐿/2
0
The solution for this temperature function is
𝑢 𝑥, 𝑡 =1
2𝐴 +
2𝐴
𝑛𝜋sin(𝑛𝜋/2) 𝑐𝑜𝑠
𝑛𝜋𝑥
𝐿 𝑒−𝑛
2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
Now sin(nπ/2) is zero if n is even. Further, if n = 2k - 1 is odd, then sin(nπ/2) = (-1)k+ 1
. The solution may
therefore be written
𝑢 𝑥, 𝑡 =1
2𝐴 +
2𝐴
𝑛𝜋
(−1)𝑛+1
2𝑛 − 1 𝑐𝑜𝑠
(2𝑛 − 1)𝜋𝑥
𝐿 𝑒−(2𝑛−1)2𝜋2𝑘𝑡/𝐿2
∞
𝑛=1
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
17
a) The Potential (Laplace) equation
Harmonic Functions and the Dirichlet Problem
The partial differential equation
𝜕2𝑢
𝜕𝑥2+𝜕2𝑢
𝜕𝑦2= 0
is called Laplace's equation in two dimensions. In 3-dimensions this equation is
𝜕2𝑢
𝜕𝑥2+𝜕2𝑢
𝜕𝑦2+𝜕2𝑢
𝜕𝑧2= 0
The Laplacian 2 (read "del squared") is defined in 2-dimensions by
∇2=𝜕2𝑢
𝜕𝑥2+𝜕2𝑢
𝜕𝑦2
and in three dimensions by
∇2=𝜕2𝑢
𝜕𝑥2+𝜕2𝑢
𝜕𝑦2+𝜕2𝑢
𝜕𝑧2
In this notation, Laplace's equation ∇2𝑢 = 0
A function satisfying Laplace's equation in a certain region is said to be harmonic on that region. For
example,
x2 - y
2
and
2xy
are both harmonic over the entire plane.
Laplace's equation is encountered in problems involving potentials, such as potentials for force fields in
mechanics, or electromagnetic or gravitational fields. Laplace's equation is also known as the steady-state
heat equation. The heat equation in 2- or 3-space dimensions is
𝑘∇2𝑢 =𝜕𝑢
𝜕𝑡
In the steady-state case (the limit as 𝑡 → ∞) the solution becomes independent of t, so 𝜕𝑢
𝜕𝑡= 0 and the heat
equation becomes Laplace's equation.
In problems involving Laplace's equation there are no initial conditions. However, we often encounter the
problem of solving
∇2𝑢(𝑥,𝑦) = 0
for (x, y) in some region D of the plane, subject to the condition that
u(x, y) = f(x, y),
for (x, y) on the boundary of D. This boundary is denoted D. Here f is a function having given values on
D, which is often a curve, or made up of several curves (Figure). The problem of determining a harmonic
function having given boundary values is called a Dirichlet problem, and f is called the boundary data of
the problem. There are versions of this problem in higher dimensions, but we will be concerned primarily
with dimension 2.
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
18
Typical boundary D of a region D.
The difficulty of a Dirichlet problem is usually dependent on how complicated the region D is. In general,
we have a better chance of solving a Dirichlet problem for a region that possesses some type of symmetry,
such as a disk or rectangle. We will begin by solving the Dirichlet problem for some familiar regions in
the plane.
Dirichlet Problem for a Rectangle
Let R be a solid rectangle, consisting of points (x, y) with 0 ≤ x ≤ L, 0 ≤ y ≤ K. We want to find a function
that is harmonic at points interior to R, and takes on prescribed values on the four sides of R, which form
the boundary R of R.
This kind of problem can be solved by separation of variables if the boundary data is nonzero on only one
side of the rectangle. We will illustrate this kind of problem, and then outline a strategy to follow if the
boundary data is nonzero on more than one side.
Example 7:
Consider the Dirichlet problem
2u(x,y)=0 for 0 < x < L, 0 < y < K,
u(x,0)=0 for 0 ≤ x ≤ L,
u(0, y) = u(L, y) = 0 for 0 ≤ y ≤ K,
u(x, K) = (L - x) sin(x) for 0 ≤ x ≤ L.
where the boundary data are shown in figure.
Let u(x, y) = X(x)Y(y) and substitute into Laplace's equation to obtain
Then
X" + X = 0 and Y"- Y = 0.
From the boundary conditions,
u(x, 0) = X(x)Y(0) = 0
Boundary data given on boundary sides of the rectangle.
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
19
so Y(0) = 0. Similarly,
X (0) = X (L) = 0.
The problem for X(x) is a familiar one, with eigenvalues n = n2π
2/L
2 and eigenfunctions that are nonzero
constant multiples of sin(nπx/L).
The problem for Y is now
Y’’ -( n2π
2/L
2)Y = 0; Y(0)=0
Solutions of this problem are constant multiples of sinh(nπy/L).
For each positive integer n = 1, 2, . . . , we now have functions
𝑢𝑛 𝑥,𝑦 = 𝑏𝑛 sin 𝑛𝜋𝑥
𝐿 sinh
𝑛𝜋𝑦
𝐿
which are harmonic on the rectangle, and satisfy the zero boundary conditions on the top, bottom and left
sides of the rectangle. To satisfy the boundary condition on the side y = K, we must use a superposition
𝑢 𝑥,𝑦 = 𝑏𝑛 sin 𝑛𝜋𝑥
𝐿 sinh
𝑛𝜋𝑦
𝐿
∞
𝑛=1
Choose the coefficients so that
𝑢 𝑥,𝐾 = 𝑏𝑛 sin 𝑛𝜋𝑥
𝐿 sinh
𝑛𝜋𝐾
𝐿
∞
𝑛=1
= (𝐿 − 𝑥)sin(𝑥)
This is a Fourier sine expansion of (L - x) sin(x) on [0, L], so we must choose the entire coefficient to be
the sine coefficient:
𝑏𝑛 sinh(𝑛𝜋𝑥
𝐿) =
2
𝐿 (𝐿 − 𝑥)sin(𝑥)sin(
𝑛𝜋𝑥
𝐿)𝑑𝑥
𝐿
0
𝑏𝑛 sinh(𝑛𝜋𝐾
𝐿) = 4𝐿2
𝑛𝜋 1 − (−1)𝑛cos(𝐿)
𝐿4 − 2𝐿2𝑛2𝜋2 + 𝑛4𝜋4
Then,
𝑏𝑛 =4𝐿2
sinh(𝑛𝜋𝑥𝐿 )
𝑛𝜋 1 − (−1)𝑛cos(𝐿)
(𝐿2−𝑛2𝜋2)2
The solution is
𝑢 𝑥,𝑦 = 4𝐿2
sinh(𝑛𝜋𝑥𝐿 )
𝑛𝜋 1 − (−1)𝑛cos(𝐿)
(𝐿2−𝑛2𝜋2)2 𝑠𝑖𝑛
𝑛𝜋𝑥
𝐿 𝑠𝑖𝑛
𝑛𝜋𝑦
𝐿
∞
𝑛=1
Dirichlet Problem for a Disk
We will solve the Dirichlet problem for a disk of radius R centered about the origin. In polar coordinates,
the problem is
Laplace's equation in polar coordinates is
It is easy to check that the functions
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
20
1, rn cos(nθ), and r
n sin(nθ)
are all harmonic on the entire plane. Thus attempt a solution
To satisfy the boundary condition, we need to choose the coefficients so that
But this is just the Fourier expansion of f(θ) on [-π, π], leading us to choose
and
Then
and
The solution is
This can also be written
or
Example 8:
Solve the Dirichlet problem for
The solution is
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
21
Example 8:
Solve the Dirichlet problem for
Convert the problem to polar coordinates, using x = rcos(θ) and y = r sin(θ). Let
u(x, y) = u(rcos(θ), rsin(θ)) = U(r, θ).
The condition on the boundary, where r = 3, becomes
The solution is
Now
and
Therefore
To convert this solution back to rectangular coordinates, use the fact that
Then
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
22
Example 9:
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
23
6.5 Exercises
1.
Answer:
2.
Answer:
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
24
3.
Answer:
4.
Answer:
5.
Answer:
6.
Answer:
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
25
7.
Answer:
8.
Answer:
9.
Answer:
10.
Answer:
11.
Answer:
12.
Answer:
EP219 Lecture notes - prepared by- Assoc. Prof. Dr. Eser OLĞAR 2012-Spring
26
13.
Answer:
14.
Answer:
15.
Answer:
16.
Answer:
17.
Answer:
18.
Answer:
19.
Answer:
20.
Answer:
21.
Answer:
22.
Answer:
23.
Answer:
References:
1. Advanced Engineering Mathematics, International Student Edition, Peter V. O'Neil.
2. Advanced Engineering Mathematics, K.A. Stroud, 4th edition.
3. Mathematical methods for physics and engineering, K.F. Riley, M.P. Hobson and S. J. Bence, 3th
edition.