Re: bad Mathieu functions
- To: mathgroup at smc.vnet.net
- Subject: [mg108290] Re: [mg108226] bad Mathieu functions
- From: "Carl K. Woll" <carlw at wolfram.com>
- Date: Fri, 12 Mar 2010 07:14:05 -0500 (EST)
- References: <201003111135.GAA05936@smc.vnet.net>
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
- References:
- bad Mathieu functions
- From: becko BECKO <becko565@hotmail.com>
- bad Mathieu functions