almost-integers from tan()

From time to time, I've written little programs to find almost-integers in certain forms.

Most recently, I hit upon the form tan(i)/tan(j) where i and j are both integers. I was at first surprised to see that there were in fact a lot of the form tan(2x)/tan(x) ≅ 2, but a little thought revealed why: These were values of x that were just above multiples of π.

Example:

>>> x=355; tan(2*x)/tan(x); x/pi
2.000000001817364
113.00000959524569

Reduce x modulo π, and the formula becomes tan(2ϵ)/tan(ϵ) ≅ 2ϵ/ϵ ≅ 2. Mystery solved.

Entry first conceived on 18 May 2011, 12:54 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2024 Jeff Epler