Assignment 8 solutions

# Assignment 8 solutions - MIT OpenCourseWare...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MIT OpenCourseWare http://ocw.mit.edu 18.085 Computational Science and Engineering I Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.085 - Mathematical Methods for Engineers I Prof. Gilbert Strang Solutions - Problem Set 8 Section 4.1 ⎡ ⎣1 ⎤0 � , |x| < 2 � < |x| < � , 2 f (x) � 3) f (x) = −� 1 a0 = 2� 1 = 2� = = � � � −� /2 f (x) dx � /2 � 1 bk = � 1 = � = � � �x � f (x) sin k x dx −� � /2 −� � /2 −� /2 1 · dx sin k x dx −� /2 1 [� /2 + � /2] 2� 1 2# � ��/2 1 cos k x − � k −� /2 � � �� 1 k� k� = − cos + cos − �k 2 2 = 0# 1 ak = � = = 1 � � � � f (x) cos k x dx −� � /2 cos k x dx −� /2 � ��/2 1 sin k x � k −� /2 � ⎦ � �� 1 k� = sin − sin k − �k 2 2 �� 2 k� = sin �k 2# 1 10) Boundary condition for Laplace’s equation � 1 , 0<λ<� u0 = 0 , −� < λ < 0 �� 1 1 1 a0 = 1 dx = (� − 0) = 2� 0 2� 2 � �� 1� 1� sin k � ak = cos k x dx = sin k x 0 = = 0 �k �0 �k �k � �� 1� 1� 1 bk = sin k x dx = − cos k x 0 = [1 − cos k � ] �0 �k �k ⎡ ⎣ 2 , k odd = �k ⎤0 , k even � u0 (λ) = � � 1 2 sin 3x sin 5x sin x + + +··· + 2� 3 5 � � r3 sin 3x r5 sin 5x 1 2 r sin λ + + +··· ∀ u(r, λ) = + 2� 3 5 # At origin, r = 0, λ = 0 u(0, 0) = 2 1 + [0 + 0 . . .] 2 � 1 = 2# F (x) � 1 13) width h = � , � a) |F (x)|2 dx � �/2 = 12 dx −�/2 = �# −� b) 1 Ck = 2� 1 = 2� = � � � −�/2 � /2 � �x F (x) e−ikx dx −� � /2 −�/2 − e ikx dx � ��/2 1 e−ikx 2� −ik −�/2 �� � −ik�/2 � 1 1 = −e + eik�/2 2� ik � � k� 1 = 2i sin 2�ki 2 2 C0 = = = = c) � 1 sin(k�/2) 2� (k/2) ⎡ ⎥1 ⎥ ⎥ � k , k = ±1, 5, 9, . . . ⎥ ⎥ ⎣ = − 1 , k = ±3, 7, 11, . . . ⎥ ⎥ �k ⎥ ⎥ ⎥ ⎤0 , k even = 1 2� 1 2� � � � F (x) dx 1dx −� � /2 −�/2 1 [�/2 + � /2] 2� 1 2# � −� |F (x)|2 dx � �� � � �2 � �2 � �2 � �2 2 1 1 1 1 1 + +− + +− +··· = 2� 2 � 3� � 3� � � � 4 1 1 =+ 1+ 2 + 2 +··· 2 � 3 5 � 2� � 4� =+ 2 �8 � �� � Observed from ramp series eqn (15) pg321 = �# �� 1 If h = 2�, C0 = 1 dx = 1 2� −� �� 1 1 sin(k� ) Ck = e−ikx dx = = 0 for all k 2� −� 2� (k/2) � F (x) = 1 a constant function # 18) Heat equation ut = uxx point source u(x, 0) = � (x) with free boundary conditions u � (�, t) = u � (−�, t) = 0 These boundary conditions require cosine series u(x, t) = b0 (t) + � ⎪ � � = 2� |C0 |2 + |C1 |2 + |C−1 |2 + · · · bn (t) cos nx n=1 3 Substitute into heat equation � b0 (t) + � � ⎪� ⎪ bn (t) cos nx = − bn (t)n2 cos nx n=1 n=1 since b � (t) 0 = 0, bn (t) = e −n2 t bn (0), b0 (t) = constant Initial condition � ⎪ 1 1 b0 (0) + bn (0) cos nx = � (x) = + [cos x + cos 2x + cos 3x + · · · ] 2� � n=1 Comparing coeﬃcient b0 (0) = b0 (t) = 1 , 2� 1 2� bn (0) = 1 � since b0 is a constant # � u(x, t) = � ⎪ 1 −n2 t 1 + e cos nx 2� n=1 � Section 4.2 a) F = quarter square = � 1 , 0 � x � �, 0 � y � � 0 , −� < x < 0 or − � < y < 0 F (x, y ) � � � � 1� �y � � �� � � � � � � �x −� −� � � � 1 2� 1 2� 1 2� �2 � �2 � �2 � � −� � 0 � 0 Cmn = = � � � −� � F (x, y )e−imx e−iny dx dy e−imx e−iny dx dy � 0 �� e−imx dy −im 0 0 � �2 � � �� � 1 1� = e−iny 1 − e−im� dy 2� im 0 � �2 � � � � � e−iny � 1 1� −im� = 1−e 2� im −in 0 = e−iny = � 1 2� �2 � 1 im �� 1 in � � 1 − e−im� �� 1 − e−in� 4 � For m, n ≥= 0 ⎡ ⎣ − 1 , for m and n both odd � 2 mn Cmn = ⎤ 0 , for m even or n even C� = � 1 2� 1 2� 1 4 �2 � �2 � 0 � � 1 dx dy 0 = = � � � �2 # � 0 � C0n = = 1 2� 1 2� �2 � �2 � � � � e−iny dx dy 0 Cm0 �2 � � � � 1 = e−imy dx dy 2� 0 0 ⎡ 1 ⎥ ⎣ , for m odd 2�im = ⎥ ⎤0 , for m even # � 1 0 �� e−iny dx −in 0 0 � �2 � � � � � � 1 1 1 − e−in� dx = 2� in 0 � �2 ⎦ � � 1 �� = 1 − e−in� 2� in ⎡ ⎥ 1 , for n odd ⎣ 2�in = ⎥ ⎤0 , for n even # � b) F = checkerboard = if xy > 0 if xy < 0 −� <x�� −� <y �� y � � ����� � �� � �� ��� �� � �� ��� � � �� �� � ��� � −� ���� � � � �� � � � � ��� � � � F =1 ��� �� � �� �� �� ����� −� � x 5 Cmn = � � � � � 1 2� 1 2� 1 2� 1 2� 1 2� �2 � �2 � � −� � 0 � � � � −� � F (x, y ) e−imx e−iny dx dy � 0 = e−imx e−iny dx dy + � e−imx −im �� 0 0 1 2� �2 � 0 −� � 0 −� e−imx e−iny dx dy �0 � = � 2 �� e−iny 1 im � dy + 0 � e−iny −� � e−imx −im dy −� = �2 �� �2 � � 1 − e−im� �� � � � �� � �� � e−iny � � e−iny 0 1� −1 + eim� + −in 0 im −in −� �� �� �� � 1 − e−in� + −1 + eim� −1 + ein� � = 1 im �� 1 in 1 − e−im� For m, n ≥= 0, ⎡ ⎥ − 2 , for m, n odd ⎣ � 2 mn Cm = ⎥ ⎤ 0 , if m even or n even C� = � 1 2� � 2 �� � 0 � � dx dy + 0 � 0 −� � 0 −� � dx dy = 1 2# � � � � � 1 2� 1 2� 1 2� 1 2� 1 2� � 2 �� � C0n = 0 � 0 � � � e−iny dx dy + �� 0 0 � 0 0 −� � 0 −� � e−iny dx dy �0 dx 1 in � ⎩ (−1 + ein� )dx � = � 2 �� � 2 �� �2 � �2 ⎦ � e−iny −in 1 in � dx + � −� � e−iny −in � 0 −� −� = 0 � (1 − e−in� )dx + � = 1 in �� � (1 − e−in� )� + (−1 + ein� )� = � � �� −in� in� (1 − e ) + (−1 + e ) in Cm0 = 0# � � 2 �� � � � � �0�0 1 −imx −imx = e dx dy + e dx dy 2� 0 0 −� −� = 0# 6 2) −S (x, y ) = S (−x, −y ) odd function will have double sine series ��bmn sin mx sin ny For e.g. S (x, y ) = � 1 −1 if xy � 0 , −� < x � � if xy < 0 , −� < y � � S (−x, y ) = −S (x, y ) S (x, −y ) = −S (x, y ) ⎩ are also odd functions Orthogonality ���� (sin k x sin ly )(sin mx sin ny )dx dy = 0 −� −� for k = m and l = n on the square 20) −� � x � � − � � y � � # Sturm-Liouville eigenvalue problem (pu � ) � + q u + �wu = 0 � � u1 (pu2 � ) � + q u2 + �1 wu2 = 0 � � u2 (pu1 � ) � + q u1 + �2 wu1 = 0 � 1 � 2 � 3 � −� 1 2 � �0 u1 (pu2 � ) � − u2 (pu1 � ) � + q (u���� 1 ) + wu1 u2 (�1 − �2 ) = 0 1 u2 − u 2 u � u1 (pu2 � ) � − u2 (pu1 � ) � + wu1 u2 (�1 − �2 ) = 0 � � b a � u2 (pu1 ) � dx where a, b are boundary � b �0 � b ��b � � � � �) − = u2 (� 1 a pu u2 (pu1 )dx = − u2 (pu1 )dx � a a Boundary � b a � u1 (pu2 ) � dx �b �0 � b � ��b � � � � �� = u1 (pu2 ) a − u1 (pu2 )dx = − u1 (pu2 )dx � a a Boundary From � 3 � �b � b� �� �� u1 (pu2 ) − u2 (pu1 ) dx = (�2 − �1 )wu1 u2 dx a a �b �b � b � � � � − u1 (pu2 )dx + u2 (pu1 )dx = (�2 − �1 )wu1 u2 dx a a a 7 � � b a (�2 − �1 )wu1 u2 dx = 0 If (�2 − �1 ) = 0 ≥ � b a wu1 u2 dx = 0 # weighted orthogonality Section 4.3 2) fj = N −1 ⎪ k=0 ck w j k ∀ f = F N c w 2j . . . w j (N −1) ] w2(N −j ) . . . w(N −j )(N −1) ] row j th of F = [1 w j row (N − j )th of F = [1 w(N −j ) w j = e−2�ij/N wN −j = e(2�i/N )(N −j ) = e2�i e−2�ij/N = 1 · e−2�ij/N = wj Similarly w 2j = w2(N −j ) . . . w j (N −1) = w(N −j )(N −1) � row j th of F is the same as row (N − j )th of F # � 1 1 1 −1 1 1 w4 w8 1 w4 w8 1 w w2 −1 −w −w 2 1 w ⎢� 11 1 w2 1 w4 1 w4 w8 ⎢� ⎢ 100000 0 0 1 0 0 0⎧ ⎧ 0 0 0 0 1 0⎧ ⎧ ⎧ ⎧ 0 1 0 0 0 0⎧ ⎧ 0 0 0 1 0 0⎨ 000001 �� � P � � � � 6) F6 = � � �1 � � � 1 −w 1 w3 w6 ⎧� ⎧� w2 ⎧ � ⎧� ⎧� ⎧� ⎧� ⎧� ⎨� −w 2 1 w5 w10 −1 −w5 −w10 0 0 ⎢� 11 1 w2 1 w4 ⎧ ⎧ ⎧ ⎧ ⎧ ⎧ 1⎧ ⎧ w4 ⎨ w8 ⎢ ⎧ ⎧ ⎧ ⎧ ⎧ ⎧ ⎧ ⎧ ⎨ � � � � =� � �1 1 � � 1 w2 1 w4 11 1 w2 1 w4 1 1 1 1 1 1 −1 −w3 −w6 ⎧� ⎧� ⎧� ⎧� ⎧� ⎧� ⎧� ⎧� ⎨� � � � � � � � � � � 8 � � � =� � � � � � 1 1 1 w 1 w2 1 −1 1 −w 1 −w 2 1 1 1 1 1 1 1 w w2 w3 w4 w5 1 w2 w4 1 w2 w4 1 w2 w4 w6 w8 w10 1 w3 w6 −1 −w 3 −w 6 1 w3 w6 w9 w12 w15 1 w4 w8 1 w4 w8 1 w4 w8 w12 w16 w20 1 w5 w10 −1 −w 5 −w10 1 w5 w10 w15 w20 w25 ⎢ ⎧ ⎧ ⎧ ⎧ ⎧ ⎧ ⎨ ⎢ ⎧ ⎧ ⎧ ⎧ ⎧ ⎧ ⎨ Where D = � � � 1 w w2 ⎢ ⎨ � � � =� � � � 8) 11 F3 = � 1 w 2 1 w4 ⎢ 1 w4 ⎨ w8 # veriﬁed c = (1, 0, 1, 0), c � = (1, 1) f � = F2 c � �� � � 1 1 1 = 1 −1 1 �� 2 = 0 First half, fj = fj� + (wN )j fj�� f1 = � 2 0 � + � 1 i �� 0 0 N =4 c �� = (0, 0) f �� = F2 c �� �� � � 1 1 0 = 1 −1 0 �� 0 = 0 � = � 2 0 � Second half, fj +M = fj� − (wN )j fj�� f2 = � 2 0 � − � 1 i �� 0 0 � � = � 2 0 � ⎢ 2 �0⎧ � Combine f = [f1 ; f2 ] = � ⎧ �2⎨ 0 For c = (0, 1, 0, 1) c � = (0, 0) f � = F2 c � � �� � 1 1 0 = 1 −1 0 �� 0 = 0 # c �� = (1, 1) f �� = F2 c �� � �� � 1 1 1 = 1 −1 1 �� 2 = 0 9 First half, ��� 0 1 f1 = + 0 Second half, ��� 1 0 f2 = − 0 � Combine � ⎢ 2 � 0⎧ ⎧ f =� � −2 ⎨ 0 i �� �� 2 0 � � = � � 2 0 � � i 2 0 = −2 0 # 10) w = e2�i/64 ≤ w2 = e2�i/32 w = e2�i/128 ≤ � w2 and w are among the 32 and 128 roots of 1 # 15) � 1i � 1 i2 =� � 1 i3 11 11 �1 i =� � 1 i2 1 i3 � 0 �0 � �0 1 � 1 0 0 0 0 1 0 0 i2 i4 i6 1 1 i2 i4 i6 ⎢� 0 11 0 ⎧� 1 i ⎧� 1 ⎨ � 1 i2 0 1 i3 ⎢ i3 i6 ⎧ ⎧ i9 ⎨ 1 1 i2 i4 i6 ⎢ 1 i3 ⎧ ⎧ i6 ⎨ i9 � �1 = 1, �2 = i, ⎢� 1 1 i3 ⎧ � i ⎧� i6 ⎨ � i9 i 2 ⎢ i3 ⎧ ⎧ ⎨ � 3 = i2 , �4 = i3# 10 ...
View Full Document

## This note was uploaded on 04/12/2011 for the course MATH 18.085 taught by Professor Staff during the Fall '10 term at MIT.

Ask a homework question - tutors are online