# Mathieu function

In mathematics, Mathieu functions, sometimes called angular Mathieu functions, are solutions of Mathieu's differential equation
    ${\frac {d^{2}y}{dx^{2}}}+(a-2q\cos(2x))y=0,$
where a, q are real-valued parameters. Since we may add π/2 to x to change the sign of q, it is a usual convention to set q ≥ 0.
They were first introduced by Émile Léonard Mathieu, who encountered them while studying vibrating elliptical drumheads. They have applications in many fields of the physical sciences, such as optics, quantum mechanics, and general relativity. They tend to occur in problems involving periodic motion, or in the analysis of partial differential equation (PDE) boundary value problems possessing elliptic symmetry.

## Definition
### Mathieu functions

In some usages, Mathieu function refers to solutions of the Mathieu differential equation for arbitrary values of $a$ and $q$. When no confusion can arise, other authors use the term to refer specifically to $\pi$- or $2\pi$-periodic solutions, which exist only for special values of $a$ and $q$. More precisely, for given (real) $q$ such periodic solutions exist for an infinite number of values of $a$, called characteristic numbers, conventionally indexed as two separate sequences $a_{n}(q)$ and $b_{n}(q)$, for $n=1,2,3,\ldots$. The corresponding functions are denoted ${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$, respectively. They are sometimes also referred to as cosine-elliptic and sine-elliptic, or Mathieu functions of the first kind.
As a result of assuming that $q$ is real, both the characteristic numbers and associated functions are real-valued.
${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$ can be further classified by parity and periodicity (both with respect to $x$), as follows:
    FunctionParityPeriod ${\text{ce}}_{n},\ n{\text{ even}}$ even $\pi$ ${\text{ce}}_{n},\ n{\text{ odd}}$ even $2\pi$ ${\text{se}}_{n},\ n{\text{ even}}$ odd $\pi$ ${\text{se}}_{n},\ n{\text{ odd}}$ odd $2\pi$
The indexing with the integer $n$, besides serving to arrange the characteristic numbers in ascending order, is convenient in that ${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$ become proportional to $\cos nx$ and $\sin nx$ as $q\rightarrow 0$. With $n$ being an integer, this gives rise to the classification of ${\text{ce}}_{n}$ and ${\text{se}}_{n}$ as Mathieu functions (of the first kind) of integral order. For general $a$ and $q$, solutions besides these can be defined, including Mathieu functions of fractional order as well as non-periodic solutions.

### Modified Mathieu functions

Closely related are the modified Mathieu functions, also known as radial Mathieu functions, which are solutions of Mathieu's modified differential equation
    ${\frac {d^{2}y}{dx^{2}}}-(a-2q\cosh 2x)y=0,$
which can be related to the original Mathieu equation by taking $x\to \pm {\rm {i}}x$. Accordingly, the modified Mathieu functions of the first kind of integral order, denoted by ${\text{Ce}}_{n}(x,q)$ and ${\text{Se}}_{n}(x,q)$, are defined from
    ${\begin{aligned}{\text{Ce}}_{n}(x,q)&={\text{ce}}_{n}({\rm {i}}x,q).\\{\text{Se}}_{n}(x,q)&=-{\rm {i}}\,{\text{se}}_{n}({\rm {i}}x,q).\end{aligned}}$
These functions are real-valued when $x$ is real.

### Normalization

A common normalization, which will be adopted throughout this article, is to demand
    $\int _{0}^{2\pi }{\text{ce}}_{n}(x,q)^{2}dx=\int _{0}^{2\pi }{\text{se}}_{n}(x,q)^{2}dx=\pi$
as well as require ${\text{ce}}_{n}(x,q)\rightarrow +\cos nx$ and ${\text{se}}_{n}(x,q)\rightarrow +\sin nx$ as $q\rightarrow 0$.

## Floquet theory

Many properties of the Mathieu differential equation can be deduced from the general theory of ordinary differential equations with periodic coefficients, called Floquet theory. The central result is Floquet's theorem:
Floquet's theorem — Mathieu's equation always has at least one solution $y(x)$ such that $y(x+\pi )=\sigma y(x)$, where $\sigma$ is a constant which depends on the parameters of the equation and may be real or complex.
It is natural to associate the characteristic numbers $a(q)$ with those values of $a$ which result in $\sigma =\pm 1$. Note, however, that the theorem only guarantees the existence of at least one solution satisfying $y(x+\pi )=\sigma y(x)$, when Mathieu's equation in fact has two independent solutions for any given $a$, $q$. Indeed, it turns out that with $a$ equal to one of the characteristic numbers, Mathieu's equation has only one periodic solution (that is, with period $\pi$ or $2\pi$), and this solution is one of the ${\text{ce}}_{n}(x,q)$, ${\text{se}}_{n}(x,q)$. The other solution is nonperiodic, denoted ${\text{fe}}_{n}(x,q)$ and ${\text{ge}}_{n}(x,q)$, respectively, and referred to as a Mathieu function of the second kind. This result can be formally stated as Ince's theorem:
Ince's theorem — Define a basically periodic function as one satisfying $y(x+\pi )=\pm y(x)$. Then, except in the trivial case $q=0$, Mathieu's equation never possesses two (independent) basically periodic solutions for the same values of $a$ and $q$.
An equivalent statement of Floquet's theorem is that Mathieu's equation admits a complex-valued solution of form
    $F(a,q,x)=\exp(i\mu \,x)\,P(a,q,x),$
where $\mu$ is a complex number, the Floquet exponent (or sometimes Mathieu exponent), and $P$ is a complex valued function periodic in $x$ with period $\pi$. An example $P(a,q,x)$ is plotted to the right.

### Stability in parameter space

The Mathieu equation has two parameters. For almost all choices of these parameters, Floquet theory says that any solution either converges to zero or diverges to infinity.
If the Mathieu equation is parameterized as ${\ddot {x}}+k(1-m\cos(t))x=0$, where $k\in \mathbb {R} ,m\geq 0$, then the regions of stability and instability are separated by the following curves:
$m(k)={\begin{cases}2{\sqrt {\frac {k(k-1)(k-4)}{3k-8}}},&k<0;\\[4pt]{\frac {1}{4}}\left[{\sqrt {(9-4k)(13-20k)}}-(9-4k)\right],&k<{\frac {1}{4}};\\[10pt]{\frac {1}{4}}\left[9-4k\mp {\sqrt {(9-4k)(13-20k)}}\right],&{\frac {1}{4}}<k<{\frac {13}{20}};\\[6pt]{\sqrt {\frac {2(k-1)(k-4)(k-9)}{k-5}}},&{\frac {13}{20}}<k<1;\\[2pt]2{\sqrt {\frac {k(k-1)(k-4)}{3k-8}}},&k>1.\end{cases}}$

## Other types of Mathieu functions
### Second kind

Since Mathieu's equation is a second order differential equation, one can construct two linearly independent solutions. Floquet's theory says that if $a$ is equal to a characteristic number, one of these solutions can be taken to be periodic, and the other nonperiodic. The periodic solution is one of the ${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$, called a Mathieu function of the first kind of integral order. The nonperiodic one is denoted either ${\text{fe}}_{n}(x,q)$ and ${\text{ge}}_{n}(x,q)$, respectively, and is called a Mathieu function of the second kind (of integral order). The nonperiodic solutions are unstable, that is, they diverge as $z\rightarrow \pm \infty$.
The second solutions corresponding to the modified Mathieu functions ${\text{Ce}}_{n}(x,q)$ and ${\text{Se}}_{n}(x,q)$ are naturally defined as ${\text{Fe}}_{n}(x,q)=-i{\text{fe}}_{n}(xi,q)$ and ${\text{Ge}}_{n}(x,q)={\text{ge}}_{n}(xi,q)$.

### Fractional order

Mathieu functions of fractional order can be defined as those solutions ${\text{ce}}_{p}(x,q)$ and ${\text{se}}_{p}(x,q)$, $p$ a non-integer, which turn into $\cos px$ and $\sin px$ as $q\rightarrow 0$. If $p$ is irrational, they are non-periodic; however, they remain bounded as $x\rightarrow \infty$.
An important property of the solutions ${\text{ce}}_{p}(x,q)$ and ${\text{se}}_{p}(x,q)$, for $p$ non-integer, is that they exist for the same value of $a$. In contrast, when $p$ is an integer, ${\text{ce}}_{p}(x,q)$ and ${\text{se}}_{p}(x,q)$ never occur for the same value of $a$. (See Ince's Theorem above.)
These classifications are summarized in the table below. The modified Mathieu function counterparts are defined similarly.
    Classification of Mathieu functions OrderFirst kindSecond kind Integral ${\text{ce}}_{n}(x,q)$ ${\text{fe}}_{n}(x,q)$ Integral ${\text{se}}_{n}(x,q)$ ${\text{ge}}_{n}(x,q)$ Fractional ($p$ non-integral) ${\text{ce}}_{p}(x,q)$ ${\text{se}}_{p}(x,q)$

## Explicit representation and computation
### First kind

Mathieu functions of the first kind can be represented as Fourier series:
    ${\begin{aligned}{\text{ce}}_{2n}(x,q)&=\sum _{r=0}^{\infty }A_{2r}^{(2n)}(q)\cos(2rx)\\{\text{ce}}_{2n+1}(x,q)&=\sum _{r=0}^{\infty }A_{2r+1}^{(2n+1)}(q)\cos \left[(2r+1)x\right]\\{\text{se}}_{2n+1}(x,q)&=\sum _{r=0}^{\infty }B_{2r+1}^{(2n+1)}(q)\sin \left[(2r+1)x\right]\\{\text{se}}_{2n+2}(x,q)&=\sum _{r=0}^{\infty }B_{2r+2}^{(2n+2)}(q)\sin \left[(2r+2)x\right]\\\end{aligned}}$
The expansion coefficients $A_{j}^{(i)}(q)$ and $B_{j}^{(i)}(q)$ are functions of $q$ but independent of $x$. By substitution into the Mathieu equation, they can be shown to obey three-term recurrence relations in the lower index. For instance, for each ${\text{ce}}_{2n}$ one finds
    ${\begin{aligned}aA_{0}-qA_{2}&=0\\(a-4)A_{2}-q(A_{4}+2A_{0})&=0\\(a-4r^{2})A_{2r}-q(A_{2r+2}+A_{2r-2})&=0,\quad r\geq 2\end{aligned}}$
Being a second-order recurrence in the index $2r$, one can always find two independent solutions $X_{2r}$ and $Y_{2r}$ such that the general solution can be expressed as a linear combination of the two: $A_{2r}=c_{1}X_{2r}+c_{2}Y_{2r}$. Moreover, in this particular case, an asymptotic analysis shows that one possible choice of fundamental solutions has the property
    ${\begin{aligned}X_{2r}&=r^{-2r-1}\left(-{\frac {e^{2}q}{4}}\right)^{r}\left[1+{\mathcal {O}}(r^{-1})\right]\\Y_{2r}&=r^{2r-1}\left(-{\frac {4}{e^{2}q}}\right)^{r}\left[1+{\mathcal {O}}(r^{-1})\right]\end{aligned}}$
In particular, $X_{2r}$ is finite whereas $Y_{2r}$ diverges. Writing $A_{2r}=c_{1}X_{2r}+c_{2}Y_{2r}$, we therefore see that in order for the Fourier series representation of ${\text{ce}}_{2n}$ to converge, $a$ must be chosen such that $c_{2}=0.$ These choices of $a$ correspond to the characteristic numbers.
In general, however, the solution of a three-term recurrence with variable coefficients cannot be represented in a simple manner, and hence there is no simple way to determine $a$ from the condition $c_{2}=0$. Moreover, even if the approximate value of a characteristic number is known, it cannot be used to obtain the coefficients $A_{2r}$ by numerically iterating the recurrence towards increasing $r$. The reason is that as long as $a$ only approximates a characteristic number, $c_{2}$ is not identically $0$ and the divergent solution $Y_{2r}$ eventually dominates for large enough $r$.
To overcome these issues, more sophisticated semi-analytical/numerical approaches are required, for instance using a continued fraction expansion, casting the recurrence as a matrix eigenvalue problem, or implementing a backwards recurrence algorithm. The complexity of the three-term recurrence relation is one of the reasons there are few simple formulas and identities involving Mathieu functions.
In practice, Mathieu functions and the corresponding characteristic numbers can be calculated using pre-packaged software, such as Mathematica, Maple, MATLAB, and SciPy. For small values of $q$ and low order $n$, they can also be expressed perturbatively as power series of $q$, which can be useful in physical applications.

### Second kind

There are several ways to represent Mathieu functions of the second kind. One representation is in terms of Bessel functions:
    ${\begin{aligned}{\text{fe}}_{2n}(x,q)&=-{\frac {\pi \gamma _{n}}{2}}\sum _{r=0}^{\infty }(-1)^{r+n}A_{2r}^{(2n)}(-q)\ {\text{Im}}[J_{r}({\sqrt {q}}e^{ix})Y_{r}({\sqrt {q}}e^{-ix})],\quad {\text{where }}\gamma _{n}=\left\{{\begin{array}{cc}{\sqrt {2}},&{\text{ if }}n=0\\2n,&{\text{ if }}n\geq 1\end{array}}\right.\\{\text{fe}}_{2n+1}(x,q)&={\frac {\pi {\sqrt {q}}}{2}}\sum _{r=0}^{\infty }(-1)^{r+n}A_{2r+1}^{(2n+1)}(-q)\ {\text{Im}}[J_{r}({\sqrt {q}}e^{ix})Y_{r+1}({\sqrt {q}}e^{-ix})+J_{r+1}({\sqrt {q}}e^{ix})Y_{r}({\sqrt {q}}e^{-ix})]\\{\text{ge}}_{2n+1}(x,q)&=-{\frac {\pi {\sqrt {q}}}{2}}\sum _{r=0}^{\infty }(-1)^{r+n}B_{2r+1}^{(2n+1)}(-q)\ {\text{Re}}[J_{r}({\sqrt {q}}e^{ix})Y_{r+1}({\sqrt {q}}e^{-ix})-J_{r+1}({\sqrt {q}}e^{ix})Y_{r}({\sqrt {q}}e^{-ix})]\\{\text{ge}}_{2n+2}(x,q)&=-{\frac {\pi q}{4(n+1)}}\sum _{r=0}^{\infty }(-1)^{r+n}B_{2r+2}^{(2n+2)}(-q)\ {\text{Re}}[J_{r}({\sqrt {q}}e^{ix})Y_{r+2}({\sqrt {q}}e^{-ix})-J_{r+2}({\sqrt {q}}e^{ix})Y_{r}({\sqrt {q}}e^{-ix})]\end{aligned}}$
where $n,q>0$, and $J_{r}(x)$ and $Y_{r}(x)$ are Bessel functions of the first and second kind.

### Modified functions

A traditional approach for numerical evaluation of the modified Mathieu functions is through Bessel function product series. For large $n$ and $q$, the form of the series must be chosen carefully to avoid subtraction errors.

## Properties

There are relatively few analytic expressions and identities involving Mathieu functions. Moreover, unlike many other special functions, the solutions of Mathieu's equation cannot in general be expressed in terms of hypergeometric functions. This can be seen by transformation of Mathieu's equation to algebraic form, using the change of variable $t=\cos(x)$:
    $(1-t^{2}){\frac {d^{2}y}{dt^{2}}}-t\,{\frac {dy}{dt}}+(a+2q(1-2t^{2}))\,y=0.$
Since this equation has an irregular singular point at infinity, it cannot be transformed into an equation of the hypergeometric type.

### Qualitative behavior

For small $q$, ${\text{ce}}_{n}$ and ${\text{se}}_{n}$ behave similarly to $\cos nx$ and $\sin nx$. For arbitrary $q$, they may deviate significantly from their trigonometric counterparts; however, they remain periodic in general. Moreover, for any real $q$, ${\text{ce}}_{m}(x,q)$ and ${\text{se}}_{m+1}(x,q)$ have exactly $m$ simple zeros in $0<x<\pi$, and as $q\rightarrow \infty$ the zeros cluster about $x=\pi /2$.
For $q>0$ and as $x\rightarrow \infty$ the modified Mathieu functions tend to behave as damped periodic functions.
In the following, the $A$ and $B$ factors from the Fourier expansions for ${\text{ce}}_{n}$ and ${\text{se}}_{n}$ may be referenced (see Explicit representation and computation). They depend on $q$ and $n$ but are independent of $x$.

### Reflections and translations

Due to their parity and periodicity, ${\text{ce}}_{n}$ and ${\text{se}}_{n}$ have simple properties under reflections and translations by multiples of $\pi$:
    ${\begin{aligned}&{\text{ce}}_{n}(x+\pi )=(-1)^{n}{\text{ce}}_{n}(x)\\&{\text{se}}_{n}(x+\pi )=(-1)^{n}{\text{se}}_{n}(x)\\&{\text{ce}}_{n}(x+\pi /2)=(-1)^{n}{\text{ce}}_{n}(-x+\pi /2)\\&{\text{se}}_{n+1}(x+\pi /2)=(-1)^{n}{\text{se}}_{n+1}(-x+\pi /2)\end{aligned}}$
One can also write functions with negative $q$ in terms of those with positive $q$:
    ${\begin{aligned}&{\text{ce}}_{2n+1}(x,-q)=(-1)^{n}{\text{se}}_{2n+1}(-x+\pi /2,q)\\&{\text{ce}}_{2n+2}(x,-q)=(-1)^{n}{\text{ce}}_{2n+2}(-x+\pi /2,q)\\&{\text{se}}_{2n+1}(x,-q)=(-1)^{n}{\text{ce}}_{2n+1}(-x+\pi /2,q)\\&{\text{se}}_{2n+2}(x,-q)=(-1)^{n}{\text{se}}_{2n+2}(-x+\pi /2,q)\end{aligned}}$
Moreover,
    ${\begin{aligned}&a_{2n+1}(q)=b_{2n+1}(-q)\\&b_{2n+2}(q)=b_{2n+2}(-q)\end{aligned}}$

### Orthogonality and completeness

Like their trigonometric counterparts $\cos nx$ and $\sin nx$, the periodic Mathieu functions ${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$ satisfy orthogonality relations
    ${\begin{aligned}&\int _{0}^{2\pi }{\text{ce}}_{n}{\text{ce}}_{m}\,dx=\int _{0}^{2\pi }{\text{se}}_{n}{\text{se}}_{m}\,dx=\delta _{nm}\pi \\&\int _{0}^{2\pi }{\text{ce}}_{n}{\text{se}}_{m}\,dx=0\end{aligned}}$
Moreover, with $q$ fixed and $a$ treated as the eigenvalue, the Mathieu equation is of Sturm–Liouville form. This implies that the eigenfunctions ${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$ form a complete set, i.e. any $\pi$- or $2\pi$-periodic function of $x$ can be expanded as a series in ${\text{ce}}_{n}(x,q)$ and ${\text{se}}_{n}(x,q)$.

### Integral identities

Solutions of Mathieu's equation satisfy a class of integral identities with respect to kernels $\chi (x,x')$ that are solutions of
    ${\frac {\partial ^{2}\chi }{\partial x^{2}}}-{\frac {\partial ^{2}\chi }{\partial x'^{2}}}=2q\left(\cos 2x-\cos 2x'\right)\chi$
More precisely, if $\phi (x)$ solves Mathieu's equation with given $a$ and $q$, then the integral
    $\psi (x)\equiv \int _{C}\chi (x,x')\phi (x')dx'$
where $C$ is a path in the complex plane, also solves Mathieu's equation with the same $a$ and $q$, provided the following conditions are met:
* $\chi (x,x')$ solves ${\frac {\partial ^{2}\chi }{\partial x^{2}}}-{\frac {\partial ^{2}\chi }{\partial x'^{2}}}=2q\left(\cos 2x-\cos 2x'\right)\chi$
* In the regions under consideration, $\psi (x)$ exists and $\chi (x,x')$ is analytic
* $\left(\phi {\frac {\partial \chi }{\partial x'}}-{\frac {\partial \phi }{\partial x'}}\chi \right)$ has the same value at the endpoints of $C$
Using an appropriate change of variables, the equation for $\chi$ can be transformed into the wave equation and solved. For instance, one solution is $\chi (x,x')=\sinh(2q^{1/2}\sin x\sin x')$. Examples of identities obtained in this way are
    ${\begin{aligned}{\text{se}}_{2n+1}(x,q)&={\frac {{\text{se}}'_{2n+1}(0,q)}{\pi q^{1/2}B_{1}^{(2n+1)}}}\int _{0}^{\pi }\sinh(2q^{1/2}\sin x\sin x'){\text{se}}_{2n+1}(x',q)dx'\qquad (q>0)\\{\text{Ce}}_{2n}(x,q)&={\frac {{\text{ce}}_{2n}(\pi /2,q)}{\pi A_{0}^{(2n)}}}\int _{0}^{\pi }\cos(2q^{1/2}\cosh x\cos x'){\text{ce}}_{2n}(x',q)dx'\qquad \ \ \ (q>0)\end{aligned}}$
Identities of the latter type are useful for studying asymptotic properties of the modified Mathieu functions.
There also exist integral relations between functions of the first and second kind, for instance:
    ${\text{fe}}_{2n}(x,q)=2n\int _{0}^{x}{\text{ce}}_{2n}(\tau ,-q)\ J_{0}\left({\sqrt {2q(\cos 2x-\cos 2\tau )}}\right)d\tau ,\qquad n\geq 1$
valid for any complex $x$ and real $q$.

### Asymptotic expansions

The following asymptotic expansions hold for $q>0$, ${\text{Im}}(x)=0$, ${\text{Re}}(x)\rightarrow \infty$, and $2q^{1/2}\cosh x\simeq q^{1/2}e^{x}$:
    ${\begin{aligned}{\text{Ce}}_{2n}(x,q)&\sim \left({\frac {2}{\pi q^{1/2}}}\right)^{1/2}{\frac {{\text{ce}}_{2n}(0,q){\text{ce}}_{2n}(\pi /2,q)}{A_{0}^{(2n)}}}\cdot e^{-x/2}\sin \left(q^{1/2}e^{x}+{\frac {\pi }{4}}\right)\\{\text{Ce}}_{2n+1}(x,q)&\sim \left({\frac {2}{\pi q^{3/2}}}\right)^{1/2}{\frac {{\text{ce}}_{2n+1}(0,q){\text{ce}}'_{2n+1}(\pi /2,q)}{A_{1}^{(2n+1)}}}\cdot e^{-x/2}\cos \left(q^{1/2}e^{x}+{\frac {\pi }{4}}\right)\\{\text{Se}}_{2n+1}(x,q)&\sim -\left({\frac {2}{\pi q^{3/2}}}\right)^{1/2}{\frac {{\text{se}}'_{2n+1}(0,q){\text{se}}_{2n+1}(\pi /2,q)}{B_{1}^{(2n+1)}}}\cdot e^{-x/2}\cos \left(q^{1/2}e^{x}+{\frac {\pi }{4}}\right)\\{\text{Se}}_{2n+2}(x,q)&\sim \left({\frac {2}{\pi q^{5/2}}}\right)^{1/2}{\frac {{\text{se}}'_{2n+2}(0,q){\text{se}}'_{2n+2}(\pi /2,q)}{B_{2}^{(2n+2)}}}\cdot e^{-x/2}\sin \left(q^{1/2}e^{x}+{\frac {\pi }{4}}\right)\end{aligned}}$
Thus, the modified Mathieu functions decay exponentially for large real argument. Similar asymptotic expansions can be written down for ${\text{Fe}}_{n}$ and ${\text{Ge}}_{n}$; these also decay exponentially for large real argument.
For the even and odd periodic Mathieu functions $ce,se$ and the associated characteristic numbers $a$ one can also derive asymptotic expansions for large $q$. For the characteristic numbers in particular, one has with $N$ approximately an odd integer, i.e. $N\approx N_{0}=2n+1,n=1,2,3,...,$
    ${\begin{aligned}a(N)=&-2q+2q^{1/2}N-{\frac {1}{2^{3}}}(N^{2}+1)-{\frac {1}{2^{7}q^{1/2}}}N(N^{2}+3)-{\frac {1}{2^{12}q}}(5N^{4}+34N^{2}+9)\\&-{\frac {1}{2^{17}q^{3/2}}}N(33N^{4}+410N^{2}+405)-{\frac {1}{2^{20}q^{2}}}(63N^{6}+1260N^{4}+2943N^{2}+41807)+{\mathcal {O}}(q^{-5/2})\end{aligned}}$
Observe the symmetry here in replacing $q^{1/2}$ and $N$ by $-q^{1/2}$ and $-N$, which is a significant feature of the expansion. Terms of this expansion have been obtained explicitly up to and including the term of order $|q|^{-7/2}$. Here $N$ is only approximately an odd integer because in the limit of $q\to \infty$ all minimum segments of the periodic potential $\cos 2x$ become effectively independent harmonic oscillators (hence $N_{0}$ an odd integer). By decreasing $q$, tunneling through the barriers becomes possible (in physical language), leading to a splitting of the characteristic numbers $a\to a_{\mp }$ (in quantum mechanics called eigenvalues) corresponding to even and odd periodic Mathieu functions. This splitting is obtained with boundary conditions (in quantum mechanics this provides the splitting of the eigenvalues into energy bands). The boundary conditions are:
    $\left({\frac {dce_{N_{0}-1}}{dx}}\right)_{\pi /2}=0,\;\;ce_{N_{0}}(\pi /2)=0,\;\;\left({\frac {dse_{N_{0}}}{dx}}\right)_{\pi /2}=0,\;\;se_{N_{0}+1}(\pi /2)=0.$
Imposing these boundary conditions on the asymptotic periodic Mathieu functions associated with the above expansion for $a$ one obtains
    $N-N_{0}=\mp 2\left({\frac {2}{\pi }}\right)^{1/2}{\frac {(16q^{1/2})^{N_{0}/2}e^{-4q^{1/2}}}{[{\frac {1}{2}}(N_{0}-1)]!}}\left[1-{\frac {3(N_{0}^{2}+1)}{2^{6}q^{1/2}}}+{\frac {1}{2^{13}q}}(9N_{0}^{4}-40N_{0}^{3}+18N_{0}^{2}-136N_{0}+9)+\dots \right].$
The corresponding characteristic numbers or eigenvalues then follow by expansion, i.e.
    $a(N)=a(N_{0})+(N-N_{0})\left({\frac {\partial a}{\partial N}}\right)_{N_{0}}+\cdots .$
Insertion of the appropriate expressions above yields the result
    ${\begin{aligned}a(N)\to a_{\mp }(N_{0})=&-2q+2q^{1/2}N_{0}-{\frac {1}{2^{3}}}(N_{0}^{2}+1)-{\frac {1}{2^{7}q^{1/2}}}N_{0}(N_{0}^{2}+3)-{\frac {1}{2^{12}q}}(5N_{0}^{4}+34N_{0}^{2}+9)-\cdots \\&\mp {\frac {(16q^{1/2})^{N_{0}/2+1}e^{-4q^{1/2}}}{(8\pi )^{1/2}[{\frac {1}{2}}(N_{0}-1)]!}}{\bigg1-{\frac {N_{0}}{2^{6}q^{1/2}}}(3N_{0}^{2}+8N_{0}+3)+\cdots {\bigg ]}.\end{aligned}}$
For $N_{0}=1,3,5,\dots$ these are the eigenvalues associated with the even Mathieu eigenfunctions $ce_{N_{0}}$ or $ce_{N_{0}-1}$ (i.e. with upper, minus sign) and odd Mathieu eigenfunctions $se_{N_{0}+1}$ or $se_{N_{0}}$ (i.e. with lower, plus sign). The explicit and normalised expansions of the eigenfunctions can be found in or.
Similar asymptotic expansions can be obtained for the solutions of other periodic differential equations, as for Lamé functions and prolate and oblate spheroidal wave functions.

## Applications

Mathieu's differential equations appear in a wide range of contexts in engineering, physics, and applied mathematics. Many of these applications fall into one of two general categories: 1) the analysis of partial differential equations in elliptic geometries, and 2) dynamical problems which involve forces that are periodic in either space or time. Examples within both categories are discussed below.

### Partial differential equations

Mathieu functions arise when separation of variables in elliptic coordinates is applied to 1) the Laplace equation in 3 dimensions, and 2) the Helmholtz equation in either 2 or 3 dimensions. Since the Helmholtz equation is a prototypical equation for modeling the spatial variation of classical waves, Mathieu functions can be used to describe a variety of wave phenomena. For instance, in computational electromagnetics they can be used to analyze the scattering of electromagnetic waves off elliptic cylinders, and wave propagation in elliptic waveguides. In general relativity, an exact plane wave solution to the Einstein field equation can be given in terms of Mathieu functions.
More recently, Mathieu functions have been used to solve a special case of the Smoluchowski equation, describing the steady-state statistics of self-propelled particles.
The remainder of this section details the analysis for the two-dimensional Helmholtz equation. In rectangular coordinates, the Helmholtz equation is
    $\left({\frac {\partial ^{2}}{\partial x^{2}}}+{\frac {\partial ^{2}}{\partial y^{2}}}\right)\psi +k^{2}\psi =0,$
Elliptic coordinates are defined by
    ${\begin{aligned}x&=c\cosh \mu \cos \nu \\y&=c\sinh \mu \sin \nu \end{aligned}}$
where $0\leq \mu <\infty$, $0\leq \nu <2\pi$, and $c$ is a positive constant. The Helmholtz equation in these coordinates is
    ${\frac {1}{c^{2}(\sinh ^{2}\mu +\sin ^{2}\nu )}}\left({\frac {\partial ^{2}}{\partial \mu ^{2}}}+{\frac {\partial ^{2}}{\partial \nu ^{2}}}\right)\psi +k^{2}\psi =0$
The constant $\mu$ curves are confocal ellipses with focal length $c$; hence, these coordinates are convenient for solving the Helmholtz equation on domains with elliptic boundaries. Separation of variables via $\psi (\mu ,\nu )=F(\mu )G(\nu )$ yields the Mathieu equations
    ${\begin{aligned}&{\frac {d^{2}F}{d\mu ^{2}}}-\left(a-{\frac {c^{2}k^{2}}{2}}\cosh 2\mu \right)F=0\\&{\frac {d^{2}G}{d\nu ^{2}}}+\left(a-{\frac {c^{2}k^{2}}{2}}\cos 2\nu \right)G=0\\\end{aligned}}$
where $a$ is a separation constant.
As a specific physical example, the Helmholtz equation can be interpreted as describing normal modes of an elastic membrane under uniform tension. In this case, the following physical conditions are imposed:
* Periodicity with respect to $\nu$, i.e. $\psi (\mu ,\nu )=\psi (\mu ,\nu +2\pi )$
* Continuity of displacement across the interfocal line: $\psi (0,\nu )=\psi (0,-\nu )$
* Continuity of derivative across the interfocal line: $\psi _{\mu }(0,\nu )=-\psi _{\mu }(0,-\nu )$
For given $k$, this restricts the solutions to those of the form ${\text{Ce}}_{n}(\mu ,q){\text{ce}}_{n}(\nu ,q)$ and ${\text{Se}}_{n}(\mu ,q){\text{se}}_{n}(\nu ,q)$, where $q=c^{2}k^{2}/4$. This is the same as restricting allowable values of $a$, for given $k$. Restrictions on $k$ then arise due to imposition of physical conditions on some bounding surface, such as an elliptic boundary defined by $\mu =\mu _{0}>0$. For instance, clamping the membrane at $\mu =\mu _{0}$ imposes $\psi (\mu _{0},\nu )=0$, which in turn requires
    ${\begin{aligned}{\text{Ce}}_{n}(\mu _{0},q)=0\\{\text{Se}}_{n}(\mu _{0},q)=0\end{aligned}}$
These conditions define the normal modes of the system.

### Dynamical problems

In dynamical problems with periodically varying forces, the equation of motion sometimes takes the form of Mathieu's equation. In such cases, knowledge of the general properties of Mathieu's equation— particularly with regard to stability of the solutions—can be essential for understanding qualitative features of the physical dynamics. A classic example along these lines is the inverted pendulum. Other examples are
* vibrations of a string with periodically varying tension
* stability of railroad rails as trains drive over them
* seasonally forced population dynamics
* the phenomenon of parametric resonance in forced oscillators
* motion of ions in a quadrupole ion trap
* the Stark effect for a rotating electric dipole
* the Floquet theory of the stability of limit cycles
* analytic traveling-wave solutions of the Kardar-Parisi-Zhang interface growing equation with periodic noise term

### Quantum mechanics

Mathieu functions play a role in certain quantum mechanical systems, particularly those with spatially periodic potentials such as the quantum pendulum and crystalline lattices.
The modified Mathieu equation also arises when describing the quantum mechanics of singular potentials. For the particular singular potential $V(r)=g^{2}/r^{4}$ the radial Schrödinger equation
    ${\frac {d^{2}y}{dr^{2}}}+\left[k^{2}-{\frac {\ell (\ell +1)}{r^{2}}}-{\frac {g^{2}}{r^{4}}}\right]y=0$
can be converted into the equation
    ${\frac {d^{2}\varphi }{dz^{2}}}+\left[2h^{2}\cosh 2z-\left(\ell +{\frac {1}{2}}\right)^{2}\right]\varphi =0.$
The transformation is achieved with the following substitutions
    $y=r^{1/2}\varphi ,r=\gamma e^{z},\gamma ={\frac {ig}{h}},h^{2}=ikg,h=e^{I\pi /4}(kg)^{1/2}.$
By solving the Schrödinger equation (for this particular potential) in terms of solutions of the modified Mathieu equation, scattering properties such as the S-matrix and the absorptivity can be obtained.
Originally the Schrödinger equation with cosine function was solved in 1928 by Strutt.