# Trigonometric series approximation to a sound wave

The following function gives an approximation to the displacement curve for a single tone played on an organ pipe: $x(t) = 22.4\sin(t) + 94.1\cos(t) + 49.8\sin(2t) - 43.6\cos(2t) + 33.7\sin(3t) - 14.2\cos(3t) \\ + 19.0\sin(4t) - 1.9\cos(4t) + 8.9\sin(5t) - 5.22\cos(5t) \\ - 8.18\sin(6t) - 1.77\cos(6t) + 6.40\sin(7t) - 0.54\cos(7t) \\ + 3.11\sin(8t) - 8.34\cos(8t) - 1.28\sin(9t) - 4.10\cos(9t) \\ - 0.71\sin(10t) - 2.17\cos(10t),$ where t is in units of $$\tfrac{1}{522\pi}$$ seconds, a frequency of 261 oscillations per second.

The demonstration below will plot the selected number of terms of x(t), where each term is of the form $$a\sin(nt) + b\cos(nt)$$ for some real numbers a and b and positive integer n. At the same time, the given tone is played. The fundamental is played at 261 cyles per second (middle C).

Number of terms:

See The Science of Musical Sounds (Macmillan, New York, 1926) by Dayton Miller for more details.