How to solve complex Fourier Series