3. Find the minimum value of the expression

$$
A=\left(2\left(\sin x_{1}+\ldots+\sin x_{n}\right)+\cos x_{1}+\ldots+\cos x_{n}\right) \cdot\left(\sin x_{1}+\ldots+\sin x_{n}-2\left(\cos x_{1}+\ldots+\cos x_{n}\right)\right)
$$
Answer: $-\frac{5 n^{2}}{2}$.

Solution. For $k=1, \ldots, n$ let $t_{k}=3 \sin x_{k}-\cos x_{k}, s_{k}=\sin x_{k}+3 \cos x_{k}$. Then

$$
\begin{aligned}
4 A=\left(\sum_{k=1}^{n}\left(4 \sin x_{k}+2 \cos x_{k}\right)\right) \cdot\left(\sum_{k=1}^{n}\left(2 \sin x_{k}-4 \cos x_{k}\right)\right)= \\
=\left(\sum_{k=1}^{n}\left(3 \sin x_{k}-\cos x_{k}\right)+\sum_{k=1}^{n}\left(\sin x_{k}+3 \cos x_{k}\right)\right) \cdot\left(\sum_{k=1}^{n}\left(3 \sin x_{k}-\cos x_{k}\right)-\sum_{k=1}^{n}\left(\sin x_{k}+3 \cos x_{k}\right)\right)= \\
=\left(\sum_{k=1}^{n} t_{k}\right)^{2}-\left(\sum_{k=1}^{n} s_{k}\right)^{2}
\end{aligned}
$$

By the Cauchy inequality,

$$
\left(\sum_{k=1}^{n} s_{k}\right)^{2} \leqslant n \sum_{k=1}^{n} s_{k}^{2} \leqslant n \sum_{k=1}^{n}\left(s_{k}^{2}+t_{k}^{2}\right)=n \sum_{k=1}^{n} 10\left(\sin ^{2} x_{k}+\cos ^{2} x_{k}\right)=10 n^{2}
$$

from which

$$
A \geqslant-\frac{1}{4}\left(\sum_{k=1}^{n} s_{k}\right)^{2} \geqslant-\frac{5 n^{2}}{2}
$$

Equality is achieved when $\sin x_{1}=\ldots=\sin x_{n}=\frac{1}{\sqrt{10}}$ and $\cos x_{1}=\ldots=\cos x_{n}=\frac{3}{\sqrt{10}}$.