Let’s deduce formulas to calculate the trigonometric functions of the sum $(a + b)$ and the difference $(a - b)$ of any two real numbers $a$ and $b$, known as the circular functions of $a$ and $b$. The story In Almagest, Ptolemy proved that, in an inscribed quadrilateral, the product of the diagonals is equal to the sum of the products of the opposite sides — Ptolemy’s theorem. Applied to a quadrilateral with a side equal to the diameter, it gives exactly the chord formulas for the sum and difference of two arcs, which Ptolemy used to assemble his half-by-half degree table. In the form of sines, the formulas appear with the Persian astronomer Abu al-Wafa (10th century), whom we already met in chapter II. The demonstration we will do — based on the distance between two points — uses Descartes’ analytical geometry and is much more recent.