LAST (family) NAME: FIRST (given) NAME: ID # : MATHEMATICS 3FF3 McMaster University Final Examination Day Class Duration of Examination: 3 hours Dr. J.-P. Gabardo THIS EXAMINATION PAPER INCLUDES 22 PAGES AND 9 QUESTIONS. YOU ARE RESPONSIBLE FOR ENSURING THAT YOUR COPY OF THE PAPER IS COMPLETE. BRING ANY DISCREPANCY TO THE ATTENTION OF YOUR INVIGILATOR. Instructions: • The total of marks is 100. • No calculator or other aid are allowed. • Pages 18–21 are for scratch or overflow work. Please indicate clearly that you are continuing your work on one of these pages if you decide to do so. • There is a formula sheet on the last page. SAMPLE FINAL EXAM SOLUTIONS Continued. . . Page 1 of 22 Final Exam / Math 3FF3 NAME: ID #: Provide all details and fully justify your answer in order to receive credit. 1. (10 pts.) Use the method of characteristics the solve the first-order partial differential equation (for u = u(x, y)): ex ux − uy = 0, −∞ < x < ∞, y > 0, 1 + ey with initial condition u(x, 0) = e2x . Solution. The equation for the characteristics curves is dy ex =− dx 1 + ey which is a separable ODE. We have dy = −ex (1 + e ) dx y Z and thus y (1 + e ) dy = − Z ex dx which yield y + ey = −ex + C. The characteristics curves are thus the curves with equation ey + y + ex = C, C arbitary constant. The general solution of the PDE is this u(x, y) = F (ey + y + ex ), where F (s) is an arbitrary function of 1 variable. Using the initial condition we have u(x, 0) = e2x = F (e0 + 0 + ex ) = F (1 + ex ) Letting s = 1 + ex , we have e2x = (ex )2 = (s − 1)2 and thus F (s) = (s − 1)2 . The solution is therefore u(x, y) = (ey + y + ex − 1)2 . Continued. . . Page 2 of 22 Final Exam / Math 3FF3 NAME: ID #: 2. (8 pts.) Consider the solution u(x, t) of the diffusion equation ut = uxx , 0 < x < l, t > 0, ux (0, t) = ux (l, t) = 0, t > 0, u(x, 0) = φ(x), 0 < x < l. Z Show that the function F (t) = l eu(x,t) dx is decreasing for t ≥ 0. 0 Solution. We compute Z l Z l Z l d d u(x,t) 0 u(x,t) F (t) = e dx = e dx = ut (x, t) eu(x,t) dx dt 0 0 0 dt Z l = uxx (x, t) eu(x,t) dx (using the PDE) 0 Z l d u(x,t) u(x,t) l u (x, t) = ux (x, t) e − e dx (using integration by parts) x 0 dx 0 Z l u(l,t) u(0,t) − ux (0, t) e − (ux (x, t))2 eu(x,t) dx ≤ 0 = ux (l, t) e | {z } | {z } {z } 0 | =0 =0 ≥0 Since F 0 (t) ≤ 0 for all t > 0, it follows that F (t)is decreasing for t ≥ 0. Continued. . . Page 3 of 22 Final Exam / Math 3FF3 NAME: ID #: 3. Consider the eigenvalue problem ( X 00 (x) + λ X(x) = 0, 0 < x < 1, X(0) = 0, X(1) = −X 0 (1). (a) (4 pts.) Show that the boundary conditions for the problem above are symmetric.(You should assume that all functions involved are complex-valued.) What can you conclude about the eigenvalues and eigenfunctions of the problem above? Solution. If f (x) and g(x) both satisfy the boundary conditions, we have h i1 f 0 (x) g(x) − f (x) g 0 (x) = f 0 (1)g(1) − f (1) g 0 (1) − f 0 (0) g(0) − f (0) g 0 (0) |{z} |{z} 0 =0 =0 = −f (1)g(1) + f (1) g(1) = 0. It follows that all the eigenvalues are real and that eigenfunctions associated with different eigenvalues are orthogonal to each other. (b) (4 pts.) State a simple condition that can be used to check that there are no negative eigenvalues and use it to show that this is the case for the problem above. Check directly that they are indeed no negative eigenvalues. Solution. If the boundary conditions are symmetric and we have 1 [f (x) f 0 (x)]0 ≤ 0 for any (real-valued) function f (x) satisfying the boundary conditions, then all then eigenvalues are non-negative. For the boundary conditions in part (a), we have 1 [f (x) f 0 (x)]0 = f (1) f 0 (1) − f (0) f 0 (0) = −f (1)2 ≤ 0 |{z} =0 and thus that condition holds. By direct computation, letting λ = −β 2 where β > 0, if X 00 (x) − β 2 X(x) = 0, then X(x) = C1 sinh(βx) + C2 cosh(βx). If X(0) = 0, then C2 = 0 and the condition X(1) = −X 0 (1) implies that C1 sinh(β) = −C1 β cosh(β). If C1 6= 0, we would need tanh(β) = −β which has no solution as tanh(β) > 0 and −β < 0 for β > 0. Continued. . . Page 4 of 22 Final Exam / Math 3FF3 NAME: ID #: (c) (2 pts.) Is zero an eigenvalue? If so find the corresponding eigenfunction. Solution. If X(x) is a corresponding eigenfunction, then X 00 (x) = 0, so X(x) = C1 x + C2 . The condition X(0) = 0 implies C2 = 0 and the condition X(1) = −X 0 (1) implies C1 = −C1 or C1 = 0. Thus there is non non-trivial solution and 0 is not an eigenvalue. (d) (4 pts.) Use the graphical method to show that there are infinitely many eigenvalues λn > 0 and find the corresponding eigenfunctions. Solution. If λ = β 2 where β > 0 and X 00 (x) + β 2 X(x) = 0, then X(x) = C1 sin(βx) + C2 cos(βx). If X(0) = 0, then C2 = 0 and the condition X(1) = −X 0 (1) implies that C1 sin(β) = −C1 β cos(β). If C1 6= 0, we need tan(β) = −β We can see from the graph above that the previous equation has infinitely many solutions βn for n ≥ 1, where (n − 1/2)π < βn < n π and thus infinitely many corresponding positive eigenvalues λ = βn2 . and eigenfunctions Xn (x) = sin(βn x). Continued. . . Page 5 of 22 Final Exam / Math 3FF3 NAME: ID #: 4. Let D = {(x, y), x2 + y 2 < 1} be the unit disk centered at the origin in the x, y plane and let C = {(x, y), x2 + y 2 = 1} be the unit circle bounding D. Find the solution u(x, y) of Laplace equation uxx + uyy = 0, (x, y) ∈ D, which satisfies the boundary condition u(x, y) = 4 x3 , (x, y) ∈ C. (a) (8 pts.) Solve this problem by passing to polar coordinates. Note that the Laplace operator is written as ∂2 1 ∂ 1 ∂2 + + ∂r2 r ∂r r2 ∂θ2 in polar coordinates. (Hint. cos3 θ = 1 4 cos(3θ) + 3 4 cos(θ).) Solution. We look first for non-trivial solutions of the PDE in polar coordinates of the form u(r, θ) = R(r) Θ(θ) where Θ(θ) is 2π-periodic. We have 1 1 R (r) Θ(θ) + R0 (r) Θ(θ) + 2 R(r) Θ00 (θ) = 0 or r r 00 r2 R00 (r) + r R0 (r) Θ00 (θ) =− = λ. R(r) Θ(θ) This leads to the eigenvalue problem for Θ(θ): Θ00 (θ) + λ Θ(θ) = 0, Θ(−π) = Θ(π), Θ0 (−π) = Θ0 (π), The eigenvalues are λn = n2 , n ≥ 0, with corresponding eigenfunctions Θ0 (θ) = 1 and,for n ≥ 1, Θn (θ) = An cos(nθ) + Bn sin(nθ). For each n ≥ 0, we need to solve the DE r2 R00 (r) + r R0 (r) − n2 R(r) = 0 which is of Cauchy-Euler type. Letting R(r) = rβ we have β (β − 1) + β − n2 = 0 or β 2 = n2 . If n = 0, the solution is R0 (r) = C + D ln r and and we need D = 0 to ensure the continuity of the solution at r = 0. Thus R0 (r) = C. If n ≥ 1, the solution is of the form Rn (r) = Cn rn + Dn r−n . Again, to ensure the continuity of the solution at r = 0, we need to take Dn = 0. We obtain thus particular solutions of the form C0 and (An cos(nθ) + Bn sin(nθ)) rn for n ≥ 1. By the superposition principle, the general solution has the form ∞ A0 X + (An cos(nθ) + Bn sin(nθ)) rn u(r, θ) = 2 n=1 where A0 2 = C0 for convenience. Continued. . . Page 6 of 22 Final Exam / Math 3FF3 NAME: ID #: If x2 + y 2 = 1, we have x = cos θ, y = sin θ, and 4 x3 = 4 cos3 θ = cos(3θ) + 3 cos(θ). To satisfy the boundary condition, we thus need ∞ u(1, θ) = A0 X + (An cos(nθ) + Bn sin(nθ)) = cos(3θ) + 3 cos(θ). 2 n=1 By inspection, we see immediately that A1 = 3, A3 = 1 and An = Bn = 0 otherwise. The solution is thus u(r, θ) = cos(3θ) r3 + 3 cos(θ) r. (b) (4 pts.) Express the solution found in part (a) in rectangular coordinates and verify that it is a solution of the Laplace equation satisfying the given boundary condition. Solution. Letting x + i y = r(cos θ + i sin θ) = r ei θ , we have r cos θ = x = Re(x + iy) and r3 cos(3θ) = Re(r3 e3 i θ ) = Re((r ei θ )3 ) = Re((x + i y)3 ) = Re(x3 + 3 i x2 y − 3 x y 2 − i y 3 ) = x3 − 3 x y 2 In cartesian coordinates, the solution is thus given by u(x, y) = x3 − 3 x y 2 + 3 x. We check that this is indeed the correct solution: uxx + uyy = 6 x − 6 x = 0 and if x2 + y 2 = 1, we have x3 − 3 x y 2 + 3 x = x3 − 3 x (1 − x2 ) + 3 x = 4 x3 . Continued. . . Page 7 of 22 Final Exam / Math 3FF3 NAME: ID #: 5. Consider the wave equation utt = 4 uxx , 0 < x < π, t > 0, (1) together with the boundary conditions u(0, t) = u(π, t) = 0, t > 0, (2) 0 < x < π. (3) and the initial conditions u(x, 0) = 0, ut (x, 0) = 1, (a) (4 pts.) Using the method of separation of variables, find all non-trivial solutions of the equations (1) and (2) of the form u(x, t) = X(x) T (t). Solution. Letting u(x, t) = X(x) T (t), we have using (1) X(x) T 00 (t) = 4 X 00 (x) T (t) or T 00 (t) X 00 (x) = = −λ. 4 T (t) X(x) and, using (2), X(0) T (t) = X(π) T (t) = 0 which implies X(0) = X(π) = 0. We obtain thus the eigenvalue problem for X(x): ( X 00 (x) + λ X(x) = 0, X(0) = X(π) = 0 The eigenvalues are λn = n2 for n ≥ 1 with corresponding eigenfunctions Xn (x) = sin(nx). For each n, the solution of the ODE T 00 (t) + 4 n2 T (t) = 0 is Tn (t) = An cos(2nt) + Bn sin(2nt). The non-trivial solutions obtained are thus un (x, t) = (An cos(2nt) + Bn sin(2nt)) sin(nx), Continued. . . n ≥ 1. Page 8 of 22 Final Exam / Math 3FF3 NAME: ID #: (b) (8 pts.) Use the superposition principle to find the general form of a solution of the PDE satisfying the given boundary conditions and compute the unique solution u(x, t) satisfying the given initial conditions (3). Solution. By the superposition principle, the general solution of (1) and (2) is of the form u(x, t) = ∞ X (An cos(2nt) + Bn sin(2nt)) sin(nx), 0 < x < π, t > 0. n=1 for appropriate constant An and Bn , n ≥ 1. The first condition in (3) yields u(x, 0) = 0 = ∞ X An sin(nx), 0 < x < π, n=1 and thus that An = 0 for all n ≥ 1 (by uniqueness of the coefficients in a Fourier sine series). The first condition in (3) yields ut (x, 0) = 1 = ∞ X 2 n Bn sin(nx), 0 < x < π. n=1 It follows that 2 2 n Bn = π Z 0 π 2 sin(nx) dx = π and thus Bn = − cos(nx) n 1 1 − (−1)n , π n2 π = 0 2 1 − (−1)n π n n ≥ 1. The solution is thus ∞ 1 X 1 − (−1)n u(x, t) = sin(2nt) sin(nx), π n=1 n2 0 < x < π, t > 0, or ∞ 2 X 1 u(x, t) = sin(2(1 + 2k)t) sin((1 + 2k)x), π k=0 (1 + 2k)2 Continued. . . 0 < x < π, t > 0. Page 9 of 22 Final Exam / Math 3FF3 NAME: ID #: 6. (a) (5 pts.) Show that if u(x, t) is solution of the diffusion equation with variable dissipation ( ut − k uxx + φ(t) u = 0, −∞ < x < ∞, t > 0, u(x, 0) = f (x), −∞ < x < ∞, and g(t) is solution of the differential equation g 0 (t) = φ(t) g(t), g(0) = 1, then v(x, t) = g(t) u(x, t) is solution of the diffusion equation ( vt − k vxx = 0, −∞ < x < ∞, t > 0, v(x, 0) = f (x), −∞ < x < ∞, Solution. We have vt (x, t) = g 0 (t) u(x, t) + g(t) ut (x, t) and vxx (x, t) = g(t) uxx (x, t). Thus vt (x, t) − k vxx (x, t) = g 0 (t) u(x, t) + g(t) ut (x, t) − k g(t) uxx (x, t) = φ(t) g(t) u(x, t) + g(t) ut (x, t) − k g(t) uxx (x, t) = g(t) (φ(t) u(x, t) + ut (x, t) − k uxx (x, t)) = 0 and v(x, 0) = g(0) u(x, 0) = 1 · f (x) = f (x). Continued. . . Page 10 of 22 Final Exam / Math 3FF3 NAME: ID #: (b) (5 pts.) Solve the diffusion equation with variable dissipation ( ut − k uxx + cos(t) u = 0, −∞ < x < ∞, t > 0, u(x, 0) = e−x , −∞ < x < ∞, (Hint. See part (a).) Solution. Let v(x, t) be the solution of the diffusion equation ( vt − k vxx = 0, −∞ < x < ∞, t > 0, v(x, 0) = e−x , −∞ < x < ∞, Then, Z ∞ 1 v(x, t) = √ 4πkt −∞ Z ∞ 1 =√ 4πkt −∞ Z ∞ 1 =√ 4πkt −∞ 1 = ekt−x √ 4πkt 2 /4kt e−(x−y) e−(x e−y dy 2 −2 (x−2 kt) y+y 2 )/4kt 2 dy e−(x−2 kt−y) /4kt e(−4ktx+4 k Z ∞ 2 e−(x−2 kt−y) /4kt 2 t2 )/4kt dy −∞ √ √ After making the change of variable, (−x + 2 kt + y)/ 4kt = s with dy = 4kt ds, we obtain Z ∞ 2 kt−x 1 √ v(x, t) = e e−s ds = ekt−x . π −∞ {z } | =1 Using part (a), we first need to of g 0 (t) − cos(t) g(t) = 0 with g(0) = 1. R find g(t) the solution − sin t The integrating factor is exp( − cos t dt) = e . We have thus (g(t) e− sin t )0 = 0 or g(t) e− sin t = C, a constant. Since g(0) = 1, C = 1 and g(t) = esin t . By part (a), the solution is u(x, t) = Continued. . . v(x, t) = e− sin t ekt−x = e− sin t+k t−x . g(t) Page 11 of 22 Final Exam / Math 3FF3 NAME: ID #: 7. (a) (8 pts.) Use the method of separation of variables together with the superposition principle to find the solution u = u(x, y) of the boundary-value problem for the Laplace equation uxx + uyy = 0, 0 < x < π, 0 < y < 1, ux (0, y) = ux (π, y) = 0, 0 < y < 1, u(x, 0) = 0, u(x, 1) = cos x, 0 < x < π. Solution. We first look for solutions of the PDE that satisfy the boundary conditions and are of the form u(x, y) = X(x) Y (y). We have X 00 (x) Y (y) + X(x) Y 00 (y) = 0 or X 00 (x) Y 00 (y) =− = −λ X(x) Y (y) and X 0 (0) Y (y) = X 0 (π) Y (y) = 0 which yields X 0 (0) = X 0 (π) = 0. We obtain thus the eigenvalue problem for X(x): ( X 00 (x) + λ X(x) = 0, X 0 (0) = X 0 (π) = 0 The eigenvalues are λn = n2 for n ≥ 0 with corresponding eigenfunctions X0 (x) = 1 and Xn = cos(nx) for n ≥ 1. For each n ≥ 0, the DE for Y (y) is Y 00 (y) − n2 Y (y) = 0. If n = 0, the solution is Y0 (y) = A0 + B0 y and for n ≥ 1, the solution is Yn (y) = An cosh(ny) + Bn sinh(ny). We obtain thus particular solutions of the form A0 + B0 y and (An cosh(ny) + Bn sinh(ny)) cos(nx) n ≥ 1. By the superposition principle, the general solution has the form u(x, y) = A0 + B0 y + ∞ X (An cosh(ny) + Bn sinh(ny)) cos(nx), 0 < x < π, 0 < y < 1. n=1 The boundary condition u(x, 0) = 0 yields 0 = A0 + ∞ X An cos(nx), 0<x<π n=1 and implies that An = 0 for all n ≥ 0. The boundary condition u(x, 1) = cos x then yields cos x = B0 + ∞ X Bn sinh(n) cos(nx), 0 < x < π. n=1 Continued. . . Page 12 of 22 Final Exam / Math 3FF3 NAME: ID #: By inspection, B1 sinh(1) = 1 or B1 = 1/ sinh(1) and Bn = 0 otherwise. The solution is thus u(x, y) = sinh y cos(x). sinh 1 (b) (4 pts.) Find the maximum value of the solution u(x, y) in part (a) on the rectangle {(x, y), 0 ≤ x ≤ π, 0 ≤ y ≤ 1}. How does this relate to the “maximum principle”? Solution. If 0 ≤ x ≤ π, cos x ≤ 1 = cos 0 and if 0 ≤ y ≤ 1, sinh y ≤ sinh 1 as sinh y is an increasing function. It follows that u(x, y) = sinh 1 sinh y cos(x) ≤ cos(0) = 1 = u(0, 1). sinh 1 sinh 1 The maximum value of u(x, y) on the rectangle {(x, y), 0 ≤ x ≤ π, 0 ≤ y ≤ 1} is thus 1 and is reached at the point (0, 1) which is on the boundary of the rectangle and not an interior point in accordance with the maximum principle. Continued. . . Page 13 of 22 Final Exam / Math 3FF3 NAME: ID #: 8. (10 pts.) Solve the Poisson equation ( uxx + uyy = x2 + y 2 , u(x, y) = 0, x2 + y 2 < 1, x2 + y 2 = 1. by passing to polar coordinates (See Problem 4). Express your final answer in rectangular coordinates. (Hint. Look for a solution that depends only on r.) Solution. Let x = r cos θ and y = r sin θ and suppose that u(x, y) = v(r), for some function v. Then, 1 v 00 (r) + v 0 (r) = r2 and v(1) = 0. r 0 The function w = v satisfies the first-order linear ODE w0 (r) + R The integrating factor is e 1/r dr 1 w(r) = r2 r = eln r = r. We have thus r w0 (r) + w(r) = (r w(r))0 = r3 Integrating yields r3 C r4 + C or w(r) = + . 4 4 r 0 Since w(r) = v (r) should be continuous at r = 0, we need C = 0. We have thus r w(r) = v 0 (r) = w(r) = r3 4 and thus after integrating, v(r) = r4 + D. 16 1 The condition v(1) = 0 yields D = − 16 . We have thus v(r) = r4 − 1 16 and the solution is given in rectangular coordinates as u(x, y) = Continued. . . (x2 + y 2 )2 − 1 . 16 Page 14 of 22 Final Exam / Math 3FF3 NAME: Continued. . . ID #: Page 15 of 22 Final Exam / Math 3FF3 NAME: 9. ID #: (a) (5 pts.) Compute the Fourier series of the function f (x) = ex , in its complex form (i.e. ex = P∞ n=−∞ −π < x < π, cn einx , −π < x < π). Solution. We have Z π 1 cn = ex e−inx dx 2 π −π Z π 1 = e(1−in)x dx 2 π −π π 1 e(1−in)x = 2 π 1 − in −π = 1 e(1−in)π − e−(1−in)π (−1)n eπ − e−π = 2π 1 − in 2π 1 − in The Fourier series expansion of ex is thus given by ∞ X (−1)n eπ − e−π e = einx , 2 π 1 − in n=−∞ x Continued. . . −π < x < π. Page 16 of 22 Final Exam / Math 3FF3 NAME: ID #: (b) (7 pts.) Apply Parseval’s identity to the function in part (a) and the complete orthogonal system {einx }n∈Z on the interval (−π, π) to prove the formula ∞ X 1 eπ + e−π =π π . 1 + n2 e − e−π n=−∞ Solution. Letting Xn (x) = einx for n ∈ Z and f (x) = ex , we have using (a), π Z π e − e−π x −inx n , n ∈ Z, (f, Xn ) = e e dx = (−1) 1 − in −π Z π Z π inx −inx 2 1 dx = 2 π, e e dx = kXn k = (Xn , Xn ) = −π −π and Z 2 π kf k = (f, f ) = 2 π |f (x)| dx = −π Since Z x 2 Z π (e ) dx = −π −π e2x e dx = 2 2x π = −π e2π − e−2π . 2 π −π 2 π −π 2 e − e n = (e − e ) , |(f, Xn )| = (−1) 1 − in 1 + n2 2 Parseval’s identity yields ∞ ∞ X X e2π − e−2π |(f, Xn )|2 (eπ − e−π )2 kf k = = = 2 kXn k2 2 π (1 + n2 ) n=−∞ n=−∞ 2 which shows that ∞ X n=−∞ Continued. . . 1 e2π − e−2π (eπ + e−π ) (eπ − e−π ) eπ + e−π =π π =π =π π . 1 + n2 (e − e−π )2 (eπ − e−π )2 e − e−π Page 17 of 22 Final Exam / Math 3FF3 NAME: ID #: SCRATCH Continued. . . Page 18 of 22 Final Exam / Math 3FF3 NAME: ID #: SCRATCH Continued. . . Page 19 of 22 Final Exam / Math 3FF3 NAME: ID #: SCRATCH Continued. . . Page 20 of 22 Final Exam / Math 3FF3 NAME: ID #: SCRATCH Continued. . . Page 21 of 22 Final Exam / Math 3FF3 NAME: ID #: Some formulas you may use: ∞ nπx a0 X f (x) ∼ + an cos , 2 l n=1 f (x) ∼ ∞ X nπx bn sin l n=1 , Z 2 an = l 2 bn = l Z l f (x) cos nπx l 0 l f (x) sin nπx l 0 dx, 0 < x < l. dx, 0 < x < l. ∞ nπx nπx a0 X f (x) ∼ + an cos + bn sin , −l < x < l, 2 l l n=1 Z Z nπx nπx 1 l 1 l where an = f (x) cos dx, n ≥ 0, bn = f (x) sin dx, n ≥ 1. l −l l l −l l f (x) ∼ ∞ X πinx/l cn e n=−∞ 1 , −l < x < l, with cn = 2l Z l f (x) e−πinx/l dx. −l If {Xn (x)} is a complete orthogonal system on (a, b), f (x) ∼ X (f, Xn ) Xn (x), kXn k2 n kf k2 = X |(f, Xn )|2 . kXn k2 n ( nπ 2 X 00 (x) + λX(x) = 0, λn = , Xn (x) = sin(nπx/l), n ≥ 1. l X(0) = X(l) = 0, ( nπ 2 X 00 (x) + λX(x) = 0, , Xn (x) = cos(nπx/l), n ≥ 0. λ = n l X 0 (0) = X 0 (l) = 0, ( nπ 2 X 00 (x) + λX(x) = 0, λ = , n≥0 n l X(l) = X(−l), X 0 (−l) = X 0 (l) = 0, with X0 (x) = 1, Xn (x) = An cos(nπx/l) + Bn sin(nπx/l), n ≥ 1. 1 u(x, t) = √ 4πkt *** THE END*** Z ∞ e−(x−y) 2 /4kt φ(y) dy. −∞ Page 22 of 22