# Thread: Finding a specific funcion with parameters given, tough seeming question

1. ## Finding a specific funcion with parameters given, tough seeming question

Heres the question, I have tried to construct such a function, but I keep having trouble making it so both conditions are met, I seem to only be able to manufacture a function that works for one of the conditions, or the other, but not both simultaneous. I dont need a full blown answer, but I would definantly like some guidence as to where to go next:

If $x_1, ... , 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 \neq i$.

The question also gives a hint:

The product of all $(x-x_j)$ for $j \neq i$, is $0$ at $x_j$ if $j \neq i$.

Thank you for any help on this question that anybody can give.

2. Originally Posted by mfetch22
Heres the question, I have tried to construct such a function, but I keep having trouble making it so both conditions are met, I seem to only be able to manufacture a function that works for one of the conditions, or the other, but not both simultaneous. I dont need a full blown answer, but I would definantly like some guidence as to where to go next:

If $x_1, ... , 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 \neq i$.

The question also gives a hint:

The product of all $(x-x_j)$ for $j \neq i$, is $0$ at $x_j$ if $j \neq i$.

Thank you for any help on this question that anybody can give.
Because it is a polynomial function of degree n-1 $f_i(x)=A\prod_j(x-x_j)$.

All that is left is to determine what A satisfies $f_i(x_i)=1\therefore A=\dfrac{1}{\prod_j(x_i-x_j)}$

So finally you get $f_i(x)=\dfrac{\prod_j(x-x_j)}{\prod_j(x_i-x_j)}$