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 1. 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
Provide all details and fully justify your answer in order to receive credit. 1. (1 pts.) Use the method of characteristics the solve the first-order partial differential equation (for u = u(x, y)): u x ex 1 + e u y y =, < x <, y >, with initial condition u(x, ) = e 2x. Solution. The equation for the characteristics curves is which is a separable ODE. We have (1 + e y ) dy dx = ex dy dx = ex 1 + e y and thus (1 + e y ) dy = e x dx which yield y + e y = e x + C. The characteristics curves are thus the curves with equation e y + y + e x = C, C arbitary constant. The general solution of the PDE is this u(x, y) = F (e y + y + e x ), where F (s) is an arbitrary function of 1 variable. Using the initial condition we have u(x, ) = e 2x = F (e + + e x ) = F (1 + e x ) Letting s = 1 + e x, we have e 2x = (e x ) 2 = (s 1) 2 and thus F (s) = (s 1) 2. The solution is therefore u(x, y) = (e y + y + e x 1) 2. Continued... Page 2 of 22
2. (8 pts.) Consider the solution u(x, t) of the diffusion equation u t = u xx, < x < l, t >, u x (, t) = u x (l, t) =, t >, u(x, ) = φ(x), < x < l. Show that the function F (t) = l e u(x,t) dx is decreasing for t. Solution. We compute F (t) = d l dt = l } l e u(x,t) dx = u xx (x, t) e u(x,t) dx = [ u x (x, t) e u(x,t)] l l = u x (l, t) }} = d dt e u(x,t) } dx = l (using the PDE) e u(l,t) u x (, t) e u(,t) }} = u t (x, t) e u(x,t) dx u x (x, t) d } e u(x,t) dx (using integration by parts) dx l (u x (x, t)) 2 e u(x,t) dx }} Since F (t) for all t >, it follows that F (t)is decreasing for t. Continued... Page 3 of 22
3. Consider the eigenvalue problem X (x) + λ X(x) =, < x < 1, X() =, X(1) = X (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 [ ] 1 f (x) g(x) f(x) g (x) = f(1)g(1) + f(1) g(1) =. It follows that all the eigenvalues are real = f (1)g(1) f(1) g (1) f () g() }} = f() g }} () = 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 [f(x) f (x)] 1 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 [f(x) f (x)] 1 = f(1) f (1) f() f () = f(1) 2 }} = and thus that condition holds. By direct computation, letting λ = β 2 where β >, if X (x) β 2 X(x) =, then X(x) = C 1 sinh(βx) + C 2 cosh(βx). If X() =, then C 2 = and the condition X(1) = X (1) implies that C 1 sinh(β) = C 1 β cosh(β). If C 1, we would need tanh(β) = β which has no solution as tanh(β) > and β < for β >. Continued... Page 4 of 22
(c) (2 pts.) Is zero an eigenvalue? If so find the corresponding eigenfunction. Solution. If X(x) is a corresponding eigenfunction, then X (x) =, so X(x) = C 1 x + C 2. The condition X() = implies C 2 = and the condition X(1) = X (1) implies C 1 = C 1 or C 1 =. Thus there is non non-trivial solution and is not an eigenvalue. (d) (4 pts.) Use the graphical method to show that there are infinitely many eigenvalues λ n > and find the corresponding eigenfunctions. Solution. If λ = β 2 where β > and X (x) + β 2 X(x) =, then X(x) = C 1 sin(βx) + C 2 cos(βx). If X() =, then C 2 = and the condition X(1) = X (1) implies that C 1 sin(β) = C 1 β cos(β). If C 1, 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 λ = β 2 n. and eigenfunctions X n (x) = sin(β n x). Continued... Page 5 of 22
4. Let D = (x, y), x 2 + y 2 < 1} be the unit disk centered at the origin in the x, y plane and let C = (x, y), x 2 + y 2 = 1} be the unit circle bounding D. Find the solution u(x, y) of Laplace equation u xx + u yy =, (x, y) D, which satisfies the boundary condition u(x, y) = 4 x 3, (x, y) C. (a) (8 pts.) Solve this problem by passing to polar coordinates. Note that the Laplace operator is written as 2 r + 1 2 r r + 1 2 r 2 θ 2 in polar coordinates. (Hint. cos 3 θ = 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 R (r) Θ(θ) + 1 r R (r) Θ(θ) + 1 r 2 R(r) Θ (θ) = or r 2 R (r) + r R (r) R(r) = Θ (θ) Θ(θ) = λ. This leads to the eigenvalue problem for Θ(θ): Θ (θ) + λ Θ(θ) =, Θ( π) = Θ(π), Θ ( π) = Θ (π), The eigenvalues are λ n = n 2, n, with corresponding eigenfunctions Θ (θ) = 1 and,for n 1, Θ n (θ) = A n cos(nθ) + B n sin(nθ). For each n, we need to solve the DE r 2 R (r) + r R (r) n 2 R(r) = which is of Cauchy-Euler type. Letting R(r) = r β we have β (β 1) + β n 2 = or β 2 = n 2. If n =, the solution is R (r) = C + D ln r and and we need D = to ensure the continuity of the solution at r =. Thus R (r) = C. If n 1, the solution is of the form R n (r) = C n r n + D n r n. Again, to ensure the continuity of the solution at r =, we need to take D n =. We obtain thus particular solutions of the form C and (A n cos(nθ) + B n sin(nθ)) r n for n 1. By the superposition principle, the general solution has the form u(r, θ) = A 2 + (A n cos(nθ) + B n sin(nθ)) r n where A 2 = C for convenience. Continued... Page 6 of 22
If x 2 + y 2 = 1, we have x = cos θ, y = sin θ, and 4 x 3 = 4 cos 3 θ = cos(3θ) + 3 cos(θ). To satisfy the boundary condition, we thus need u(1, θ) = A 2 + (A n cos(nθ) + B n sin(nθ)) = cos(3θ) + 3 cos(θ). By inspection, we see immediately that A 1 = 3, A 3 = 1 and A n = B n = otherwise. The solution is thus u(r, θ) = cos(3θ) r 3 + 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 e i θ, we have r cos θ = x = Re(x + iy) and r 3 cos(3θ) = Re(r 3 e 3 i θ ) = Re((r e i θ ) 3 ) = Re((x + i y) 3 ) = Re(x 3 + 3 i x 2 y 3 x y 2 i y 3 ) = x 3 3 x y 2 In cartesian coordinates, the solution is thus given by u(x, y) = x 3 3 x y 2 + 3 x. We check that this is indeed the correct solution: u xx + u yy = 6 x 6 x = and if x 2 + y 2 = 1, we have x 3 3 x y 2 + 3 x = x 3 3 x (1 x 2 ) + 3 x = 4 x 3. Continued... Page 7 of 22
5. Consider the wave equation u tt = 4 u xx, < x < π, t >, (1) together with the boundary conditions u(, t) = u(π, t) =, t >, (2) and the initial conditions u(x, ) =, u t (x, ) = 1, < x < π. (3) (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 (t) = 4 X (x) T (t) or T (t) 4 T (t) = X (x) X(x) = λ. and, using (2), X() T (t) = X(π) T (t) = which implies X() = X(π) =. We obtain thus the eigenvalue problem for X(x): X (x) + λ X(x) =, X() = X(π) = The eigenvalues are λ n = n 2 for n 1 with corresponding eigenfunctions X n (x) = sin(nx). For each n, the solution of the ODE is The non-trivial solutions obtained are thus T (t) + 4 n 2 T (t) = T n (t) = A n cos(2nt) + B n sin(2nt). u n (x, t) = (A n cos(2nt) + B n sin(2nt)) sin(nx), n 1. Continued... Page 8 of 22
(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) = (A n cos(2nt) + B n sin(2nt)) sin(nx), < x < π, t >. for appropriate constant A n and B n, n 1. The first condition in (3) yields u(x, ) = = A n sin(nx), < x < π, and thus that A n = for all n 1 (by uniqueness of the coefficients in a Fourier sine series). The first condition in (3) yields u t (x, ) = 1 = 2 n B n sin(nx), < x < π. It follows that 2 n B n = 2 π π sin(nx) dx = 2 π [ cos(nx) n ] π = 2 π 1 ( 1) n n and thus The solution is thus B n = 1 π 1 ( 1) n, n 1. n 2 u(x, t) = 1 π 1 ( 1) n n 2 sin(2nt) sin(nx), < x < π, t >, or u(x, t) = 2 π k= 1 sin(2(1 + 2k)t) sin((1 + 2k)x), < x < π, t >. (1 + 2k) 2 Continued... Page 9 of 22
6. (a) (5 pts.) Show that if u(x, t) is solution of the diffusion equation with variable dissipation u t k u xx + φ(t) u =, < x <, t >, u(x, ) = f(x), < x <, and g(t) is solution of the differential equation g (t) = φ(t) g(t), g() = 1, then v(x, t) = g(t) u(x, t) is solution of the diffusion equation v t k v xx =, < x <, t >, v(x, ) = f(x), < x <, Solution. We have and v t (x, t) = g (t) u(x, t) + g(t) u t (x, t) v xx (x, t) = g(t) u xx (x, t). Thus v t (x, t) k v xx (x, t) = g (t) u(x, t) + g(t) u t (x, t) k g(t) u xx (x, t) = φ(t) g(t) u(x, t) + g(t) u t (x, t) k g(t) u xx (x, t) = g(t) (φ(t) u(x, t) + u t (x, t) k u xx (x, t)) = and v(x, ) = g() u(x, ) = 1 f(x) = f(x). Continued... Page 1 of 22
(b) (5 pts.) Solve the diffusion equation with variable dissipation u t k u xx + cos(t) u =, < x <, t >, u(x, ) = e x, < x <, (Hint. See part (a).) Solution. Let v(x, t) be the solution of the diffusion equation v t k v xx =, < x <, t >, Then, v(x, t) = = = v(x, ) = e x, < x <, 1 4πkt 1 4πkt 1 4πkt = e kt x 1 4πkt e (x y)2 /4kt e y dy e (x2 2 (x 2 kt) y+y 2 )/4kt dy e (x 2 kt y)2 /4kt e ( 4ktx+4 k2 t 2 )/4kt dy e (x 2 kt y)2 /4kt After making the change of variable, ( x + 2 kt + y)/ 4kt = s with dy = 4kt ds, we obtain v(x, t) = e kt x 1 π } } =1 e s2 ds = e kt x. Using part (a), we first need to find g(t) the solution of g (t) cos(t) g(t) = with g() = 1. The integrating factor is exp( cos t dt) = e sin t. We have thus (g(t) e sin t ) = or g(t) e sin t = C, a constant. Since g() = 1, C = 1 and g(t) = e sin t. By part (a), the solution is u(x, t) = v(x, t) g(t) = e sin t e kt x = e sin t+k t x. Continued... Page 11 of 22
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 u xx + u yy =, < x < π, < y < 1, u x (, y) = u x (π, y) =, < y < 1, u(x, ) =, u(x, 1) = cos x, < 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 and X (x) Y (y) + X(x) Y (y) = or X (x) X(x) = Y (y) Y (y) = λ X () Y (y) = X (π) Y (y) = which yields X () = X (π) =. We obtain thus the eigenvalue problem for X(x): X (x) + λ X(x) =, X () = X (π) = The eigenvalues are λ n = n 2 for n with corresponding eigenfunctions X (x) = 1 and X n = cos(nx) for n 1. For each n, the DE for Y (y) is Y (y) n 2 Y (y) =. If n =, the solution is Y (y) = A + B y and for n 1, the solution is Y n (y) = A n cosh(ny) + B n sinh(ny). We obtain thus particular solutions of the form A + B y and (A n cosh(ny) + B n sinh(ny)) cos(nx) n 1. By the superposition principle, the general solution has the form u(x, y) = A + B y + (A n cosh(ny) + B n sinh(ny)) cos(nx), < x < π, < y < 1. The boundary condition u(x, ) = yields = A + and implies that A n = for all n. A n cos(nx), The boundary condition u(x, 1) = cos x then yields cos x = B + < x < π B n sinh(n) cos(nx), < x < π. Continued... Page 12 of 22
By inspection, B 1 sinh(1) = 1 or B 1 = 1/ sinh(1) and B n = otherwise. The solution is thus u(x, y) = sinh y sinh 1 cos(x). (b) (4 pts.) Find the maximum value of the solution u(x, y) in part (a) on the rectangle (x, y), x π, y 1}. How does this relate to the maximum principle? Solution. If x π, cos x 1 = cos and if y 1, sinh y sinh 1 as sinh y is an increasing function. It follows that u(x, y) = sinh y sinh 1 cos(x) sinh 1 sinh 1 cos() = 1 = u(, 1). The maximum value of u(x, y) on the rectangle (x, y), x π, y 1} is thus 1 and is reached at the point (, 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
8. (1 pts.) Solve the Poisson equation u xx + u yy = x 2 + y 2, x 2 + y 2 < 1, u(x, y) =, x 2 + 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, v (r) + 1 r v (r) = r 2 and v(1) =. The function w = v satisfies the first-order linear ODE The integrating factor is e 1/r dr = e ln r = r. We have thus Integrating yields w (r) + 1 w(r) = r2 r r w (r) + w(r) = (r w(r)) = r 3 r w(r) = r4 r3 + C or w(r) = 4 4 + C r. Since w(r) = v (r) should be continuous at r =, we need C =. We have thus v (r) = w(r) = r3 4 and thus after integrating, v(r) = r4 16 + D. The condition v(1) = yields D = 1. We have thus 16 v(r) = r4 1 16 and the solution is given in rectangular coordinates as u(x, y) = (x2 + y 2 ) 2 1. 16 Continued... Page 14 of 22
Continued... Page 15 of 22
9. (a) (5 pts.) Compute the Fourier series of the function f(x) = e x, π < x < π, in its complex form (i.e. e x = n= c n e inx, π < x < π). Solution. We have c n = 1 2 π = 1 2 π = 1 2 π = 1 2 π π π π π [ e (1 in)x e x e inx dx e (1 in)x dx 1 in ] π π e (1 in)π e (1 in)π 1 in The Fourier series expansion of e x is thus given by e x = n= ( 1) n 2 π = ( 1)n 2 π e π e π 1 in ( ) e π e π e inx, π < x < π. 1 in Continued... Page 16 of 22
(b) (7 pts.) Apply Parseval s identity to the function in part (a) and the complete orthogonal system e inx } n Z on the interval ( π, π) to prove the formula n= 1 1 + n 2 = π eπ + e π e π e π. Solution. Letting X n (x) = e inx for n Z and f(x) = e x, we have using (a), π ( ) e (f, X n ) = e x e inx dx = ( 1) n π e π, n Z, 1 in π and f 2 = (f, f) = X n 2 = (X n, X n ) = π π f(x) 2 dx = π π π π e inx e inx dx = (e x ) 2 dx = π π π π 1 dx = 2 π, [ e e 2x 2x dx = 2 ] π π = e2π e 2π. 2 Since Parseval s identity yields ( ) (f, X n ) 2 = e π e π 2 ( 1)n = (eπ e π ) 2, 1 in 1 + n 2 f 2 = e2π e 2π 2 = n= (f, X n ) 2 X n 2 = n= (e π e π ) 2 2 π (1 + n 2 ) which shows that n= 1 1 + n 2 = π e2π e 2π (e π e π ) 2 = π (eπ + e π ) (e π e π ) (e π e π ) 2 = π eπ + e π e π e π. Continued... Page 17 of 22
SCRATCH Continued... Page 18 of 22
SCRATCH Continued... Page 19 of 22
SCRATCH Continued... Page 2 of 22
SCRATCH Continued... Page 21 of 22
Some formulas you may use: where a n = 1 l f(x) a 2 + f(x) l l ( nπx a n cos l ), a n = 2 l ( nπx ) b n sin, b n = 2 l l f(x) a 2 + ( nπx ) f(x) cos dx, n, l l l ( nπx ) ( nπx a n cos + b n sin l l b n = 1 l ( nπx ) f(x) cos dx, < x < l. l ( nπx ) f(x) sin dx, < x < l. l l l ), l < x < l, ( nπx ) f(x) sin dx, n 1. l f(x) c n e πinx/l, l < x < l, with c n = 1 2 l n= If X n (x)} is a complete orthogonal system on (a, b), l l f(x) e πinx/l dx. with f(x) n X (x) + λx(x) =, (f, X n ) X n 2 X n(x), λ n = X() = X(l) =, X (x) + λx(x) =, λ X () = X n = (l) =, X (x) + λx(x) =, X(l) = X( l), X ( l) = X (l) =, f 2 = n (f, X n ) 2 X n 2. ( nπ ) 2, Xn (x) = sin(nπx/l), n 1. l ( nπ ) 2, Xn (x) = cos(nπx/l), n. l λ n = ( nπ ) 2, n l X (x) = 1, X n (x) = A n cos(nπx/l) + B n sin(nπx/l), n 1. u(x, t) = 1 4πkt e (x y)2 /4kt φ(y) dy. *** THE END*** Page 22 of 22