Find the function P(x) = a + b*cos(pi*x) + c*sin(pi*x), which interpolates the data:
(0,2), (.5,5), (1,4)
Can someone show what I need to do here please?
The answer is: P(x) = 3 - cos(pix) + 2sin(pix)
Thanks
Are you sure "interpolates" is the right word? Seems like "collocates" might be better.
This could be a tricky problem, but you have been given wounderfully convenient values, 0, 1/2, and 1. Substitute away and you've three equations so solve simultaneously.
P(x) = a + b*cos(pi*x) + c*sin(pi*x)
P(0) = a + b*cos(pi*0) + c*sin(pi*0) = a + b = 2
P(1/2) = a + b*cos(pi*(1/2)) + c*sin(pi*(1/2)) = a + c = 5
P(1) = a + b*cos(pi*1) + c*sin(pi*1) = a - b = 4
Are you letting the complicated appearance frighten you? Don't. Substitute and solve.