18.4. (Jury, GDR, 79). For a given number $n \geqslant 2$ find the greatest and the least values of the product

$$
x_{1} x_{2} \ldots x_{n}
$$

under the condition that $x_{i} \geqslant 1 / n(i=1,2, \ldots, n)$ and $x_{1}^{2}+x_{2}^{2}+\ldots$ $\cdots+x_{n}^{2}=1$.
18.4. a) Let's find the minimum value of the product $x_{1} x_{2} \ldots x_{n}$. Let an arbitrary set $(x_{1}; \ldots; x_{n})$ satisfy the condition of the problem. Consider a new set

$$
\left(x_{1}^{(1)}; x_{2}^{(1)}; \ldots; x_{n}^{(1)}\right)
$$

where

$$
\begin{aligned}
& x_{1}^{(1)}=x_{1}, x_{2}^{(1)}=x_{2}, \ldots, x_{n-2}^{(1)}=x_{n-2}, \\
& x_{n-1}^{(1)}=\sqrt{x_{n-1}^{2}+x_{n}^{2}-1 / n^{2}}, x_{n}^{(1)}=1 / n .
\end{aligned}
$$

This set satisfies the relations

$$
x_{i}^{(1)} \geqslant 1 / n \quad (i=1, \ldots, n), \quad \sum_{i=1}^{n}\left(x_{i}^{(1)}\right)^{2}=1
$$

We will prove that

$$
x_{1} x_{2} \ldots x_{n} \geqslant x_{1}^{(1)} x_{2}^{(1)} \ldots x_{n}^{(1)}
$$

Indeed, we have

$$
\begin{aligned}
& x_{n-1}^{2} x_{n}^{2}-\left(x_{n-1}^{(1)} x_{n}^{(1)}\right)^{2}= \\
& \quad=x_{n-1}^{2} x_{n}^{2}-\left(x_{n-1}^{2}+x_{n}^{2}-\frac{1}{n^{2}}\right) \frac{1}{n^{2}}=\left(x_{n-1}^{2}-\frac{1}{n^{2}}\right)\left(x_{n}^{2}-\frac{1}{n^{2}}\right) \geqslant 0
\end{aligned}
$$

Next, let

$$
\begin{gathered}
x_{1}^{(2)}=x_{1}^{(1)}, \ldots, x_{n-3}^{(2)}=x_{n-3}^{(1)} \\
x_{n-2}^{(2)}=\sqrt{\left(x_{n-2}^{(1)}\right)^{2}+\left(x_{n-1}^{(1)}\right)^{2}-1 / n^{2}}, \quad x_{n-1}^{(2)}=x_{n}^{(2)}=1 / n
\end{gathered}
$$

and similarly we obtain that

$$
x_{i}^{(2)} \geqslant 1 / n, \quad \sum_{i=1}^{n}\left(x_{i}^{(2)}\right)^{2}=1
$$

and

$$
x_{1}^{(1)} x_{2}^{(1)} \ldots x_{n}^{(1)} \geqslant x_{1}^{(2)} x_{2}^{(2)} \ldots x_{n}^{(2)}
$$

Repeating this procedure $(n-1)$ times, we will eventually obtain the set

$$
\left(x_{1}^{(n-1)}; x_{2}^{(n-1)}; \ldots; x_{n}^{(n-1)}\right)
$$

where

$$
x_{1}^{(n-1)}=\sqrt{n^{2}-n+1} / n, \quad x_{2}^{(n-1)}=\ldots=x_{n}^{(n-1)}=1 / n
$$

such that

$$
x_{i}^{(n-1)} \geqslant 1 / n, \quad \sum_{i=1}^{n}\left(x_{i}^{(n-1)}\right)^{2}=1
$$

and

$$
x_{1} x_{2} \ldots x_{n} \geqslant x_{1}^{(n-1)} x_{2}^{(n-1)} \ldots x_{n}^{(n-1)}=\sqrt{n^{2}-n+1} / n^{n}
$$

Thus, for any set $(x_{1}; \ldots; x_{n})$ satisfying the condition of the problem, the inequality

$$
x_{1} x_{2} \ldots x_{n} \geqslant \sqrt{n^{2}-n+1} / n^{n}
$$

holds, and equality is achieved when

$$
x_{1}=\sqrt{n^{2}-n+1} / n, \quad x_{2}=\ldots=x_{n}=1 / n
$$

Therefore, the minimum value is

$$
\sqrt{n^{2}-n+1} / n^{n}
$$

b) Let's find the maximum value of the product $x_{1} x_{2} \ldots x_{n}$. Applying the theorem of means, we get

$$
x_{1}^{2} \ldots x_{n}^{2} \leqslant\left(\left(x_{1}^{2}+\ldots+x_{n}^{2}\right) / n\right)^{n}=1 / n^{n}
$$

i.e.,

$$
x_{1} x_{2} \ldots x_{n} \leqslant n^{-n / 2}
$$

Equality is achieved when $x_{1}=x_{2}=\ldots=x_{n}=1 / \sqrt{n}$. Therefore, the maximum value is $n^{-n / 2}$.