Re: Re: How to solve nonlinear equations?
- To: mathgroup at smc.vnet.net
- Subject: [mg52570] Re: [mg52526] Re: How to solve nonlinear equations?
- From: DrBob <drbob at bigfoot.com>
- Date: Thu, 2 Dec 2004 02:21:32 -0500 (EST)
- References: <cohj9d$1nr$1@smc.vnet.net> <200412011057.FAA19914@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
The only trouble with THAT is that it doesn't work. eqns = {20.428836553499018 - Log[X1] == 468/67*X1 + 5790/1273*X2 - 66257/1273* X3 - 24660/1273*X4 - 79150/1273*X5, 17.011108423692498 - Log[X2] == 5790/1273*X1 + 6294/1273*X2 - 66257/1273*X3 - 24660/ 1273*X4 - 403.8069285* X5, -29.72639373695347 - Log[X3] == -66257/1273* X1 - 66257/1273*X2 - 2* X3, -26.273726271581616 - Log[X4] == -24660/1273*X1 - 24660/ 1273*X2 + 10.15330715*X4, -38.76695085346396 - Log[X5] == -79150/ 1273*X1 - 403.8069285*X2 - 10.67374705*X5}; FindRoot[eqns, {{X1, 1}, {X2, 1}, {X3, 1}, {X4, 1}, {X5, 1}}] eqns /. Equal -> Subtract /. % (FindRoot::lstol error) {X1 -> 0.5287215008048355 + 0.0078093799604902845*I, X2 -> 0.002514442570050682 - 0.007506800892680369*I, X3 -> 0.2750175495952261 + 0.0051666476248725625*I, X4 -> -1.6157105189511614 -4.778719413301337*^-15*I, X5 -> -0.006058532522555838 - 0.003759309847863656*I} {-0.0000172993518866571 - 5.25106242902848*^-7*I, 0.0014397436481736747 + 0.000060457451791506855*I, -0.23588972784670026 + 0.007297504899863284*I, -0.057825246363192695 + 3.1474540831359445*I, 0.0009303265262765592 + 0.00036856201666024546*I} Bobby On Wed, 1 Dec 2004 05:57:41 -0500 (EST), Jens-Peer Kuska <kuska at informatik.uni-leipzig.de> wrote: > Hi, > > a) learn the correct syntax of Mathematica > b) read the Mathematica book carefully > c) type: > > eqns = {20.428836553499018 - Log[X1] == > 468/67*X1 + 5790/1273*X2 - 66257/1273*X3 - 24660/1273*X4 - > 79150/1273*X5, > 17.011108423692498 - Log[X2] == > 5790/1273*X1 + 6294/1273*X2 - 66257/1273*X3 - 24660/1273*X4 - > 403.8069285*X5, -29.72639373695347 - Log[X3] == -66257/1273*X1 - > 66257/1273*X2 - 2*X3, -26.273726271581616 - > Log[X4] == -24660/1273*X1 - 24660/1273*X2 + > 10.15330715*X4, -38.76695085346396 - Log[X5] == -79150/1273*X1 - > 403.8069285*X2 - 10.67374705*X5} > > FindRoot[eqns, {{X1, 1}, {X2, 1}, {X3, 1}, {X4, 1}, {X5, 1}}] > > > > Regards > > Jens > > > "Wei Wang" <weiwang at baosteel.com> schrieb im Newsbeitrag > news:cohj9d$1nr$1 at smc.vnet.net... >> How to solve the following equations, where X1, X2, X3, X4 and X5 are >> variables? >> >> eqns = {20.428836553499018-ln(X1) == >> 468/67*X1+5790/1273*X2-66257/1273*X3-24660/1273*X4-79150/1273*X5, >> 17.011108423692498-ln(X2) == >> 5790/1273*X1+6294/1273*X2-66257/1273*X3-24660/1273*X4-403.8069285*X5, -29.72639373695347-ln(X3) >> == -66257/1273*X1-66257/1273*X2-2*X3, -26.273726271581616-ln(X4) >> == -24660/1273*X1-24660/1273*X2+10.15330715*X4, -38.76695085346396-ln(X5) >> == -79150/1273*X1-403.8069285*X2-10.67374705*X5}; >> > > > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Re: How to solve nonlinear equations?
- From: "Jens-Peer Kuska" <kuska@informatik.uni-leipzig.de>
- Re: How to solve nonlinear equations?