# Root finding: zeroes of Mathieu function

I am finding the roots of the Mathieu sine function, and find Mathematica and Maple do not agree on the solutions.

For example, consider the solutions of Abs[MathieuS[4x, 4, Pi]] = 0, for 2 < x < 3.

Mathematica finds the solutions x=2.31536 and x=2.66776, whereas Maple only agrees with the solution x=2.31536.

I show plots from Mathematica (top) and Maple (bottom) illustrating the disagreement.

Why are the results inconsistent?

• You may want to try Plot[{Re@#, Im@#} &@MathieuS[4 x, 4, Pi], {x, 2, 3}, Evaluated -> True] – Dr. belisarius Nov 6 '14 at 0:21
• I guess their definition of Mathieu functions are different. For example, the Mathie characteristic functions in maple only take integer argument, but in Mathematica it takes real argument. I tried but never figure out the differences. – xslittlegrass Nov 6 '14 at 1:44
• for special functions, you need to make sure software uses the definition you expect, as for some special functions they can use slightly different definition. So you need to look up Maple definition of Mathieu and compare that to Mathematica to make sure which one you want to use. – Nasser Nov 6 '14 at 3:00

The Maple definition seems to be based on a different initial value for the derivative than the Mathematica definition. The derivative of the Maple function SE(a, q, z] at z = 0 is 1; Mathematica has a different initial value. (I couldn't find a specification in the documentation or on functions.wolfram.com). Howevever, since they satisfy the same linear differential equation, they are constant multiples of one another. You can divide the Mathematica one by its derivative at zero.

Plot[Abs[MathieuS[4 x, 4, Pi]/MathieuSPrime[4 x, 4, 0]], {x, 2, 3}]