views:

161

answers:

7

I have to solve polynomial equation system which gives error as it has infinite solutions and i just require few solutions(any 2 or 3) so how can i get them? , Can i specify condition on solution like solutions whose values range between 1 to 10 so that i can get few value. Equations are actually long complicated but infinite solutions are due to "sin(0)" at root.

A: 

If you solve a system of the form f(x)=0 numerically, you can use FMINCON to add constraints. For example, you can specify that the solution should be between 1 and 10.

Jonas
+1  A: 

Mathematica's FindRoot function will give you the closest solution to a given value, so you can use FindRoot a few times with various inputs.

Any other mathematical program should have something similar, it just happens that I'm most familiar with Mathematica at the moment.

David Zaslavsky
This is not true, unless the system consists of polynomials in only one variable. For instance, the single polynomial equation x^2+y^2-1=0 has infinitely many solutions.
ShreevatsaR
Good point, I was thinking of completely determined systems (N equations for N variables).
David Zaslavsky
+2  A: 

You can try to add additional equations to the system, like x1 = 0, x2 = 0 etc., to restrict the number of possible solutions.

sth
+1  A: 

Which definition of a solution are you meaning here: That a given function has a value of zero for certain inputs or that a given system of multiple equations overlap in multiple points? The latter could be described as 2 planes intersecting on a line but this isn't necessarily what people may think of when they picture solving a polynomial equation system.

For example: x^2 =4 has only 2 solutions, but x^2=y^2 may have infinitely many solutions as x=y and x=-y are both lines that define where that equality would hold, yet both can be considered polynomial equations to my mind.


I presume you have read through things like SOLUTION OF EQUATIONS USING MATLAB, MATLAB Programming/Symbolic Toolbox, and Solving non linear equations, right? Those may have some ideas for how to use Matlab to do that.

JB King
Solution may be equation as your 2nd aproch but then why i m getting error instead of expression?
A: 

In a similar manner to Jonas, if you solve for f(x) = 0 numerically in Matlab, you can use fsolve. Should the polynomial have many potential outputs, you may well be able to iterate towards these from different initial points.

Beware local minima in your solution space though, they can be a serious problem for iterative solutions as they guide your algorithm to an answer that is not actually correct.

ianhales
A: 

In Mathematica you could use FindInstance to find one or more solutions to your equations. Here's how to get 2 solutions of a particular set of equations:

In[2]:= FindInstance[
 x^2 + y^2 + z^2 == -1 && z^2 == 2 x - 5 y, {x, y, z}, 2]

Out[2]= {{x -> -(46/5) - (6 I)/5, 
  y -> 1/10 (25 - Sqrt[-5955 - 1968 I]), 
  z -> -Sqrt[1/10 ((-309 - 24 I) + 5 Sqrt[-5955 - 1968 I])]}, {x -> 
   11/5 - (43 I)/5, y -> 1/10 (25 - Sqrt[6997 + 5504 I]), 
  z -> Sqrt[(1/5 - I/10) ((2 - 85 I) + (2 + I) Sqrt[6997 + 5504 I])]}}

You can also give inequalities like 1 < var < 10 to FindInstance or to Reduce to further restrict possible solutions, as you suggested.

Andrew Moylan
A: 

If the system is big or there are many solutions (isolated or high dimension components) you can use packages like HOM4PS2. If the system is (extremely) small you can solve it symbolically by finding the so called Grobner's basis, which gives you a equivalent (but different) set of polynomials whose solutions are almost obvious. Both Maple and Mathematica 7 can do this.

ssquidd