TITLE: When does $x_1+x_2+\dots+x_n=a,\space x_1^2+x_2^2+\dots+x_n^2=b$ have a unique solution?
QUESTION [8 upvotes]: Let $n\in \Bbb N$ be fixed. For which $a,b\in \Bbb R$ does the equation system
$$x_1+x_2+\dots+x_n=a$$
$$x_1^2+x_2^2+\dots+x_n^2=b$$
have a unique solution for the $x_i$?
For example if $(n,a,b)=(20,200,2000)$ it has a unique solution.

REPLY [13 votes]: If $(x_1,...,x_n)$ solves the equations then if $\pi$ is any permutation $(x_{\pi(1)},...,x_{\pi(n)})$ also solves them. In other words, any way of permuting the $x_i$'s will also lead to a solution. So the only way there could possibly be a unique solution is if $x_1 = $ ... $= x_n$, in which case each $x_i = {a \over n}$, and each $x_i^2 = 
{b \over n}$. 
So if there is a unique solution one has to have ${a^2 \over n^2} = {b \over n}$ or just $a^2 = nb$. Conversely, given any $b \geq 0$, one can let $a = \pm \sqrt{nb}$ and get a unique solution where
each $x_i = {a \over n}$.