Solution
Inserting the data below:
(t0,y0)=(0.25,3)
(t1,y1)=(0.5,2)
(t2,y2)=(0.75,−3)
(t3,y3)=(1,0)
in the equation
y=a sin(πt)+b sin(2πt)+c sin(3πt)+d sin(4πt)
gives the following system of equations
⎣⎡21121010−1021−12100000⎦⎤⎣⎡abcd⎦⎤=⎣⎡32−30⎦⎤
Now let’s implement it in Python and solve it.