

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Numerical Methods; Subject: Engineering Applied Sci-Davis; University: University of California - Davis; Term: Fall 2004;
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Extrapolation Find an approximation for the data using f(x) Linear ax+b, find a and b o Compute error E= (axi+b-yi)^2 o Sxx= xixi, Sx= xi, Sxy= xiyi, Sy= yi o dE/db=2 (axi+b-yi)= o nb+a xi= yi o dE/da=2 (axi+b-yi)xi= o b xi +a xi^2 = xiyi o Sxa+nb=Sy o Sxxa+Sxb=Sxy Parabola ax^2 +bx+c find a,b and c…- Same method o dE/da=2 xi^2 (axi^2 +bxi+c-f(xi))xi= o Sxxxxa+Sxxxb+ Sxxc =Sxxy o Sxxxa+Sxxb+ Sxc=Sxy o Sxxa+Sxb+ nc=Sy General least square o f(x)= ajgj(x) o E= ( ajgj(xi) -yi)^2 o dE/dak=0= gk (xi)( ajgj(xi) - yi)= o jaj i gk (xi)gj(xi) - i gk (xi)yi= o bjk= i gk (xi)gj(xi) o ck= i gk (xi)yi o Ba=c Continuous observations – same thing with integral o f(x)= ajgj(x) o E= (ajgj(x) -y))^2 dx o dE/dak=0= gk (x)(ajgj(x) - y))dx= o jajgk (x)gj(x) dx- gk (x)y)dx= o bjk= gk (x)gj(x)dx o ck= gk (x)y)dx o Ba=c Legendre poly)nomials o If the poly)nomial are orthogonal with a weight function of 1 then B is diagonal and ai=ci/bii o Moreover each a does not depend on its predecessors. o We can rescale the range of integration to [1,-1] and the orthogonal poly)nomial will become the legendre poly)nomials. o If the integration is over the range [z,w] we replace x by) [2x-w-z]*/ [w-z] General theory) o Given a set of n observations y)i and a function with m components f(x)= xjgj(x) o We want xjgj(xi)=y)i
o We denote aij=gj(xi) and obtain Ax=y), where A is nm, a is a m vector and y) is a n vector o Since A is over determined there will usually) be no solution, but we want to minimize the residual. We want r=Ax-y) to be minimal and we use the Euclidean norm to find the minima (since it is a convex function it alway)s exist) o ||r|| is minimal is equivalent to ||r||^2 minimal o ||r||^2 =rTr=(Ax-y))T(Ax-y))=xTATAx-y)TAx-xTATy)+y)Ty) o We want to find the minima relative to a, so that we want the gradient of the error to be minimal E= o ATAx-ATy)= o Let is denote C=ATA and b= ATy) and we are back to Cx=b, where C is a square matrix. If A has full rank then C is non-singular o Now we will look for way) to create a simple C with a low condition Cholesky) o If matrix M is positive definite and sy)mmetric, we can fact prize M=LLT, where L is lower diagonal. o l 11 =(m 11 )^2. o Deal with every) row of L (or column of LT) one after the other. o Once we solved ATA=LLT, we can solve LLTx=ATy) o Lz= ATy) o LTx=z SVD o Any) matrix Mnm can be divided into M=UnmnmVmmT, where U and V are orthogonal and is diagonal ij=0 when ij. o This is denoted singular value decomposition (SVD). o We can divide nm into mm and On-mm. Similarly) we can divide Unn into U1nm and U2nn-m. o ATAx=ATb o VmmmnTUnnT^ UnnnmVmmTx= VmmmnTUnnTb o VmmmnTnmVmmTx= VmmmnTUnnTb o mnTnmVmmTx= mnTUnnTb o mmT1mmVmmTx= (^1) mmTU1mnTb o 1mmVmmTx= U1mnTb o x=Vmm1mm-1U1m*nTb QR o If Q is orthogonal then ||Qv||^2 =(Qv)T(Qv)=vTQTQv=vTv=||v||^2 o Let us denote R as an upper triangular and Q as orthogonal, while O is a zero matrix o if A=Q[R,O]T^ then ||r||^2 =(Ax-b)T(Ax-b)=||Q[R,O]Tx-b||^2 =||[R,O]Tx- QTb||^2. o We denote QTb as [c 1 ,c 2 ]T^ , ||r||^2 =||Rx-c 1 ||^2 +||c 2 ||^2. The minimum is obviously) obtained when Rx=c 1 QR facrorization o Housleholder matrix o H=I-2vvT/(vTv) o Hu=u-2vvTu/(vTv)= u-2vTu/(vTv)v