Re: BesselJZeros strangeness
- To: mathgroup@smc.vnet.net
- Subject: [mg12076] Re: BesselJZeros strangeness
- From: Paul Abbott <paul@physics.uwa.edu.au>
- Date: Sat, 25 Apr 1998 01:30:12 -0400
- Organization: University of Western Australia
- References: <6h7564$m8@smc.vnet.net>
L. Dwynn Lafleur wrote: > I am using Mathematica 3.0.1 in Windows 95. I obtain rather strange (at > least, to me) results when using the BesselJZeros function in the > NumericalMath`BesselZeros` package. > > (* First two input cells are from Mathematica 3.0 help file describing > BesselZeros package *) > In[1]:= << NumericalMath`BesselZeros` In[2]:= BesselJZeros[0, 5] > Out[2]= $Aborted > (* Above aborted after about 3 minutes of no output *) In[3]:= > BesselJZeros[0, 5, AccuracyGoal->8] Out[3]= > {2.40483,5.52008,8.65373,11.7915,14.9309} (* Above output appears in > much less than one second *) In[4]:= BesselJZeros[0, 2] > Out[4]= {2.40483,5.52008} > In[5]:= BesselJZeros[0, 3] > Out[5]= $Aborted > In[6]:= BesselJZeros[0, 6] > Out[6]= $Aborted > In[7]:= BesselJZeros[0, 7] > Out[7]= {2.40483,5.52008,8.65373,11.7915,14.9309,18.0711,21.2116} > In[8]:= BesselJZeros[0, 20] > Out[8]= {2.40483,5.52008,8.65373,11.7915,14.9309,18.0711,21.2116,24.3525,27.4935, > 30.6346,33.7758,36.9171,40.0584,43.1998,46.3412,49.4826,52.6241,55.7655, > 58.907,62.0485} > --------------------- > Note that, contrary to what is suggested in the help file, BesselJZeros > cannot calculate the first 5 zeros unless an AccuracyGoal setting is > explicitly stated. This particular resulty is strange since the > default options for BesselJZeros are {WorkingPrecision->16, > AccuracyGoal->Automatic}, and according to the Mathematica > documentation, the Automatic setting for AccuracyGoal sets it to 10 > fewer digits than WorkingPrecision, i.e. 6. However, AccuracyGoal->8 > works while the default does not. > > We also see that BesselJZeros can be called to calculate the first 2 > zeros but not the first 3 zeros or the first 6 zeros. However, it can > calculate the first 7 zeros and the first 20 zeros. This is rather puzzling. On a Macintosh In[1]:= << NumericalMath`BesselZeros` In[2]:= Table[BesselJZeros[0, n],{n,2,7}]//Timing Out[2]= {3.31667 Second, {{2.40483,5.52008},{2.40483,5.52008,8.65373},{2.40483,5.52008, 8.65373,11.7915},{2.40483,5.52008,8.65373,11.7915,14.9309},{2.40483, 5.52008,8.65373,11.7915,14.9309,18.0711},{2.40483,5.52008,8.65373, 11.7915,14.9309,18.0711,21.2116}}} or under Mathematica 3.0 for Linux In[1]:= << NumericalMath`BesselZeros` In[2]:= Table[BesselJZeros[0, n],{n,2,7}]//Timing Out[2]= {2.47 Second, {{2.40483, 5.52008}, {2.40483, 5.52008, 8.65373}, > {2.40483, 5.52008, 8.65373, 11.7915}, > {2.40483, 5.52008, 8.65373, 11.7915, 14.9309}, > {2.40483, 5.52008, 8.65373, 11.7915, 14.9309, 18.0711}, > {2.40483, 5.52008, 8.65373, 11.7915, 14.9309, 18.0711, 21.2116}}} there is no problem. Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul@physics.uwa.edu.au AUSTRALIA http://www.pd.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________