Square Wave Approximation With Fourier Series