Re: solving two of nonlinear equations and two unknwons.




In article <79d4b9a3-85b1-4401-9f4b-bedc72eefa4c@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Mike <SulfateIon@xxxxxxxxx> writes:
Hi

I have a problem about solving two of nonlinear equations. And I only
have two unknown.
The function is run by some complex program and I think it's very hard
to solve it analytically.
Thus, I cannot have anallytic Jacobian.
I try numerically. I use IMSL and fortran.

First I use NEQBF(purpose:Solves a system of nonlinear equations using
factored secant update with a finite-difference approximation to the
Jacobian.). Then I find there is no constraint (reasonable bounds)
for this.
Does anybody know if there is constrainted nonlinear equations solver
for imsl?

Then I switch to use BCLSF(purpose:
Solves a nonlinear least squares problem subject to bounds on the
variables using a modified
Levenberg-Marquardt algorithm and a finite-difference Jacobian.)
It is quite sensitive to guess vectors. It traps to a wrong solution.
Since I have two unkown for two nonlinear equations. I doubt if I
need to use this (least squares).

Is there a better choice for IMSL fortran?

Mike

if I understand this and the postings following this then
. you have a system f1(x,y)=0 f2(x,y)=0
searching for a solution in a given box
. f1 and f2 are computed by a complicated black box system
and you have only function values available
. you are using codes which try to approximate derivatives (Jacobians)
using finite differences

your question concerning "good digits in f" : this means an estimate of the
number of (decimal) digits in the computed function values which are
exact. this is needed in devising a senseful numerical derivative.
maybe all the failures you report are simply due to the fact that
the output of your black box is low precision thereas the software you are
using assumes, if not told otherwise, that the function values are correctly
rounded. this would yield horribly wrong derivatives and hence chaotic
behaviour.
maybe this is expensive, but have you made a plot of your two functions
over your box in order to get a crude idea about the solution?
next proposal would be to use minimization of the sum of squares
f1^2+f2^2 over the box using a derivative free code
for example bobyqua by M.J.Powell, or a (mathematically correct version of)
Nelder-Mead code.

hth
peter

.



Relevant Pages

  • Re: solving two of nonlinear equations and two unknwons.
    ... Solves a nonlinear least squares problem subject to bounds on the ... Since I have two unkown for two nonlinear equations. ... this would yield horribly wrong derivatives and hence chaotic ...
    (sci.math.num-analysis)
  • Re: out of memory message
    ... 300 nonlinear equations equations in the 100 grid points for each ... Therefore the Jacobian that fsolves needs to handle is ... 30000x30000 in dimension in my problem. ... function and pass that options structure into FSOLVE, ...
    (comp.soft-sys.matlab)
  • Re: fsolve - nonlinear equations
    ... but if the sum of squares ... least squares problem via lsqnonlin. ... If you need to enforce explicitly, ... I am trying to solve a system of nonlinear equations using ...
    (comp.soft-sys.matlab)
  • Re: solving two of nonlinear equations and two unknwons.
    ... I have a problem about solving two of nonlinear equations. ... I cannot have anallytic Jacobian. ...  I use IMSL and fortran. ... What does "Number of good digits in the function." ...
    (sci.math.num-analysis)
  • solving two of nonlinear equations and two unknwons.
    ... I have a problem about solving two of nonlinear equations. ... I cannot have anallytic Jacobian. ... I use IMSL and fortran. ... Solves a nonlinear least squares problem subject to bounds on the ...
    (sci.math.num-analysis)