How to find the numbers?

79 Views Asked by At

$$x_1+x_2+x_3+x_4=4$$ $$x_1^2+x_2^2+x_3^2+x_4^2=6$$ $$x_1^3+x_2^3+x_3^3+x_4^3=10$$ $$x_1^4+x_2^4+x_3^4+x_4^4=18$$ How do I find the numbers (which are non-negative integers)?

I am trying to find a general solution, where the sums of powers of the numbers up to the $n$th power are given and there are $n$ variables.

4

There are 4 best solutions below

1
On

The Newton identities give a way to express the elementary symmetric polynomials in terms of power sums. For example, in your case:

$$e_1 = x_1 + x_2 + x_3 + x_4 = p_1 = 4;$$ $$e_2 = x_1 x_2 + x_1 x_3 + x_1 x_4 + x_2 x_3 + x_2 x_4 + x_3 x_4 = \frac{e_1 p_1 - p_2}{2} = \frac{4^2 - 6}{2} = 5;$$ $$e_3 = x_1 x_2 x_3 + x_1 x_2 x_4 + x_1 x_3 x_4 + x_2 x_3 x_4 = \frac{e_2 p_1 - e_1 p_2 + p_3}{3} = \frac{5 \cdot 4 - 4 \cdot 6 + 10}{3} = 2;$$ $$e_4 = x_1 x_2 x_3 x_4 = \frac{e_3 p_1 - e_2 p_2 + e_1 p_3 - p_4}{4} = \frac{2 \cdot 4 - 5 \cdot 6 + 4 \cdot 10 - 18}{4} = 0,$$ so $x_1,x_2,x_3,x_4$ are the roots of $$X^4 - 4X^3 + 5X^2 - 2X = X(X-1)^2 (X-2);$$ so they are $0,1,1,2$ (or some permutation of these).

1
On

How do I find the numbers (which are non-negative integers)?

The only integer squares $\le 6$ are $0=0^2,1=1^2,4=2^2$, and the only sum of $4$ such squares which adds up to $6$ is $0+1+1+4=6$. This happens to satisfy the other relations as well, so $(x_1,x_2,x_3,x_4)$ must be a permutation of $(0,1,1,2)$.

The similar problem where you replace the right-hand side $(4,6,10,18)$ with arbitrary numbers always has a solution in complex numbers (unique up to permutations). The general solution in that case can be derived using Newton's identities as shown in user376902's answer. The same holds true for $n \gt 4$ equations of the same form with $n$ unknowns.

0
On

Problems like this always have solutions that are easy to find. We might as well require $x_1 \le x_2 \le x_3 \le x_4$, then permute the variables to get all solutions. In the case of this problem, because $3^4=81 \gt 18$ we know no variable can be greater than $2$. As $4 \cdot 1^4 \lt 18$ we must have $x_4=2$. That leaves us needing $2$, so $x_1=0, x_2=1, x_3=1$.

0
On

If you assume that all variables but one is zero, the largest value the latter can take is the smallest of $4,\lfloor\sqrt6\rfloor,\lfloor\sqrt[3]{10}\rfloor,\lfloor\sqrt[4]{18}\rfloor$, which is $2$. If we hypothetize $x_1=2$, the system reduces to

$$x_2+x_3+x_4=2$$ $$x_2^2+x_3^2+x_4^2=2$$ $$x_2^3+x_3^3+x_4^3=2$$ $$x_2^4+x_3^4+x_4^4=2$$ the solutions of which are obviously the permutations of $(1,1,0)$.

If we hypothetize $x_1=1$ or $x_1=0$, we are falling in one of the previous cases, hence the solutions are all permutations of

$$(2,1,1,0).$$