Sum of 1st, 3rd and 5th harmonics approximates square wave.

sum of harmonics approximates square wave diagram1