Task B-2.4. A square $A B C D$ with side length $10 \mathrm{~cm}$ is given. On side $\overline{A B}$, point $E$ is chosen, on side $\overline{B C}$, point $F$, on side $\overline{C D}$, point $G$, and on side $\overline{D A}$, point $H$ such that $E F G H$ is also a square. Calculate the length of segment $\overline{A E}$ so that the sum of the area of the circle inscribed in square $E F G H$ and the areas of the circles inscribed in triangles $E B F$, $F C G$, $G D H$, and $H A E$ is minimized.
## Solution.

![](https://cdn.mathpix.com/cropped/2024_05_30_6bd7d8198e5de61c26bbg-09.jpg?height=696&width=768&top_left_y=674&top_left_x=646)

Let's introduce the notations as shown in the figure, \( |A E| = m \) and \( |E F| = x \).

The radius of the circle inscribed in the square is \( R = \frac{x}{2} \), and the radii of the circles inscribed in the right triangles are

\[
r = \frac{10 - m + m - x}{2} = \frac{10 - x}{2}
\]

(using the formula \( r = \frac{a + b - c}{2} \), where \( a \) and \( b \) are the legs of the right triangle and \( c \) is the hypotenuse).

Thus, we want the expression

\[
P = \left( \frac{x}{2} \right)^2 \pi + 4 \left( \frac{10 - x}{2} \right)^2 \pi = \frac{5 \pi}{4} \left( x^2 - 16x + 80 \right)
\]

to be the smallest.

Since \( P = \frac{5 \pi}{4} \left( x^2 - 16x + 80 \right) \) is a quadratic function, the minimum will be achieved at the x-coordinate of the vertex, which is \( x = \frac{-(-16)}{2} = 8 \).

From one of the triangles, using the Pythagorean theorem, we get

\[
\begin{aligned}
& m^2 + (10 - m)^2 = 8^2 \\
& 2m^2 - 20m + 36 = 0 \\
& \Rightarrow m_1 = 5 - \sqrt{7}, \quad m_2 = 5 + \sqrt{7}
\end{aligned}
\]

Since \( m_1 \approx 2.35 \) and \( m_2 \approx 7.65 \), both solutions can represent the length of the desired segment \( \overline{A E} \).