Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Using the Jacobi and Gauss-Seidel Methods: Consider the linear system And = p, where A,, is an n x n matrix with 2's on

image text in transcribed
image text in transcribed
3. Using the Jacobi and Gauss-Seidel Methods: Consider the linear system And = p, where A,, is an n x n matrix with 2's on the main diagonal, -1's directly above and below the main diagonal and O's everywhere else. For example, IN NL As = NLooO 0 This is a discretized version of Poisson's equation do(x) dx2 = p(x) which appears very often in physical applications. We will discuss discretizations and differential equations, including the origin of the matrix A,, later on in the quarter. Setting up the problem: (a) Construct the matrix A48. You should be able to do this using the diag function. Save this matrix as A5. (b) Now construct the right hand side vector p. Thus will be a 48 x 1 vector such that the jth entry of p is 537 j pj = 2 1 - cos sin 49 49 Save this vector as A6. Using the Jacobi Method: 2 (c) The Jacobi method for this problem can be written as ok = Mox-1 + c, where M is a 48 x 48 matrix like in the matrix iteration lecture. (Note that or in this equation means the kth guess for the vector @ and it is an entire vector. It does not mean the kth entry of o). Use the Jacobi method to solve for o. Your ini- tialization should be a 48 x 1 vector of all ones, and you should use a tolerance of 10 5 or le -5 in MATLAB. That is, you should stop when | 0 - 0-1||

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistics For Engineers And Scientists

Authors: William Navidi

3rd Edition

73376345, 978-0077417581, 77417585, 73376337, 978-0073376332

Students also viewed these Mathematics questions