Use Gauss elimination to solve 4x1 x2 x3 2 5x1 x2 2x3
Use Gauss elimination to solve: 4x_1 + x_2 - x_3 = -2 5x_1 + x_2 + 2x_3 = 4 6x_1 + x_2 + x_3 = 6 Employ partial pivoting and check your answers by substituting them into the original equations.
Solution
4x1 + x2 - x3 = -25
x1 + x2 + 2x3 = 4
6x1 + x2 + x3 = 6
Rewrite the system in matrix form and solve it by Gaussian Elimination (Gauss-Jordan elimination)
4 1 -1 -2
5 1 2 4
6 1 1 6
R1 R1 / 4
1 0.25 -0.25 -0.5
5 1 2 4
6 1 1 6
R2 R2 - 5 R1 ;
R3 R3 - 6 R1
1 0.25 -0.25 -0.5
0 -0.25 3.25 6.5
0 -0.5 2.5 9
R2 R2 / -0.25
1 0.25 -0.25 -0.5
0 1 -13 -26
0 -0.5 2.5 9
R1 R1 - 0.25 R2;
R3 0.5 R2 + R3
1 0 3 6
0 1 -13 -26
0 0 -4 -4
R3 / -4 R3
1 0 3 6
0 1 -13 -26
0 0 1 1
R1 R1 - 3 R3;
R2 13R3 + R2
1 0 0 3
0 1 0 -13
0 0 1 1
x1 = 3x2 = -13x3 = 1
Make a check:
4·3 + (-13) - 1 = 12 - 13 - 1 = -2
5·3 + (-13) + 2·1 = 15 - 13 + 2 = 4
6·3 + (-13) + 1 = 18 - 13 + 1 = 6
Check completed successfully.
Answer:
x1 = 3
x2 = -13
x3 = 1

