Given a set $A = \{a_1, a_2, ... , a_n\}$
And a set $B = \{b_1, b_2, ..., b_n\}$ where $n > 0$ (neither $A$ nor $B$ are $\emptyset$) and $a_1 \ne a_2 \ne ... \ne a_n$
With no further restrictions on $B$ does there always exist a polynomial function, $P$, with $order \le n $ such that $P(a_n)=b_n$?

Thanks :)


Hint: use Lagrange interpolation:

$P=\sum_{i=1,..,n} b_i{{(X-a_1)..(X-a_{i-1})(X-a_{i+1})..(X-a_n)}\over{(a_i-a_1)..(a_i-a_{i-1})(a_i-a_{i+1})..(a_i-a_n)}}$

| cite | improve this answer | |
  • $\begingroup$ Thanks! This is really cool! $\endgroup$ – Oisín Moran Oct 30 '16 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.