0% found this document useful (0 votes)
37 views6 pages

Lecture5 Worksheet Solns

The document discusses solutions to boundary value problems for various partial differential equations, including the wave equation, heat equation, Schrodinger equation, and Laplace equation. It provides the general solutions for each equation after applying separation of variables, and shows how to determine coefficients based on given boundary conditions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Lecture5 Worksheet Solns

The document discusses solutions to boundary value problems for various partial differential equations, including the wave equation, heat equation, Schrodinger equation, and Laplace equation. It provides the general solutions for each equation after applying separation of variables, and shows how to determine coefficients based on given boundary conditions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

PHYS 312, Worksheet for Lecture 5

Jupyter Worksheet - read lecture5-worksheet.pdf

Let’s go over solutions to the various examples in Worksheets 4 and 5. For completness,
this will include some of the notes in the two Jupyter worksheets.

In Lecture 3, we solved the following problem boundary value problem:

f 00 (x) = λf (x)

f (x) = f (1) = 0
and showed that the solutions are

fn (x) = sin(nπx) , λn = − (nπ)2

for n = 1, 2, 3, . . . (we set L = 1 for concretness here).


There are many PDEs which will give the equation f 00 (x) = λf (x) after separation of
variables. Here are some examples, focusing on equations with just two variables.
Wave equation (speed of propagation set to 1)

∂2 ∂2
u(x, t) = u(x, t)
∂t2 ∂x2
Schrodinger equation (various physical parameters such as m and ~ set to 1)

∂ 1 ∂2
i u(x, t) = − u(x, t)
∂t 2 ∂x2
Heat equation (diffusion constant set to 1)

∂ ∂2
u(x, t) = u(x, t)
∂t ∂x2
Laplace equation in rectilinear coordinates

∂2 ∂2
u(x, y) + u(x, y) = 0
∂x2 ∂y 2

Laplace equation in cylindrical coordinates (except now x is θ):

1 ∂2
 
1 ∂ ∂
r u(r, θ) + 2 2 u(r, θ) = 0
r ∂r ∂r r ∂θ

Wave equation
The first three of these equations describe time evolution of some quantity u. Then, as we
already discovered in Lecture 3, the general solution to the wave equation with boundary
conditions u(0, t) = u(l, t) = 0 is

X
u(x, t) = fn (x) (an sin(nπt) + bn cos(nπt))
n=1

The coefficients an and bn are fixed by initial conditions. Let’s take initial conditions to

be a motionless state, ie ∂t u(x, 0) = 0, together with some initial profile u(x, 0) = F (x).
1
Specificaly, in the Worksheet we used F (x) = f1 (x) − 19 f3 (x) + 25 f5 (x), which approximates
a string plucked in the middle.
To set the initial motion to zero, we must have ∂t u(x, t)|t=0 = 0:

X ∞
X
∂t u(x, t) = fn (x) (nπan cos(nπt) − nπbn sin(nπt)) = nπfn (x)an = 0
n=1 t=0 n=1

To satisfy this condition, we take an = 0 for all n (we will learn soon why this choice is
unique). Then,

X
u(x, t) = bn fn (x) cos(nπt)
n=1

and the initial condition requires



X 1 1
u(x, 0) = bn fn (x) = f1 (x) − f3 (x) + f5 (x)
n=1
9 25

which means we can read off the coefficients: b1 = 1, b3 = − 19 , b5 = 1


25
and the rest are zero.
The time evolution implied by the wave equation is therefore

1 1
u(x, t) = f1 (x) cos(πt) − f3 (x) cos(3πt) + cos(5πt) =
9 25
1 1
sin(πx) cos(πt) − sin(3πx) cos(3πt) + sin(5πx) cos(5πt)
9 25

Heat and Schrodinger equations


The next two equations on the list look very similar, and we can do them together. Let σ be
equal to 1 for the heat equation and 2i for the Schrodinger equation. Then both equations
are
∂ ∂2
u(x, t) = σ 2 u(x, t)
∂t ∂x
Separation of variables, u(x, t) = f (x)g(t) implies that if f 00 (x) = λf (x), then g 0 (t) =
σλg(t), with solutions g(t) = eσλt . The general solution to the PDE above is then
∞ ∞
2t
X X
u(x, t) = cn fn (x)e σλn t
= cn sin(nπx)e−σ(nπ)
n=1 n=1
This is ∞
2t
X
u(x, t) = cn sin(nπx)e−(nπ)
n=1

for the heat equation (notice decaying exponentials as the system settles towards its steady-
state / thermal equilibrium) and

i 2t
X
u(x, t) = cn sin(nπx)e− 2 (nπ)
n=1

for the Schrodinger equation.

Laplace equation in rectilinear coordinates


Let’s solve the Laplace equation in rectilinear coordinates

∂2 ∂2
u(x, y) + u(x, y) = 0
∂x2 ∂y 2

on a square region [0, 1] × [0, 1] with boundary conditions

u(0, y) = u(1, y) = 0

and
u(x, 0) = u(x, 1) = F (x)
Separation of variables, u(x, t) √= f (x)g(y) implies that if f 00 (x) = λf (x), then g 00 (y) =

−λg(y), with solutions g(y) = e± −λy , since λ < 0. Specificaly, λn = −(nπ)2 , so −λ =
nπ and gn (y) = an enπy + bn e−nπy . The general solution to the the Laplace equation with
u(0, y) = u(1, y) = 0 is then

X
fn (x) an enπy + bn e−nπy

u(x, y) =
n=1

Now, let’s impose boundary conditions u(x, 0) = u(x, 1) = F (x):



X
u(x, 0) = (an + bn )fn (x) = F (x)
n=1


X
an enπ + bn e−nπ fn (x) = F (x)

u(x, 1) =
n=1

The coefficients in F (x) need to be matched. For example, for n = 3, F (x) contains a term
− 19 f3 . So, we must have that a3 +b3 = − 19 and (an e3π + bn e−3π ) = − 19 . This can be solved for
3π −1 −3π e3π
a3 and b3 : a3 = − 19 ee6π −1 = − 19 e3π1+1 and b3 = − 19 ee−6π −1
−1
= − 91 e−3π1 +1 = − 91 e3π +1
. Similarly,
we can compute the other nonzero coefficients.
A shortcut involves realizing that the boundary conditions are symmetric under reflecting
y to 1 − y. A symmetric combination of exponential functions is called the hyperbolic cosine,
cosh z = 12 (ez + e−z ). cosh(y − 12 ) is shifted so that it is clearly symmetric under y → (1 − y),
as cosh((1 − y) − 21 ) = cosh( 12 − y) = cosh(y − 12 ). An antisymmetric combination of
exponential functions is called the hyperbolic sine, sinh z = 12 (ez − e−z ). sinh(y) is an
antisymetric function and zero at y = 0; sinh(y − 21 ) is zero at y = 1/2 and antisymmetric
under y → (1 − y), since sinh((1 − y) − 12 ) = sinh( 12 − y) = − sinh(y − 12 ). Using these
functions we can write a different formula for the general solution:
∞  
X 1 1
u(x, y) = fn (x) cn cosh(nπ(y − )) + dn sinh(nπ(y − ))
n=1
2 2

Since we want our solution to be symmetric under y → 1−y, we set dn = 0. Then, substitute

X 1
u(x, 0) = u(x, 1) = cn cosh(nπ( ))fn (x) = F (x)
n=1
2

to read of that cn is the coefficient of fn in F (x) divided by cosh(nπ( 21 )).


This shortcut involves a lot less algebra, but more deep thinking.

Laplace equation in polar coordinates


Today, we will focus on the Laplace equation in cylindrical coordinates:

1 ∂2
 
1 ∂ ∂
r u(r, θ) + 2 2 u(r, θ) = 0
r ∂r ∂r r ∂θ

One interpretation of solutions to this equation is equilibrium (steady-state) temperature


distribution.
You studied this equation in HW 1B. Let’s review your results. Separating variables;
u(r, θ) = f (r)g(θ) gives
g 00 (θ) = −k 2 g(θ)
Periodic boundary conditions in θ:

g(θ + pπ) = g(θ)

imply that k = n is an integer and


gn = einθ
The corresponding r equation is then

n2
 
1 ∂ ∂
r f (r) − 2 f (r) = 0
r ∂r ∂r r

Substitute the ansatz f (r) = rp without expanding the derivative term:


 
1 ∂ ∂ p 1 ∂
r r = (prp ) = p2 rp−2
r ∂r ∂r r ∂r
so the equation becomes
p2 rp−2 − n2 rp−2 = 0
rp−2 cancels out, and the solutions are p = ±n, g(r) = r±n , except for n = 0 where we need
a second solution, and the solutions are r0 = 1 and ln r.
The general solution to the laplace equation is therefore
n=∞
X
einθ an rn + bn r−n

u(r, θ) = a0 + b0 ln r +
n=−∞,n6=0

Polar coordinates are well adapted to specifying boundary conditions that lie on circles. Let’s
try solving the Laplace equation on a disk of radius 1: r < 1, with boundary conditions

u(1, θ) = cos(2θ)

Substituting r = 1 in solution to the laplace equation above we get


n=∞
X 1 1
u(1, θ) = a0 + einθ (an + bn ) = cos 2θ = e2iθ + e−2iθ
n=−∞,n6=0
2 2

Clearly, we want a2 + b2 = a−2 + b−2 = 12 . This is not sufficient information. There is another
boundary condition implicit in this question: to get a smooth solution inside the disk, you
need to throw out any terms that blow up at 0. For example, b2 is multiplied by r−2 , which
blows up at zero and therefore b2 = 0. Similarly, we set a−2 = 0. Then, a2 = b−2 = 12 and we
obtain a smooth solution with required boundary conditions: u(r, θ) = 21 r2 (e2iθ + e−2iθ) =
r2 cos(2θ).
We could have removed all terms that are not finite at r = 0 from the general solution to
begin with (like you did in HW 1B):
n=∞
X n=−1
X
u(r, θ) = a0 + n inθ
an r e + bn r−n einθ
n=1 n=−∞

Now, using −n = |n| for n < 0 and renaming coefficients: a0 = c0 , an = cn for n positive,
bn = cn for n negative, we get a nice formula
n=∞
X
u(r, θ) = cn r|n| einθ
n=−∞

which is valid anytime the origin r = 0 is included in the region of interest.


Another (and sometimes more convenient) way to write the general solution is
n=∞
X
rn An einθ + Bn e−inθ

u(r, θ) = A0 + B0 ln r +
n=−∞,n6=0
and even n=∞
X
u(r, θ) = A0 + B0 ln r + rn (Cn cos(nθ) + Dn sin(nθ))
n=−∞,n6=0

As another example, let’s consider a different region and a different boundary condition:

1 < r < 2

u(1, θ) = 0
u(2, θ) = cos(2θ)
This time, the origin is not included in the region, so we need the complete general solution:
n=∞
X
einθ an rn + bn r−n

u(r, θ) = a0 + b0 ln r +
n=−∞,n6=0

Substitute our required boundary conditions:


n=∞
X
u(1, θ) = a0 + + einθ (an + bn ) = 0
n=−∞,n6=0

n=∞
X 1 1
einθ 2n an + 2−n bn = cos(2θ) = e2iθ + e−2iθ

u(2, θ) = a0 + b0 ln 2 +
n=−∞,n6=0
2 2

All coefficients can be set to zero except for a±2 and b±2 . For these four, the constraints are

a2 + b2 = a−2 + b−2 = 0

1 1 1
4a2 + b2 = a−2 + 4b−2 =
4 4 2
1 1

Therefore, a2 = −b2 = b−2 = −a−2 = 2 / 4 − 4 = 2/15. The desired solution is
 
4 2 1
u(r, θ) = r − 2 cos(2θ)
15 r

You might also like