4. Let $x, y$ and $z$ be real numbers. Find the minimum and maximum value of the expression $f=\cos x \sin y+\cos y \sin z+\cos z \sin x$.
Answer: $\max f=\frac{3}{2}, \min f=-\frac{3}{2}$.

Solution. To find the maximum and minimum values, we estimate the expression $|f|$, using the property of absolute value: the absolute value of the sum of several numbers does not exceed the sum of the absolute values of these numbers. Therefore, $|f| \leqslant|\cos x \sin y|+|\cos y \sin z|+|\cos z \sin x|$. Now we estimate each term using the inequality of means $|a b| \leqslant \frac{1}{2}\left(a^{2}+b^{2}\right) \Longleftrightarrow 0 \leqslant(|a|-|b|)^{2}$:

$$
|f| \leqslant \frac{1}{2}\left(\cos ^{2} x+\sin ^{2} y\right)+\frac{1}{2}\left(\cos ^{2} y+\sin ^{2} z\right)+\frac{1}{2}\left(\cos ^{2} z+\sin ^{2} x\right)
$$

The right-hand side of the inequality equals $\frac{3}{2}$, so $|f| \leqslant \frac{3}{2}$, which means $-\frac{3}{2} \leqslant f \leqslant \frac{3}{2}$. The maximum value $\frac{3}{2}$ is achieved, for example, when $x=y=z=\pi / 4$, and the minimum value $-\frac{3}{2}$ is achieved when $x=y=z=-\pi / 4$.

Criteria. Only the answer - 0 points. Correctly indicating the set of values $x, y, z$, for which $f=\frac{3}{2}$ or $f=-\frac{3}{2}-1$ point. Proving only one inequality $f \leqslant \frac{3}{2}$ (or $-\frac{3}{2} \leqslant f$), but not verifying the attainability of the value $\frac{3}{2}$ (or $-\frac{3}{2}$) - 3 points. Proving only one inequality $f \leqslant \frac{3}{2}$ (or $-\frac{3}{2} \leqslant f$) and verifying the attainability of the value $\frac{3}{2}$ (or $-\frac{3}{2}$) - 4 points. Proving the inequality $|f| \leqslant \frac{3}{2}$, but not verifying the attainability of the values $\pm \frac{3}{2}-5$ points. Complete solution - 7 points.