MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RootSearch options


I wrote the RootSearch package on MathSource.
David W. Cantrell noted that with the default options
RootSearch doesn't find all roots in the specified
interval in the following example.

Below I give three ways to get all the roots using RootSearch.


In[1]:=
Needs["Ersek`RootSearch`"];


In[2]:=
  a=0.01;
  RootSearch[
   Cot[x] == x/a - a/(4*x), {x, 10^-6, 50},
   RootTest->(True&), InitialSamples->500
  ];


In[4]:=
  RootSearch[
   Cot[x] == x/a - a/(4*x), {x, 10^-6, 50},
   RootTest->((Abs[#2]<1.0*^-7)&), InitialSamples->500
  ];


In[5]:=
a=1/100;
  RootSearch[Cot[x] == x/a - a/(4*x), {x, 10^-6, 50},
    InitialPrecision->30, InitialSamples->500
  ] ;


With the a higher setting for InitialSamples
RootSearch looks harder. Some functions are very time consuming
to evaluate. In such cases we have a trade off between making
sure all roots are found, and the time it takes to find the roots.

With the above settings for the RootTest option you have a greater
risk that some of the "roots found" are actually points very close
to a discontinuity where (lhs-rhs) changes sign. The RootTest option
ensures "roots found" where Abs[lhs-rhs] is "too large" are thrown
out.

Sorry for the delay responding. I don't have a lot of time for
MathGroup correspondence.

----------
Regards,
  Ted Ersek



  • Prev by Date: Re: Generating a function from a series
  • Next by Date: Re: First Order Logic
  • Previous by thread: Re: Problem with Thread over Plus?
  • Next by thread: Implicit integration of finite alternating series of hypergeometric (2F1) functions