Re: help: how to find all zero roots of a non-linear equation in a given interval




In article <1142908679.591339.85570@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"andywenj@xxxxxxxxx" <andywenj@xxxxxxxxx> writes:
thanks Peter and Jen for your help, though i do not quite understand
what you mean,sorry.
Peter, do you mean the following approach:

1) set h=0.01(small length ), calculate derivative f '(-1+h) and f '
(-1)


no. you wanted to know _all_ roots. hence you must be sure
not to overlook one. as long as you know that f' has no zero in a
subinterval, there can be at most (at most!) one simple zero of f.
this is the reason for this more complicated process
in principle you use Newtons method now, but make the step shorter
such that you end left of the zero:
f(x_0) not=0.
f(x_0+h) = f(x_0)+f'(xi)*h with xi inside [x,x+h].
hence if M>=f'(xi)>=m>0 for any xi in [x,x+h]
you can take the step h if f(x_0)>0 and the step -f(x_0)/M if
f(x_0)<0. this destroys the fast convergence of Newtons process, but is safe.
If
-M<= f'(xi)<=-m<=0
the consideration of the signs is just reverted
hence you must have sure bounds here for the value of f' on small intervals.
in principle you might use the interval-arithmetic version of Newton's
method in the subintervals. what I describe is a handcrafted version of
this.
now it may occur that you detect a sign change of f at x and x+h
during this process: then, because you have no sign change in f', you can
be sure that there is exactly one simple root in this subinterval. then it makes
sense to use a faster method with sure convergence (the brent-decker method for
example, which is the essence of "fzero")
this approach is fine as long as there are only simple zeros.
a multiple zero would indicate itself as a zero of f , f', f'' ...
simultaneously, but due to roundoff effects you would not be able
to see something else than a (hopefully small) interval there you
can not safely decide the sign of these functions, and must step through this
with very small steps, counting it all as a "possibly multiple" root
with even or odd order, depending on whether you detect finally a safe sign
change in f or not. hopefully this will not be the case for you.

hth
peter

2) if f '(-1+h) * f ' (-1) >0,
calculate abs(f(-1+h) )/ abs(f '(-1+h))
set next subinteval [-1+h, -1+h+abs(f(-1+h) )/ abs(f
'(-1+h)) ]
else
use fzero to find root in [-1,-1+h]
find roots in [-1+h,0] in the same way
endif

Another question, does this apporach have an official name? so i can
study it for more details.

Jen, sorry i did not post the specific form of B(x) since it is by no
means simple, so express the determinant analytically is not possible

.



Relevant Pages

  • Re: allocate array
    ... I'm afraid you have bigger problems than that. ... function results to be exactly zero. ... If the function might have a root at a point where it ... of having an allocation failure on something this small are pretty low. ...
    (comp.lang.fortran)
  • Act 3, Scene 2 (was Re: wasting precious time on Ray Haddad)
    ... I heard someone was going to write a post celebrating Chefp, ... sheer ugliness of having to read a post celebrating his memory, ... that Chefp would have been pleased had his boon companion Zero actually ... "Peter, you are lamentably undereducated." ...
    (misc.writing)
  • Re: orthogonal complement
    ... Still, even after fixing that problem, I'm still not getting a zero ... Peter Spellucci wrote: ... >(cPerp) the th to th columns of U? ... >but when I multiply C and cPerp together (using cvMatMul or ...
    (sci.math.num-analysis)
  • RE: subform textbox value causing invalid use of null error messag
    ... "Peter S." ... time the subform initializes. ... numeric zero value. ... Nz(Me.MyTextBox,"") this would convert a null value in MyTextBox to a zero ...
    (microsoft.public.access.modulesdaovba)
  • Re: D3/Linux compile question
    ... Congratulations Robert and thank you for at least getting the option ... Peter, to as your question as to where this idiocy started: ... The ANSI Basic standard committee X332 proposed the zero standard ...
    (comp.databases.pick)