MATH 267 Due: Jan 25, 2012 ASSIGNMENT # 3 Do the following FIVE problems. Hand in written solutions for grading at the BEGINNING of the lecture on the due date. Illegible, disorganized or partial solutions will receive no credit. Staple your HW. 1. Find the solution to the following heat equation with boundary conditions and initial conditions: for all 0 < x < L and t > 0; ut (x, t) = uxx (x, t), u(0, t) = 0, u(L, t) = 0, for all t > 0; u(x, 0) = 1 for all 0 < x < L. (Hint: You may want to look at the course notes ”Solution of the Heat Equation by Separation of Variables” The Third Step Imposition of the Initial Conditions page 3.) Solution * Separation of variables (X(x)T 0 (t) = X 00 (x)T (t)) and the boundary condition gives ( X 00 (x) = σX(x) X(0) = 0 = X(L) (1) and (2) 2 T 0 (t) = σT (t) 2 From (1) , we get σ = − kLπ2 , and X(x) = Ak sin( kπ L x), for k = 1, 2, 3, 4, · · · . (See e.g. the notes about eigenvalue problem, that I recently sent by email, or see the notes of ”Fourier Series” page1–3.) Here Ak is an arbitrary constant. From (2), using the same σ we obtained from (1), we get T (t) = Bk e− constants Bk . k2 π 2 L2 Thus, we get X(x)T (t) = ck e− k2 π 2 L2 t sin( kπ x), L k = 1, 2, 3, · · · with arbitrary constants ck . * Superposition: u(x, t) = ∞ X ck e− k2 π 2 L2 t sin( k=1 kπ x) L *Initial condition: 1 = u(x, 0) = ∞ X k=1 ck sin( kπ x) L Note this is exactly the sine series of the function f (x) = 1 on 0 < x < L. 1 t , for k = 1, 2, 3, · · · , with Thus, Z kπ 2 L 1 · sin( x)dx ck = L 0 L h L kπ iL 2 − cos( x) = L kπ L 0 i 2 h =− cos(kπ) − cos 0 kπ i 2 h (−1)k − 1 =− ( kπ 4 k odd , = kπ 0 k even . Therefore, we have X u(x, t) = k=odd kπ 4 − k2 π22 t e L sin( x) kπ L Or equivalently, using k = 2n + 1, n = 0, 1, 2, 3, · · · , for odd k, u(x, t) = ∞ X (2n+1)2 π 2 (2n + 1)π 4 e− L2 t sin( x) (2n + 1)π L n=0 2. Find the solution to the following wave equation with boundary conditions and initial conditions: for all 0 < x < L and t > 0; utt (x, t) = uxx (x, t), u(0, t) = 0, u(L, t) = 0, for all t > 0; u(x, 0) = 1, ut (x, 0) = f (x) for all 0 < x < L, where ( f (x) = for 0 < x < L2 ; for L2 ≤ x < L. 1 −1 (Hint: You may want to look at the course notes ”Solution of the Wave Equation by Separation of Variables” The Third Step Imposition of the Initial Conditions page 3–4.) Solution * Separation of variables (X(x)T 00 (t) = X 00 (x)T (t)) and the boundary condition gives ( (1) X 00 (x) = σX(x) X(0) = 0 = X(L) and (2) T 00 (t) = σT (t) From (1) , we get σ=− k2 π2 , L2 and X(x) = Ak sin( kπ x), L for k = 1, 2, 3, 4, · · · . (See e.g. the notes about eigenvalue problem, that I recently sent by email, or see the notes of ”Fourier Series” page1–3. ) Here Ak is an arbitrary constant. 2 From (2), using the same σ we obtained from (1), we get T (t) = Bk1 cos kπ kπ t) + Bk2 sin t), L L for k = 1, 2, 3, · · · , with constants Bk1 , Bk2 . Thus, we get h kπ kπ kπ i X(x)T (t) = αk cos t) + βk sin t) sin( x), L L L with arbitrary constants ck . k = 1, 2, 3, · · · * Superposition: u(x, t) = ∞ h X k=1 αk cos kπ kπ kπ i t) + βk sin t) sin( x), L L L *Initial condition for u: 1 = u(x, 0) = ∞ X αk sin( k=1 kπ x) L Note this is exactly the sine series of the function f (x) = 1 on 0 < x < L. Thus, (by exactly the same calculation as in Problem 1), Z kπ 2 L 1 · sin( x)dx αk = L 0 L 2h L kπ iL = − cos( x) L kπ L 0 h i 2 =− cos(kπ) − cos 0 kπ i 2 h =− (−1)k − 1 ( kπ 4 k odd , = kπ 0 k even . *Initial condition for ut : f (x) = ut (x, 0) = ∞ X k=1 βk kπ kπ sin( x), L L Now, to determine βk , use the sine series of f (x): Z kπ 2 L kπ βk = f (t) sin( x)dx L L 0 L Z L2 Z 2 kπ kπ 2 L = f (t) sin( x)dx f (t) sin( x)dx + L 0 L L L2 L Z L2 Z L 2 kπ 2 kπ = 1 · sin( x)dx + (−1) · sin( x)dx L 0 L L L2 L h i h L/2 2 L kπ 2 L kπ iL = − cos( x) + cos( x) L kπ L L kπ L 0 L/2 i 2 h = − cos(kπ/2) + cos 0 + cos(kπ) − cos(kπ/2) kπ i 2 h = 1 + (−1)k − 2 cos(kπ/2) kπ i ( h 1 n 2 − 2(−1) even k = 2n, using cos(2nπ/2) = cos(nπ) = (−1)n , = nπ 0 odd k = 2n + 1, using cos(nπ + π/2) = 0. 3 * Final solution: Therefore, we have ∞ X u(x, t) = αk cos k=odd ∞ X kπ kπ kπ kπ t) sin( x) + t) sin( x) βk sin L L L L k=even (since αk = 0 for even k while βk = 0 for odd k) ∞ ∞ i X X 2nπ (2n + 1)π (2n + 1)π 2nπ 1 L h 4 2 − 2(−1)n sin cos t) sin( x) + t) sin( x) = (2n + 1)π L L nπ 2nπ L L n=1 n=0 3. (a) Recall eiA = cos A + i sin A and ei(A+B) = eiA eiB . Use these to show the following: cos(A + B) = cos A cos B − sin A sin B, sin(A + B) = sin A cos B + cos A sin B. Solution eiA eiB = (cos A + i sin A)(cos B + i sin B) = cos A cos B − sin A sin B + i(sin A cos B + cos A sin B) ei(A+B) = cos(A + B) + i sin(A + B) Since ei(A+B) = eiA eiB , comparing these two, we get cos(A + B) = cos A cos B − sin A sin B and sin(A + B) = sin A cos B + cos A sin B (b) Use the above result to show the following: 1 cos(A + B) + cos(A − B) , 2 1 sin A cos B = sin(A + B) + sin(A − B) 2 cos A cos B = sin A sin B = 1 cos(A − B) − cos(A + B) 2 Solution From (a), cos(A + B) = cos A cos B − sin A sin B and sin(A + B) = sin A cos B + cos A sin B Now use −B instead of B in these formulas, then, we get cos(A − B) = cos A cos B + sin A sin B sin(A − B) = sin A cos B − cos A sin B Then, cos(A + B) + cos(A − B) = cos A cos B − sin A sin B + cos A cos B + sin A sin B = 2 cos A cos B sin(A + B) + sin(A − B) = sin A cos B + cos A sin B + sin A cos B − cos A sin B = 2 sin A cos B This shows the desired identities. 4. Fix the constant α2 > 0. Consider the heat equation ut (x, t) = α2 uxx (x, t), for all 0 < x < L and t > 0. Subject to the boundary conditions u(0, t) = 0 and u(L, t) = 0 for all t > 0, solve the initial value problem if the temperature is initially u(x, 0) = 2 cos(3πx/L). (Hint: You may want to use the result of the above problem (b).) Solution 4 * Separation of variables (X(x)T 0 (t) = α2 X 00 (x)T (t)) and the boundary condition gives ( (1) X 00 (x) = σX(x) X(0) = 0 = X(L) and T 0 (t) = σα2 T (t) (2) 2 2 From (1) , we get σ = − kLπ2 , and X(x) = Ak sin( kπ L x), for k = 1, 2, 3, 4, · · · . (See e.g. the notes about eigenvalue problem, that I recently sent by email, or see the notes of ”Fourier Series” page1–3.) Here Ak is an arbitrary constant. From (2), using the same σ we obtained from (1), we get T (t) = Bk e− constants Bk . α2 k 2 π 2 L2 t , for k = 1, 2, 3, · · · , with Thus, we get X(x)T (t) = ck e− α2 k 2 π 2 L2 t sin( kπ x), L k = 1, 2, 3, · · · with arbitrary constants ck . * Superposition: u(x, t) = ∞ X ck e− α2 k 2 π 2 L2 t sin( k=1 kπ x) L *Initial condition: 2 cos(3πx/L) = u(x, 0) = ∞ X k=1 ck sin( kπ x) L Note this is exactly the sine series of the function f (x) = 1 on 0 < x < L. Thus, 2 ck = L Z 2 = L Z L 2 cos( 0 0 L sin( 3π kπ x) · sin( x)dx L L (k + 3)π (k − 3)π x) + sin( x) dx L L (use Problem 3 (b) for sin A cos B) Remember that k = 1, 2, 3, · · · , thus the factor (k+3)πx in the first sine is nonzero but, for k = 3 the factor L (k−3)π in the second sine is zero. Thus, to compute the integral, we separate k = 3 case. L Case: k = 3: Z 2 L 6πx c3 = sin( ) dx L 0 L 2 L 6πx L = − cos( ) L 6π L 0 2 =− cos(6π) − cos 0 6π =0 (since cos 6π = 1, Case: k 6= 3: 5 cos 0 = 1). 2h L (k + 3)π L (k − 3)π iL − cos( x) − cos( x) L (k + 3)π L (k − 3)π L 0 i 1 2h 1 − = [cos((k + 3)π) − cos 0] − [cos((k − 3)π) − cos 0] π (k + 3) (k − 3) i 1 2h 1 [(−1)k+3 − 1] + [(−1)k−3 − 1] =− π (k + 3) (k − 3) 2 h −(−1)k − 1 −(−1)k − 1 i (used (−1)3 = −1) =− + π (k + 3) (k − 3) 2((−1)k + 1) h 1 1 i = + π k+3 k−3 2((−1)k + 1) 2k = π (k + 3)(k − 3) 4k((−1)k + 1) = π(k + 3)(k − 3) ck = Therefore, we have u(x, t) = X 4k((−1)k + 1) − α2 k2 π2 t kπ L2 sin( x) e π(k + 3)(k − 3) L k6=3 Notice that we have computed c3 = 0, so there is k = 3 term in the summation. 5. Consider the boundary value problem for 0 < t < 1, y 00 (t) + 2y(t) = f (t) with y(0) = 0 and y(1) = 0, for some nonzero function f (t). (a) Does this problem has a unique solution? Justify your answer. In other words, suppose there are solutions y1 (t) and y2 (t) for the problem. Is y1 (t) = y2 (t) for 0 < t < 1? Justify your answer. (Hint. Consider y = y1 − y2 and plug-in this to the lefthand side of the differential equation. Then, see this y is not a solution to the original problem, but a solution to a related problem. Is y necessarily zero?) Solution See http://www.iam.ubc.ca/˜ sospedra/a3MATH267-sol.pdf Problem 3. (b) Suppose f (t) is given by the series f (t) = ∞ n+1 2 X (−1) sin (nπt) π n=1 n Find a solution to the boundary value problem as a Fourier sine series. (Hint, write an appropriate Fourier sine series expansion of y(t), and then determine the Fourier coefficients using the given differential equation. When determining the coefficient, start with n = 1.) Solution See http://www.iam.ubc.ca/˜ sospedra/a3MATH267-sol.pdf Problem 3. 6