# Question: 1 consider the following system of equations 3x1 x2 1...

###### Question details

1. Consider the following system of equations:

3x1 +x2 =1

x1 –5x2 =11

(a)
Solvethegivensystemusingthegraphicalmethod(usingMATLABforplotting).

(b) ExpresseveryequationasananonymousMATLABfunction.

(c) With MATLAB, use the functions in (b) to verify your
solution in (a).

2. Consider the following system of equations:

2x2 + 5x3 = 1

2x1+x2+ x3=1 3x1 + x2 = 2

(a) SolveusingCramer’srule.

(b) SolveusingGausseliminationwithpartialpivoting.

Show all steps of computation.

3. Consider the MATLAB function GaussPivot() given in class in
slide 5-31.

(a) Modify GaussPivot() so that it computes and returns the
determinant (with the correct sign) and

detects whether the system is singular based on a near-zero
determinant. Define “near-zero” as

being when the absolute value of the determinant is below a
tolerance. When this occurs, the

function should display an error message and terminate. The
first line of the function should be:

function [x, D] = GaussPivot2(A, b, tol)

where D is the determinant, and tol is the tolerance.

(b) Show the result of running your function on the following
system of equations with tol =

0.00001

2x2 + 5x3 = 1 2x1+x2 +x3=1 4x1 +2x2 +2x3 =4