4B. In the set of real numbers, solve the equation $x^{2}+6 x \cos (x y)+9=0$.
Solution. First method. We transform the equation into the form

$$
(x+3 \cos (x y))^{2}+(3 \sin (x y))^{2}=0
$$

from which it follows that $x+3 \cos (x y)=0, \sin (x y)=0$. From the fundamental trigonometric identity, $\sin ^{2}(x y)+\cos ^{2}(x y)=1$, the last two equations are equivalent to the system

$$
\left\{\begin{array}{l}
x+3 \cos (x y)=0 \\
\cos (x y)= \pm 1
\end{array}\right.
$$

We will consider two cases.

Case 1. $\cos (x y)=1$. Then from the first equation we get $x+3=0$, i.e., $x=-3$. Accordingly, $\cos (-3 y)=1$, i.e., $\cos (3 y)=1$. Solutions to the last equation are $3 y=2 k \pi$, from which we get $y=\frac{2 k \pi}{3}$. Therefore, the solutions are $\left\{\left.\left(-3, \frac{2 k \pi}{3}\right) \right\rvert\, k \in \mathbb{Z}\right\}$.

Case 2. $\cos (x y)=-1$. Then from the first equation we get $x-3=0$, i.e., $x=3$. Accordingly, $\cos (3 y)=-1$. Solutions to the last equation are $3 y=(2 k+1) \pi$ from which we get $y=\frac{(2 k+1) \pi}{3}$. Therefore, the solutions are $\left\{\left.\left(3, \frac{(2 k+1) \pi}{3} \pi\right) \right\rvert\, k \in \mathbb{Z}\right\}$.

Finally, the solutions to the equation are $\left\{\left.\left(3, \frac{(2 k+1) \pi}{3} \pi\right) \right\rvert\, k \in \mathbb{Z}\right\} \cup\left\{\left.\left(-3, \frac{2 k \pi}{3}\right) \right\rvert\, k \in \mathbb{Z}\right\}$.

Second method. From the inequality between the arithmetic and geometric means, we have $x^{2}+9 \geq 2 \sqrt{9 x^{2}}=6|x|$. Clearly, $x=0$ is not a solution to the given equation. Therefore, the equation can be written in the form

$$
\cos (x y)=-\frac{x^{2}+9}{6 x}
$$

We will consider two cases.

Case 1. $x>0$. Then, $\frac{x^{2}+9}{6 x} \geq \frac{6|x|}{6 x}=\frac{6 x}{6 x}=1$ and $\cos (x y)=-\frac{x^{2}+9}{6 x} \leq-1$. Equality is achieved if and only if $x^{2}=9$, i.e., $x=3$. But then, the equation takes the form $\cos (3 y)=-1$, and its solutions are $3 y=\pi+2 k \pi=(2 k+1) \pi$, i.e., $y=\frac{(2 k+1) \pi}{3}$.

Case 2. $x<0$. Then $\frac{x^{2}+9}{6 x} \leq \frac{6|x|}{6 x}=-\frac{6 x}{6 x}=-1$ and $\cos (x y)=-\frac{x^{2}+9}{6 x} \geq 1$. Equality is achieved if and only if $x^{2}=9$, i.e., $x=-3$. But then $\cos (-3 y)=1$, i.e., $\cos (3 y)=1$. Solutions to the last equation are $3 y=2 k \pi$, i.e., $y=\frac{2 k \pi}{3}$.

Finally, the solutions to the equation are $\left\{\left.\left(3, \frac{(2 k+1) \pi}{3} \pi\right) \right\rvert\, k \in \mathbb{Z}\right\} \cup\left\{\left.\left(-3, \frac{2 k \pi}{3}\right) \right\rvert\, k \in \mathbb{Z}\right\}$.

## Fourth Year