YES FINALLY - AND IT'S 1S1S Press s to draw a graph (move the mouse) DO NOT USE TURBO MODE Wait until finished. NOW USE TURBO MODE < change accuracy by -1 > change accuracy by 1 space Draw approximation of graph m montage of functions
This project demonstrates Fourier series. His discovery was that you could use sine waves and add them together to approximate a function. This is quite obvious but he found out if you used an infinite number of them the approximation would be exact and he also discovered how to calculate the size and position of the waves to fit. It is based on the fact that If you multiply two sine waves of different frequencies together e.g. sin(x)sin(2x) and integrate the result from 0 to 2pi the answer is zero. This also applies to any sine and cosine multiplied together. However if you multiply a sine wave by itself you get an answer of pi. Because integrating is distributive over addition you can multiply the function by various sine waves and use the integrals to find the necessary magnitude of the sine wave (by dividing by pi). The list of magnitudes for the sine and cosines is the Fourier series of the function. Note that because the sine wave is periodic the whole function will also be periodic. In the project it has period 480 and I account for this by dividing the integrals by 240 instead of pi. Another closely related subject is the Fourier transform, which is the same thing but for nonperiodic functions.