Question: 1 Instructor: Prof. Hector D. Ceniceros General Instructions: Please write your homework papers neatly. You need to turn in both full printouts of your codes

1 Instructor: Prof. Hector D. Ceniceros General Instructions: Please write your homework papers neatly. You need to turn in both full printouts of your codes and the appropriate runs you made. Write your own code, individually. Do not copy codes! 1. Consider the linear system of the boundary value problem of homework # 4, i.e. vj1 + 2vj vj+1 + 2 vj = 2 2 sin(xj ) for j = 1, 2, . . . , N 1. 2 h (1) . (a) Implement Jacobi's iteration method to find an approximation of the solution of (1) using a stopping criterium of kb Ax(k) k2 /kbk2 < 0.1h, with h = 1/N . Do this for N = 50 and N = 100 and comment on the required number of iterations. (b) Repeat (a) for the Gauss-Seidel iteration. (c) Repeat (b) for the Conjugate Gradient Method and compare the performance with that of the Jacobi and Gauss-Seidel iterations. 1 All course materials (class lectures and discussions, handouts, homework assignments, examinations, web materials) and the intellectual content of the course itself are protected by United States Federal Copyright Law, the California Civil Code. The UC Policy 102.23 expressly prohibits students (and all other persons) from recording lectures or discussions and from distributing or selling lectures notes and all other course materials without the prior written permission of the instructor. 1 \f\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!