2. Given numbers $x, y, z \in\left[0, \frac{\pi}{2}\right]$. Find the minimum value of the expression

$$
A=\cos (x-y)+\cos (y-z)+\cos (z-x)
$$
Answer: 1.

Solution. We can assume that $x \leqslant y \leqslant z$, since the expression $A$ does not change under pairwise permutations of the variables. Notice that

$$
\cos (x-y)+\cos (z-x)=2 \cos \left(\frac{z-y}{2}\right) \cos \left(\frac{z+y}{2}-x\right)
$$

The first cosine in the right-hand side is positive and does not depend on $x$, while the argument of the second cosine lies in $\left[0, \frac{\pi}{2}\right]$, since $\frac{\pi}{2} \geqslant \frac{z+y}{2} \geqslant x$. Therefore, the right-hand side will be the smallest when $x=0$. In this case,

$$
A=\cos y+\cos z+\cos (y-z)=\cos z+2 \cos \frac{z}{2} \cdot \cos \left(y-\frac{z}{2}\right)
$$

Notice that $-\frac{z}{2} \leqslant y-\frac{z}{2} \leqslant \frac{z}{2}$, hence $\cos \left(y-\frac{z}{2}\right) \geqslant \cos \frac{z}{2}$. Therefore,

$$
A \geqslant \cos z+2 \cos ^{2} \frac{z}{2}=2 \cos z+1 \geqslant 1
$$

Equality is achieved when $x=0, y=z=\frac{\pi}{2}$.