How medieval astronomers made trig tables

How would you create a table of trig functions without calculators or calculus?

It’s not too hard to create a table of sines at multiples of 3°. You can use the sum-angle formula for sines

sin(α+β) = sin α cos β + sin β cos α.

to bootstrap your way from known values to other values. Elementary geometry gives you the sines of 45° and 30°, and the sum-angle formula will then give you the sine of 75°. From Euclid’s construction of a 5-pointed star you can find the sine of 72°. Then you can use the sum-angle formula to find the sine of 3° from the sines of 75° and 72°. Ptolemy figured this out in the 2nd century AD.

But if you want a table of trig values at every degree, you need to find the sine of 1°. If you had that, you could bootstrap your way to every other integer number of degrees. Ptolemy had an approximate solution to this problem, but it wasn’t very accurate or elegant.

The Persian astronomer Jamshīd al-Kāshī had a remarkably clever solution to the problem of finding the sine of 1°. Using the sum-angle formula you can find that

sin 3θ = 3 sin θ – 4 sin3 θ.

Setting θ = 1° gives you a cubic equation for the unknown value of sin 1° involving the known value of sin 3°. However, the cubic formula wasn’t discovered until over a century after al-Kāshī. Instead, he used a numerical algorithm more widely useful than the cubic formula: finding a fixed point of an iteration!

Define f(x) = (sin 3° + 4x3)/3. Then sin 1° is a fixed point of f. Start with an approximate value for sin 1° — a natural choice would be (sin 3°)/3 — and iterate. Al-Kāshī used this procedure to compute sin 1° to 16 decimal places.

Here’s a little Python code to play with this algorithm.

    from numpy import sin, deg2rad

    sin3deg = sin(deg2rad(3))

    def f(x):
        return (sin3deg + 4*x**3)/3

    x = sin3deg/3
    for i in range(4):
        x = f(x)
        print(x)

This shows that after only three iterations the method has converged to floating point precision, which coincidentally is about 16 decimal places, the same as al-Kāshī’s calculation.

Source: Heavenly Mathematics: The Forgotten Art of Spherical Trigonometry

6 thoughts on “How medieval astronomers made trig tables

  1. Structure and Interpretation of Computer Programs uses this formula as an exercise (Ex 1.15) but I hadn’t known the history. Interesting.

  2. thx for mentioning that he was persian. a whole bunch of mathematicians/astronomers from that era who were persian (and muslim) are referred to as arabs (who also had brilliant scientists).

  3. @Stéfan: The most common way is to use the contraction mapping theorem.

    In a complete metric space, in this case the real numbers, it’s enough to show that you have a contraction mapping. That is, you show that for any two distinct points x and y, the distance between f(x) and f(y) is less than the distance between x and y, by at least some constant factor k < 1, where k is independent of your choice of points. Often you use something like the mean value theorem to establish your contraction constant k. If your map is not a contraction, you may be able to reformulate your problem to work with a map that is a contraction.

  4. R E Van Valkenburgh

    This also brings up the question of how the manual labor for number crunching has been acquired.

    For those of you who remember the huge, “Handbook of Chemistry and Physics” (still?) published by the former Chemical Rubber Company (now CRC Press)… my dad used to tell us how the students at the then Case Institute of Technology (not Case-Western Reserve University) were conscripted to calculate the large number of large tables. Hey, it never hurt your grade if your professor asked you to volunteer.

    Not only is it remarkable how some of these things were calculated; but even more remarkable how accurate they often were. (Case & the CRC had multiple independent calculations to help identify errors, according to dad.)

Comments are closed.