Let $n\ge3$ be a positive integer. Find the real numbers $x_1\ge0,\ldots,x_n\ge 0$, with $x_1+x_2+\ldots +x_n=n$, for which the expression \[(n-1)(x_1^2+x_2^2+\ldots+x_n^2)+nx_1x_2\ldots x_n\] takes a minimal value.
1. **Problem Setup**: We need to find the real numbers \( x_1 \geq 0, x_2 \geq 0, \ldots, x_n \geq 0 \) such that \( x_1 + x_2 + \ldots + x_n = n \) and minimize the expression:
   \[
   E(x_1, x_2, \ldots, x_n) = (n-1)(x_1^2 + x_2^2 + \ldots + x_n^2) + n x_1 x_2 \ldots x_n.
   \]

2. **Domain and Function**: Define the domain \( D = \{ (x_1, x_2, \ldots, x_n) \mid x_k \geq 0, \sum_{k=1}^n x_k = n \} \subset \mathbb{R}^n \). The function \( E \) is a polynomial and hence \( C^\infty \). By Weierstrass' Theorem, \( E \) attains its extrema on the compact set \( D \).

3. **Lagrange Multipliers**: Construct the Lagrange function:
   \[
   L(x_1, x_2, \ldots, x_n, \lambda) = E(x_1, x_2, \ldots, x_n) - \lambda \left( \sum_{k=1}^n x_k - n \right).
   \]
   The partial derivatives of \( L \) with respect to \( x_k \) and \( \lambda \) are:
   \[
   \frac{\partial L}{\partial x_k} = 2(n-1)x_k + n \prod_{j \neq k} x_j - \lambda = 0, \quad 1 \leq k \leq n,
   \]
   \[
   \frac{\partial L}{\partial \lambda} = \sum_{k=1}^n x_k - n = 0.
   \]

4. **Critical Points**: From the partial derivatives, we get:
   \[
   2(n-1)x_k + n \frac{P}{x_k} - \lambda = 0, \quad \text{where } P = \prod_{k=1}^n x_k.
   \]
   Subtracting the equations for indices \( i \) and \( j \):
   \[
   (x_i - x_j) \left( 2(n-1)x_i x_j - nP \right) = 0.
   \]
   This implies either \( x_i = x_j \) or \( x_i x_j = \frac{n}{2(n-1)} P \).

5. **Distinct Values**: Let \( y_1, y_2, \ldots, y_s \) be the distinct values among \( x_1, x_2, \ldots, x_n \) with multiplicities \( n_1, n_2, \ldots, n_s \). Then:
   \[
   \sum_{k=1}^s n_k = n, \quad \sum_{k=1}^s n_k y_k = n.
   \]
   If \( s \geq 3 \), then \( y_i y_j = \frac{n}{2(n-1)} P \) for three distinct indices, leading to a contradiction. Thus, \( s = 1 \) or \( s = 2 \).

6. **Case \( s = 1 \)**: All variables are equal, \( x_1 = x_2 = \ldots = x_n = 1 \). Then:
   \[
   E(1, 1, \ldots, 1) = (n-1)n + n = n^2.
   \]

7. **Case \( s = 2 \)**: Let \( a \) variables be \( u \) and \( b \) variables be \( v \) with \( a + b = n \) and \( au + bv = n \). Also, \( uv = \frac{n}{2(n-1)} P \). Then:
   \[
   E(u, \ldots, v, \ldots) = (n-1)(au^2 + bv^2) + nP.
   \]
   Substitute \( v = \frac{n - au}{b} \) and simplify:
   \[
   E = \frac{n-1}{b} \left( (n-2)au^2 - 2n(a-1)u + n^2 \right).
   \]
   The minimum of this quadratic expression is reached for \( u_0 = \frac{n(a-1)}{(n-2)a} \). Evaluating \( E \) at \( u_0 \):
   \[
   E \geq \frac{n-1}{b} n^2 \left( 1 - \frac{(a-1)^2}{(n-2)a} \right).
   \]
   Simplifying further, we find:
   \[
   E \geq n^2.
   \]

8. **Conclusion**: The minimum value of \( E \) is \( n^2 \), achieved when all \( x_i = 1 \).

The final answer is \( \boxed{ n^2 } \).