- #1
gothmogsbane
- 1
- 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?
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?