Lagrange interpolation formula

swevener
Messages
21
Reaction score
0

Homework Statement


(a) If x_{1},\ldots, x_{n} are distinct numbers, find a polynomial function f_{i} of degree n - 1 which is 1 at x_{i} and 0 at x_{j} for j \ne i. Hint: the product of all (x - x_{j}) for j \ne i is 0 at x_{j} if j \ne i. This product is usually denoted by
\prod_{\substack{j = 1 \\ j \ne i}}^{n} (x - x_{j}).
(b) Now find a polynomial function f of degree n - 1 such that f(x_{i}) = a_{i}, where a_{1},\ldots,a_{n} are given numbers. (You should use the functions f_{i} from part (a). The formula you will obtain is called the "Lagrange interpolation formula.")

3. [strike]The attempt at a solution[/strike] Questions
Why are these polynomials of degree n - 1? Because of the j \ne i?
[strike]And the hint in part (a), where does that come from? Why can we say the product is zero if[/strike] j \ne i? Figured this one out. I misread the problem.
 
Last edited:
Physics news on Phys.org
Anyone has a MATLAB code for lagrange interpolation and Barycentric , please help
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top