Re: solving two of nonlinear equations and two unknwons.
- From: Mike <SulfateIon@xxxxxxxxx>
- Date: Fri, 17 Oct 2008 19:44:15 -0700 (PDT)
On Oct 17, 9:42 pm, spellu...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(Peter Spellucci) wrote:
In article <79d4b9a3-85b1-4401-9f4b-bedc72eef...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Mike <Sulfate...@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.
I don't know what "exact" means. For example, I choose 14 good
digits, and f values in processing are:
X,F: 0.04431411 0.00000000 5.49698488612194E-03 (the first
two are solutions; the last one is f)
X,F: 0.04431725 0.00000000 5.49731812498067E-03
X,F: 0.04431875 0.00000000 5.49688156752381E-03
X,F: 0.04431908 0.00000000 5.49633696209639E-03
X,F: 0.04431910 0.00000000 5.49633696209639E-03
X,F: 0.04431911 0.00000000 5.49633696209639E-03
Does it mean "49633696209639" (14 digits) have been not changed in
iteration then it will stop?
But in fact it keeps on iterating and change to another value like:
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04431912 0.00000000 5.49633696209639E-03
X,F: 0.04463535 0.00000000 5.67854040127713E-03
X,F: 0.04400290 0.00000000 5.94585580984131E-03
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.
Yes, the output of the black box is in single precision.
But the same function is used in both simulation and solving. Does it
matter?
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.
I'll try it.
Thank you for your suggestion and explanation.
Mike
.
- Follow-Ups:
- Re: solving two of nonlinear equations and two unknwons.
- From: Martin Eisenberg
- Re: solving two of nonlinear equations and two unknwons.
- From: Peter Spellucci
- Re: solving two of nonlinear equations and two unknwons.
- References:
- solving two of nonlinear equations and two unknwons.
- From: Mike
- Re: solving two of nonlinear equations and two unknwons.
- From: Peter Spellucci
- solving two of nonlinear equations and two unknwons.
- Prev by Date: Re: solving two of nonlinear equations and two unknwons.
- Next by Date: Re: solving two of nonlinear equations and two unknwons.
- Previous by thread: Re: solving two of nonlinear equations and two unknwons.
- Next by thread: Re: solving two of nonlinear equations and two unknwons.
- Index(es):
Relevant Pages
|