Two solutions of the equation are the Mathieu sine and cosine and they form an orthogonal basis. The equation has arisen from the wave equation for an infinite string with a sinusoidal cross-section. The initial values are the displacement of the string at $t=0$ and the velocity of the sting at $t=0$, which are both functions of $x$.

Wave equation:

$\frac{\partial^2u(x,t)}{\partial x^2}-(1-\kappa\cos{2x})\frac{\partial^2u(x,t)}{\partial t^2}=0$, $\kappa$ is a parameter.

Initial condition:

$u(x,t=0)=f(x),\quad u'(x,t=0)=g(x)$.

Separation of variables:

$u(x,t)=A(x)T(t)$

New equation:

$\frac{1}{A}\frac{\partial^2A}{\partial x^2}\frac{1}{-1+\kappa\cos{2x}}=-\frac{1}{T}\frac{\partial^2T}{\partial t^2}=constant=\lambda$

$\lambda$ must be greater than zero so that T is harmonic and not exponential. The equation for A is the Mathieu DE and its solutions are

$A(x)=C_1 C(\lambda,\frac{\kappa \lambda}{2},x)+C_2 S(\lambda,\frac{\kappa \lambda}{2},x)$, $C$ and $S$ are the Mathieu cosine and sine respectively.

So my question is how do I satisfy the initial conditions $f(x)$ and $g(x)$. IIRC there is a sum with respect to $\lambda$ if where are also boundary conditions but in this case there is an integral? Any help would be appreciated.