MathGroup Archive 2010

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

Search the Archive

Re: bad Mathieu functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108279] Re: [mg108226] bad Mathieu functions
  • From: becko BECKO <becko565 at hotmail.com>
  • Date: Fri, 12 Mar 2010 07:12:04 -0500 (EST)

Thanks Carl, Peter and Daniel.

Guess I was too hasty to send that bug report... Though it would be useful 
to issue a warning or something (perhaps putting it in the Possible Issues 
section of the help on Mathieu functions). I'm kind of falling in love with
 Mathematica, so it's reassuring to know that this was my mistake and not
 Mathematica's.

Another question. How do I know that WorkingPrecision->50 is enough? What if I wanted to Plot all the way to q=100000?


> Date: Thu, 11 Mar 2010 08:26:43 -0500
> From: carlw at wolfram.com
> To: becko565 at hotmail.com
> CC: mathgroup at smc.vnet.net
> Subject: Re: [mg108226] bad Mathieu functions
>
> On 3/11/2010 6:35 AM, becko BECKO wrote:
> > I am no expert in Mathieu functions, but I don't think this gives the right result:
> >
> > ce1[r_, q_, z_] := MathieuCPrime[MathieuCharacteristicA[r, q], q, z]
> >
> > Plot[I ce1[3, q, I], {q, 0, 1000}]
> >
> >
> > In another system you get a smooth graph, making very small oscillations about zer o as q increases. I've read that Mathieu functions are difficult to deal with. I guess that Mathematica's implementation doesn't support arbitrary values of the parameters. I made a bug report in the WRI site. Maybe someone here has some comments to share? It would be nice if there were a package or something with more robust implementations of Mathieu functions.
> >   		 	   	
> >
> >   
>
> The problem is that for large q ce1 will return incorrect values for
> machine numbers. On the other hand, for extended precision numbers it
> will return correct values. Compare:
>
> Machine number input:
>
> In[16]:= ce1[3, 1000., I]
>
> Out[16]= 0. - 2200.76 I
>
> Extended precision number input:
>
> In[17]:= ce1[3, 1000`50, I]
>
> Out[17]= 7.29389*10^-22 I
>
> If you want to plot this, try instead:
>
> Plot[I ce1[3, q, I], {q, 0, 1000}, PlotRange->{-5,5}, WorkingPrecision->50]
>
> Carl Woll
> Wolfram Research
>


  • Prev by Date: Re: Forcing mathematica to output a certain form
  • Next by Date: superimposed plots using SHOW command
  • Previous by thread: Re: Re: bad Mathieu functions
  • Next by thread: Re: Re: bad Mathieu functions