RootSearch Performance

*To*: mathgroup at smc.vnet.net*Subject*: [mg72370] RootSearch Performance*From*: "Ted Ersek" <ted.ersek at tqci.net>*Date*: Tue, 26 Dec 2006 08:55:26 -0500 (EST)

About a week ago we had the thread: "FindRoot anomoly (example from Mathematica" -------------------------------------------------------------- In that thread galordloo wrote: Ersek's RootSearch function finds only seven roots to the equation between x == 1 and x == 100: sol == RootSearch[3*Cos[x] ==== Log[x], {x, 1, 100}] <snip> (* Rules for seven roots, all between 1 and 20 were returned.= *) --------------------------------- Then Carl Woll (of Wolfram Research) replied: An alternative method is possible using IntervalBisection: < snip > =20 The nice thing about IntervalBisection is that we were able to use an=20 initial range of {0,Infinity} instead of {1,100}. The other nice thing=20 about IntervalBisection is that we are guaranteed that all roots lie in=20 the interval given in the result, something that is not true with=20 RootSearch. The price you pay is that the only transcendental functions allowed in=20 the input are trigonometric/exponential functions and their inverses,=20 i.e., only functions which support Interval arguments. =========================================================================== ====================== I wrote the RootSearch package, and it's designed to never look=20 for a root outside the range specified in the input. While=20 RootSearch has many lines of code, the ideas I use to limit the=20 range being searched are straight forward. I doubt you can find=20 an example where it returns a root outside the specified range.=20 However, if you can find an example that shows otherwise,=20 I would like to know about it. Ted Ersek Reply to: Ted.Ersek at navy.mil