3. Given a square $Q$ with side $a$ in which a square $Q_{1}$ is inscribed whose vertices lie on the sides of the square $Q$. In the square $Q_{1}$ and in each of the four resulting triangles, circles are inscribed. Determine the position of the vertices of the inscribed square $Q_{1}$ so that the sum of the areas of all the inscribed circles is minimal.
Solution. Let $ABCD$ be the given square and $A_1B_1C_1D_1$ be the inscribed square, with points $A_1$, $B_1$, $C_1$, $D_1$ lying on sides $AB$, $BC$, $CD$, $DA$ respectively. Let $R$ and $r$ denote the radii of the inscribed circles in the square $A_1B_1C_1D_1$ and the triangle $A_1BB_1$ (see diagram on the right). Then $A_1B_1 = 2R$ and $A_1B + BB_1 = a$. Since triangle $A_1BB_1$ is a right triangle (with a right angle at vertex $B$), we get $a - 2r = 2R$. The sum of the areas of the inscribed circles is

$$
\pi R^2 + 4 \pi r^2 = \left(\frac{a}{2} - r\right)^2 \pi + 4 \pi r^2 = \left(5r^2 - ar + \frac{a^2}{4}\right) \pi = \left(5\left(r - \frac{a}{10}\right)^2 + \frac{a^2}{5}\right) \pi
$$

and has a minimum value for $r = \frac{a}{10}$. Let $AA_1 = x$, $BA_1 = y$. For $r = \frac{a}{10}$, we get $R = \frac{2a}{5}$ and

$$
x + y = a, \quad x^2 + y^2 = 4R^2 = \frac{16}{25}a^2
$$

from which it is easy to obtain $x = \left(\frac{1}{2} - \frac{\sqrt{7}}{10}\right)a$ or $x = \left(\frac{1}{2} + \frac{\sqrt{7}}{10}\right)a$.