a) Find the function P(x) = a + bcos(pi x) + csin(pi x) which interpolates the data
x | 0 0.5 1
y | 2 5 4
At a minimum plugging the data into the interpolating form will give you three simultaneous linear equations in three unknowns which you should be able to solve.