[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-gsl] Different value for mathieu_ce in Mathematica and GSL

**From**: |
maxgacode |

**Subject**: |
Re: [Help-gsl] Different value for mathieu_ce in Mathematica and GSL |

**Date**: |
Sat, 18 Feb 2017 14:55:00 +0100 |

**User-agent**: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |

Il 17/02/2017 23:17, Patrick Alken ha scritto:

N[MathieuC[MathieuCharacteristicA[0, -1], -1, 2*Pi/180]]

1.41071
```
should be equivalent to
```
gsl_sf_mathieu_ce(0, -1.0, 2.0 * M_PI / 180.0)
```
which gives a totally different value: 0.99751942347886335.

`Looking at Abramovitz and Stegun I found the following power serie for
``Ce(0,q,z) ( for small |q| ).
`

`Ce(0,q,z) = ( 1/sqrt(2) ) * [ 1 - q * cos(2 z)/2 + q^2 * ((cos(4 z)/32)
``- 1/16) +........
`
for q= -1 , z = 2 pi / 180
Ce(0,q,z) =~ 1.04 + ....

`That is not proving anything but my guess is that GSL implementation
``agrees with Abramovitz and Stegun.
`

`Moreover Scilab (using the Mathieu Toolbox from R.Coisson & G. Vernizzi,
``Parma University, 2001-2002.)
`
-->mathieu_ang_ce(0,-1, 2 * %pi / 180 ,1)
ans =
0.9975194
again in agreement with GSL, Specfun and Abramovitz.
The Wolfram site says

`"For nonzero q, the Mathieu functions are only periodic in z for certain
``values of a. Such characteristic values are given by the Wolfram
``Language functions MathieuCharacteristicA[r, q] and
``MathieuCharacteristicB[r, q] with r an integer or rational number. These
``values are often denoted a_r and b_r. In general, both a_r and b_r are
``multivalued functions with very complicated branch cut structures.
``Unfortunately,
`
there is no general agreement on how to define the branch cuts.

`As a result, the Wolfram Language's implementation simply picks a
``convenient sheet. "
`
What are the values returned by
MathieuCharacteristicA[0, -1]
Hope this helps
Max