I'm working on a stochastic differential equations research problem and I have come across this second order ODE, my gut tells me it has an analytic or close to analytic solution, but I just can't find it. Any help would be appreciated.


$$y''(x)-(A+B\,\sin 2x)\, y'(x)-\lambda y(x)=0\quad$$
for $x\in(0,\pi)$ with boundary condition $y(0)=y(\pi)$.  

I substituted $z(2x)=y(x)$ and then $\theta=2x$, and obtained
$$4z''(\theta) -2\,A(1+\gamma\,\sin \theta)\,z'(\theta) -\lambda z(\theta)=0$$
for $\theta\in(0,2\pi)$ with boundary condition $z(0)=z(2\pi)$, where $\gamma:=B/A$.



Second order linear ODE question with boundary conditions
A standard change of the variable killing the term $y'$ reduces this to Hill's equation (see Whittaker-Watson, chapter "Mathieu functions", in vol. II).
It is not clear what you mean by "analytic or semi-analytic", and what you mean
by "solution": the problem that you stated seems to be an eigenvalue problem not a problem of solving the equation. But the reference above tells you what is known about Hill's equation.


