Mathematica Mathematica: solving system of nonlinear equations

AI Thread Summary
The discussion focuses on solving a system of nonlinear equations in Mathematica involving 2n variables, where the challenge arises from the Solve command returning multiple solutions due to the interchangeable nature of the xi variables. The user seeks a method to constrain the solutions by enforcing the condition x1 <= x2 <= ... <= xn to obtain a unique solution. It is suggested that using the Reduce function along with Assumptions may be the key to achieving this goal. The conversation emphasizes the importance of managing variable constraints in Mathematica to streamline solution outputs. Ultimately, applying these techniques can help refine the results for better usability.
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
 

Similar threads

Replies
19
Views
2K
Replies
2
Views
2K
Replies
2
Views
1K
Replies
3
Views
2K
Replies
2
Views
1K
Replies
4
Views
1K
Replies
5
Views
3K
Replies
1
Views
1K
Replies
1
Views
2K
Back
Top