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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Thus the element c i,j is the scalar product of columns number i and j of matrixA, while f i is the scalar product of column number i of matrix A and theoriginal right hand side b. Since the resulting system A T Ax = A T b, often calledthe normal equations, always is consistent, it may have a unique solution orinfinitely many solution vectors.Example 5.1.2 We consider the same example as in Chapter 2, namely thetask to approximate exp(t) with a polynomial of degree less than 4. Now we doleast squares fit with respect to the set of the five points −1, −0.5, 0, 0.5, 1. Thuswe get an over-determined linear system with 5 equations and 4 unknowns.The following output was obtainedgiven system1.000000 -1.000000 1.000000 -1.000000 .3679001.000000 -.500000 .250000 -.125000 .6065001.000000 .000000 .000000 .000000 1.0000001.000000 .500000 .250000 .125000 1.6487001.000000 1.000000 1.000000 1.000000 2.718300normal equations:5.000000 .000000 2.500000 .000000 6.341400.000000 2.500000 .000000 2.125000 2.8715002.500000 .000000 2.125000 .000000 3.650000.000000 2.125000 .000000 2.031250 2.480675triangular system5.000000 .000000 2.500000 .000000 6.341400.000000 2.500000 .000000 2.125000 2.871500.000000 .000000 .875000 .000000 .479300.000000 .000000 .000000 .225000 .039900solution vector.994394 .997867 .547771 .177333The coefficients c i,j of the left hand side and f i of the right hand side of thenormal equations are obtained by forming the scalar products of the columnsof the given (overdetermined) system. Thus the coefficients of the first normalequation are the scalar products of the first column and the other columns andthe right hand side. Thusc 1,1 is the scalar product of the first column with itself:c 1,1 = 1 + 1 + 1 + 1 + 1 = 5c 1,2 is the scalar products of the first and the second columns:c 1,2 = −1 − 0.5 + 0 + 0.5 + 1 = 0c 1,3 is the product of the first and the third columns:c 1,3 = 1 + 0.25 + 0 + 0.25 + 1 = 2.538

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

Saved successfully!

Ooh no, something went wrong!