Fourier series and orthogonal functions