Re: help: how to find all zero roots of a non-linear equation in a given interval
- From: spellucci@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Peter Spellucci)
- Date: Tue, 21 Mar 2006 12:09:15 +0000 (UTC)
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
- Follow-Ups:
- Re: help: how to find all zero roots of a non-linear equation in a given interval
- From: andywenj@xxxxxxxxx
- Re: help: how to find all zero roots of a non-linear equation in a given interval
- References:
- help: how to find all zero roots of a non-linear equation in a given interval
- From: andywenj@xxxxxxxxx
- Re: help: how to find all zero roots of a non-linear equation in a given interval
- From: andywenj@xxxxxxxxx
- Re: help: how to find all zero roots of a non-linear equation in a given interval
- From: Peter Spellucci
- Re: help: how to find all zero roots of a non-linear equation in a given interval
- From: andywenj@xxxxxxxxx
- help: how to find all zero roots of a non-linear equation in a given interval
- Prev by Date: Re: ? determine eigenbasis and eigenvalues of A directly from X and B where A*X=B
- Next by Date: Re: The numerical value of Sum(1/(p log p))
- Previous by thread: Re: help: how to find all zero roots of a non-linear equation in a given interval
- Next by thread: Re: help: how to find all zero roots of a non-linear equation in a given interval
- Index(es):
Relevant Pages
|