MATH 2370 Lecture Notes - Lecture 14: Lagrange Polynomial, Newton Polynomial, Matlab
Document Summary
Interpolation theorem ex: if you have 4 data points, you are guaranteed only one polynomial of degree 0, 1, 2 or 3, only one will "work" Algorithm - one of many ways to find this polynomial, p(x), is the lagrange method (lagrange form) Will not find a polynomial of degree 0 or 1, only polynomial of degree 2 goes through the points. Find the lagrange polynomial that passes though (-1,2), (0,-1), (2,1) (you will make a vector the x points and a vector of the y points) Note: the polynomial will be degree 0, 1, or 2. Given n distinct points, ( ), where , there is a unique polynomial of degree n-1 that will pass through these points. P(x): computed with a divided-difference algorithm p= Newton form: another algorithm to find the same polynomial as lagrange form, but it"s more efficient: Newton"s form can be made more efficient with nesting: Algorithm -> pseudocode: for i=n-1:-1:1 p= p= +(x- )*(p)