MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Trouble with coupled quadratic equations where the

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108262] Re: [mg106476] Trouble with coupled quadratic equations where the
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Fri, 12 Mar 2010 07:08:57 -0500 (EST)
  • References: <201001141046.FAA19729@smc.vnet.net> <4B4F4A54.1060707@wolfram.com> <F31A33CB-5E54-4AAF-84D9-342F88A1BA07@yale.edu>

Robert Hoy wrote:
> Hello - sorry for the extremely belated reply.  Daniel, your method 
> worked, of course - thanks.
> 
> What I ended up going with was a numerical solver that makes initial 
> guesses (with some randomnness) as to the values of the {x, y, z}, and 
> then uses Newton iterations to try and solve them.  If it doesn't work 
> after a number of iterations (which I set), it makes another initial 
> guess.  The code uses LU decomposition and a number of standard tricks.  
> One thing I thought worth mentioning is, the method does not employ 
> complex numbers, and I don't see why complex numbers would be needed.  
> So, bringing things back to Mathematica, three questions:
> 
> 1) Is there a way to restrict the Mathematica solver to work only in 
> real space?

Reduce can be restricted in that way. Solve cannot, but this will change 
in the next release. NSolve cannot be so restricted, at least not in a 
useful way. We might try to add such functionality in future but have 
not done so as yet.


> 
> 2) A problem with solving these sets of equations in Mathematica is its 
> use of Grobner bases; solutions slow drastically as the number of 
> variables (3N) exceeds 21 (N = 7).  Does Mathematica have a special 
> solver for quadratic forms (my equations are all quadratic forms) which 
> uses something other than Grobner bases?

No. And I suspect any "global" method will run afoul of complexity, even 
when equations are "only" quadratic. But see remark below re optimization.


> 3) To be clear, though I am solving equations in 3N variables, the 
> solutions 'live in' 3-dimensional Cartesian space (R^3).  Is there some 
> command to tell Mathematica to look for solutions only in R^3?

This part I do not understand. The fact that solutions represent triples 
in R^3 does not strike me as being relevant to solvers (except insofar 
as you impose realness, which might be used to avoid complex space).


> The reason I ask is, the numerical solver I'm using also starts to break 
> as N becomes 'large' (how large 'large' is can be increased by using 
> tricks, but only up to a point), but I guess Mathematica might include 
> some special routines for dealing with this problem (which is, after 
> all, just solving real quadratic forms).

If you can get by with just one solution (e.g. using symmetries to 
generate others), there might be ways to set it up as a constrained 
minimization and invoke FindMinimum with interior point or quadratic 
programming option. This is not very well documented functionality but 
some might be found in the advanced tutorial material for optimization.


> Thanks,
> Robert Hoy
> [...]

Sorry I cannot be of much help here. I simply am not aware of 
technologies, other than perhaps quadratic programming, that will find 
all solutions (or all in some restricted region) and that might behave 
nicely for such problems.


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: Re: gaps in plot of piecewise function
  • Next by Date: Re: ParametricPlot3D with three parameters
  • Previous by thread: Re: Manipulate [ Show [graphics ]]]
  • Next by thread: Re: Trouble with coupled quadratic equations where the