There are curves in mathematics that are very difficult to quantify. There are plenty of equations that are difficult to write an equation for: That is why we have Fourier Series. Fourier Series uses sines and cosines to interact with one another to create a harmonic analysis of the curve and to mimic the actual graph (Weisstein Fourier). These are not exact equations, but some of the predictions are fairly close to the desired end result.
Fourier Series is just that—a series. The basic equation is where
(Weisstein Fourier). When multiple iterations have been achieved, the formulas produce a summation that is a large string of sines and cosines with coefficients abounding. The more iterations of the series that are used, the more accurately the prediction will be close to the actual graph. Each iteration adds curves to the prediction until it slowly matches with the intended picture; the original prediction is typically a horizontal line on the x-axis and as the series increases the prediction improves to shadow the graph more accurately (Weisstein Fourier). The more iterations that the series performs provides the series with more information and more terms which is what allows the series to become more accurate. These predictions are close, but they all include what is known as the Gibbs phenomena: this is when there is a slight bump on the prediction directly before the true values drastically change (Weisstein Gibbs). This is because sines and cosines make up the prediction and they are wave equation that do not keep up with big interval changes as well as other changes. These waves can also be seen throughout the graph; however, they are simply more distinct around large changes.
The Fourier music piece is based around the square curve and how the Fourier Series forms around that. The first two notes that you hear are the true square curve that the Fourier Series will try to replicate. Following a measure of rest is the first iteration of Fourier Series, then another rest and the second iteration, and so on. It is easy to hear how much closer the estimations grow toward the square curve. The major difference is that the two notes are disconnected in the square curve; however, Fourier connects the lines (which is easy to hear in the piece). It is also possible to hear the Gibbs phenomena, every iteration (following the first) overestimates the maximum and minimum of the original function due to this principle (Weisstein Gibbs). The musical piece follows the image since the black lines signify the square curve, the red line is the first iteration of Fourier Series, the orange line is the second iteration, followed by the yellow line, then the green line, and finally the blue line.
(Image from Wolfram Alpha)
Played by Liv Long