# Limit of Mathieu function near the discontinuous point

Consider the Mathieu characteristic function, which is a piecewise function. The discontinuity happens at integer number.

With[{V0 = -1}, Plot[MathieuCharacteristicA[κ, V0], {κ, -2.5, 2.5}]]


I'm trying to calculate the limit at k=2 with the direction of positive axis. I tried to do this in Mathematic and I got different answers when approaching 2:

So I calculate the function value at 2-ϵ, and with ϵ take to be smaller and smaller values. We can see that the function value first become small, then at ϵ=10^-60, the function value suddenly jumps about 40 orders of magnitude.

N[
Table[Re@MathieuC[MathieuCharacteristicA[2 - ϵ, -1], -1,
0], {ϵ, {10^-6, 10^-8, 10^-10, 10^-20, 10^-40, 10^-60,
10^-100}}], 100]
(*
9.37551974147072835559249118350860328663842780156187022041630631583395\
1776806837902179623867179198570*10^-6, \
9.37551974249387199028571957345692499510682012392156540333196700968792\
3231481580841077469030562191305*10^-8, \
9.37551974249397430464920759145123255395714887241690706549073245295310\
8780592926489536671069329119067*10^-10, \
9.37551974249397431488166718533639787521652887810091370096758925579343\
2748631135267810942389900367393*10^-20, \
9.37551965486425358591047481958041604234458729394544036776955645793908\
5038181962308922619162634749446*10^-40, \
1.11438859178173311502100242852087617176800818468416114397816239922310\
7768160400228809114697590700165, \
1.11438859178173311502100242852087617176800818468416114397816239922310\
7768160400228809114697590700165
*)


So I'm wondering whether this is the behavior of Mathieu function, or simply some kind of error in Mathematica. If we look at the behavior before ϵ decrease to 10^-60, it looks like the function limit is 0. So is 0 the correct answer for the limit of MathieuC[MathieuCharacteristicA[2 - ϵ, -1]?

• That table is not easy to interpret at a glance. Your question will be more accessible if you include a summary of the two methods used and the resulting discrepancy. Commented Aug 27, 2014 at 20:53
• how do you plot the first figure?
– mike
Commented Aug 27, 2014 at 22:26
• @Semiclassical Thanks for the suggestion, I added more details. Commented Aug 28, 2014 at 1:22
• @mike I plotted also using Mathematica, see the update. Commented Aug 28, 2014 at 1:23

I think that it is numerical error in the Mathematica implementation. I am using v7.0 and here is the output of command" Table[N[Re[MathieuC[MathieuCharacteristicA[2 - 10^(-n), -1], -1, 0]], 20], {n, 1, 50}]".

When $n\ge 46$, the calculation breaks down.

  0.53972224712427121309, 0.092750258079945471042,
0.0093744966834648209648, 0.00093755095100530765387,
0.000093755196401693802370, 9.3755197414707283556*10^-6,
9.3755197424837418553*10^-7, 9.3755197424938719903*10^-8,
9.3755197424939732916*10^-9, 9.3755197424939743046*10^-10,
9.3755197424939743148*10^-11, 9.3755197424939743149*10^-12,
9.3755197424939743149*10^-13, 9.3755197424939743149*10^-14,
9.3755197424939743149*10^-15, 9.3755197424939743149*10^-16,
9.3755197424939743149*10^-17, 9.3755197424939743149*10^-18,
9.3755197424939743149*10^-19, 9.3755197424939743149*10^-20,
9.3755197424939743149*10^-21, 9.3755197424939743149*10^-22,
9.3755197424939743149*10^-23, 9.3755197424939743149*10^-24,
9.3755197424939743149*10^-25, 9.3755197424939743149*10^-26,
9.3755197424939743149*10^-27, 9.3755197424939743149*10^-28,
9.3755197424939743149*10^-29, 9.3755197424939743149*10^-30,
9.3755197424939742273*10^-31, 9.3755197424939734386*10^-32,
9.3755197424939655519*10^-33, 9.3755197424938866852*10^-34,
9.3755197424930980177*10^-35, 9.3755197424852113428*10^-36,
9.3755197424063445942*10^-37, 9.3755197416176771076*10^-38,
9.3755197337310022420*10^-39, 9.3755196548642535859*10^-40,
9.3755188661967670252*10^-41, 9.3755109795219014178*10^-42,
9.3754321127732453437*10^-43, 9.3746434452866846030*10^-44,
9.3667567704210771956*10^-45,
1.1143885917817331150, 1.1143885917817331150,
1.1143885917817331150, 1.1143885917817331150,
1.1143885917817331150