Various MathieuC
problems identified here have been reported as CASE:3698818.
I need to calculate some numeric integrations of the periodic Mathieu's Functions. So I used NIntegrate and it works well as long as the arguments of the function are not too large. Whenever I try to do the calculation with a large argument, Mathematica leaves the function unevaluated and I get the "The integrand has evaluated to non-numerical values" error.
I noticed that when I round off the arguments, or use Rationalize to get a rational approximation of them, it does evaluate the function, but the problem with that is that the functions are very sensitive to argument changes - as soon as I round off the argument the function stops being periodic and becomes exponentially growing - which is definitely not what I'm looking for. I tried increasing the precision of the approximation, and it wasn't precise enough when Mathematica stopped evaluating the function again.
So what I need is to keep the precision but make Mathematica evaluate the function. (The built-in function Evaluate doesn't work either)
Is there a way to do that?
Here are some code lines for example:
b = 0.49
q = q /. FindRoot[-2 q b == MathieuCharacteristicA[6, q], {q, 1000}]
q2 = q /. FindRoot[-2 q b == MathieuCharacteristicA[8, q], {q, 1000}]
NIntegrate[MathieuC[-2 q b, q, x]*MathieuC[-2 q2 b, q2, x], {x, 0, 2 Pi}]
Plot[Evaluate[{Re[#], Im[#]} &@MathieuC[-2 q2 b, q2, x]], {x, 0, 4 Pi}, PlotStyle -> {Blue, {Blue, Dashed}}]
Thanks!
Comments
Post a Comment