B1. In a square with side length $a$, we inscribe a regular octagon such that 4 sides of the octagon lie on the sides of the square. Express the length of the side of the inscribed octagon in terms of $a$.
B1.

![](https://cdn.mathpix.com/cropped/2024_06_07_58dcb28c79ea4cc315e1g-18.jpg?height=419&width=448&top_left_y=1875&top_left_x=273)

Let $x$ be the side length of the inscribed octagon. The four triangles that form at the corners of the square are isosceles right triangles. Since their hypotenuse is of length $x$, their legs are of length $\frac{x}{\sqrt{2}}$. Therefore, we have $a=x+2 \frac{x}{\sqrt{2}}=x+x \sqrt{2}=x(\sqrt{2}+1)$. From the given equation, we can express

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

Clear and labeled diagram ..... 1 point
Calculation of the leg length of the triangle at the corner of the square ( $\frac{x}{\sqrt{2}}$ ) ..... 1 point
Writing the equation $a=x+2 \frac{x}{\sqrt{2}}$ ..... 1 point
Simplifying the equation $\mathbf{v} a=x(\sqrt{2}+1)$ ..... 1 point
Answer $x=\sqrt{2} a-a$ ..... 2 points