A possible hint for your solution is that you are looking for a orthogonal projection. And you know that there is only one fouriercoefficient for this projection.