Trigonometric series approximation of a sound wave

An updated version of this demonstration, without Java, is available here.

The following functions give successive approximations to the displacement curve for a single tone played on a organ pipe. Clicking on the buttons will load an audio file to play the given tone. The fundamental is played at a frequency of 261 cycles per second (middle C). Note that each audio file is 41k, and so may take a moment to download the first time you play it.

x1(t) = 22.4sin(t) + 94.1cos(t)
x2(t) = x1(t) + 49.8sin(2t) - 43.6cos(2t)
x3(t) = x2(t) + 33.7sin(3t) - 14.2cos(3t)
x4(t) = x3(t) + 19.0sin(4t) - 1.9cos(4t)
x5(t) = x4(t) + 8.90sin(5t) - 5.22cos(5t)
x6(t) = x5(t) - 8.18sin(6t) - 1.77cos(6t)
x7(t) = x6(t) + 6.40sin(7t) - 0.54cos(7t)
x8(t) = x7(t) + 3.11sin(8t) - 8.34cos(8t)
x9(t) = x8(t) - 1.28sin(9t) - 4.10cos(9t)
x10(t) = x9(t) - 0.71sin(10t) - 2.17cos(10t)