# How to solve the non homogeneous equations

I am looking for the proof of the following

I have the following equations

$x_1^2+x_2^2+x_3^2+....+x_n^2=1$,

$x_1+x_2+x_3+........+x_n=1$

$0 \leq x_i\leq 1$ for-all $i$

I believe that the only solution to the above is one of the variable value is one and remaining all are zero. If it is true then how can we prove that. Many Thanks

-
Geometrically, this is the intersection of the unit sphere with an affine hyperplane. Draw the $n=2$ case first to see what is going on. –  1015 Mar 3 '13 at 17:17

Observe that

$$(x_1+x_2+x_3+...+x_n)^2=1$$ $$x_1^2+x_2^2+x_3^2+...+x_n^2+2(x_1x_2+x_1x_3+x_1x_4+...+x_{n-1}x_n)=1$$

Subtracting the first equation from the above, we obtain

$$2(x_1x_2+x_1x_3+x_1x_4+...+x_{n-1}x_n)=0$$

Now, since $0 \leq x_i \leq 1$ for all $i$, at most one of $x_i$ is nonzero, for otherwise (if $x_m$ and $x_k$ were non-zero)

$$2(x_1x_2+x_1x_3+x_1x_4+...+x_{n-1}x_n) \geq 2x_mx_k \gt 0$$

Without loss of generality let $x_1$ be the nonzero term. Then we have $x_1=1, x_1^2=1$, and thus we have $x_1=1, x_2=x_3=x_4=...=x_n=0$.

-
Thanks for the solution. I don't know I never I got this idea. –  Kumar Mar 3 '13 at 17:18
@Reddy the key is that we need to prove all but one terms are non-zero, as you suggested. –  Vincent Tjeng Mar 3 '13 at 17:26

Alternately, note that $x^2 < x$ when $0 <x < 1$, and $x^2 = x$ for $x = 0,1$. Therefore if there is some $x_i$ with $0 < x_i < 1$, we have

$$x_1^2 + x_2^2 + \ldots + x_n^2 < x_1 + x_2 + \ldots + x_n$$

and so every solution has $x_i = 0$ or $1$ for each $i$. Then from the second equation we see that exactly one $x_i$ must be $1$.

-