Re: Numerical solution of quadratic equations set.
- To: mathgroup at smc.vnet.net
- Subject: [mg58235] Re: Numerical solution of quadratic equations set.
- From: "Valeri Astanoff" <astanoff at yahoo.fr>
- Date: Fri, 24 Jun 2005 02:49:53 -0400 (EDT)
- References: <d9e0vb$gdl$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Stepan,
Assuming you already know x1 (for instance),
you can proceed as follows :
In[1]:=
eq = {x1^2 + x2^2 + x3^2 - 1, x4^2 + x5^2 + x6^2 - 1, x7^2 + x8^2 +
x9^2 - 1,
[...]
x33 + 0.395675328765874*x31 - 91.6389177918417};
In[2]:=
var = Variables[eq . eq /. x1 -> 0.927403345664447]
Out[2]=
{x10, x11, x12, x2, x25, x26, x27, x3, x31, x32, x33, x37, x38, x39,
x4, x40,
x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53,
x54,
x55, x56, x57, x6, x7, x8, x9}
In[3]:=Length[var]
Out[3]=38
In[4]:=Length[eq]
Out[4]=38
In[5]:=
sol = {x1 -> 0.927403345664447, x2 -> 0.0725966543355521,
[...]
x55 -> 3.3546139097961*^-14, x56 -> 320, x57 -> 359.999993383562};
In[6]:=
FindRoot[Thread[eq == 0] /. x1 -> 0.927403345664447,
Transpose[{var, var /. sol}]]
Out[6]=
{x10 -> 64.98983755710177, x11 -> -39.84544671253095,
x12 -> 330.44304955683197, x2 -> 0.0725966543355611,
x25 -> -11.397496577102489, x26 -> -270.6759724565711,
x27 -> 110.543902002013, x3 -> -0.36695062369435016,
x31 -> -18.526997426452514, x32 -> 44.08583005442901,
x33 -> 98.9695935895978, x37 -> -18.526998007516152,
x38 -> 46.98639765626758, x39 -> 84.30824176417308,
x4 -> -0.0725966543355525, x40 -> -0.28718517022215695,
x41 -> -0.766755739222569, x42 -> 0.5741169866618843,
x43 -> 315.33820643168474, x44 -> 20.851602095468678,
x45 -> 216.4104662941398, x46 -> -0.927403345664447,
x47 -> 0.0725966543355525, x48 -> -0.366950623694352,
x49 -> -18.52699800751613, x5 -> 0.9972656090731754,
x50 -> 46.98639765626763, x51 -> 84.30824176417305,
x52 -> -18.52699742645233, x53 -> 46.98639761078225,
x54 -> 84.30824199408565, x55 -> -6.590757482558595*^-14,
x56 -> 319.99999999999966, x57 -> 359.99999937345075,
x6 -> 0.013821387021311736, x7 -> 0.366950623694352,
x8 -> 0.013821387021266472, x9 -> 0.930137736591272}
v.a.