Text this: Corrected Fourier series and its application to function approximation