2. It is known that $\frac{\cos x-\sin x}{\cos y}=\frac{\sqrt{2}}{3} \operatorname{tg} \frac{x+y}{2}$ and $\frac{\sin x+\cos x}{\sin y}=3 \sqrt{2} \operatorname{ctg} \frac{x+y}{2}$. Find all possible values of the expression $\operatorname{tg}(x+y)$, given that there are at least three.
Answer: $1, \frac{3}{4}$ or $-\frac{3}{4}$.

Solution. Multiplying the two given equations, we get $\frac{\cos ^{2} x-\sin ^{2} x}{\cos y \sin y}=2$, which is equivalent to the following on the domain of definition:

$$
\cos 2 x=2 \sin y \cos y \Leftrightarrow \cos 2 x+\cos \left(2 y+\frac{\pi}{2}\right)=0 \Leftrightarrow 2 \cos \left(x+y+\frac{\pi}{4}\right) \cos \left(x-y-\frac{\pi}{4}\right)=0
$$

from which it follows that either $x+y+\frac{\pi}{4}=\frac{\pi}{2}+\pi k, k \in \mathbb{Z}$, or $x-y-\frac{\pi}{4}=\frac{\pi}{2}+\pi k, k \in \mathbb{Z}$.

In the first case, we get that $x+y=\frac{\pi}{4}+\pi k, k \in \mathbb{Z}$, from which it immediately follows that $\operatorname{tg}(x+y)=1$. In the second case, $x=y+\frac{3 \pi}{4}+\pi k, k \in \mathbb{Z}$. By introducing an additional angle, we can transform the numerator of the fraction on the left side of the first equation: $\cos x-\sin x=\sqrt{2}\left(\frac{1}{\sqrt{2}} \cos x-\frac{1}{\sqrt{2}} \sin x\right)=$ $\sqrt{2} \cos \left(x+\frac{\pi}{4}\right)$. Substituting this expression for $x$, we get

$$
\sqrt{2} \cos (y+\pi+\pi k)=-\sqrt{2} \cos (y+\pi k)=-\sqrt{2}(\cos y \cos \pi k-\sin y \sin \pi k)=(-1)^{k+1} \sqrt{2} \cos y
$$

The second equation then becomes $(-1)^{k+1} \sqrt{2}=\frac{\sqrt{2}}{3} \operatorname{tg} \frac{x+y}{2}$. From this, $\operatorname{tg} \frac{x+y}{2}$ can take the values $\pm 3$. Therefore, $\operatorname{tg}(x+y)=\frac{2 \operatorname{tg} \frac{x+y}{2}}{1-\operatorname{tg}^{2} \frac{x+y}{2}}=\frac{2 \cdot( \pm 3)}{1-9}=\mp \frac{3}{4}$.

Since the problem states that the expression $\operatorname{tg}(x+y)$ can take at least 3 different values, all three cases are possible.

Remark. It is not difficult to verify that all three cases are realizable.

In the first case, we get the system

$$
\left\{\begin{array} { l } 
{ \frac { \sqrt { 2 } \operatorname { c o s } ( x + \frac { \pi } { 4 } ) } { \operatorname { c o s } y } = \frac { \sqrt { 2 } } { 3 } \operatorname { t g } \frac { x + y } { 2 } , } \\
{ x = \frac { \pi } { 4 } - y + \pi k , k \in \mathbb { Z } }
\end{array} \Leftrightarrow \left\{\begin{array} { l } 
{ \frac { \operatorname { c o s } ( \frac { \pi } { 2 } - y + \pi k ) } { \operatorname { c o s } y } = \frac { 1 } { 3 } \operatorname { t g } ( \frac { \pi } { 8 } + \frac { \pi k } { 2 } ) , } \\
{ x = \frac { \pi } { 4 } - y + \pi k , k \in \mathbb { Z } }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
(-1)^{k} \operatorname{tg} y=\frac{1}{3} \operatorname{tg}\left(\frac{\pi}{8}+\frac{\pi k}{2}\right) \\
x=\frac{\pi}{4}-y+\pi k, k \in \mathbb{Z}
\end{array}\right.\right.\right.
$$

Obviously, the first equation has solutions (the tangent takes any values), and therefore the system has solutions.

In the second case, substitute $x$ not only into the left side of the second equation but also into the right side: $(-1)^{k+1} \sqrt{2}=\frac{\sqrt{2}}{3} \operatorname{tg}\left(y+\frac{3 \pi 8}{+} \frac{\pi k}{2}\right) \Leftrightarrow \operatorname{tg}\left(y+\frac{3 \pi}{8}+\frac{\pi k}{2}\right)=3(-1)^{k+1}$. It is easy to see that this equation has solutions for any integer $k$, so both values of $\operatorname{tg}(x+y)$ can be taken.