Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • $\begingroup$ Thanks for the input about the signal symmetry. My main goal though is to understand how sin and cos can synthesize an almost perfect square wave mathematically. As the attached FFT results show, this square wave seems to be composed of 2 cos and 2 sin (fundamental + 3rd harmonic in this example), but I am missing the equation that synthesizes the final square wave from the components. $\endgroup$ Commented Oct 7, 2023 at 6:24
  • $\begingroup$ You can build ANY periodic function from sines and cosines. That's the whole idea of the Fourier Series. The square wave is probably the most common text book example. See for example mathsisfun.com/calculus/fourier-series.html. This is one example for a "orthogonal basis": you can construct any function from a set of basis functions as long as they are "orthogonal", which is a very useful mathematical concept. Sines, cosines and complex sines at different frequencies are indeed orthogonal (with the right choice of interval). $\endgroup$ Commented Oct 7, 2023 at 12:27
  • $\begingroup$ Hi. I understand the concept of Fourier transformation and I am aware that I can build a square wave by summing scaled sines (fundamental and harmonics), but I am not aware of a square wave that can be built through sin and cos together, which more or less look like the ones provided in the figure above. This question is about having the analytical equation that produces such a square wave: meaning, writing down the sin and cos whose summation is a square wave analytically. If you can provide these equations, it would be very appreciated. $\endgroup$ Commented Oct 8, 2023 at 8:38