Mathematica: solving system of nonlinear equations

Click For Summary
SUMMARY

This discussion focuses on solving a system of nonlinear equations using Mathematica, specifically addressing the challenge of obtaining unique solutions when variables can switch positions. The user encounters the issue of receiving n! solutions due to the free positioning of variables x1, x2, ..., xn. The suggested approach to resolve this is to utilize the Reduce function along with Assumptions to enforce the condition x1 <= x2 <= ... <= xn, thereby limiting the output to a single solution.

PREREQUISITES
  • Familiarity with Mathematica's Solve command
  • Understanding of nonlinear equations and systems of equations
  • Knowledge of the Reduce function in Mathematica
  • Basic grasp of mathematical assumptions and inequalities
NEXT STEPS
  • Learn how to implement the Reduce function in Mathematica
  • Explore the use of Assumptions in Mathematica for constraining variable values
  • Study the behavior of Solve and Reduce with nonlinear equations
  • Investigate techniques for handling multiple solutions in mathematical software
USEFUL FOR

Mathematics students, researchers in computational mathematics, and anyone using Mathematica to solve complex systems of equations.

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 ·
Replies
19
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K