MATH 4220 (2012-13) Partial differential equations
CUHK
Suggested Answer to Assignment 5 Suggested Answer to Exercise 5.1 2.Let φ(x) = x2 for 0 ≤ x ≤ 1 = l. (a) Calculate its Fourier sine series. (b) Calculate its Fourier cosine series. Answer: (a) 1
x2 cos mπx |10 + Am =2 x sin mπxdx = −2 mπ 0 2 8 =(−1)m+1 − 3 3. mπ m π Z
2
1
Z 0
4x cos mπxdx mπ
2 for m odd, and (−1)m+1 mπ for m even. (b)
Z
1
x2 dx =
A0 = 2 0
1
2 3
x2 Am =2 x cos mπxdx = 2 sin mπx |10 − mπ 0 4 =(−1)m 2 2 . mπ Z
2
Z 0
1
4x cos mπxdx mπ
4.Find the Fourier cosine series of the function of | sin x| in the interval (−π, π). Use it to find the sums ∞ ∞ X X (−1)n 1 and . 4n2 − 1 4n2 − 1 n=1 n=1 Answer: To find the Fourier series of the function f (x) = |sin(x)|, we first note that this is an even function so that it has a cos-series. If we integrate from 0 to π and multiply the result by 2, we can take the function sin(x) instead of |sin(x)| so that √ Z 2 π sin x 2 2 √ dx = a0 = , π 0 π 2 Z 2 π 4 an = sin x cos nxdx = π 0 (1 − n2 )π for n even and an = 0 for n odd. Hence, we have f (x) =
2 4 cos 2x cos 4x cos 6x − ( 2 + + + · · · ). π π 2 − 1 42 − 1 62 − 1
Substituting x = 0 and x = π2 , we will get the sums are 21 and 12 − π4 respectively. 5. Given the Fourier sine series of f (x) = x on (0, l), assume that the series can be integrated term by term, a fact that will be shown later. 1
MATH 4220 (2012-13) Partial differential equations
CUHK
a) Find the Fourier cosine series for x2 /2. Find the constant of integration that will be the first term in the cosine series. P (−1)n+1 b) By by setting x = 0 in your result, find the sum of the series ∞ . n=1 n2 Answer: (a) From p. 109 we have x=
∞ X
(−1)m+1
m=1
2l mπx sin . mπ l
Integration of both sides gives Z
x
∞ X x2 2l2 mπx tdt = =c+ (−1)m 2 cos . 2 mπ l m=1
The constant of integration is the missing coefficient Z A0 1 l x2 l2 c= = dx = . 2 l 0 2 6 (b) By Setting x = 0 gives ∞
0= or
l2 X 2l2 (−1)m 2 2 , + 6 m=1 mπ
∞ X π2 (−1)m+1 = . 12 m=1 m2
8 A rod has length l = 1 and constant k = 1. Its temperature satisfies the heat equation. Its left end is held at temperature 0, its right end at temperature 1. Initially (at t = 0) the temperature is given by 5 2 φ(x) = x, 0 < x < 2 3
φ(x) = 3 − 2x,
2 < x < 1. 3
Find the solution, including the coefficients. Answer: The key point in the problem above is to solve the following PDE problem. ut − uxx = 0, u(x, 0) = φ(x), u(0, t) = u(1, t) = 0 3 x, 0 < x < 23 , 2 φ(x) = 3 − 3x, 23 < x < 1 P 2 Through a standard procedure of separation variable method, we obtain u(x, t) = an e−n t sin nπx, R1 where an = 2 0 φ(x) sin nπx = n29π2 sin 2πn ., therefore the solution T = u(x, t) + x. 3 9. Solve utt = c2 uxx for 0 < x < π, with the boundary conditions ux (0, t) = ux (π, t) = 0 and the initial conditions u(x, 0) = 0, ut (x, 0) = cos2 (x).
2
MATH 4220 (2012-13) Partial differential equations
CUHK
Answer: From Section 4.2.7, we see that the general formula to wave equation with Neumann boundary condition is ∞ X 1 (An cos nct + Bn sin nct) cos nx. u(x, t) = (A0 + B0 t) + 2 n=1
where
∞ X 1 φ(x) = A0 + An cos nx 2 n=1 ∞ X 1 ψ(x) = B0 + ncBn cos nx 2 n=1
Through calculation, we find that except B0 = 1, B2 = Therefore u(x, t) = 12 + sin 2ct cos 2x/(4c).
1 . 4c
The other coefficients are zero.
Suggested Answer to Exercise 5.2
2. Show that cos x + cos αx is periodic if α is a rational number. What is its period? Answer: Suppose α = p/q, where p, q are co-prime to each other. Then it is not difficult to see that S = 2qπ is a period of the function. Suppose 2qπ = mT, where T is the minimal period. Then cos x + cos αx = cos(x + T ) + cos(αx + αT ). Let x = 0, we have the above equality holds iff q/m, p/m are both integers. Therefore m = 1. Hence, we finish the problem. 5. Show that the fourier sine series on (0, l) can be derived from the full fourier series on ˜ (−l, l) as follows. Let φ(x) be any continuous function on (0, l). Let φ(x) be its odd extension. ˜ Write the full series of φ(x) on (−l.l). By Exercise 4, this series has only sine terms. Simply restrict your attention to 0 < x < l to get the sine series for φ(x). Rl . Then, we have Answer: Let am = 2l 0 φ(x) sin mπx l φ(x) =
∞ X
am sin mπx/l.
m=1
8 (a) Prove that differentiation switches even functions to odd ones, and odd functions to even ones. (b) Prove the same for integration provided that we ignore the constant of integration. Answer: (a). If f is even, f (−x) = f (x). Differentiating both sides gives −f (−x) = f (x), so f (−x) = −f (x), showing f is odd. If f is odd, f (−x) = −f (x). Therefore −f (−x) = −f (x) and so f (−x) = f (x), showing fR is even. R R (b). If f isR even, consider f (−x)dx = f (x)dx. Via substitution, u = −x, we have − f (u)du = f (x)dx. So, ignoring the constant of integration, F (−x) R = −F (x), showing F is odd, where F is an antiderivative of f . Similarly, for f odd, we have f (−x)dx = −f (x)dx, so F (−x) = F (x), showing F is even. 10. (a) Let φ(x) be a continuous function on (0, l). Under what conditions is its odd extension also a continuous function? (b) Let φ(x) be a differentiable function on (0, l). Under what conditions is its odd extension also a differentiable function? (c) Same as part (a) for the even extension. (d) Same as part (b) for the even extension. 3
MATH 4220 (2012-13) Partial differential equations
CUHK
Answer: (a) If φ is continuous on (0, l), φodd is continuous on (−l, l) if and only if limx→0+ φ(x) = 0. (b) If φ is differentiable on (0, l), φodd is differentiable on (−l, l) if and only if limx→0+ φ(x) exists, since φodd is an even function (see 5.2 8(a)), so the only thing to avoid is an infinite discontinuity at x = 0. (c) If φ is continuous on (0, l), φeven is continuous on (−l, l) if and only if limx→0+ φ(x) exists, since the only thing to avoid is an infinite discontinuity at x = 0. (d) If φ is differentiable on (0, l), φeven is differentiable on (−l, l) if and only if limx→0+ φ(x) = 0, since φ0even is odd, by 5.2 8(a).
Suggested Answer to Exercise 5.3
3. Consider utt = c2 uxx for 0 < x < l, with the boundary conditions u( 0, t) = 0, ux (l, t) = 0 and the initial conditions u( x, 0) = x, ut (x, 0) = 0. Find the solution explicitly in series form. Answer:Since X(0) = 0, by the odd extension X(−x) = −X(x) for −l < x < 0, then X satisfies X” + λX = 0, X 0 (−l) = X 0 (l) = 0. Hence 1 1 λ = [(n + )π]2 /(l2 ), Xn (x) = sin[(n + )πx/l], n = 0, 1, 2, . . . 2 2 Thus we obtain the general formula to this equation u(x, t) =
∞ X 0
[An cos
(n + 21 )πct (n + 21 )πct 1 + Bn sin ] sin[(n + )πx/l]. l l 2
By the boundary condition, we obtained that Bn are all zero, while An = (−1)n (n+ 2l 1 2 2. ) π
2 l
Rl
sin( 0
n+ 12 πx )x l
=
2
5(a).Show that the boundary conditions u(0, t) = 0, ux (l, t) = 0 lead to the eigenfunctions (n+ 1 )πx (sin( l2 ), . . .). Answer:Let u(x, t) = X(x)T (t), then −X 00 (x) = λX(x), X(0) = 0, X 0 (l) = 0. By Theorem 3, there is no negative eigenvalue. It is easy to check that 0 is not an eigenvalue. Hence there are only positive eigenvalues. Let λ = β 2 , β > 0, then we have X(x) = A cos βx + B sin βx Hence by the boundary conditions, we get A = 0, Bβ cos βl = 0. Thus
(n + 21 )π , n = 0, 1, 2, ... β= l 4
MATH 4220 (2012-13) Partial differential equations
CUHK
Therefore the eigenfunctions are (n + 12 )πx , n = 0, 1, 2, ... Xn (x) = sin l . 6.Find the complex eigenvalues of the first-derivative operator d/(dx) subject to the single boundary condition X(0) = X(1). Are the eigenfunctions orthogonal on the interval (0, 1) Answer:Let X 0 (x) = λX(x), λ ∈ C, then X(x) = eλx . By the boundary condition X(0) = X(1), we have eλ = 1. Hence λn = 2nπi, Xn (x) = e2nπxi , n ∈ Z. Since if m 6= m, Z
1
Z Xn (x)Xm (x)dx =
1
e2(n−m)πxi dx = 0.
0
0
Therefore the eigenfunctions are orthogonal on the interval (0, 1). 8. Show directly that (−X10 X2 + X1 X20 )|ba = 0 if both X1 and X2 satisfy the same Robin boundary condition at x = a and the same Robin boundary condition at x = b. Answer: If X10 (a) − aa X1 (a) = X20 (a) − aa X2 (a) = 0 and X10 (b) + ab X1 (b) = X20 (b) + ab X2 (b) = 0, then (−X10 X2 + X1 X20 )|ba = −X10 (b)X2 (b) + X1 (b)X20 (b) + X10 (a)X2 (a) − X1 (a)X20 (a) = ab X1 (b)X2 (b) − X1 (b)ab X2 (b) + aa X1 (a)X2 (a) − X1 (a)aa X2 (a) = 0. 9. Show that the boundary conditions X(b) = αX(a) + βX 0 (a) and X 0 (b) = γX(a) + δX 0 (a) on an interval a ≤ x ≤ b are symmetric if and only if αδ − βγ = 1. Answer: For j = 1, 2, suppose that Xj (b) = αXj (a) + βXj0 (a) and Xj0 (b) = γXj (a) + δXj0 (a). 5
MATH 4220 (2012-13) Partial differential equations
Then (X10 X2 − X1 X20 )|ba = X10 (b)X2 (b) − X1 (b)X20 (b) − X10 (a)X2 (a) + X1 (a)X20 (a) = γX1 (a) + δX10 (a) αX2 (a) + βX20 (a) − αX1 (a) + βX10 (a) γX2 (a) + δX20 (a) −X10 (a)X2 (a) + X1 (a)X20 (a) = (αδ − βγ − 1)X10 (a)X2 (a) + (1 + βγ − αδ)X1 (a)X20 (a) = (αδ − βγ − 1)(X1 X2 )0 |x=a . Therefore the boundary conditions are symmetric if and only if αδ − βγ = 1. 12. Prove Green’s first identity: For every pair of functions f (x), g(x) on (a, b), Z
b
b
Z
00
f 0 (x)g 0 (x) dx + f 0 g|ba .
f (x)g(x) dx = − a
a
Answer: By the divergence theorem, Z b Z b 0 b 0 0 f 00 (x)g(x) + f 0 (x)g 0 (x)dx, f g|a = (f (x)g(x)) dx = a
a
which implies Z
b
b
Z
00
f 0 (x)g 0 (x)dx + f 0 g|ba .
f (x)g(x)dx = − a
a
13.Use Green’s first identity to prove Theorem 3. Answer:Substitute f (x) = X(x) = g(x) in the Green’s first identity, we have Z
b
Z
00
b
X 02 (x)dx + (X 0 X)|ba ≤ 0.
X (x)X(x)dx = − a
a
Since −X 00 = λX, so Z −λ
b
X 2 (x)dx ≤ 0.
a
Therefore we get λ ≥ 0 since X 6≡ 0.
Suggested Answer to Exercise 5.4 1.
∞ P
(−1)n x2n is a geometric series.
n=0
(a) Does it converge pointwise in the interval −1 < x < 1? (b) Does it converge uniformly in the interval −1 < x < 1? (c) Does it converge in the L2 sense in the interval −1 < x < 1? (Hint: You can compute its partial sums explicitly.) Answer: Firstly, the partial sum is given by Sn =
1 − (−1)n x2n . 1 + x2 6
CUHK
MATH 4220 (2012-13) Partial differential equations
CUHK
1 1 (a) Obviously for any x0 fixed, Sn → 1+x 2 . Thus it converges to 1+x2 pointwise. 0 (b) Let xn = 1 − n1 , then x2n → e−2 . Thus it doesn’t converge uniformly. 1 2 (c) It will converge to S(x) ≡ 1+x 2 in the L sense since
Z
1
Z
2
1
x4n dx (1 + x2 )2
|Sn − S| dx = −1 1
−1
Z
x4n dx
≤ −1
≤
2 → 0 as n → ∞. 4n + 1
2. Consider any series of functions on any finite interval. Show that if it converges uniformly, then it also converges in the L2 sense and in the point wise sense. Answer: This is an easy consequence combined Theorem 2 and Theorem 3 on Page 124 and Theorem 4 on Page 125. 3. Let γn be a sequence of constants tending to ∞. Let fn (x) be the sequence of functions defined as follows: fn ( 21 ) = 0, fn (x) = γn in the interval [ 12 − n1 , 12 ), let fn (x) = −γn in the interval ( 21 , 12 + n1 ], and let fn (x) = 0 elsewhere. Show that: (a) fn (x) → 0 pointwise. (b) The convergence is not uniform. (c) fn (x) → 0 in the L2 sense if γn = n1/3 . (d) fn (x) does not converge in the L2 sense if γn = n. Answer: (a) For any fixed point x0 , W.L.O.G., we assume x0 < 21 . Then there is N0 such that for n > N0 , 1 1 x0 < − , 2 n which implies that fn (x0 ) ≡ 0. Thus fn (x) → 0 pointwise. (b) Let xn = 12 − n1 , then fn (xn ) = −γn → −∞, which implies that the convergence is not uniform. (c) First, by direct computation, we can get Z
fn2 (x)dx
Z
1 2
= 1 1 −n 2
= γn2 × 1 3
Forγn = n ,
Z
γn2 dx
1 1 +n 2
Z + 1 2
γn2 dx
2 . n 1
fn2 (x)dx = 2 × n− 3 → 0 as n → ∞.
(d) By the computation in (c), for γn = n, Z fn2 (x)dx = 2n → ∞ as n → ∞.
7
MATH 4220 (2012-13) Partial differential equations
4. Let
1 in the interval [ 14 − 1 in the interval [ 34 − gn (x) = y + 1,
1 , n2 1 , n2
1 4 3 4
+ +
1 ), n2 1 ), n2
CUHK
for odd n; for odd n; for all other x.
Show that gn (x) → 0 in the L2 sense but that gn (x) does not tend to zero in the pointwise sense. Answer: For odd n, Z 1 + 12 4 n 2 12 dx = 2 → 0. 1 n − 12 4 n
For even n, Z
3 + 12 4 n
12 dx =
3 − 12 4 n
2 → 0. n2
Thus for any n, 2 → 0 as n → ∞. n2 5.Let φ(x) = 0 for 0 < x < 1 and φ(x) = 1 for 1 < x < 3. (a) Find the first four nonzero terms of its Fourier cosine series explicitly. (b) For each x(0 ≤ x ≤ 3), what’s the sum of the series. (c) Does it converge to φ(x) in L2 sense, why? (d) Put x = 0 to find the sum |gn (x)k2L2 =
1 1 1 1 1 − − + + − ... 2 4 5 7 8 R3 R 2 3 2 mπ mπx Answer: (a) We see that A0 = 23 1 √ dx = 43 and A m = 3 1 cos 3 dx = − mπ sin 3 . √ √ So, the first four nonzero terms are 43P , − π3 cos πx , − 2π3 cos 2πx and 4π3 cos 4πx 3 3 3 ∞ nπx (b) We can express φ(x) = A20 + 1 (An cos nπx + B sin ), by Theorem 4 of Section 4, n 3 3 since φ(x) and its derivative is piecewise continuous, so we get the fourier series will converge to f (x) except at x = 1, while the value of this series at x = 1 is 21 . (c) By corollary 7. We see that it converge to φ(x) in L2 sense. (d) Put x=0, we see that the sine series vanish, it turns out to be that φ(0) = 32 − m √ P (−1)[ 3 ] 3 √ . cos mπ0 , thus we obtain the sum of the series is 32π 1≤m<∞,m6=3n π m 3 3 1+
6. Find the sine series of the function cos x on the interval (0, π). For each x satisfying −π < x < π, what is the sum of the Pseries? Answer: The series is cos x = ∞ n=1 an sin nx. If n > 1, Z 2 π 1 cos(n + 1)x cos(n − 1)x π 2n(1 + (−1)n ) cos x sin nxdx = − [ + ] |0 = . an = π 0 π n+1 n−1 (n2 − 1)π If n = 1 a1 = 0. The sum series is 0 if x = −π, 0, π. By Theorem 4 in Section 4, the sum series converges to cos x point wise in 0 < x < π, and to − cos x for −π < x < 0. 8
MATH 4220 (2012-13) Partial differential equations
7. Let φ(x) =
−1 − x,
−1 < x < 0;
+1 − x,
0 < x < 1.
CUHK
(a) Find the full Fourier series of φ(x) in the interval (−1, 1). (b) Find the first three nonzero terms explicitly. (c) Does it converge in the mean square sense? (d) Does it converge pointwise? (e) Does it converge uniformly? Answer: (a) Obviously φ(x) is odd. Thus its full Fourier series is just the Sine Fourier series, i.e., ∞ X Bn sin nπx, n=1
where Bn satisfies Z
1
Bn =
φ(x) sin nπxdx = −1
2 . nπ
(b) By (a), the first three nonzero terms are 1 2 2 sin πx, sin 2πx, sin 3πx. π π 3π (c) Since Z
1 2
Z
|φ(x)| dx = 2 −1
1
(1 − x)2 dx ≤ 2,
0
it converges in the mean square sense according to Corollary 7. (d) According to Theorem 4, it converges pointwise. (e) No. Since ∞ ∞ X X 1 2 Bn sin(nπ ) = = ∞. 2n nπ n=1 n=1
Suggested Answer to Exercise 5.6 1. (a) Solve as a series the equation ut = uxx in (0, 1) with ux (0, t) = 0, u(1, t) = 1, and u(x, 0) = x2 . Compute the first two coefficients explicitly. (b) What is the equilibrium state (the term that does not tend to zero)? Answer: (Using the method of shifting the data) Let v(x, t) := u(x, t) − 1, then v solves vt = vxx , vx (0, t) = v(1, t) = 0, and v(x, 0) = x2 − 1. By the method of separation of variables, we have v(x, t) =
∞ X n=0
1 2 2 π t
An e−(n+ 2 )
1 1 cos (n + )πx , An = (−1)n+1 4(n + )−3 π −3 . 2 2
9
MATH 4220 (2012-13) Partial differential equations
CUHK
Hence u(x, t) = 1 +
∞ X
1 2 2 π t
An e−(n+ 2 )
n=0
1 1 cos[(n + )πx], An = (−1)n+1 4(n + )−3 π −3 . 2 2
(b) 1. 2. For problem (1), complete the calculation of the series in case j(t) = 0 and h(t) = et . Answer: In case j(t) = 0 and h(t) = et , by (10) and the initial condition un (0) = 0, un (t) = Therefore u(x, t) =
∞ X n=1
2nπk (et − e−λn kt ). (λn k + 1)l2
2nπk nπx . (et − e−λn kt ) sin 2 (λn k + 1)l l
5. Solve utt = c2 uxx + et sin 5x for 0 < x < π, with u(0, t) = u(π, t) = 0 and the initial conditions u(x, 0) = 0, ut (x, 0) = sin 3x. et Answer: It is easy to check 1+25c 2 sin 5x solves vtt = c2 vxx + et sin 5x, and v(0, t) = v(π, t) = 0. Using the method of shifting the data, we have ∞ X 1 t e sin 5x + An cos(nct) + Bn sin(nct) sin(nx), u(x, t) = 2 1 + 25c n=1
where
Z 2 π 1 sin 5x sin(nx)dx, An = − π 0 1 + 25c2 Z π 2 1 and Bn = sin 3x − sin 5x sin(nx)dx. 2 ncπ 0 1 + 25c
8. Solve ut = kuxx in (0, l), with u(0, t) = 0, u(l, t) = At, u(x, 0) = 0, where A is a constant. Answer:(Expansion Method) Let u(x, t) =
∞ X
un (t) sin
n=1
nπx , l
∞
X ∂u nπx (x, t) = vn (t) sin , ∂t l n=1 ∞
X ∂ 2u nπx (x, t) = wn (t) sin . 2 ∂x l n=1 Then 2 vn (t) = l
Z 0
l
∂u nπx dun sin dx = , ∂t l dt 10
MATH 4220 (2012-13) Partial differential equations 2 wn (t) = l =−
2 l
Z
l
( 0
l
Z 0
CUHK
∂ 2u nπx dx sin 2 ∂x l
nπx 2 nπx nπ nπx l nπ 2 ) u(x, t) sin dx + (ux sin − u cos )| l l l l l l 0 = −λn un (t) − 2nπl−2 (−1)n At,
where λn = (nπ/l)2 . Here we used the Green’s second identity and the boundary conditions. Hence by the PDE ut = kuxx and the initial condition u(x, 0) = 0, we get dun = k[−λn un (t) − 2nπl−2 (−1)n At] dt un (0) = 0. Hence n+1
un (t) = (−1) Therefore u(x, t) =
∞ X
t 1 e−λn kt 2nπl A[ − 2 + 2 ]. λn λn k λn k −2
(−1)n+1 2nπl−2 A[
n=1
t 1 e−λn kt nπx − 2 + 2 ] sin , λn λn k λn k l
2
where λn = (nπ/l) .
Suggested Answer to Extra Problems 10. Find out the solution for the following problem utt − 4uxx = 0, u(0, t) = u(1, t) = 0. u(x, 0) = sin2 πx, ut (x, 0) = x(1 − x). Answer: Let u = X(x)T (t), then T 00 (t)X(x) = 4X 00 (x)T (t), we get X 00 (x) = −λX(x), following a standard process, we have X(x) = cm sin mπx, m = 1, 2, 3, · · · . Therefore, our u is the following X u= (am cos 2mπt + bm sin 2mπt) sin mπx. Using the initial conditions, we have X 1 1 − cos 2πx = am sin mπx, 2 2 and x(1 − x) =
X
2mπbm sin mπx.
Using the above two equalities, we can decide am , bm . 11