In this example of a Fourier series I found on the Internet, there appear to be "peaks" (I'm not sure of the correct terminology) at points on the square wave. Apparently in the limit this graph should appear as a pure square wave, but there are these peaks that don't seem to diminish as the length of the series approaches infinity. Is the equation ($y=\frac{1}{2}+\sum_{n=1}^{a}\frac{\left(1-\cos\left(n\pi\right)\right)}{n\pi}\sin\left(n\pi x\right)\$) inaccurate? Does the Fourier series never actually plot a true square wave, even with an infinite length?
Here is a screenshot of the graph with the peaks highlighted, with low and high series lengths. Note that in both screenshots the "peak" has an approximate height of 0.1. [![enter image description here][1]][1] [![enter image description here][2]][2]
I realise some of my terminology may be inaccurate so please feel free to edit the question. [1]: https://i.stack.imgur.com/vXDIS.png [2]: https://i.stack.imgur.com/B59c3.png