Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions...

8
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 A n and B n . 1. Let ϕ(x)= x 2 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 C n := Z 1 0 e iπnx x 2 dx = - Z 1 0 2 iπn e iπnx x dx + 1 iπn e iπnx x 2 1 0 = Z 1 0 2 (iπn) 2 e iπnx dx - 2 (iπn) 2 e iπnx x 1 0 + 1 iπn e iπn = 2 (iπn) 3 e iπnx 1 0 - 2 (iπn) 2 e iπn + 1 iπn e iπn = 2 (iπn) 3 e iπn - 2 (iπn) 3 - 2 (iπn) 2 e iπn + 1 iπn e iπn Simplifying the above using the fact that i 2 = -1, i 3 = -i and 1/i = -i we have C n = e inπ 2 π 2 n 2 + i 2 π 3 n 3 - 1 πn - 2i π 3 n 3 = (cos()+ i sin()) 2 π 2 n 2 + i 2 π 3 n 3 - 1 πn - 2i π 3 n 3 = 2 π 2 n 2 cos()+ 1 πn - 2 π 3 n 3 sin(πn) + i 2 π 2 n 2 sin()+ 2 π 3 n 3 - 1 πn cos() - 2 π 3 n 3 . Notice that the coefficients of the Fourier sine series are B n =2 Z 1 0 x 2 sin(πnx) dx =2Im(C n )= 4 π 2 n 2 sin()+2 2 π 3 n 3 - 1 πn cos()- 4 π 3 n 3 , and the coefficients of the Fourier cosine series are A n =2 Z 1 0 x 2 cos(πnx) dx =2Re(C n )= 4 π 2 n 2 cos()+2 1 πn - 2 π 3 n 3 sin(πn), for n 1 and A 0 =2 R 1 0 x 2 dx = 2 3 . (b) Calculate the Fourier cosine series for ϕ.

Transcript of Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions...

Page 1: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

Math 5587 – Homework 5 Solutions

In any question that asks for a series representation for the solution of a PDE, you do notneed 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. Integratingby parts twice we have

Cn :=

∫ 1

0eiπnxx2 dx

=−∫ 1

0

2

iπneiπnxx dx+

1

iπneiπnxx2

∣∣∣10

=

∫ 1

0

2

(iπn)2eiπnx dx− 2

(iπn)2eiπnxx

∣∣∣10+

1

iπneiπn

=2

(iπn)3eiπnx

∣∣∣10− 2

(iπn)2eiπn +

1

iπneiπn

=2

(iπn)3eiπn − 2

(iπn)3− 2

(iπn)2eiπn +

1

iπneiπn

Simplifying the above using the fact that i2 = −1, i3 = −i and 1/i = −i we have

Cn = einπ(

2

π2n2+ i

(2

π3n3− 1

πn

))− 2i

π3n3

= (cos(nπ) + i sin(nπ))

(2

π2n2+ i

(2

π3n3− 1

πn

))− 2i

π3n3

=2

π2n2cos(nπ) +

(1

πn− 2

π3n3

)sin(πn)

+ i

(2

π2n2sin(nπ) +

(2

π3n3− 1

πn

)cos(nπ)− 2

π3n3

).

Notice that the coefficients of the Fourier sine series are

Bn = 2

∫ 1

0x2 sin(πnx) dx = 2Im(Cn) =

4

π2n2sin(nπ)+2

(2

π3n3− 1

πn

)cos(nπ)− 4

π3n3,

and the coefficients of the Fourier cosine series are

An = 2

∫ 1

0x2 cos(πnx) dx = 2Re(Cn) =

4

π2n2cos(nπ) + 2

(1

πn− 2

π3n3

)sin(πn),

for n ≥ 1 and A0 = 2∫ 10 x

2 dx = 23 .

(b) Calculate the Fourier cosine series for ϕ.

Page 2: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

2. Find the Fourier cosine series of the function sin(x) in the interval (0, π). Use it tocompute the sums

∞∑n=1

1

4n2 − 1and

∞∑n=1

(−1)n

4n2 − 1.

Solution. The coefficients of the Fourier cosine series are

An =2

π

∫ π

0sin(x) cos(nx) dx.

Whenever you need to work out a trig identity, use Euler’s formula

eiθ = cos θ + i sin θ

which can be rearranged to obtain

cos θ =1

2(eiθ + e−iθ) and sin θ =

1

2i(eiθ − e−iθ).

Here we have

sin(x) cos(nx) =1

4i

(eix − e−ix

) (einx + e−inx

)=

1

4i

(ei(n+1)x + e−i(n−1)x − ei(n−1)x − e−i(n+1)x

)=

1

4i

(ei(n+1)x − e−i(n+1)x + e−i(n−1)x − ei(n−1)x

)=

1

4i(2i sin((n+ 1)x)− 2i sin((n− 1)x))

=1

2sin((n+ 1)x)− 1

2sin((n− 1)x).

Therefore

πAn =

∫ π

0sin((n+ 1)x) dx−

∫ π

0sin((n− 1)x) dx

=1− cos((n+ 1)π)

n+ 1+

cos((n− 1)π)− 1

n− 1,

for n ≥ 2. Noticing that cos((n+ 1)π) = cos((n− 1)π) = −(−1)n we have

πAn =1 + (−1)n

n+ 1+−(−1)n − 1

n− 1=

(1 + (−1)n)(n− 1)− (1 + (−1)n)(n+ 1)

(n− 1)(n+ 1)=−2(1 + (−1)n)

n2 − 1

for n ≥ 2. We also have

A1 =2

π

∫ π

0sin(2x) dx = 0 and A0 =

2

π

∫ π

0sin(x) = − 2

πcos(x)

∣∣π0= − 2

π(−1−1) = 4

π.

Therefore

An =

−4

π(n2 − 1), if n even,

0, if n odd.

2

Page 3: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

Hence sin(x) is given by the cosine series

sin(x) =2

π− 4

π

∞∑n=1

cos(2nx)

4n2 − 1

for 0 ≤ x ≤ π. If we set x = 0, then

0 =2

π− 4

π

∞∑n=1

1

4n2 − 1.

Therefore∞∑n=1

1

4n2 − 1=

1

2.

If we set x = π/2, then we have cos(nπ) = (−1)n and hence

1 =2

π− 4

π

∞∑n=1

(−1)n

4n2 − 1.

Therefore∞∑n=1

(−1)n

4n2 − 1=

1

2− π

4=

2− π4

.

3. (a) Use the Fourier expansion to explain why the note produced by a violin string risesby one octave when the string is clamped exactly at its midpoint. [Each increaseby an octave corresponds to a doubling of the frequency.]

Solution. Recall from class we deduced that the fundamental frequeny of a vibratingstring is

f1 =1

2`

√κ

ρ,

where ` is the length of the string, κ is the tension, and ρ is the density. Clampingthe string at its midpoint divides the length of the string in half, and does not affectthe tension or density. Hence the frequency is doubled, by observing the formulaabove.

(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 thetension κ. So when the string is tightened, so tension increases, the frequency alsoincreases.

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 separa-

tion of variables to find a representation formula for u(x, t) as a series.

3

Page 4: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

Solution. Using separation of variables, we guess a solution of the form

u(x, t) = X(x)T (t),

and find that0 = ut − iuxx = X(x)T ′(t)− iX ′′(x)T (t).

Separating variables yieldsX ′′(x)

X(x)=T ′(t)

iT (t).

ThereforeX ′′(x) + λX(x) = 0, X(0) = X(l) = 0,

andT ′(t) + iλT (t) = 0.

As we showed in class, for Dirichlet boundary conditions the eigenvalues are λn = (πn/l)2

and the eigenfunctions areXn(x) = sin

(πnxl

).

The solutions of the second ODE are therefore

Tn(t) = Ane−iλnt = Ane

−i(πn/l)2t.

Therefore, a series representation of the solution u of Schrödinger’s equation is

u(x, t) =∞∑n=1

Ane−i(πn/l)2t sin

(πnxl

)=∞∑n=1

An

(cos

(π2n2

l2t

)− i sin

(π2n2

l2t

))sin(πnx

l

).

Notice this more closely resembles a solution of the wave equation than a solution of theheat equation. Hence the complex number i in Schrödinger’s equation plays a big rolein determining the behavior of the solution.

5. Consider waves in a resistant medium, which satisfy the equation

(W)

utt − c2uxx + rut = 0, 0 < x < `, t > 0

u(x, 0) = ϕ(x), 0 < x < `

ut(x, 0) = ψ(x), 0 < x < `

u(0, t) = u(`, t) = 0 t > 0,

where r is a constant, 0 < r < 2πc/`. Use separation of variables to write down theseries expansion of the solution.

Solution. We again guess the from u(x, t) = X(x)T (t) and find that

0 = utt − c2uxx + rut = X(x)T ′′(t)− c2X ′′(x)T (t) + rX(x)T ′(t).

Separating variables we have

c2T (t)X ′′(x) = (T ′′(t) + rT ′(t))X(x),

4

Page 5: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

orX ′′(x)

X(x)=T ′′(t) + rT ′(t)

c2T (t).

Therefore we have the ODE

X ′′(x) + λX(x) = 0, X(0) = X(l) = 0,

andT ′′(t) + rT ′(t) + c2λT (t) = 0.

As we again have Dirichlet boundary conditions, the eigenvalues are λn = (πn/l)2 andthe eigenfunctions are

Xn(x) = sin(πnx

l

).

To solve for T we write down the characteristic polynomial

ξ2n + rξn + c2λn = 0,

which has roots

ξn =−r ±

√r2 − 4c2λn2

.

Since 0 < r < 2πc/l and λn ≥ λ1 = (π/l)2, we have r2 < 4c2λ2n for all n. Therefore, theroots are both complex valued

ξ1n =1

2

(−r + i

√4c2λ2n − r2

)and ξ2n =

1

2

(−r − i

√4c2λ2n − r2

).

The solutions of the ODE for T are

T 1n(t) = exp(ξ1nt) = e−rt/2eit

√4c2λn−r2/2,

andT 2n(t) = exp(ξ2nt) = e−rt/2e−it

√4c2λn−r2/2.

To find two linearly independent real-valued solutions, we form (T 1n + T 2

n)/2 and (T 1n −

T 2n)/2i to find the general form

Tn(t) = e−rt/2[An cos

(t

2

√4c2λn − r2

)+Bn sin

(t

2

√4c2λn − r2

)].

Therefore, the series representation of the solution is

u(x, t) =

∞∑n=1

e−rt/2[An cos

(t

2

√4c2λn − r2

)+Bn sin

(t

2

√4c2λn − r2

)]sin(πnx

l

),

where λn = (πn/l)2.

6. Consider the wave equation utt = c2uxx for 0 < x < ` with boundary conditionsux(0, t) = u(`, t) = 0.

5

Page 6: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

(a) Show that the eigenfunctions are Xn(x) = cos((n+ 1

2)πx/`).

Solution. We have a lot of similar questions on the homework, so I will sketchthe solution here. Use separation of variables and look for a solution in the formu(x, t) = X(x)T (t). We find that

X ′′(x) + λX(x) = 0 and X ′(0) = 0 = X(`),

andT ′′(t) + λc2T (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 implies b = 0. Then X(`) = 0 implies thatcos(√λ`) = 0. The zeros of cos are at x = π/2 + nπ for n = 0, 1, 2, . . . . Hence

√λ` =

π

2+ nπ, n = 0, 1, 2, 3, 4, 5, . . . ,

and so

λn =

((n+ 1

2)π

`

)2

, n = 0, 1, 2, 3, 4, 5, . . . .

Finally, the eigenfunctions X(x) are

Xn(x) = cos(√λnx) = cos

((n+ 1

2)π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+ 1

2)πct

`

)+Bn sin

((n+ 1

2)πct

`

).

The full series solution of the PDE Is

u(x, t) =∞∑n=0

(An cos

((n+ 1

2)πct

`

)+Bn sin

((n+ 1

2)πct

`

))cos

((n+ 1

2)πx

`

).

6

Page 7: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

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 ofthe diffusing substance satisfies

ut − kuxx = 0, − ` < x < `, t > 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 sketchthe solution here. Using separation of variables we guess solutions of the formu(x, t) = X(x)T (t) and find that

X ′′(x) + λX(x) = 0 and X(−`) = X(`), X ′(−`) = X ′(`),

andT ′(t) + kλT (t) = 0.

When λ = 0, we get a constant solution X(x) = C. When λ < 0, the generalsolution is

X(x) = ae−γx + beγx,

where γ =√−λ. Using X(−`) = X(`) we have a = b. Using X ′(−`) = X ′(`) 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 ′(`) = X ′(−`) = 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(πnx

`

)+Bn sin

(πnx`

).

7

Page 8: Math5587–Homework5Solutionsjwcalder/5587F16/hw5_sol.pdfMath5587–Homework5Solutions InanyquestionthatasksforaseriesrepresentationforthesolutionofaPDE,youdonot needtogiveformulasforthecoefficientsA

(b) Show that the concentration is

u(x, t) =1

2A0 +

∞∑n=1

(An cos

(πnx`

)+Bn sin

(πnx`

))exp

(−n2π2kt

`2

).

Solution. We just need to solve for T . We have

T (t) = Ce−kλt,

soTn(t) = Ce−k(

πn` )

2t.

The series representation is then

u(x, t) =1

2A0 +

∞∑n=1

Xn(x, t)Tn(x, t),

which is exactly what is stated in the question.

8