Math 5587 – Homework 5 Solutions - Math-UMN

Math 5587 – Homework 5 Solutions
In any question that asks for a series representation for the solution of a PDE, you do not
need to give formulas for the coefficients An and Bn .
1. Let ϕ(x) = x2 for 0 ≤ x ≤ 1 = `.
(a) Calculate the Fourier sine series for ϕ.
Solution. We’ll do a complexification trick to get both series at once. Integrating
by parts twice we have
Z 1
eiπnx x2 dx
Cn :=
0
Z 1
2 iπnx
1 iπnx 2 1
=−
e
x dx +
e
x iπn
0
0 iπn
Z 1
1
2
2
1 iπn
iπnx
iπnx =
e
dx −
e
x +
e
2
2
(iπn)
(iπn)
iπn
0
0
1
2
2
1 iπn
iπnx =
e
eiπn +
e
−
3
2
(iπn)
(iπn)
iπn
0
2
2
2
1 iπn
=
eiπn −
−
eiπn +
e
3
3
2
(iπn)
(iπn)
(iπn)
iπn
Simplifying the above using the fact that i2 = −1, i3 = −i and 1/i = −i we have
2
2
1
2i
inπ
Cn = e
+i
−
− 3 3
2
2
3
3
π n
π n
πn
π n
2
1
2i
2
+i
−
− 3 3
= (cos(nπ) + i sin(nπ))
2
2
3
3
π n
π n
πn
π n
2
1
2
= 2 2 cos(nπ) +
sin(πn)
−
π n
πn π 3 n3
2
2
1
2
+i
sin(nπ) +
−
cos(nπ) − 3 3 .
π 2 n2
π 3 n3 πn
π n
Notice that the coefficients of the Fourier sine series are
Z 1
4
2
1
4
2
Bn = 2
−
cos(nπ)− 3 3 ,
x sin(πnx) dx = 2Im(Cn ) = 2 2 sin(nπ)+2
3 n3
π
n
π
πn
π
n
0
and the coefficients of the Fourier cosine series are
Z 1
4
1
2
2
An = 2
x cos(πnx) dx = 2Re(Cn ) = 2 2 cos(nπ) + 2
−
sin(πn),
π n
πn π 3 n3
0
for n ≥ 1 and A0 = 2
R1
0
x2 dx = 23 .
(b) Calculate the Fourier cosine series for ϕ.
2. Find the Fourier cosine series of the function sin(x) in the interval (0, π). Use it to
compute the sums
∞
∞
X
X
1
(−1)n
and
.
4n2 − 1
4n2 − 1
n=1
n=1
Solution. The coefficients of the Fourier cosine series are
Z
2 π
sin(x) cos(nx) dx.
An =
π 0
Whenever you need to work out a trig identity, use Euler’s formula
eiθ = cos θ + i sin θ
which can be rearranged to obtain
1
cos θ = (eiθ + e−iθ ) and
2
sin θ =
1 iθ
(e − e−iθ ).
2i
Here we have
sin(x) cos(nx) =
=
=
=
=
1 ix
e − e−ix einx + e−inx
4i
1 i(n+1)x
e
+ e−i(n−1)x − ei(n−1)x − e−i(n+1)x
4i
1 i(n+1)x
e
− e−i(n+1)x + e−i(n−1)x − ei(n−1)x
4i
1
(2i sin((n + 1)x) − 2i sin((n − 1)x))
4i
1
1
sin((n + 1)x) − sin((n − 1)x).
2
2
Therefore
Z
π
Z
sin((n + 1)x) dx −
πAn =
sin((n − 1)x) dx
0
0
=
π
1 − cos((n + 1)π) cos((n − 1)π) − 1
+
,
n+1
n−1
for n ≥ 2. Noticing that cos((n + 1)π) = cos((n − 1)π) = −(−1)n we have
πAn =
1 + (−1)n −(−1)n − 1
(1 + (−1)n )(n − 1) − (1 + (−1)n )(n + 1)
−2(1 + (−1)n )
+
=
=
n+1
n−1
(n − 1)(n + 1)
n2 − 1
for n ≥ 2. We also have
Z
Z
π
2 π
2 π
2
2
4
A1 =
sin(2x) dx = 0 and A0 =
sin(x) = − cos(x)0 = − (−1−1) = .
π 0
π 0
π
π
π
Therefore
−4
, if n even,
An = π(n2 − 1)

0,
if n odd.


2
Hence sin(x) is given by the cosine series
∞
2
4 X cos(2nx)
sin(x) = −
π π
4n2 − 1
n=1
for 0 ≤ x ≤ π. If we set x = 0, then
0=
∞
1
2
4X
−
.
π π
4n2 − 1
n=1
Therefore
∞
X
n=1
1
1
= .
4n2 − 1
2
If we set x = π/2, then we have cos(nπ) = (−1)n and hence
∞
2
4 X (−1)n
1= −
.
π π
4n2 − 1
n=1
Therefore
∞
X
1 π
2−π
(−1)n
= − =
.
2
4n − 1
2 4
4
n=1
3. (a) Use the Fourier expansion to explain why the note produced by a violin string rises
by one octave when the string is clamped exactly at its midpoint. [Each increase
by an octave corresponds to a doubling of the frequency.]
Solution. Recall from class we deduced that the fundamental frequeny of a vibrating
string is
r
1 κ
f1 =
,
2` ρ
where ` is the length of the string, κ is the tension, and ρ is the density. Clamping
the string at its midpoint divides the length of the string in half, and does not affect
the tension or density. Hence the frequency is doubled, by observing the formula
above.
(b) Explain why the pitch of the note rises when the string is tightened.
Solution. Again, observing the formula above, f1 is an increasing function of the
tension κ. So when the string is tightened, so tension increases, the frequency also
increases.
4. A quantum-mechanical particle on the line with an infinite potential outside the interval
(0, `) (“particle in a box”) is described by Schrödinger’s equation
ut = iuxx
√
on (0, `),
where i = −1, with Dirichlet conditions u(0, t) = u(`, t) = 0 at the ends. Use separation of variables to find a representation formula for u(x, t) as a series.
3
Solution. Using separation of variables, we guess a solution of the form
u(x, t) = X(x)T (t),
and find that
0 = ut − iuxx = X(x)T 0 (t) − iX 00 (x)T (t).
Separating variables yields
T 0 (t)
X 00 (x)
=
.
X(x)
iT (t)
Therefore
X 00 (x) + λX(x) = 0,
X(0) = X(l) = 0,
and
T 0 (t) + iλT (t) = 0.
As we showed in class, for Dirichlet boundary conditions the eigenvalues are λn = (πn/l)2
and the eigenfunctions are
πnx Xn (x) = sin
.
l
The solutions of the second ODE are therefore
2
Tn (t) = An e−iλn t = An e−i(πn/l) t .
Therefore, a series representation of the solution u of Schrödinger’s equation is
2 2 2 2 ∞
∞
πnx X
πnx X
π n
π n
−i(πn/l)2 t
=
An cos
.
u(x, t) =
An e
sin
t
−
i
sin
t
sin
l
l2
l2
l
n=1
n=1
Notice this more closely resembles a solution of the wave equation than a solution of the
heat equation. Hence the complex number i in Schrödinger’s equation plays a big role
in determining the behavior of the solution.
5. Consider waves in a resistant medium, which satisfy

utt − c2 uxx + rut = 0,




u(x, 0) = ϕ(x),
(W)

ut (x, 0) = ψ(x),



u(0, t) = u(`, t) = 0
the equation
0 < x < `, t > 0
0<x<`
0<x<`
t > 0,
where r is a constant, 0 < r < 2πc/`. Use separation of variables to write down the
series expansion of the solution.
Solution. We again guess the from u(x, t) = X(x)T (t) and find that
0 = utt − c2 uxx + rut = X(x)T 00 (t) − c2 X 00 (x)T (t) + rX(x)T 0 (t).
Separating variables we have
c2 T (t)X 00 (x) = (T 00 (t) + rT 0 (t))X(x),
4
or
X 00 (x)
T 00 (t) + rT 0 (t)
=
.
X(x)
c2 T (t)
Therefore we have the ODE
X 00 (x) + λX(x) = 0,
X(0) = X(l) = 0,
and
T 00 (t) + rT 0 (t) + c2 λT (t) = 0.
As we again have Dirichlet boundary conditions, the eigenvalues are λn = (πn/l)2 and
the eigenfunctions are
πnx .
Xn (x) = sin
l
To solve for T we write down the characteristic polynomial
ξn2 + rξn + c2 λn = 0,
which has roots
ξn =
−r ±
√
r2 − 4c2 λn
.
2
Since 0 < r < 2πc/l and λn ≥ λ1 = (π/l)2 , we have r2 < 4c2 λ2n for all n. Therefore, the
roots are both complex valued
ξn1 =
p
1
−r + i 4c2 λ2n − r2
2
p
1
−r − i 4c2 λ2n − r2 .
2
and ξn2 =
The solutions of the ODE for T are
Tn1 (t) = exp(ξn1 t) = e−rt/2 eit
√
and
Tn2 (t) = exp(ξn2 t) = e−rt/2 e−it
4c2 λn −r2 /2
√
,
4c2 λn −r2 /2
.
To find two linearly independent real-valued solutions, we form (Tn1 + Tn2 )/2 and (Tn1 −
Tn2 )/2i to find the general form
p
p
t
t
−rt/2
2
2
2
2
Tn (t) = e
An cos
4c λn − r + Bn sin
4c λn − r
.
2
2
Therefore, the series representation of the solution is
u(x, t) =
∞
X
e
−rt/2
n=1
p
p
πnx t
t
2
2
2
2
An cos
4c λn − r + Bn sin
4c λn − r
sin
,
2
2
l
where λn = (πn/l)2 .
6. Consider the wave equation utt = c2 uxx for 0 < x < ` with boundary conditions
ux (0, t) = u(`, t) = 0.
5
(a) Show that the eigenfunctions are Xn (x) = cos (n + 12 )πx/` .
Solution. We have a lot of similar questions on the homework, so I will sketch
the solution here. Use separation of variables and look for a solution in the form
u(x, t) = X(x)T (t). We find that
X 00 (x) + λX(x) = 0 and X 0 (0) = 0 = X(`),
and
T 00 (t) + λc2 T (t) = 0.
When λ = 0, we have X(x) = ax+b, and the boundary conditions imply a = b = 0,
so this is trivial.
√
When λ < 0, write γ = −λ so γ 2 = λ. Then the general solution is
X(x) = ae−γx + beγx .
Invoking the boundary conditions again gives a = b = 0, so this is trivial.
Finally, when λ > 0 the general solution is
√
√
X(x) = a cos( λx) + b sin( λx).
The√boundary condition X 0 (0) = 0 implies b = 0. Then X(`) = 0 implies that
cos( λ`) = 0. The zeros of cos are at x = π/2 + nπ for n = 0, 1, 2, . . . . Hence
√
π
λ` = + nπ, n = 0, 1, 2, 3, 4, 5, . . . ,
2
and so
λn =
(n + 21 )π
`
!2
, n = 0, 1, 2, 3, 4, 5, . . . .
Finally, the eigenfunctions X(x) are
p
Xn (x) = cos( λn x) = cos
(n + 12 )πx
`
!
.
(b) Write down the series expansion for a solution u(x, t).
Solution. To solve the PDE, we also need T (t). Solving this ODE we have
√
√
T (t) = A cos( λct) + B sin( λct).
Therefore
Tn (t) = An cos
(n + 12 )πct
`
!
+ Bn sin
The full series solution of the PDE Is
!
∞
X
(n + 12 )πct
+ Bn sin
u(x, t) =
An cos
`
n=0
6
(n + 12 )πct
`
(n + 12 )πct
`
!
!!
cos
.
(n + 12 )πx
`
!
.
7. Consider diffusion inside an enclosed circular tube. Let its length (circumference) be 2`.
Let x denote the arc length parameter where −` ≤ x ≤ `. Then the concentration of
the diffusing substance satisfies

− ` < x < `, t > 0

 ut − kuxx = 0,
u(−`, t) = u(`, t) t > 0


ux (−`, t) = ux (`, t) t > 0.
These are called periodic boundary conditions.
(a) Show that the eigenvalues are λ = (nπ/`)2 for n = 0, 1, 2, 3, . . . .
Solution. We have a lot of similar questions on the homework, so I will sketch
the solution here. Using separation of variables we guess solutions of the form
u(x, t) = X(x)T (t) and find that
X 00 (x) + λX(x) = 0 and X(−`) = X(`), X 0 (−`) = X 0 (`),
and
T 0 (t) + kλT (t) = 0.
When λ = 0, we get a constant solution X(x) = C. When λ < 0, the general
solution is
X(x) = ae−γx + beγx ,
√
where γ = −λ. Using X(−`) = X(`) we have a = b. Using X 0 (−`) = X 0 (`) gives
a = b = 0, so we have the trivial zero solution here.
For λ > 0 the general solution is
√
√
X(x) = a cos( λx) + b sin( λx).
Using the boundary conditions we have
√
√
√
√
a cos( λ`) + b sin( λ`) = X(`) = X(−`) = a cos( λ`) − b sin( λ`),
and
√
√
√
√
√
√
√
√
−a λ sin( λ`)+b λ cos( λ`) = X 0 (`) = X 0 (−`) = a λ sin( λ`)+b λ cos( λ`).
√
√
Both are true when sin( λ`) = 0, hence we get λ` = πn for n ≥ 1 or
λn =
πn 2
`
,
n = 0, 2, 3, 4, . . . ,
and the eigenfunctions are
Xn (x) = An cos
7
πnx `
+ Bn sin
πnx `
.
(b) Show that the concentration is
∞
πnx πnx X
1
+ Bn sin
exp
u(x, t) = A0 +
An cos
2
`
`
n=1
Solution. We just need to solve for T . We have
T (t) = Ce−kλt ,
so
Tn (t) = Ce−k(
πn 2
t
`
) .
The series representation is then
∞
X
1
u(x, t) = A0 +
Xn (x, t)Tn (x, t),
2
n=1
which is exactly what is stated in the question.
8
−n2 π 2 kt
`2
.