Re: How can I solve these simultaneous quadratic equations in Mathemetica?

• To: mathgroup at smc.vnet.net
• Subject: [mg65840] Re: [mg65726] How can I solve these simultaneous quadratic equations in Mathemetica?
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Tue, 18 Apr 2006 06:56:36 -0400 (EDT)
• References: <200604160748.DAA11097@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Heisnam Singh wrote:
> [This post has been delayed due to email problems - moderator]
>
> Hello,
>
> I am trying to solve a set of  4 simultaneous quadratic equations in 4 unknowns (plus a paramter, c) using Mathematica. I tried doing the following:
>
> Solve[{1 + 3c/2 + x(1 + c + y + z - x) + c*y + (y + z + x)/2 - w(2y + 2x-3w + 3 + 2c) == 0,  c/2 + w(y + z - w + 3/2 + c) - x( 2w + 2z - 3x + 2) == 0,
> 1 + 2c + w(1 + c) + z(w + x - z + 3/2 + c) - y(2w + 2z - 3y + 4 + 2c) == 0, y(x + w - y + 1 + c) - c(1 + w) + (y + w - x)/2 - z(2y + 2x - 3z) == 0}, {w, x, y, z}]
>
> I need only real solutions (actually only positive real numbers if it exist). I have also tried using Reduce[{eqns},{vars},reals]. But both Solve and Reduce do not seem to be able to give any solutions. (I get an error message saying that there's not enough memory and that mathematica has shut down). Is there a command or a way to solve such system of equations using Mathematica. Please help. ( I haven't tried Nsolve. Can it solve the above? )
>
> Thoihen

The answer to your last question will depend on what you require. If you
can make do with solution sets for speific values of c then NSolve will
get these as below.

exprs = {1 + (3*c)/2 + c*y - w*(3 + 2*c - 3*w + 2*x + 2*y) +
x*(1 + c - x + y + z) +
(x + y + z)/2, c/2 + w*(3/2 + c - w + y + z) -
x*(2 + 2*w - 3*x + 2*z),
1 + 2*c + (1 + c)*w + (3/2 + c + w + x - z)*z -
y*(4 + 2*c + 2*w - 3*y + 2*z), -(c*(1 + w)) +
(1 + c + w + x - y)*y + (w - x + y)/2 - (2*x + 2*y - 3*z)*z};

vars = {w,x,y,z};

Timing[soln = Select[vars/.NSolve[exprs /. c->-11/5],
Apply[And,Map[Positive,#]]&]]
Out[16]= {0.072004 Second, {{4.76195, 1.72393, 6.61827, 4.98005}}}

If you have patience and a lot of RAM the method below might work for
generic c.

Timing[soln = NSolve[exprs, vars, WorkingPrecision->Infinity];]

I've not obtained a solution after 10 minutes thus far and I do not know
if I will get one at all, or run out of memory. But it might work. If
so, I expect the result to be a set of nine huge symbolic solutions and
I doubt it will be of any use.

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Mathlink and C/C++
• Next by Date: Re: setps problem/how to set matrix elements
• Previous by thread: How can I solve these simultaneous quadratic equations in Mathemetica?
• Next by thread: Re: How can I solve these simultaneous quadratic equations in Mathemetica?