0

I've been stuck on a problem in spivak calculus and can't find the anwser anywhere.. I'm wondering if I'm missing something so here it goes:

Question

Find a polynomial function $f$ of degree $n-1$ such that $f(x_i) = a_i$ where $a_i,...., a_n$ are given numbers. It should give us the lagrange interpolation formula.

Solution

In part a), we showed that

$f_i(x) =\frac{\prod_{ j\neq i} (x-x_j)}{\prod_{ j\neq i} (x_i-x_j) } = 1$ for $f_i(x_i)$ and $0$ for $f_i(x_j)$

Therefore I assumed that if I want $a_i$ for $f(x_i)$ I would simply need

$f(x) = a_i \cdot f_i(x)$

But the book awnser is

$f(x) = \sum_{i=1}^n a_i \cdot f_i(x)$

But it seems to me that $f(x_i)$ would be $ \sum_{i=1}^n a_i \neq a_i $

Am I missing somethign or maybe misunderstanding the question?

THank you in advance and I can't write the sum and prod very well I'm sorry.

Ianatore
  • 613
  • $f(x)$ must be $a_i$ at $x_i$ but from their awnser I find that $f_i(x) = 1$ at $x_i$ and the other part gives $a_1 + a_2 + ... + a_i$ but the questions states that it must be $= a_i$ at $x_i$ and this is there I get confused – Ianatore Aug 05 '17 at 21:29
  • See my answer (the notation was inconsistent with yours in my prior comment). – Bill Dubuque Aug 05 '17 at 21:39

1 Answers1

1

You need to add in the other terms so that $f$ takes the correct value at all points $x_j$.

Intuitively, the idea is that each polynomial of degree $< n$ is uniquely determine by its values at $\,n\,$ distinct points $\,x_i,\,$ since if $f$ and $g$ agree on these points then $\,f-g$ is divisible by all $\,x-x_i$ so also by their lcm = product. But this has degree $n$ and $f-g$ has smaller degree, so $f-g = 0.\,$

Thus we can represent $f$ by a vector of values $[f(x_1),\ldots f(x_n)]$ at the $x_i.\,$ Lagrange interpolation essentially amounts to writing $f$ in terms of the unit vectors in this basis, i.e.

$$\begin{align} f_1 &= [1,0,0,\ldots]\\ f_2 &= [0,1,0,\ldots]\\ &\ \ \vdots\\ f_n &= [0,\ldots,0,1]\\ \Rightarrow\ f:= \sum a_i f_i &= [a_1,\ldots,a_n] \end{align}$$

Therefore the above polynomial satisfies $\,f(x_i) = a_i,\,$ as desired.

This will become clearer when one learns about product rings and CRT = Chinese Remainder Theorem. Lagrange interpolation is a special case: solving $\,f\equiv a_i\pmod{x-x_i}.$

Bill Dubuque
  • 272,048