Quadratic InterpolationDate: 03/27/2003 at 19:03:56 From: Jaeda Subject: Lagrangian Form of a Polynomial I need to derive a polynomial of degree three. The answer is y = [(x-x2)(x-x3)]/[(x1-x2)(x1-x3)]*y1 + [(x-x1)(x-x3)]/[(x2-x1)(x2- x3)]*y2 + [(x-x1)(x-x2)]/[(x3-x1)(x3-x2)]*y3. I know this is the answer by the formula for Lagrange. I don't know how to derive it. Date: 03/28/2003 at 08:35:20 From: Doctor Fenton Subject: Re: Lagrangian Form of a Polynomial Hi Jaeda, Thanks for writing to Dr. Math. Actually, the formula you wrote is a quadratic polynomial, which is of degree 2, not 3. This polynomial is used for interpolation, that is, given a list of points (x1,y1), (x2,y2), (x3,y3), with all the x's different, then there is exactly one quadratic polynomial through all three points (if the three points happen to lie on a line, then the coefficient of x^2 will be 0, and the "quadratic" reduces to a line, but the formula will automatically take care of this). The idea is this. Suppose you can find three quadratic polynomials L1(x), L2(x), and L3(x), with the following properties: (1) L1(x1) = 1; L1(x2) = 0; L1(x3) = 0; (2) L2(x1) = 0; L2(x2) = 1; L2(x3) = 0; (3) L3(x1) = 0; L3(x2) = 0; L3(x3) = 1 . Then the polynomial P(x) = y1*L1(x) + y2*L2(x) + y3*L3(x) is quadratic (it's a sum of three quadratics, each multiplied by a number), and P(x1) = y1 , P(x2) = y2, and P(x3) = y3. To find L1, for example, we know by the Factor Theorem that since L1 is a quadratic, with roots x2 and x3, that L1(x) = A(x-x2)(x-x3). We can choose A so that L1(x1) = 1. Evaluating L1 at x1, L1(x1) = A(x1-x2)(x1-x3), so if A(x1-x2)(x1-x3) = 1, 1 then A = -------------- (x1-x2)(x1-x3) . You can find L2 and L3 similarly, and these will give you the formula you are looking for. These same ideas apply equally well to any degree polynomial, so you can write down a polynomial of degree n through any given list of (n+1) points (x(1),y(1)),...,(x(n+1),y(n+1)) if all the x coordinates are different. If you have any questions, please write back and I will try to explain further. - Doctor Fenton, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/