Given a refractive index of the form $n(y) = n_0 \cos(ky)$ , where $n_0$ and $k$ are positive constants.
Is it possible to determine the trajectory of a ray of light, in the x-y plane, traveling through a medium with such a refractive index?
through my attempts I got the light travel time $$T = \int \frac{n(y)\sqrt{1+{y^{'}}^{2}}}{c}dx$$
using the relation $v = c/n(y)$
then using the Euler-Lagrange equation we can get $$F(y,y') - y'F_{y'}(y,y') = const.$$ where $F(y,y')$ is $$\frac{n(y)\sqrt{1+{y^{'}}^{2}}}{c}$$ but this doesn't seem solvable to me, and I only end up with a difficult polynomial (in terms of $y'$) of degree 6 and coefficients in terms of $n(y)$.
I'm not sure if I'm going wrong somewhere, is this problem solvable analytically?
Any help or hints would be much appreciated.
Thank you in advance.