Solve the following equation:

$\cos x + \sqrt{3} \sin x = \sqrt{2}$.
Divide the equation by 2 and replace $\frac{1}{2}$ with $\sin \frac{\pi}{6}$, and $\frac{\sqrt{3}}{2}$ with $\cos \frac{\pi}{6}$:

$$
\begin{gathered}
\frac{1}{2} \cos x+\frac{\sqrt{3}}{2} \sin x=\frac{\sqrt{2}}{2} \\
\sin \frac{\pi}{6} \cos x+\cos \frac{\pi}{6} \sin x=\frac{\sqrt{2}}{2}
\end{gathered}
$$

Based on the identity $\sin (a+b)=\sin a \cos b+\cos a \sin b$, the left side becomes $\sin \left(x+\frac{\pi}{6}\right)$, that is,

$$
\sin \left(x+\frac{\pi}{6}\right)=\frac{\sqrt{2}}{2}
$$

The solutions to this are: $x+\frac{\pi}{6}=\frac{\pi}{4}+2 k \pi$, so $x=\frac{\pi}{12}+2 k \pi$ and $x+\frac{\pi}{6}=\frac{3 \pi}{4}+2 l \pi$, so $x=\frac{7 \pi}{12}+2 l \pi$, where $k, l$ are arbitrary integers.

Remarks. 1. The equation can also be solved by expressing one of the terms on the left side, for example, $\cos x$, and squaring both sides, then replacing $\cos ^{2} x$ with $\left(1-\sin ^{2} x\right)$:

$$
\begin{aligned}
\cos x & =\sqrt{2}-\sqrt{3} \sin x \\
\cos ^{2} x & =(\sqrt{2}-\sqrt{3} \sin x)^{2} \\
1-\sin ^{2} x & =2-2 \sqrt{6} \sin x+3 \sin ^{2} x
\end{aligned}
$$

This results in a quadratic equation in $\sin x$, which can be solved.

The disadvantage of this method is that squaring can introduce extraneous roots.

2. Equations of the form

$$
A \sin x+B \cos x=C
$$

where $A$ and $B$ are not both zero, can be solved similarly to the method seen in the solution.

First, we try to divide the equation by a number so that the two coefficients on the left side become the cosine and sine of some number. This is exactly satisfied if the sum of the squares of the two coefficients is 1.

It is easy to verify that this can be achieved by dividing by $\sqrt{A^{2}+B^{2}}$:

$$
\frac{A}{\sqrt{A^{2}+B^{2}}} \sin x+\frac{B}{\sqrt{A^{2}+B^{2}}} \cos x=\frac{C}{\sqrt{A^{2}+B^{2}}}
$$

Let $\alpha$ be a number such that $\cos \alpha=\frac{A}{\sqrt{A^{2}+B^{2}}}$ and $\sin \alpha=\frac{B}{\sqrt{A^{2}+B^{2}}}$. Then the equation becomes:

$$
\sin (x+\alpha)=\frac{C}{\sqrt{A^{2}+B^{2}}}
$$

The solutions to this are:

$$
x=\arcsin \frac{C}{\sqrt{A^{2}+B^{2}}}+2 k \pi-\alpha
$$

and

$$
x=-\arcsin \frac{C}{\sqrt{A^{2}+B^{2}}}+(2 l+1) \pi-\alpha
$$

where $k, l$ are arbitrary integers.

The equation has a solution if and only if $\left|\frac{C}{\sqrt{A^{2}+B^{2}}}\right| \leqslant 1$, that is, $C^{2} \leqslant A^{2}+B^{2}$.