5. In a rectangle, a segment $A B$ of length $l=4$, shorter than the lengths of its sides, is positioned such that its ends lie on the sides of the rectangle. As point $A$ makes a complete revolution around the rectangle, it travels a path equal to its perimeter. During this, point $C$ - the midpoint of segment $A B$, also travels a certain path. How much shorter is this path compared to the perimeter of the rectangle?
5. Solution. From the conditions of the problem (the length of segment $AB$ is less than the lengths of the sides of the rectangle), it follows that points $A$ and $B$ are either on the same side of the rectangle or on adjacent sides of the rectangle. If points $A$ and $B$ move along the same side of the rectangle, point $C$ moves along a straight line segment. If points $A$ and $B$ are on adjacent sides of the rectangle, then point $C$ moves along an arc of a circle with a central angle of $90^{\circ}$ and a radius of $l / 2$, since $DC$ (see figure) is the median of a right triangle drawn to the hypotenuse (it is equal to half the hypotenuse).

![](https://cdn.mathpix.com/cropped/2024_05_06_a08dea28507761506bd0g-2.jpg?height=522&width=694&top_left_y=2012&top_left_x=612)

During one complete revolution, point $C$ travels four quarters of a circle with a radius of $l / 2$ and twice the straight-line segments of lengths $a-l$ and $b-l$, respectively. Therefore, in one complete revolution, point $C$ travels the path $s=2 \pi \cdot l / 2+2(a-l)+2(b-l)=2(a+b)-l(4-\pi)$. Since the perimeter of the rectangle is $2(a+b)$, then $\Delta s=L(4-\pi)$.