Consider the right triangle $$\triangle_1$$ with vertices at $$(0,0)$$, $$(0,1)$$, and $$(1,1).$$ Note that the angle at the origin is $$\frac{\pi}{4}.$$ Use the hypotenuse of $$\triangle_1$$ as one of the legs of another right triangle, $$\triangle_2,$$ with an angle of $$\frac{\pi}{8}$$ at the origin, and whose second leg extends towards the $$x$$–axis. Continue constructing adjacent right triangles $$\triangle_n$$ in the same fashion, with one leg supported on the hypothenuse of the previous right triangle $$\triangle_{n-1},$$ with angle $$\frac{\pi}{2^{n+1}}$$ at the origin, and with a second leg extending towards the $$x$$–axis.

Note that, since the angles at the origin form the series $$\sum_{n=2}^\infty \frac{\pi}{2^n},$$ (that add up to $$\frac{\pi}{2}$$) the limit of the previous process is an actual segment on the $$x$$–axis.

1. What is the length of this segment?
2. Find an equation in polar coordinates $$(\rho,\theta)$$ of a curve passing through all the vertices of the resulting triangles, except possibly $$(0,0).$$
3. Find an equation for that curve in rectangular coordinates. Let us denote $$h_n$$ the hypotenuse of triangle $$\triangle_n.$$ By construction we have $$h_1=\sqrt{2}$$ and, for each consecutive steps, the definition of cosine in our setup gives us that

\begin{equation} \cos \dfrac{\pi}{2^{n+1}} = \dfrac{h_{n-1}}{h_n}. \end{equation}

We may solve the recurrence with the aid of the formula of sine of double angles: $$\sin 2\alpha = 2 \sin \alpha \cos \alpha.$$ In our case, setting $$\alpha = \frac{\pi}{2^{n+1}}$$, we have

\begin{equation} \dfrac{h_{n-1}}{h_n} = \cos \dfrac{\pi}{2^{n+1}} = \dfrac{\sin \frac{\pi}{2^n}}{2\sin \frac{\pi}{2^{n+1}}} \end{equation}

or equivalently,

\begin{equation} h_n = \dfrac{2\sin \frac{\pi}{2^{n+1}}}{\sin \frac{\pi}{2^n}}\, h_{n-1} = \dfrac{2\sin \frac{\pi}{2^{n+1}}}{\sin \frac{\pi}{2^n}}\, \dfrac{2\sin \frac{\pi}{2^n}}{\sin \frac{\pi}{2^{n-1}}}\, h_{n-2} = \dotsb = 2^{n-1} \dfrac{\sin \frac{\pi}{2^{n+1}}}{\sin \frac{\pi}{2^2}} h_1 \end{equation}

which is the same as

\begin{equation} h_n = 2^n \sin \frac{\pi}{2^{n+1}} = \dfrac{\pi}{2}\, \dfrac{2^{n+1}}{\pi}\, \sin \frac{\pi}{2^{n+1}}. \end{equation}

We use this identity to obtain the answer to the first two questions. For instance, an expression in polar coordinates of a function that goes through all the vertices of the triangles could be given by

\begin{equation} \rho(\theta) = \dfrac{\pi}{2}\, \dfrac{\sin \theta}{\theta}. \end{equation}

And in that case, the length of the segment at the limit is given by

\begin{equation} \displaystyle{\lim_n h_n = \lim_{\theta\to 0} \rho(\theta) = \frac{\pi}{2}}. \end{equation}

I leave the third part of the puzzle an an exercise to the reader.

## Miscellaneous

This is the $$\LaTeX$$ code used with tikz to produce the diagram above. Note the power of the plot command, that allows us to obtain a very accurate graph of any function.