Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored 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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions