Need help Solv[]ing equations
- To: mathgroup
- Subject: Need help Solv[]ing equations
- From: sdoyle at fed.frb.gov
- Date: Fri, 24 Mar 89 15:48:08 CST
Hi: I am trying to solve a system of four equations using Mathematica, and Solve[] (and/or Reduce[]) are running out of memory. It is possible that the equations have no solution. I'm using SunMathematica (sun3.68881) 1.1 on a Sun 3/60. I'd like to understand why Mathematica has difficulty with this problem (it probably isn't Mathematica's fault.) This set of equations is from two economists that don't have access to Mathematica. They would like a solution, but I'm more interested in how the algorithms work. Any hints/solutions/truth&beauty appreciated. Part 1:How to create the out-of-memory error: I've attached the file SolveProblem.m below. After you read the file in (e.g. <<SolveProblem.m) try either of the following: This takes about half an hour > In[2]:= Solve[eqns,{w,x,y,z}] > Out of memory. Also about half an hour (different session) > In[2]:= Reduce[Share[eqns], {w,x,y,z}] > Out of memory. Share seems to simply to delay out-of-memory message. As an aside, Mathematica doesn't seem to respond to Control-C after either Solve[] or Reduce[] has been running a while (I did wait a few minutes to respond before killing the process). (******************* File SolveProblem.m ************************) (* Small model that Solve[] has problems solving. Solve[eqns, {w,x,y,z}] *) eqns = { w x y z == 1/b^2, w x (y + z) + y z (w + x) == - (c a + f g)/(a q b^2 (f c + p d)), w (x + z) + y (w + x) + z (x + y) == (1 + 2 b a q (f c + p d))/ (a q b^2 (f c + p d)), w + x + y + z == -(f q + c a)/(b q a (f c + p d)) } (****************** End of file SolveProblem.m ************************) Part 2: Various questions: 1. Why is this problem hard? 2. Solve[] and Reduce[] are (to me) black boxes. If this were *my* problem I'd start by reducing the dimensions to three, and create some plots. Can others suggest a better search procedure? 3. Are there ways of posing problems to Solve[] and Reduce[] that are easier for them to solve? Since I don't know what the algorithms are doing internally, I don't know if the failure to find a solution is because a) The problem has no solution b) The algorithm doesn't deal with this class of problems, so I'm abusing the software c) I haven't RTFM closely enough Thanks! Sean Doyle Board of Governors of the Federal Reserve System 20 and Constitution, NW Mail Stop 76 Washington, DC 20551 (202) 452-2352 uucp: uunet!fed!m1swd00 , internet: sdoyle at fed.frb.gov