Task 2:
Find the solution of the following equations using Gaussian elimination. Show the steps.

[tex]\[
\begin{array}{l}
x - y + z = 4 \\
5x - y + z = 6 \\
3x - y + 5z = 5
\end{array}
\][/tex]



Answer :

To solve the given system of linear equations using Gaussian Elimination, we will perform a series of steps called forward elimination to reduce the system to an upper triangular form and then perform back substitution to find the solution. Here are the detailed steps to achieve this:

Given System of Equations:
[tex]\[ \begin{cases} x - y + z = 4 & \quad (1) \\ 5x - y + z = 6 & \quad (2) \\ 3x - y + 5z = 5 & \quad (3) \end{cases} \][/tex]

### Step 1: Forward Elimination

#### a. Eliminate [tex]\(x\)[/tex] from equations (2) and (3) using equation (1)

First, we will make the coefficients of [tex]\(x\)[/tex] in equations (2) and (3) zero.

1. For equation (2):
[tex]\[ \text{Equation (2)} - 5 \times \text{Equation (1)} \][/tex]
[tex]\[ (5x - y + z) - 5(x - y + z) = 6 - 5 \times 4 \][/tex]
[tex]\[ 5x - y + z - (5x - 5y + 5z) = 6 - 20 \][/tex]
Simplifying:
[tex]\[ - y + z + 5y - 5z = -14 \][/tex]
[tex]\[ 4y - 4z = -14 \][/tex]
[tex]\[ y - z = - \frac{14}{4} = - 3.5 \][/tex]
Simplified:
[tex]\[ 4y - 4z = -14 \quad \text{(Equation 2')} \][/tex]

2. For equation (3):
[tex]\[ \text{Equation (3)} - 3 \times \text{Equation (1)} \][/tex]
[tex]\[ (3x - y + 5z) - 3(x - y + z) = 5 - 3 \times 4 \][/tex]
[tex]\[ 3x - y + 5z - (3x - 3y + 3z) = 5 - 12 \][/tex]
Simplifying:
[tex]\[ - y + 5z + 3y - 3z = -7 \][/tex]
[tex]\[ 4y + 2z = -7 \][/tex]
Simplified:
[tex]\[ 4y + 2z = -7 \quad \text{(Equation 3')} \][/tex]

#### b. Eliminate [tex]\(y\)[/tex] from equation (3') using equation (2')

To eliminate [tex]\(y\)[/tex] from equation (3'):

[tex]\[ \text{Equation (3')} - \frac{4}{4} \times \text{Equation (2')} \][/tex]

[tex]\[ (4y + 2z) - (4y - 4z) = -7 - (-14) \][/tex]

Simplifying:

[tex]\[ 4y + 2z - 4y + 4z = 7 \][/tex]

[tex]\[ 6z = 7 \quad \text{(Equation 3'')} \][/tex]

Simplified:
[tex]\[ 0 + 4z = 0 \quad \text{(Equation 3'')} \][/tex]

### Step 2: Back Substitution

Now we have the upper triangular system:
[tex]\[ \begin{cases} x - y + z = 4 \quad \text{(Equation 1)} \\ 4y - 4z = -14 \quad \text{(Equation 2')} \\ 0 + 4z = 0 \quad \text{(Equation 3'')} \end{cases} \][/tex]

From Equation (3''):
[tex]\[ 4z = 0 \implies z = 0 \][/tex]

Substitute [tex]\(z = 0\)[/tex] into Equation (2'):

[tex]\[ 4y - 4(0) = -14 \][/tex]
[tex]\[ 4y = -14 \][/tex]
[tex]\[ y = -\frac{14}{4} = -3.5 \][/tex]

Substitute [tex]\(y = -3.5\)[/tex] and [tex]\(z = 0\)[/tex] into Equation (1):

[tex]\[ x - (-3.5) + 0 = 4 \][/tex]
[tex]\[ x + 3.5 = 4 \][/tex]
[tex]\[ x = 4 - 3.5 = 0.5 \][/tex]

### Solution

The solution to the system of equations is:
[tex]\[ x = 0.5, \quad y = -3.5, \quad z = 0 \][/tex]