Thursday, 1 January 2015

Understanding newton interpolating polynomial



I understand what a Newton Interpolating Polynomial is and what it accomplishes, but I'm not exactly sure how it accomplishes it.
I'm not looking for a proof of why it works, just a layman explanation of how it is calculated, preferably with an example.



A lot like this question but instead of Lagrange Interpolating Polynomial it's about Newton's Interpolating Polynomial.



Answer



Polynomial interpolation amounts to solving a system of linear equations. Let's explain what that means: if you have some polynomials p1,,pn and want to interpolate the data (x1,y1),,(xn,yn), the interpolation problem says: find numbers c1,,cn so that



c1p1(x1)+c2p2(x1)++cnpn(x1)=y1c1p1(x2)+c2p2(x2)++cnpn(x2)=y2c1p1(xn)+c2p2(xn)++cnpn(xn)=yn.



Thus, we can pick and choose the polynomials p that we want to use to find these cs. Good choices will make this system of linear equations easy to solve. In Lagrange interpolation, you choose polynomials k which vanish at all but one node and are equal to 1 at the remaining node. Then the system just becomes c1=y1,c2=y2, etc.




In Newton interpolation we make the system a little bit harder to solve. Specifically, we have p1 which is constant, p2 which vanishes at x1, p3 which vanishes at x1 and x2, and so forth. This idea is fairly similar to Lagrange interpolation: once we've chosen an interpolant for the first k points, we want every change we make to leave those k points alone.



With this choice, the system above becomes



c1p1(x1)=y1c1p1(x2)+c2p2(x2)=y2c1p1(x3)+c2p2(x3)+c3p3(x3)=y3c1p1(xn)++cnpn(xn)=yn.



This system is triangular, whereas the Lagrange system is diagonal. But it is still pretty easy to solve: we read off c1=y1p1(x1), then we plug that into the second equation and solve for c2, then we plug those results into the third equation and solve for c3, etc.



The only remaining thing is to choose these polynomials. But that's not difficult: just pick the simplest polynomials that vanish at x1,,xk1, namely p1=1, pk=(xx1)(xxk1) for k2.



An example: you want to interpolate (1,2),(3,4),(6,10). You have p1=1,p2=x1,p3=(x1)(x3). Your first equation says:



c1=2.




Your second equation says



c1+c22=4.



Plug in what c1 is:



2+2c2=4



so c2=1. Your third equation says




c1+c25+c315=10.



Plug in what you know:



2+5+15c3=10



so c3=15. Thus your interpolant is 2+(x1)+15(x1)(x3).


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...