On the segment $P Q$, a square $M N O P$ is placed with one side, see the figure. The line $P Q$ is successively flipped over the sides of the square $M N O P$, with point $Q$ leaving a trail on the paper. After the first flip, this trail is $5 \mathrm{~cm}$ long, and after five flips, point $Q$ coincides with one of the vertices of the square.

Determine the length of the entire trail of point $Q$.

(V. Žádník)

![](https://cdn.mathpix.com/cropped/2024_04_17_fa7e37d94281542afa46g-4.jpg?height=351&width=1060&top_left_y=538&top_left_x=498)
At each flip, point $Q$ describes a quarter-circle with the center at one of the vertices of the square and with a radius that decreases by the side length of the square at each step. For point $Q$ to coincide with one of the vertices of the square after five flips, the segment $M Q$ must be five times the side length of the square.

![](https://cdn.mathpix.com/cropped/2024_04_17_fa7e37d94281542afa46g-4.jpg?height=1279&width=1271&top_left_y=1234&top_left_x=401)

The lengths of the quarter-circles are in the same ratios as their radii. The radii of all the quarter-circles are integer multiples of the radius of the smallest (fifth) quarter-circle. If we denote its length by $d$, then the sum of the lengths of all five quarter-circles is

$$
d + 2d + 3d + 4d + 5d = 15d
$$

which is three times the length of the largest (first) quarter-circle. From the problem statement, we know that the first quarter-circle is 5 cm long. The sum (1), i.e., the length of the path traced by point $Q$, is

$$
3 \cdot 5 = 15 \text{ (cm)}.
$$

Scoring suggestion. 2 points for determining $M Q$ as five times the side length of the square; 2 points for expressing the sum (1); 2 points for solving and expressing the result in cm.

Note. The expression for $d$ in terms of the side length of the square, denoted by $a$, is $d = \frac{1}{2} \pi a$. The sum (1) can then be written as:

$$
\frac{1}{2} \pi a \cdot (1 + 2 + 3 + 4 + 5) = \frac{15}{2} \pi a = 3 \cdot \frac{5}{2} \pi a
$$

To determine the sum in cm, we do not need to know either $a$ or $d$.