Utilize advanced mathematical frameworks to model electromagnetic phenomena and signal transformations.
Calculate the frequency spectrum of a square wave signal and plot its first five harmonics.