help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: Non-linear ecuation...

 From: Dirk Laurie Subject: Re: Non-linear ecuation... Date: Thu, 23 Mar 2000 17:58:14 +0200 (SAST)

```Cederik skryf:
>
> I have the next set of nine non-linear ecuations:
>
> ln(a)-ln(f)+i+4g+(19720/8314)=0
> ln(b)-ln(f)+2g+h-(192420/8314)=0
> ln(c)-ln(f)+h+i-(200240/8314)=0
> ln(d)-ln(f)+2h+i-(395790/8314)=0
> ln(e)-ln(f)+2g=0
> a+c+d-2=0
> 4a+2b+2e-14=0
> b+c+2d-3=0
> a+b+c+d+e-f=0
>
> Where:
> x=a
> x=b
> x=c
> x=d
> x=e
> x=f
> x=g
> x=h
> x=i
>
> Octave can't solve it... (non-convergent), but in fact i know that set of
> ecuations has solution. Because is a Book example.
> Octave can solve it if i put the initial x's [a,b,c,d,e,f,g,h,i] as the
> exactly solutions. But that way isn't usefull for me...
> Any sugestions?
>
Octave is no substitute for numerical analysis.  Nine simultaneous non-linear
equations is tough if you have no good initial values.

In this case you can easily reduce the number of equations to four by doing
some mathematics first, in the process a;so getting rid of the ugly logarithms
(which make life hard for the solver because they go complex when a etc goes
negative).
Use only f,g,h,i as independent variables.  Then the first five equations
give a...e in terms of f,g,h,i:
a=f*exp(-(i+4*g+19720/8314)) etc
Even without good initial values, the remaining four equations in four
unknowns should be much easier for Octave to solve.

Dirk

-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]