0% found this document useful (0 votes)
35 views

Assignment 4 Gauss Elimination

Paolo Valdez solved a system of 3 equations with 3 unknowns using naive Gauss elimination and Gauss-Jordan elimination. For the first problem, the steps of writing the augmented matrix, performing row operations to put it in row echelon form, and reading the solutions of x1=2.418, x2=10.458, x3=-4.882 are shown. These solutions were verified by substituting back into the original equations. For the second problem, the Gauss-Jordan elimination steps of writing the augmented matrix, performing row operations until reduced row echelon form is reached, solving for variables by back substitution, and verifying the solutions are outlined.

Uploaded by

Paolo Valdez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Assignment 4 Gauss Elimination

Paolo Valdez solved a system of 3 equations with 3 unknowns using naive Gauss elimination and Gauss-Jordan elimination. For the first problem, the steps of writing the augmented matrix, performing row operations to put it in row echelon form, and reading the solutions of x1=2.418, x2=10.458, x3=-4.882 are shown. These solutions were verified by substituting back into the original equations. For the second problem, the Gauss-Jordan elimination steps of writing the augmented matrix, performing row operations until reduced row echelon form is reached, solving for variables by back substitution, and verifying the solutions are outlined.

Uploaded by

Paolo Valdez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: PAOLO P.

VALDEZ Date: July 17, 2023


Course Code & Subject: CEM 602 – NUMERICAL METHODS FOR ENGINEERS

Assignment Number 4

9.8 Given the equations:

10 x 1+2 x 2−x 3=27


−3 x 1−6 x 2+ 2 x 3=−61.5
x 1+ x2 +5 x 3=−21.5

(a) Solve by naive Gauss elimination. Show all steps of the computation.
(b) Substitute your results into the original equations to check your
answers.
Solution Using Naïve Gauss Elimination:

[ | ]
(a) Naive Gauss elimination: 1 0. 2 −0.1 2 .7
0 1 −0.34 11.16
Step 1: Write the augmented matrix. 0 0 1 −4. 882
Write the augmented matrix by arranging the
coefficients and constants of the variables in a matrix
form: Step 4: Create zeros above the leading entries.

Apply row operations to create zeros above the leading


entries.

[ | ]
10 2 −1 27
−3 −6 2 −61.5 R1 = R1 - (0.2) * R2
1 1 5 −21.5 R3 = R3 - (-0.34) * R2

Step 2: Perform row operations to simplify the matrix. The updated matrix becomes:

Apply row operations to simplify the matrix and

[ | ]
transform it into row-echelon form. The goal is to create 1 0 0 2 .418
zeros below the leading entries. 0 1 0 10.458
R2 = R2 + (3/10) * R1 0 0 1 −4.882

R3 = R3 - (1/10) * R1

The updated matrix becomes: Step 5: Read the solutions:

The row-echelon form of the matrix is obtained, and we

[ | ]
10 2 −1 27 can read the solutions from it:
0 −5 1.7 −55 . 8 X1 = 2.418
0 0 5 .1 −2 4 . 9
X2 = 10.458
Step 3: Scale the leading entries to become 1.
X3 = -4.882
Scale the leading entries to become 1 by dividing each
The solutions to the system of equations are x1 = 2.418,
row by its leading entry.
x2 = 10.458, x3 = -4.882.
R1 = (1/10) * R1
(b) Checking the results:
R2 = (-1/5) * R2
Substituting the obtained values into the original
R3 = (1/5.1) * R3 equations:

The updated matrix becomes: Equation 1: 10x1 + 2x2 – x3 = 27

10(2.418) + 2(10.458) - (-4.882) ≈ 27


Equation 2: -3x1 – 6x2 + 2x3 = -61.5 Step 4: Perform the final row operation to obtain
the reduced row-echelon form.
-3(2.418) - 6(10.458) + 2(-4.882) ≈ -61.5

R3 = -R3
Equation 3: x1 + x2 + 5x3 = -21.5
The updated matrix becomes:
2.418 + 10.458 + 5(-4.882) ≈ -21.5

[ | ]
2 1 −1 1
0 −1 4 −11
9.12 Use Gauss-Jordan elimination to solve: 0 0 1 −18

2 x1 + x 2−x 3=1
5 x 1+2 x 2+ 2 x 3=−4
3 x 1+ x 2 + x 3=5
Step 5: Convert the matrix back into equation form:
Do not employ pivoting. Check your answers by
substituting them into the original equations. 2 x1 + x 2−x 3=1

Solution using Gauss-Jordan Elimination: −x 1+ 4 x 3=−1 1


To solve the system of equations using Gauss-
Jordan elimination, we can represent the system in x 3=−1 8
augmented matrix form and perform row
operations until we reach row-echelon form. Let's
Step 6: Solve for the variables by back-substitution.
proceed step by step:
From the third equation, we have x3 = -18.
Step 1: Write the augmented matrix for the system
Substitute this value into the second equation:
of equations:
-1x2 + 4(-18) = -11

[ |]
2 1 −1 1 -1x2 - 72 = -11
5 2 2 −4 -1x2 = 61
31 1 5 x2 = -61

Step 2: Perform row operations to transform the Now, substitute the values of x2 and x3 into the first
matrix into row-echelon form. We'll use equation:
elementary row operations to achieve this.
2x1 + (-61) - (-18) = 1
R2 = R2 - (5/2) *R1 2x1 - 61 + 18 = 1
R3 = R3 - (3/2) *R1 2x1 - 43 = 1
2x1 = 44
The updated matrix becomes: x1 = 22

[ | ]
2 1 −1 1 So, the solution to the system of equations is:
0 −1 4 −11 X1 = 22
0 −1 3 7 X2 = -61
X3 = -18
Step 3: Perform further row operations to continue
To verify the solution, we can substitute these
transforming the matrix into row-echelon form.
values back into the original equations:
R3 = R3 - R2
2(22) + (-61) - (-18) = 1
44 - 61 + 18 = 1
The updated matrix becomes:
1=1

[ | ]
2 1 −1 1 5(22) + 2(-61) + 2(-18) = -4
0 −1 4 −11 110 - 122 - 36 = -4
0 0 −1 18
-4 = -4
3(22) + (-61) + (-18) = 5
66 - 61 - 18 = 5
5=5

The values satisfy all three original equations,


confirming that the solution is correct.

You might also like