I am interested for a problem involving the sum of segments inside a right triangle. Consider a right triangle of hypotenuse $\overline{BC}$ and catheti $\overline{AB}$ and $\overline{AC}$. From the right angle, trace the segment $\overline{AP_1}$ forming an angle $\alpha$ with the cathetus $\overline{AB}$. $P_1$ is a point on the hypotenuse. Trace, then, the segment $\overline{P_1P_2}$ perpendicular to $\overline{AB}$ ($P_2$ is a point on this cathetus).
By continuing the process, trace the segment $\overline{P_2P_3}$, forming an angle $\alpha$ with the cathetus $\overline{AB}$, with $P_3$ on the hypotenuse, and trace $\overline{P_3P_4}$ perpendicular to $\overline{AB}$, with $P_4$ on the cathetus. And so on.
Does exist a closed form on $\overline{BC}, \overline{AB}, \overline{AC}$and $\alpha$ for the sum $$ \sum_{i=0}^{\infty}\overline{P_iP_{i+1}}?$$ Set $P_0 = A$.
Extend the first line $AP_1$ through the hypotenuse till it reaches a point $D$ such that $\angle{ABD}$ is a right-angle. If you add every odd-numbered segment ($P_0P_1,\; P_2P_3,\;\ldots$) it is the same as length of $AD$.
Similarly, if you add every even-numbered segment ($P_1P_2,\; P_3P_4,\;\ldots$) it is the same as length of $BD$.
Therefore, $$\sum_{i=0}^{\infty}\overline{P_iP_{i+1}} = \overline{AD} + \overline{BD} = \overline{AB}(\sec{\alpha} + \tan{\alpha}).$$