Generalized fourier series for the study of limit cycles