1. **Problem statement:** Solve the system of equations
$$\begin{cases} x + 4y + z = 1 \\ 8x + 64y - 2z = 12 \\ 9x + 154y + 9z = 12 \end{cases}$$
2. **LU Decomposition method:**
We want to write the coefficient matrix $A$ as $A = LU$ where $L$ is lower triangular and $U$ is upper triangular.
Matrix $A$ and vector $b$ are:
$$A = \begin{bmatrix} 1 & 4 & 1 \\ 8 & 64 & -2 \\ 9 & 154 & 9 \end{bmatrix}, \quad b = \begin{bmatrix} 1 \\ 12 \\ 12 \end{bmatrix}$$
3. **LU decomposition steps:**
- First row of $U$ is the first row of $A$:
$$U_{1,:} = [1, 4, 1]$$
- Compute multipliers for $L$:
$$L_{2,1} = \frac{8}{1} = 8, \quad L_{3,1} = \frac{9}{1} = 9$$
- Update rows 2 and 3 of $A$:
$$R_2 := R_2 - L_{2,1} R_1 = [8,64,-2] - 8[1,4,1] = [0, 64 - 32, -2 - 8] = [0, 32, -10]$$
$$R_3 := R_3 - L_{3,1} R_1 = [9,154,9] - 9[1,4,1] = [0, 154 - 36, 9 - 9] = [0, 118, 0]$$
- Now second row of $U$ is:
$$U_{2,:} = [0, 32, -10]$$
- Compute multiplier:
$$L_{3,2} = \frac{118}{32} = \frac{59}{16}$$
- Update row 3:
$$R_3 := R_3 - L_{3,2} R_2 = [0, 118, 0] - \frac{59}{16}[0, 32, -10] = [0, 118 - 118, 0 - \frac{59}{16} \times (-10)] = [0, 0, \frac{590}{16}] = [0, 0, \frac{295}{8}]$$
- Third row of $U$ is:
$$U_{3,:} = [0, 0, \frac{295}{8}]$$
- Matrix $L$ is:
$$L = \begin{bmatrix} 1 & 0 & 0 \\ 8 & 1 & 0 \\ 9 & \frac{59}{16} & 1 \end{bmatrix}$$
4. **Solve $Ly = b$:**
$$\begin{cases} y_1 = 1 \\ 8 y_1 + y_2 = 12 \\ 9 y_1 + \frac{59}{16} y_2 + y_3 = 12 \end{cases}$$
- From first: $y_1 = 1$
- Second: $8(1) + y_2 = 12 \Rightarrow y_2 = 4$
- Third: $9(1) + \frac{59}{16}(4) + y_3 = 12$
$$9 + \frac{236}{16} + y_3 = 12 \Rightarrow y_3 = 12 - 9 - \frac{236}{16} = 3 - \frac{59}{4} = \frac{12}{4} - \frac{59}{4} = -\frac{47}{4}$$
5. **Solve $Ux = y$:**
$$\begin{cases} x + 4 y + z = y_1 = 1 \\ 32 y - 10 z = y_2 = 4 \\ \frac{295}{8} z = y_3 = -\frac{47}{4} \end{cases}$$
- From third:
$$z = \frac{-\frac{47}{4}}{\frac{295}{8}} = -\frac{47}{4} \times \frac{8}{295} = -\frac{376}{1180} = -\frac{47}{147.5} = -\frac{8}{25}$$
- From second:
$$32 y - 10 z = 4 \Rightarrow 32 y = 4 + 10 z = 4 + 10 \times \left(-\frac{8}{25}\right) = 4 - \frac{80}{25} = 4 - 3.2 = 0.8$$
$$y = \frac{0.8}{32} = \frac{1}{40}$$
- From first:
$$x + 4 y + z = 1 \Rightarrow x = 1 - 4 y - z = 1 - 4 \times \frac{1}{40} - \left(-\frac{8}{25}\right) = 1 - \frac{1}{10} + \frac{8}{25} = 1 - 0.1 + 0.32 = 1.22 = \frac{61}{50}$$
**Final solution by LU decomposition:**
$$x = \frac{61}{50}, \quad y = \frac{1}{40}, \quad z = -\frac{8}{25}$$
6. **Gaussian Elimination method:**
Start with augmented matrix:
$$\left[ \begin{array}{ccc|c} 1 & 4 & 1 & 1 \\ 8 & 64 & -2 & 12 \\ 9 & 154 & 9 & 12 \end{array} \right]$$
- Eliminate $x$ from rows 2 and 3:
$$R_2 := R_2 - 8 R_1 = [8,64,-2,12] - 8[1,4,1,1] = [0, 32, -10, 4]$$
$$R_3 := R_3 - 9 R_1 = [9,154,9,12] - 9[1,4,1,1] = [0, 118, 0, 3]$$
- Eliminate $y$ from row 3:
Multiplier:
$$m = \frac{118}{32} = \frac{59}{16}$$
$$R_3 := R_3 - m R_2 = [0,118,0,3] - \frac{59}{16}[0,32,-10,4] = [0,0, \frac{590}{16}, 3 - \frac{59}{16} \times 4] = [0,0, \frac{295}{8}, 3 - \frac{59}{4}] = [0,0, \frac{295}{8}, -\frac{47}{4}]$$
- Back substitution:
$$z = \frac{-\frac{47}{4}}{\frac{295}{8}} = -\frac{8}{25}$$
$$32 y - 10 z = 4 \Rightarrow 32 y = 4 + 10 \times \frac{8}{25} = 4 + \frac{80}{25} = 4 + 3.2 = 7.2$$
$$y = \frac{7.2}{32} = \frac{9}{40}$$
$$x + 4 y + z = 1 \Rightarrow x = 1 - 4 \times \frac{9}{40} - \left(-\frac{8}{25}\right) = 1 - \frac{9}{10} + \frac{8}{25} = 1 - 0.9 + 0.32 = 0.42 = \frac{21}{50}$$
**Final solution by Gaussian elimination:**
$$x = \frac{21}{50}, \quad y = \frac{9}{40}, \quad z = -\frac{8}{25}$$
Note: The difference in $y$ and $x$ values between LU and Gaussian elimination is due to a calculation error in LU step 5 for $y$; the Gaussian elimination values are correct.
**Corrected LU solution:**
From step 5 second equation:
$$32 y - 10 z = 4 \Rightarrow 32 y = 4 + 10 \times \left(-\frac{8}{25}\right) = 4 - \frac{80}{25} = 4 - 3.2 = 0.8$$
$$y = \frac{0.8}{32} = \frac{1}{40}$$
This conflicts with Gaussian elimination result $y=\frac{9}{40}$. Rechecking Gaussian elimination step:
$$32 y - 10 z = 4$$
$$z = -\frac{8}{25}$$
$$32 y - 10 \times \left(-\frac{8}{25}\right) = 4$$
$$32 y + \frac{80}{25} = 4$$
$$32 y + 3.2 = 4$$
$$32 y = 0.8$$
$$y = \frac{0.8}{32} = \frac{1}{40}$$
So Gaussian elimination $y=\frac{1}{40}$ matches LU result.
Recalculate $x$:
$$x = 1 - 4 y - z = 1 - 4 \times \frac{1}{40} - \left(-\frac{8}{25}\right) = 1 - \frac{1}{10} + \frac{8}{25} = 1 - 0.1 + 0.32 = 1.22 = \frac{61}{50}$$
**Final consistent solution:**
$$x = \frac{61}{50}, \quad y = \frac{1}{40}, \quad z = -\frac{8}{25}$$
Lu Gaussian Solve 34D5Fa
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.