## Task 3 - 221243

Investigate whether there exist nonnegative

a) real numbers $x_{1}, x_{2}, x_{3}, x_{4}$,

b) integers $x_{1}, x_{2}, x_{3}, x_{4}$

such that $x_{1}+x_{2}+x_{3}+x_{4}=4$ and $x_{2}+2 x_{3}+3 x_{4}=4$, and the sum

$$
s=x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}
$$

assumes a minimum value. If this is the case, determine such numbers $x_{1}, x_{2}, x_{3}, x_{4}$ and the corresponding value $s$ for a) and b) respectively.
a) Solving the two side conditions for $x_{2}$ and $x_{1}$, we obtain:

$$
\begin{array}{r}
x_{2}=4-2 x_{3}-3 x_{4} \\
x_{1}=x_{3}+2 x_{4}
\end{array}
$$

Substituting into the equation $s=x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}$, we get:

$$
\begin{aligned}
s & =\left(x_{3}+2 x_{4}\right)^{2}+\left(4-2 x_{3}-3 x_{4}\right)^{2}+x_{3}^{2}+x_{4}^{2} \\
& =x_{3}^{2}+4 x_{3} x_{4}+4 x_{4}^{2}+16-16 x_{3}-24 x_{4}+4 x_{3}^{2}+12 x_{3} x_{4}+9 x_{4}^{2}+x_{3}^{2}+x_{4}^{2} \\
& =6 x_{3}^{2}+16 x_{3} x_{4}+14 x_{4}^{2}-16 x_{3}-24 x_{4}+16 \\
& =6\left(x_{3}+(4 / 3)\left(x_{4}-1\right)\right)^{2}+(14-32 / 3) x_{4}^{2}-(24-64 / 3) x_{4}+(16-32 / 3) \\
& =6\left(x_{3}+(4 / 3)\left(x_{4}-1\right)\right)^{2}+(10 / 3)\left(x_{4}^{2}-(4 / 5) x_{4}+(8 / 5)\right) \\
& \left.=6\left(x_{3}+(4 / 3)\left(x_{4}-1\right)\right)^{2}+(10 / 3)\left(x_{4}-2 / 5\right)^{2}+(10 / 3)(8 / 5-4 / 25)\right) \\
& =6\left(x_{3}+(4 / 3)\left(x_{4}-1\right)\right)^{2}+(10 / 3)\left(x_{4}-2 / 5\right)^{2}+24 / 5 \geq 24 / 5
\end{aligned}
$$

Thus, $s$ is bounded from below by $24 / 5$.

For $x_{1}=8 / 5 ; x_{2}=6 / 5 ; x_{3}=4 / 5 ; x_{4}=2 / 5$, the two side conditions are satisfied, since $(8+6+4+2) / 5=$ $20 / 5=4$ and $(6+2 \cdot 4+3 \cdot 2) / 5=20 / 5=4$ holds. For this assignment of variables,

$$
s=\left(8^{2}+6^{2}+4^{2}+2^{2}\right) / 5^{2}=120 / 25=24 / 5
$$

Thus, the lower bound is achieved.

Conclusion: The sum $s$ attains its smallest value $24 / 5$ when $x_{1}=8 / 5 ; x_{2}=6 / 5 ; x_{3}=4 / 5 ; x_{4}=2 / 5$.

b) If the numbers $x_{1}, x_{2}, x_{3}$, and $x_{4}$ are integers, then $s=x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+x_{4}^{2}$ is also an integer. A number $x_{i}$ and its square $x_{i}^{2}$ have the same parity (i.e., the same remainder when divided by 2). Therefore, $s$ has the same parity as $x_{1}+x_{2}+x_{3}+x_{4}=4$. Thus, $s$ is always even.

Just as in part a), the inequality $s \geq 24 / 5>20 / 5=4$ holds. Since $s$ is an integer and even, this can be strengthened to $s \geq 6$.

For $x_{1}=1 ; x_{2}=2 ; x_{3}=1 ; x_{4}=0$, the two side conditions are satisfied, since $1+2+1+0=4$ and $2+2 \cdot 1+3 \cdot 0=4$ holds. For this assignment of variables, $s=1^{2}+2^{2}+1^{2}+0^{2}=6$. Thus, the lower bound is achieved.

Conclusion: The sum $s$ attains its smallest value 6 when $x_{1}=1 ; x_{2}=2 ; x_{3}=1 ; x_{4}=0$.