## Task 27/70

Eight lines intersect at a point such that any two adjacent lines form an angle of $\frac{\pi}{8}$. On one of these lines, there is a point $P_{1}$ at a distance $a$ from the intersection point.

From this point, drop a perpendicular to an adjacent line, and let the foot of the perpendicular be $P_{2}$. Continuing this process from $P_{2}, P_{3}, \ldots$, we obtain a broken line (see the figure on the next page), whose number of segments grows without bound.

Determine the length of this broken line.

![](https://cdn.mathpix.com/cropped/2024_06_06_1d2be4837fb839c2b31dg-198.jpg?height=717&width=765&top_left_y=281&top_left_x=1065)
The segments form a sequence whose terms are

$$
a_{1}=a \sin \frac{\pi}{8} ; \quad a_{2}=a \sin \frac{\pi}{8} \cos \frac{\pi}{8} ; \quad a_{3}=a \sin \frac{\pi}{8} \cos ^{2} \frac{\pi}{8} \ldots \quad a_{n}=a \sin \frac{\pi}{8} \cos ^{n} \frac{\pi}{8}
$$

One can see that this is a geometric sequence with the first term $a_{1}=a \sin \frac{\pi}{8}$ and the common ratio $q=\cos \frac{\pi}{8}$. Since $|q|<1$, the corresponding series converges, and we have

$$
s_{\infty}=\frac{a \sin \frac{\pi}{8}}{1-\cos \frac{\pi}{8}}
$$

This expression can be simplified using the half-angle formulas. We have

$$
\sin \frac{\pi}{8}=\frac{1}{\sqrt{2}} \sqrt{1-\cos \frac{\pi}{4}}=\frac{1}{2} \sqrt{2-\sqrt{2}} \quad ; \quad \cos \frac{\pi}{8}=\frac{1}{\sqrt{2}} \sqrt{1+\cos \frac{\pi}{4}}=\frac{1}{2} \sqrt{2+\sqrt{2}}
$$

Thus,

$$
s_{\infty}=\frac{a \sqrt{2-\sqrt{2}}}{2-\sqrt{2+\sqrt{2}}}=a(2 \sqrt{2-\sqrt{2}}+\sqrt{4-2 \sqrt{2}}+\sqrt{2}+1)=a(\sqrt{4+2 \sqrt{2}}+\sqrt{2}+1)
$$