2. Solve the system of equations in $\mathbb{R}$

$$
\left\{\begin{array}{l}
\frac{x^{2}}{y}+\frac{y^{2}}{x}=12 \\
\frac{1}{x}+\frac{1}{y}=\frac{1}{3}
\end{array}\right.
$$
Solution. The given system is equivalent to the system

$$
\left\{\begin{array}{l}
\frac{x+y}{x y}\left(x^{2}-x y+y^{2}\right)=12 \\
\frac{x+y}{x y}=\frac{1}{3}
\end{array}\right.
$$

from which $x^{2}-x y+y^{2}=36$, or $(x+y)^{2}-3 x y=36$.

Let $z=x+y$. Then, $x y=3 z$ and the last equation is equivalent to

$$
z^{2}-9 z-36=0
$$

Its solutions are $z_{1}=12$ and $z_{2}=-3$. Thus, we get the systems:

$$
\left\{\begin{array} { l } 
{ x + y = 1 2 } \\
{ x y = 3 6 }
\end{array} \text { and } \left\{\begin{array}{l}
x+y=-3 \\
x y=-9
\end{array}\right.\right.
$$

which are equivalent to the quadratic equations

$$
t^{2}-12 t+36=0 \text { and } t^{2}+3 t-9=0
$$

respectively. Thus, the set of solutions to the given system is

$$
M=\left\{(6,6),\left(\frac{-3+3 \sqrt{3}}{2}, \frac{-3-3 \sqrt{3}}{2}\right), \quad\left(\frac{-3-3 \sqrt{3}}{2}, \frac{-3+3 \sqrt{3}}{2}\right)\right\}
$$