Viete Product

Wave · y = f(x, t)

y = ∏_(k=1)^(1 + floor(mod(t, 12))) cos(x/2^k)

Open in the app The dials and keys named below are the app's.

What it draws

A product rather than a sum. Each factor is cos(x/2^k), so the first halves the angle, the second quarters it, the third takes an eighth, and each one is nearer to 1 than the last. The clock multiplies in a new factor every second, up to twelve, then starts again from one.

One factor alone is cos(x/2), a slow cosine crossing zero at x = π. As factors accumulate the curve pulls down into a single central hump with smaller ripples either side, and stops changing: at x = 3 it runs 0.0707, then 0.0518, then 0.0473, settling on 0.04704.

What it converges to

That limit is sin(x)/x, and the identity behind it is one line of algebra repeated. Since sin(x) = 2 sin(x/2) cos(x/2), halving again and again leaves sin(x) as a run of cosines multiplied by sin(x/2ⁿ), and that last factor tends to x/2ⁿ as the angle shrinks. Divide through and the product is sin(x)/x.

History

François Viète published this in 1593, the first infinite product ever written down and the first formula to give π as an endless sequence of operations rather than a construction. He wrote it at x = π/2, where sin(x)/x is 2/π and every cosine unrolls into a nested square root of twos. Twenty factors here give 0.636619772, which is 2/π to nine places.

Try

  • Compare against the limit by typing sin(x)/x. From about eight factors the two curves are the same line.
  • Hold two factors with prod(cos(x/2^k), k, 1, 2). A product of two cosines, and the ripples are still visibly wrong at the edges.
  • Start the halving later with prod(cos(x/2^k), k, 2, 12). Dropping the first factor leaves sin(x)/x divided by cos(x/2). At x = π that cosine is zero, but so is the sine, and the curve passes calmly through 2/π ≈ 0.637.
  • Raise Span of x to 30. More ripples appear, each smaller than the last, decaying as 1/x.

Read more

Wave · y = f(x, t)