# How to find the general solution of Mathieu differential equation?

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.

If $F(x,s)$ is the Laplace transform of $u(x,t)$ in the $t$ variable (assuming $u(x,t)$ is exponentially bounded in $t$), you get an inhomogeneous Mathieu ODE for $F(x,s)$ (at each fixed $s$): $$s^2 \left( k \cos \left( 2\,x \right) -1 \right) F \left( x,s \right) +{\frac {{\partial}^{2}}{{\partial}{x}^{2}}}F \left( x,s \right) = \left( g \left( x \right) +sf \left( x \right) \right) \left( k\cos \left( 2\,x \right) -1 \right)$$ Solve this inhomogeneous differential equation and take the inverse Laplace transform. For typical $f$ and $g$, I doubt that it can be done in closed form.