4. A square $Q$ with side a is given, in which a square $Q_{1}$ is inscribed, such that the vertices of the square $Q_{1}$ lie on the sides of the square $Q$. In the square $Q_{1}$ and in the four resulting triangles, circles are inscribed. Find the side of the square $Q_{1}$ so that the sum of the areas of the inscribed circles is minimized.
Solution. Let

$$
x=\overline{A A_{1}}=\overline{B B_{1}}=\overline{C C_{1}}=\overline{D D_{1}}
$$

$R$ is the radius of the inscribed circle in the square $Q_{1}$, and $r$ is the radius of the inscribed circles in $\Delta A_{1} B B_{1}, \Delta B_{1} C C_{1}, \Delta C_{1} D D_{1}$, and $\Delta D_{1} A A_{1}$. Then $\overline{A_{1} B_{1}}=2 R$ and $\overline{A_{1} B_{1}}=\sqrt{{\overline{A_{1} B}}^{2}+{\overline{B B_{1}}}^{2}}=\sqrt{(a-x)^{2}+x^{2}}$, i.e.,

$$
R=\frac{1}{2} \sqrt{(a-x)^{2}+x^{2}}
$$

Directly from the diagram, we have

$$
\begin{aligned}
2 r+2 R & =(\overline{M B}+\overline{B N})+\overline{A_{1} B_{1}}=(\overline{M B}+\overline{B N})+\left(\overline{A_{1} P}+\overline{P B_{1}}\right) \\
& =(\overline{M B}+\overline{B N})+\left(\overline{A_{1} M}+\overline{B_{1} N}\right) \\
& =\left(\overline{A_{1} M}+\overline{M B}\right)+\left(\overline{B N}+\overline{B_{1} N}\right) \\
& =\overline{A_{1} B}+\overline{B_{1} B}=a
\end{aligned}
$$

According to this, $r=\frac{a}{2}-R$ or $R=\frac{a}{2}-r$.

The sum of the areas of all five inscribed circles is

$$
\begin{aligned}
R^{2} \pi+4 r^{2} \pi & =\pi\left[R^{2}+(a-2 R)^{2}\right]=\pi\left(5 R^{2}-4 a R+a^{2}\right) \\
& =\pi\left[5\left(R-\frac{2}{5} a\right)^{2}+a^{2}-\frac{4}{25} a^{2}\right]=\pi\left[5\left(R-\frac{2}{5} a\right)^{2}+\frac{21}{25} a^{2}\right]
\end{aligned}
$$

The sum will be minimal for $R=\frac{2 a}{5}$. From (1) we get $\frac{1}{2} \sqrt{(a-x)^{2}+x^{2}}=\frac{2 a}{5}$, from which $x=\frac{5 \pm \sqrt{7}}{10} a$.

Both obtained values are less than $a$ and their sum is equal to $a$. Therefore, for each value of $x$ we obtain, there is one solution, and the obtained squares are congruent.

The side of the inscribed square is directly found.

## III year