Assignment 1 solutions

Assignment 1 solutions - MIT OpenCourseWare...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
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 Solutions- Problem Set 1 Prof. Gilbert Strang Section 1.1 2) T 3 = 1 1 1 2 1 1 2 U = 1 1 1 1 1 U T = 1 1 1 1 1 U T U = 1 1 1 1 1 1 1 1 1 1 = 1 1 1 2 1 1 2 = T 3 U U 1 = 1 1 1 1 1 1 1 1 1 1 1 = 1 1 1 = I T 3 = U T U T 1 3 = ( U T U ) 1 = ( U 1 )( U 1 ) T = 1 1 1 1 1 1 1 1 1 1 1 1 = 3 2 1 2 2 1 1 1 1 # 5) K 2 = 2 1 1 2 K 1 2 = 1 4 1 2 1 1 2 = 1 3 2 1 1 2 # 1 Given that 3 2 1 1 K 1 3 = 2 4 2 4 1 2 3 4 3 2 1 1 3 6 4 2 2 4 6 3 K 1 = 4 5 1 2 3 4 Since det ( K 2 ) = 3, det ( K 3 ) = 4, det ( K 4 ) = 5 determinant of K 5 = 6 # From MATLAB, det ( K 5 ) = 6 # 5 4 3 2 1 4 8 6 4 2 3 6 9 6 3 2 4 6 8 4 1 2 3 4 5 1 inv ( K 5 ) = 6 # 5 4 3 2 1 4 8 6 4 2 det ( K ) inv ( K ) = 3 6 9 6 3 2 4 6 8 4 1 2 3 4 5 # 2 3 1 2 2 [ 1 2 ] 3 [ 2 4 ] 20) = + 4 5 2 4 4 5 2 4 = + 4 8 6 12 10 20 16 8 = 14 28 # For columns times row, n by n would require n 3 multiplications 22) MATLABs code n = 1000 ; e = ones ( n, 1) ; K = spdiags ([ e, 2 e, e ] , 1:1 , n, n ) ; u = K \ e ; plot ( u ) ; 2 4 x 10 Section 1.2 0 200 400 600 800 1000 0 2 4 6 8 10 12 14 Ax if x 1) u ( x ) = Bx if x if x = 0 u ( x ) = = ( x ) # if x = 0...
View Full Document

Page1 / 11

Assignment 1 solutions - MIT OpenCourseWare...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online