GNU Octave, version 2.9.8 (i486-pc-linux-gnu). Copyright (C) 2006 John W. Eaton. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to (but first, please read http://www.octave.org/bugs.html to learn how to write a helpful report). ------------------------------------------------ Part a) -- original matrix ------------------------------------------------ Ab = 3.02000 -1.05000 2.53000 -1.61000 4.33000 0.56000 -1.78000 7.23000 -0.83000 -0.54000 1.47000 -3.38000 ------------------------------------------------ Begin step 1 pivot = 3.0200 row(2) <- row(2) - 4.33/3.02 * row(1) row(3) <- row(3) - -0.83/3.02 * row(1) Ab = 3.020000 -1.050000 2.530000 -1.610000 0.010000 2.060000 -5.400000 9.530000 -0.010000 -0.820000 2.150000 -3.810000 ------------------------------------------------ Begin step 2 pivot = 2.0600 row(3) <- row(3) - -0.82/2.06 * row(2) Ab = 3.02000 -1.05000 2.53000 -1.61000 0.01000 2.06000 -5.40000 9.53000 -0.01000 0.00000 -0.01000 0.00000 ------------------------------------------------ Backsubstitution sol = 1.08000 4.63000 -0.00000 residual = 0.010100 0.018600 -0.010800 exact_solution = 1.00000 2.00000 -1.00000 ------------------------------------------------ Part b) -- changed A(1,1) ------------------------------------------------ Ab = 3.01000 -1.05000 2.53000 -1.61000 4.33000 0.56000 -1.78000 7.23000 -0.83000 -0.54000 1.47000 -3.38000 ------------------------------------------------ Begin step 1 pivot = 3.0100 row(2) <- row(2) - 4.33/3.01 * row(1) row(3) <- row(3) - -0.83/3.01 * row(1) Ab = 3.01000 -1.05000 2.53000 -1.61000 -0.00000 2.07000 -5.42000 9.55000 0.01000 -0.83000 2.18000 -3.83000 ------------------------------------------------ Begin step 2 pivot = 2.0700 row(3) <- row(3) - -0.83/2.07 * row(2) Ab = 3.01000 -1.05000 2.53000 -1.61000 -0.00000 2.07000 -5.42000 9.55000 0.01000 -0.00000 0.01000 -0.01000 ------------------------------------------------ Backsubstitution sol = 1 2 -1 residual = -0.0100000 0.0100000 0.0100000 percentage_change = 7.4074 56.8035 Inf exact_solution = 1.06001 4.12536 -0.18537 ------------------------------------------------ Part c) -- changed b(3) ------------------------------------------------ b2 = -1.6100 7.2300 -3.3900 Ab = 3.02000 -1.05000 2.53000 -1.61000 4.33000 0.56000 -1.78000 7.23000 -0.83000 -0.54000 1.47000 -3.39000 ------------------------------------------------ Begin step 1 pivot = 3.0200 row(2) <- row(2) - 4.33/3.02 * row(1) row(3) <- row(3) - -0.83/3.02 * row(1) Ab = 3.020000 -1.050000 2.530000 -1.610000 0.010000 2.060000 -5.400000 9.530000 -0.010000 -0.820000 2.150000 -3.820000 ------------------------------------------------ Begin step 2 pivot = 2.0600 row(3) <- row(3) - -0.82/2.06 * row(2) Ab = 3.02000 -1.05000 2.53000 -1.61000 0.01000 2.06000 -5.40000 9.53000 -0.01000 0.00000 -0.01000 -0.01000 ------------------------------------------------ Backsubstitution sol = 1.1500 7.2500 1.0000 residual = 5.0000e-04 1.6500e-02 -1.1500e-02 percentage_change = 6.4815 56.5875 Inf exact_solution = 1.1855 8.6991 1.5588