3. The numbers $x_{1}, \ldots, x_{n}, y_{1}, \ldots, y_{n}$ satisfy the condition $x_{1}^{2}+\ldots+x_{n}^{2}+y_{1}^{2}+\ldots+y_{n}^{2} \leqslant 1$. Find the maximum value of the expression

$$
A=\left(3\left(x_{1}+\ldots+x_{n}\right)-5\left(y_{1}+\ldots+y_{n}\right)\right) \cdot\left(5\left(x_{1}+\ldots+x_{n}\right)+3\left(y_{1}+\ldots+y_{n}\right)\right)
$$
Answer: $17 n$.

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

$$
A=\left(\sum_{k=1}^{n}\left(4 x_{k}-y_{k}\right)-\sum_{k=1}^{n}\left(x_{k}+4 y_{k}\right)\right) \cdot\left(\sum_{k=1}^{n}\left(4 x_{k}-y_{k}\right)+\sum_{k=1}^{n}\left(x_{k}+4 y_{k}\right)\right)=\left(\sum_{k=1}^{n} t_{k}\right)^{2}-\left(\sum_{k=1}^{n} s_{k}\right)^{2}
$$

Notice that

$$
\sum_{k=1}^{n} t_{k}^{2} \leqslant \sum_{k=1}^{n}\left(t_{k}^{2}+s_{k}^{2}\right)=17 \cdot \sum_{k=1}^{n}\left(x_{k}^{2}+y_{k}^{2}\right) \leqslant 17
$$

from which

$$
A \leqslant\left(\sum_{k=1}^{n} t_{k}\right)^{2} \leqslant n \sum_{k=1}^{n} t_{k}^{2} \leqslant 17 n
$$

Equality is achieved when $x_{1}=\ldots=x_{n}=\frac{4}{\sqrt{17 n}}$ and $y_{1}=\ldots=y_{n}=-\frac{1}{\sqrt{17 n}}$.