Proposition 4.1.1.
It is more convenient to choose a linear combination of orthogonal polynomials to fit data. For the given observation data (xk,yk) ( k=1,,M ), assume that {xk} satisfy 1=x1 and are equally spaced. Choose the following linear combination of normal Legendre polynomials Pn(x) (see ()) to fit the data
f(x)=a0P0(x)+a1P1(x)++aNPN(x).
F(a0,a1,,aN)=k=1M(f(xk)yk)2=k=1M=0NaP(xk)yk2.
k=1M=0NaP(xk)ykP(xk)=0(=0,1,,N).
The left-hand side is equal to =0Nk=1MP(xk)P(xk)ak=1MykP(xk) . So
(4.1.2) ,=k=1MP(xk)P(xk),=k=1MykP(xk).
Since x1,,xM are equally spaced nodes on [1,1] and normal Legendre polynomials satisfy
,=k=1MP(xk)P(xk)0(),,=k=1MP2(xk)M12.
From this and (), a2M1 ( =0,1,,N ), where are stated in ().
Proposition 4.1.2.
Let 1=x0 and let them be equally spaced, and data (xk,yk) ( k=0,1,,M ) be given. Then the polynomial fitting data is f(x)==0NP(x) , where 2M1k=1MykP(xk) and P(x) is the -th normal Legendre polynomial.
Now we consider the orthogonal polynomial with weight function to fit the given data.
Given data (xk,yk) ( k=1,,M ) satisfying a=x1 , the normal orthogonal polynomials P()(x) ( =0,1, ) on [a,b] with weight function (x) satisfy
abP()(x)P()(x)(x)dx=,,
where , is the Kronecker delta. Then the polynomial fitting data is
f(x)==0N()P()(x),
where
()2M1k=1MykP()(xk)(xk).
4.1.2 Orthogonality method
In fitting data using the orthogonality method, the BC-decomposition of matrices is crucial.
BC-decomposition
Let A be an MN matrix with rank r, where MN . Then the matrix A can be decomposed into A=BC , where B is an Mr matrix, C is an rN matrix, and ranks of B and C are both r.
In fact, let A=(ij)MN and aj=(1j,,Mj)T ( j=1,,N ) be its j-th column vector. Since rank(A)=r , there are r linearly independent column vectors. Say, a1,a2,,ar are the r linearly independent column vectors. We construct an orthonormal basis e1,e2,,eM on RM such that for any s=2,,M ,
esaj(j=1,,s1).
Let P=(e1|e2||eM) . Then P is an orthogonal matrix of order M. Define U=PTA . Since PT=P1 ,
A=PU.
Let U=(ukl)MN , where ukl=(ek,al) . Since a1,a2,,ar are linearly independent, al=j=1rcjlaj ( l>r ). From this and esaj , it follows that ukl=(ek,al)=j=1rcjl(ek,aj)=0 ( k>r ). Denote B=(ukl)k,l=1,,r and C=(ukl)k=1,,r;l=r+1,,N . So
U=BC00
and the product PU only depends on the first r columns of P and the first r rows of U, and A=PU=BC , where B=(e1|e2||er) and C=(B|C) .
Consider a general system of linear independent functions 1(x),2(x),,N(x) . We use their linear combination F(x) to fit observation data (xi,yi) ( i=1,,M ), where MN , such that
2:=i=1Mj=1Njj(xi)yi2
attains the minimal value. Some often used function systems are the power function system {xi} , the trigonometric function system sin(ix) , and the exponential function system {eix} .
Let Fj=0 . Then
(4.1.3) i=1Mj(xi)j=1Njj(xi)yi=0(i=1,,M).
This is a system of linear equations. The matrix form is AT(Ay)=0 , where
A=(ij)MN,=(1,,N)T,y=(y1,,yM)T,
and ij=j(xi) ( i=1,,M ; j=1,,N ). Denote by =(1,,N) the solution of (). Then the combination fitting data is j=1Njj(x) . We solve out = below.
Replacing A by its BC-decomposition in the matrix form of (),
CTBTBC=CTBTy.
Multiplying both sides by C,
(CCT)(BTB)C=(CCT)BTy.
Both CCT and BTB are rr nonsingular matrices and rank(B)=rank(C)=r , so
C=W,whereW=(BTB)1BTy.
This implies that CT(CCT)1C=CT(CCT)1W . Note that CT(CCT)1C=I . The desired solution is
=CT(CCT)1W=CT(CCT)1(BTB)1BTy.
Write =(1,,N) . So the combination F(x) fitting data is j=1Njj(x) .
4.2 Lagrange interpolation
Given a real sequence yk ( k=1,,n ) and nodes xk ( k=1,,n ), where x1, we construct a Lagrange interpolation polynomial Ln(x) of degree n1 such that Ln(xk)=yk ( k=1,,n ). Moreover, we introduce the uniform convergence and mean convergence of the Lagrange interpolation polynomial sequences.
4.2.1 Fundamental polynomials
Let n(x) be the product of n factors (xxk) ( k=1,,n ), i.e.,
n(x)=(xx1)(xx2)(xxn).
Then n(x) is a polynomial of degree n and n(xk)=0 ( k=1,,n ), and
n(xk)=(xkx1)(xkxk1)(xkxk+1)(xkxn)(k=1,,n).
Define fundamental polynomials as
(4.2.1) lk(x)=n(x)n(xk)(xxk)(k=1,,n).
Then lk(x) is a polynomial of degree n1 and lk(xj)=jk for j,k=1,,n , where jk is the Kronecker delta.
Let P(x) be any polynomial of degree n1 . Then P(x)=k=1nP(xk)lk(x) . In fact, let
Q(x)=1nP(xk)lk(x).
Then Q(x) is a polynomial of degree n1 and Q(xk)=P(xk) ( k=1,,n ). These n pairs of values determine that P(x)=Q(x) , i.e., P(x)=k=1nP(xk)lk(x) .
4.2.2 Lagrange interpolation polynomials
Lagrange interpolation polynomial of degree n1 is defined as
(4.2.2) Ln(x)=1nyklk(x)=1nykn(x)n(xk)(xxk).
Clearly, Ln(xj)=yj ( j=1,,n ). Formula () is called the Lagrange interpolation formula. For convenience of computation, it is rewritten in the form
(4.2.3) Ln(x)=c0+c1(xx1)+c2(xx1)(xx2)++cn1(xx1)(xx2)(xxn1).
This form is called the Newton interpolation formula. The coefficients {ck} are computed as follows.
c0=y1,c1=y2c0x2x1,ck1=ykc0l=1k2cl(xkx1)(xkxl)(xkx1)(xkxk1)(k=3,,n).
The combination of Lagrange and Newton interpolation formulas gives
(4.2.4) ck1==1kyk(x)(k=1,,n).
When we add a node, if we use the Lagrange interpolation formula, this again necessitates computing each fundamental polynomial li(x) ; if we use the Newton interpolation formula, the coefficients already computed do not have to be changed. Therefore, in numerical computations, it is best to use the Newton interpolation formula.