a) The hint is
j=1j=i∏n(x−xj)=0when x=xj, where j=i. When x=xi, the expression becomes
j=1j=i∏n(xi−xj),which we can make equal to 1 by dividing each factor by itself, which would give
fi(x)=j=1j=i∏nxi−xjx−xj.b) Using the function from a), we can create
f(x)=a1f1(x)+a2f2(x)+⋯+anfn(x).That is a polynomial function of degree n−1 since it is a sum of polynomials of degree n−1. Moreover, by definition of fi(x), we have that
f(xi)=a1f1(xi)+a2f2(xi)+⋯+anfn(xi)=a1⋅0+a2⋅0+⋯+ai⋅1+⋯+an⋅0=ai.So the conditions on f are satisfied.