Lecture5 Worksheet Solns
Lecture5 Worksheet Solns
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.
f 00 (x) = λf (x)
f (x) = f (1) = 0
and showed that the solutions are
∂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
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
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
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
∂2 ∂2
u(x, y) + u(x, y) = 0
∂x2 ∂y 2
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
∞
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
1 ∂2
1 ∂ ∂
r u(r, θ) + 2 2 u(r, θ) = 0
r ∂r ∂r r ∂θ
n2
1 ∂ ∂
r f (r) − 2 f (r) = 0
r ∂r ∂r r
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θ)
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=−∞
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
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