6. On the side $A B$ of triangle $A B C$, a square is constructed externally with center $O$. Points $M$ and $N$ are the midpoints of sides $A C$ and $B C$ respectively, and the lengths of these sides are $a$ and $b$ respectively. Find the maximum of the sum $O M+O N$ as the angle $A C B$ changes.

## 11 k l a ss
6. Let $D$ and $E$ be the remaining vertices of the square $ABDE$ and $\gamma = \angle ACB$ (Fig. 32).

Then (by the midline theorem of a triangle) from $\triangle ACD$ we get: $CD = 2OM$. Similarly, $CE = 2ON$. Therefore, it is sufficient to find the maximum of $CD + CE = 2(OM + ON)$.

First method. On the side $BC$ of triangle $ABC$, construct a square $CB D_1 E_1$ externally (Fig. 33). Triangles $AB D_1$ and $DBC$ are equal by two sides and the angle between them. Thus, $CD = AD_1$.

In triangle $AC D_1$, two sides are known: $AC = b$, $CD_1 = a\sqrt{2}$. Additionally, $\angle ACD_1 = \gamma + 45^\circ$. The third side $AD_1$ takes its maximum value when the triangle degenerates into a segment. Therefore,

$$
\max(CD) = \max(AD_1) = b + a\sqrt{2}
$$

when $\gamma = 135^\circ$. Similarly, $\max(CE) = a + b\sqrt{2}$ when $\gamma = 135^\circ$.

Thus, each of the quantities $OM$, $ON$ reaches its maximum when $\gamma = 135^\circ$. Therefore, their sum is also maximal when $\gamma = 135^\circ$:

$$
\max(OM + ON) = \frac{1 + \sqrt{2}}{2}(a + b)
$$

In the same way. Let $\angle CAB = \alpha$, $\angle ABC = \beta$, $c = AB$, $d = CD$, $e = CE$.

By the cosine theorem for triangle $ABC$:

$$
c^2 = a^2 + b^2 - 2ab \cdot \cos \gamma
$$

![](https://cdn.mathpix.com/cropped/2024_05_21_6455f48598646f41a890g-114.jpg?height=484&width=411&top_left_y=1310&top_left_x=834)

Fig. 33

By the cosine theorem for triangle $AEC$:

$$
e^2 = b^2 + c^2 - 2bc \cdot \cos(90^\circ + \alpha) = b^2 + c^2 + 2bc \sin \alpha
$$

(we used the reduction formula).

Substitute $c^2$ from the first formula into the second:

$$
e^2 = 2b^2 + a^2 - 2ab \cdot \cos \gamma + 2bc \cdot \sin \alpha
$$

From the sine theorem for triangle $ABC$, it follows that $\sin \alpha = \frac{a}{c} \sin \gamma$.

We get:

$$
e^2 = 2b^2 + a^2 + 2ab \cdot (\sin \gamma - \cos \gamma)
$$

Similarly, we obtain: $d^2 = 2a^2 + b^2 + 2ab \cdot (\sin \gamma - \cos \gamma)$.

From this, it follows that the maximum of $d$ and $e$ is achieved simultaneously with the maximum of the expression $\sin \gamma - \cos \gamma$ when $\gamma = 135^\circ$. Therefore, $d + e$ is maximal when $\gamma = 135^\circ$.

## 11th grade