TITLE: I made my own question, but I can't solve it, any help appreciated
QUESTION [6 upvotes]: I'm a math teacher and this is a question for my students.
I'm certain I'm missing something very simple but I cant seem to get it. I made the question just through sketching pretty pattern, seeing the length in that case for $n=12$ was almost the golden ratio and it got me interested.
$x$ and $y$ are the lengths seen in the picture.
EDIT: changed the wording thanks to suggestions

REPLY [5 votes]: For convenience with the unit circle, let's place the first (right isosceles) triangle with its base on the positive horizontal axis, so it has an acute angle at the origin and its right angle at $(1, 0)$. If each successive triangle is rotated $2\pi/n$ clockwise, the right angle of the $n$th triangle is at $(\cos(2\pi/n), \sin(2\pi/n))$. Consequently, we have $x = \sin(2\pi/n)$, $y = 1 - \cos(2\pi/n)$, and
$$
\frac{x}{y} = \frac{\sin(2\pi/n)}{1 - \cos(2\pi/n)}
= \frac{2\sin(\pi/n)\cos(\pi/n)}{1 - \cos^{2}(\pi/n) + \sin^{2}(\pi/n)}
= \cot\frac{\pi}{n}.
$$
The question is, what choice of $n > 1$ makes $x/y$ as close as possible to $\gamma = \frac{1}{2}(1 + \sqrt{5}) \approx 1.618034$.

The diagram shows the unit circle (centered at the origin) and the "final positions" of the right angle if we take $n = 2, \dots, 24$. The points $n = 5$ and $n = 6$ bracket the blue line (whose slope is $-\gamma$). The ratio $x/y$ is monotone in $n$, so one of these is optimal. We have
$$
\frac{\sin(2\pi/5)}{1 - \cos(2\pi/5)}
= \frac{\sqrt{2}\sqrt{5 + \sqrt{5}}}{\sqrt{5} - 1}
\approx 1.37638,\qquad
\frac{\sin(2\pi/6)}{1 - \cos(2\pi/6)}
= \sqrt{3}
\approx 1.73205.
$$
Of these, $n = 6$ is closer.
The aspect ratio of the right triangles is immaterial, because the second acute angle (not at the origin) has no effect on the position of the right angle.