From: Daniel Lichtblau on 12 Mar 2010 07:08 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
|
Pages: 1 Prev: Havriliak-Negami fit in Mathematica? Next: Manipulate [ Show [graphics ]]] |