## Task A-3.1.

Determine all pairs of real numbers $(x, y)$ such that $x, y \in\left[0, \frac{\pi}{2}\right]$ for which

$$
\frac{2 \sin ^{2} x+2}{\sin x+1}=3+\cos (x+y)
$$
## Solution.

Let $t=\sin x$. Since $x \in\left[0, \frac{\pi}{2}\right]$, it follows that $t \in[0,1]$.

For $t \in[0,1]$, we have $\frac{2 t^{2}+2}{t+1} \leqslant 2$.

Indeed,

$$
\frac{2 t^{2}+2}{t+1} \leqslant 2 \Longleftrightarrow \frac{2 t^{2}-2 t}{t+1} \leqslant 0 \Longleftrightarrow \frac{t(t-1)}{t+1} \leqslant 0
$$

For $t \in[0,1]$, the denominator is positive, and the numerator is non-positive, so the last inequality holds. Therefore, the expression on the left side of the given equation is at most 2.

On the other hand, for any choice of the pair $(x, y)$, we have $3+\cos (x+y) \geqslant 2$.

This shows that

$$
\frac{2 \sin ^{2} x+2}{\sin x+1} \leqslant 3+\cos (x+y)
$$

Equality is achieved if and only if both sides are equal to 2, which is possible only if $\sin x=0$ or $\sin x=1$, and $\cos (x+y)=-1$.

Since $x+y \in[0, \pi]$, the only solution is $(x, y)=\left(\frac{\pi}{2}, \frac{\pi}{2}\right)$.