M2. Two real numbers $x$ and $y$ satisfy the equation $x^{2}+y^{2}+3 x y=2015$.
What is the maximum possible value of $x y$ ?
Solution
Subtracting $x^{2}$ and $y^{2}$ from each side of the given equation, we obtain
$$
3 x y=2015-x^{2}-y^{2} \text {. }
$$

Now adding $2 x y$ to each side, we get
$$
\begin{aligned}
5 x y & =2015-x^{2}+2 x y-y^{2} \\
& =2015-(x-y)^{2},
\end{aligned}
$$
which has a maximum value of 2015 when $x=y$.
Therefore $x y$ has a maximum value of 403 and this occurs when $x=y=\sqrt{403}$.