# Lagrange interpolation formula

• swevener
In summary, the conversation discusses how to find polynomial functions of degree n-1 that have specific values at given points. The first part (a) involves finding a polynomial f_i that is equal to 1 at x_i and 0 at all other distinct numbers x_j. The hint explains that this can be achieved by taking the product of all (x-x_j) for j≠i, which is equal to 0 at x_j if j≠i. The second part (b) introduces the Lagrange interpolation formula, which uses the functions f_i from part (a) to find a polynomial f of degree n-1 with given values at x_i. The conversation also mentions that the formula is sometimes called the B
swevener

## 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: