$37 \triangle ABC$ has sides $BC$ and $AC$ of fixed lengths $a$ and $b$, respectively, while the length of side $AB$ can vary. A square is constructed outward from triangle with side $AB$ as one of its sides. Let $O$ be the center of the constructed square. Suppose the midpoints of $BC$ and $AC$ are $M$ and $N$, respectively. Find the maximum value of $OM + ON$.
Solve $(() M+() N)_{\max }=\frac{\sqrt{2}+1}{2}(a+b)$.

If the square is $A B D E$, then ()$M=\frac{(E}{2}$.
()$N=\frac{(D)}{2}$. Therefore, ()$M+() N=-\frac{1}{2}(C I)+(E)$.

Let $A B=\therefore$. Then $B D=. A E=\because A D=B E=\sqrt{2} \therefore$ Applying Ptolemy's theorem to quadrilateral A( BI) we get
$$
(1) \cdot c \leqslant A C \cdot c+B C \cdot \sqrt{2} c \cdot
$$

Thus,
$$
(I) \leq A C+\sqrt{2} B C \cdot
$$

Therefore,
$$
(I) \leq b+\sqrt{2} a \text {. }
$$

Similarly, applying Ptolemy's theorem to quadrilateral ACBE we get
$$
C E \cdot c \leqslant B C \cdot c+A C \cdot \sqrt{2} c \text {. }
$$

Thus,
$$
C E \leq a+\sqrt{2} b .
$$

Therefore, $O M+O N=\frac{1}{2}(C D+C E) \leqslant \frac{\sqrt{2}+1}{2}(a+b)$. The equality holds under certain conditions. Hence,
$$
(() M+() N)_{\max }=\frac{\sqrt{2}+1}{2}(a+b) .
$$