4. Let $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$ be non-negative real numbers whose sum is 1. Determine the maximum possible value of the expression

$$
x_{1} x_{2}+x_{2} x_{3}+x_{3} x_{4}+x_{4} x_{5}
$$
Solution. Due to the non-negativity of the numbers $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$, the inequality holds

$$
x_{1} x_{2}+x_{2} x_{3}+x_{3} x_{4}+x_{4} x_{5} \leq\left(x_{2}+x_{4}\right)\left(x_{1}+x_{3}+x_{5}\right)
$$

Considering the inequality $a b \leq \frac{1}{4}(a+b)^{2}$ for $a=x_{2}+x_{4}$ and $b=x_{1}+x_{3}+x_{5}$, we get

$$
\left(x_{2}+x_{4}\right)\left(x_{1}+x_{3}+x_{5}\right) \leq \frac{1}{4}\left(x_{1}+x_{2}+x_{3}+x_{4}+x_{5}\right)=\frac{1}{4}
$$

From (1) and (2), it is clear that the value of the given expression does not exceed $\frac{1}{4}$. The given expression for $x_{1}=x_{2}=\frac{1}{2}$ and $x_{3}=x_{4}=x_{5}=0$ is equal to $\frac{1}{4}$, so this is its maximum value (this value is also achieved for some other values of the variables).

## 4th year