Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Solve linear systems Write Matlab codes for both Jacobi and Gauss-Seidel methods, respectively, to solve the following equations. Make sure at the beginning you
3. Solve linear systems Write Matlab codes for both Jacobi and Gauss-Seidel methods, respectively, to solve the following equations. Make sure at the beginning you solve each equation for the variable that has the largest coefficient, why? (a) Apply your codes to the system of equations x1 + 9x2-2x3 = 36 2x1-x2 +823 = 121 6x1 + x2 + x3 = 107 with an initial x1= 1, x2= 1. (b) Apply your codes to solve the system A(t)x = b starting from x [0, 0, 0T, where A(t) =| t 1 t , b= 2 For t = 0.2.0.5, 08.09.0.99. determine the number of steps (or iterations) to obtain the solution to 6 significant digits in the computations. Plot the number of steps as functions of t and make your comments. (c) Solve the sparse system within six correct decimal places for n = 100, n 1000 and n = 10000 by using your codes which you made for solving (a) and (b). The correct soluionis e [1,1,. ,1]. Report the number of step iterations and the error max Irn - el for a n, here n is the numerical solutions and re is the exact solution. The system is 3 -1 -1 3-1 r2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started