12.07.2015 Views

Lecture Notes Course ÅMA 190 Numerical Mathematics, First ...

Lecture Notes Course ÅMA 190 Numerical Mathematics, First ...

Lecture Notes Course ÅMA 190 Numerical Mathematics, First ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The system then takes the form⎛⎜⎝1 −1 1 −10 0.5 −0.75 .8750 1.5 −0.75 1.1250 2 0 2∣0.36790.23861.28082.3504⎞⎟⎠The coefficient in front of a 2 has the largest absolute value in equation 4 andhence this equation is interchanged with the second one, i.e. we perform apivoting operation before carrying out the elimination:⎛⎞1 −1 1 −10.3679⎜ 0 2 0 22.3504⎟⎝ 0 1.5 −0.75 1.1251.2808 ⎠0 0.5 −0.75 .875 ∣ 0.2386After the interchange we eliminate the coefficient in front of a 2 in the thirdand fourth equations. Thus we subtract the second equation multiplied by1.5/2 = 0.75 from the third equation and by 0.5/2 = 0.25 from the fourthequation. The coefficients and the right hand side in the third and fourthequations change according to:Third equation: −0.75 − 0.75 · 0 = −0.75, 1.125 − 0.75 · 2 = −0.375, 1.2808 −0.75 · 2.3504 = −0.4820Fourth equation: −0.75 − 0.25 · 0 = −0.75, 0.875 − 0.25 · 2 = 0.375, 0.2386 −0.25 · 2.3504 = −0.3490 Then we obtain:⎛⎞1 −1 1 −10.3679⎜ 0 2 0 22.3504⎟⎝ 0 0 −0.75 −0.375−0.4820 ⎠0 0 −0.75 0.375 ∣ −0.3490Before the last elimination step no pivoting is required and we obtain a triangularsystem after subtracting the third equation from the fourth.⎛⎞1 −1 1 −10.3679⎜ 0 2 0 22.3504⎟⎝ 0 0 −0.75 −0.375−0.4820 ⎠0 0 0 0.75 ∣ 0.1330Now back-substitution gives the solution:a 4 = 0.1330/0.75 = 0.17733a 3 = (−0.4820 + 0.375 · a 4 )/(−0.75) = 0.55400a 2 = (2.3504 − 2a 4 )/2 = 0.99787a 1 = 0.3679 + a 4 − a 3 + a 2 = 0.98910Hence we have a 1 = 0.98910, a 2 = 0.99787, a 3 = 0.55400, a 4 = 0.1773332

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!