Mathematica: solving system of nonlinear equations

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 7K views
gothmogsbane
Messages
1
Reaction score
0
I am trying to solve the following system of 2n variables:

w1 + w2 + ... + wn = b0
w1x1 + w2x2 + ... + wnxn = b1
w1x12 + w2x22 + ... + wnxn2 = b2
...
w1x12n-1 + w2x22n-1 + ... + wnxn2n-1 = b2n-1

for w1, w2 ... wn and x1, x2 ... xn.

The problem is the using the Solve command returns n! solutions, because the xi are free to switch positions. For example, using n=2 and bi=1/(i+1):

{{w1 -> 1/2, w2 -> 1/2, x2 -> 1/6*(3 - Sqrt[3]), x1 -> 1/6*(3 + Sqrt[3])},
{w1 -> 1/2, w2 -> 1/2, x2 -> 1/6*(3 + Sqrt[3]), x1 -> 1/6*(3 - Sqrt[3])}}

Is there any way to force Mathematica to make the assumption that x1 <= x2 <= ... <= xn in order to return only one solution?
 
Physics news on Phys.org
I think you need to use Reduce and Assumptions from memory