Re: solving two of nonlinear equations and two unknwons.



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.
 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- Hide quoted text -

- Show quoted text -

I have used Powell's method and the result is much better than that by
aforementioned methods of IMSL.
However, it takes much much longer time and the result is not so
satisfied.
I need to admit that I don't take much care of the settings in IMSL
and NR.
However, it seems Powell method in NR contains less setting variables
and easier to be run.

Mike
.



Relevant Pages

  • Re: solving two of nonlinear equations and two unknwons.
    ... Solves a nonlinear least squares problem subject to bounds on the ... digits, and f values in processing are: ... this would yield horribly wrong derivatives and hence chaotic ...
    (sci.math.num-analysis)
  • 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: search a sorted vector
    ...     In IMSL, there is a function SRCH which can search a sorted vector ... for a given scalar and return its index. ... I don't find one in IMSL. ...
    (sci.math)
  • Re: Manage external functions
    ... input arguments in IMSL? ...   Let's say I use method1 and method2 in IMSL to solve the roots. ... There should be different FUNCs for method 1 and method2. ...
    (comp.lang.fortran)
  • Re: Manage external functions
    ... input arguments in IMSL? ...   Let's say I use method1 and method2 in IMSL to solve the roots. ... There should be different FUNCs for method 1 and method2. ...
    (comp.lang.fortran)