# Polynomial function

1. Sep 26, 2009

### emyt

1. The problem statement, all variables and given/known data
"If x1, ..... , xn are distinct numbers, find a polynomial function fi of degree n-1 which is 1 at xi and 0 at xj for j =/ i (not equal)."
Hint:

the any number of products with (x - xj) will be 0 at xj.

2. Relevant equations

3. The attempt at a solution

not sure what I should do, I don't think I even fully understand the question

thanks
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Sep 26, 2009

### slider142

It gives you the hint that if you want a polynomial that is 0 at A, B, and C, the polynomial (x - A)(x - B)(x - C) does nicely. It wants you to find a polynomial that is 0 at a bunch of points (xj's) except for the particular point xi, where you have to come up with something that will make it 1 there.

3. Sep 26, 2009

### emyt

thanks for the reply, what does the polynomial of n-1 degree imply?

thanks

4. Sep 26, 2009

### slider142

It doesn't imply anything really. It is giving you a limit of n-1 binomial factors, or less if you increase the degree of one or more factors.

5. Sep 26, 2009

### emyt

this is one of the main things I didn't understand about the question. so would a polynomial of the nth degree be the number of binomial terms present?
I have an answer in mind but I don't know how to get a polynomial of n-1th degree
thanks a lot for the responses

Last edited: Sep 26, 2009
6. Sep 26, 2009

### slider142

When you multiply out the expression, what is the monomial with the highest power? That power is the degree of the polynomial.
Obviously, if you simply use the nth degree polynomial (x - x1)...(x - xn), it will be 0 for each xj including the distinct xi. So what we want to start with is (x - x1)...(x - xn) where x - xi is not included. Can we do something to this (n-1)th degree polynomial to get 1 when x = xi?

7. Sep 26, 2009

### emyt

ohh, I see.. taking out a factor makes it to the n-1th degree, makes sense

(x-xj) / (xi-xj) would be 1 when x = xi I and 0 when x = xj, i just didn't know how that would be a polynomial of the n-1th degree

8. Sep 26, 2009

### emyt

wait , so x1 ..... xn are all xj?

9. Sep 26, 2009

### slider142

This is an excellent solution for the case n=2, where you provide an (n-1)=1st degree polynomial that is 1 for x = x1 and 0 when x = x0. Can you provide one for n=3, and then generalize to all n?

10. Sep 26, 2009

### emyt

hang on, I'm still a bit confused.. how is that a case of n=2?

sorry.. I'm a bit slow

thanks

11. Sep 26, 2009

### slider142

Replace n in your original question with 2:
"If x1, x2 are distinct numbers, find a polynomial function fi of degree 2-1=1 which is 1 at xi and 0 at xj for j =/ i (not equal)."

12. Sep 26, 2009

### emyt

okay, I see that (x-xj)/(xi-xj) is just a degree 1 polynomial. how come we consider the polynomial (x-xj).....(xjn)? where does it say that we should consider that polynomial so (x-xj)/(xi-xj) would be degree n-1?

Last edited: Sep 26, 2009
13. Sep 26, 2009

### slider142

I'm not sure what you're saying. What is xjn? The polynomial you name is of degree n - 1 = 2 - 1 = 1, so it fits the solution to the problem if they only wanted to see the case n = 2.

14. Sep 26, 2009

### emyt

okay, so the polynomial (x - x1)..... (x-xn) will be zero when x = xj. But how come this is our nth degree polynomial? Where does it tell me to use (x - x1)..... (x-xn) as the nth degree polynomial so that (x - xj) / (xi- xj) is n-1th degree?

15. Sep 26, 2009

### slider142

Nowhere! I'm not sure where you're going with this. (x - xj)/(xi - xj) is a 1st degree polynomial, not an (n-1)th degree polynomial. It is only the solution for the case n=2. You still have to find the general solution for all n. It is quite similar to the case n=2 that you have already solved.
The nth degree polynomial (x - x1)...(x - xn) is only a good starting guess at a manipulatable form that needs further work to fit the solution.
Look at the case n = 3.
p(x) = (x - x1)(x - x2)(x - x3) is a polynomial that is zero for each xj, where j = 1, 2, 3. Suppose we want a polynomial that is zero at two of those numbers but is 1 for x = x2. Using your solution, I guess at the 2nd degree polynomial p(x) = [(x - x1)(x - x3)] / [(x2 - x1)(x2 - x3)] . Does this make sense? How can it be generalized to arbitrary n?

16. Sep 26, 2009

### emyt

ohh alright, I understand now.. thanks a lot and sorry for dragging it out for so long

n PI product j=1 j /= i (x - xj) / n PI product j=1 j /=i (xi - xj)