## Task A-3.2.

Depending on the real parameter $p$, determine the number of solutions of the equation $\cos 2 x=p(\sin x+\cos x)$ in the interval $[0,2 \pi]$.
## Solution.

Using the formula for the cosine of a double angle, we get

$$
\cos ^{2} x-\sin ^{2} x=p(\sin x+\cos x)
$$

or

$$
(\cos x-\sin x)(\cos x+\sin x)=p(\sin x+\cos x)
$$

We get two cases:

$$
\cos x+\sin x=0 \quad \text { or } \quad \cos x-\sin x=p
$$

In the first case ( $\cos x+\sin x=0$ ), we divide by $\mathrm{s} \cos x$ (it cannot be zero, otherwise $\sin x$ would also be zero) and we get $\operatorname{tg} x=-1$, whose solutions on $[0,2 \pi]$ are $x_{1}=\frac{3 \pi}{4}$ and $x_{2}=\frac{7 \pi}{4}$.

1 point

In the second case $(\cos x-\sin x=p)$, multiplying by $\mathrm{s}-\frac{\sqrt{2}}{2}$ and applying the addition formula, the equation becomes

$$
\sin \left(x-\frac{\pi}{4}\right)=-\frac{p \sqrt{2}}{2}
$$

This equation has solutions when $-\frac{p \sqrt{2}}{2} \in[-1,1]$, i.e., when $p \in[-\sqrt{2}, \sqrt{2}]$.

Then the equation has exactly 2 solutions on $[0,2 \pi]$, except in the case where the right side is 1 or -1, or in the case where 0 and $2 \pi$ are solutions of this equation. Additionally, we need to check the case where one of the solutions of this equation is also a solution of the equation $\cos x+\sin x=0$.

The right side of this equation equals 1 when $p=-\sqrt{2}$. Then its solution is $x_{1}=\frac{3 \pi}{4}$, which is already a solution from the first case. Similarly, the right side of the equation equals -1 when $p=\sqrt{2}$, in which case the only solution is the already found solution $x_{2}=\frac{7 \pi}{4}$.

The equation will have three solutions if 0 is one of the solutions, which is the case when $\sin \left(0-\frac{\pi}{4}\right)=-\frac{p \sqrt{2}}{2}$, i.e., when $p=1$. These three solutions are $x_{3}=0, x_{4}=\pi$ and $x_{5}=2 \pi$, and they are all different from $x_{1}$ and $x_{2}$.

Finally, we conclude:

- in the case $p \leqslant-\sqrt{2}$ or $p \geqslant \sqrt{2}$, the initial equation has 2 solutions;
- in the case $p=1$, the initial equation has 5 solutions;
- in the case $p \in\langle-\sqrt{2}, \sqrt{2}\rangle \backslash\{1\}$, the initial equation has 4 solutions.

Note: The eighth and ninth points of the scoring scheme can be broken down into two separate points. One point represents considering (both) cases when the equation

$$
\sin \left(x-\frac{\pi}{4}\right)=-\frac{p \sqrt{2}}{2}
$$

has one solution, and the other represents considering (both) cases when one of the solutions of this equation is equal to $x_{1}$ or $x_{2}$. Therefore, a solution that considers the possibilities $p= \pm \sqrt{2}$ from only one of these two perspectives (for example, when the equation has exactly one solution, without commenting that it is also the found solution $x_{1}$ or $x_{2}$) achieves a maximum of 1 point from these two points.