In short:
I want to know the necessary conditions in order for a ray to 'bend backwards' and complete a full circle.
In detail:
Suppose theres a medium with a radially symmetric index of refraction $n(\vec{r})=n(r)$. A ray is 'launched' in the $\hat{\theta}$ direction. I would like to know what basic requirements of this function $n(r)$ are such that this ray continuously 'bends' to complete a full circle.
My intuition says that $n(r)$ must have a maximum at some radius $r^\ast$ so that the ray always refracts toward the gradient in the index of refraction, i.e. towards the maximum $r^\ast$, i.e. total internal reflection $$\frac{d}{dr}n(r^\ast)=0$$ $$\frac{d^2}{dr^2}n(r^\ast)<0$$
In other words, I'd like to think of this a sort of waveguide whereby the core is the area around $r^\ast$, and the cladding is the rest of the medium.
Intuition aside, I would like to able to reach this conclusion via the Eikonal equation: $$\frac{d}{ds}(n(\vec{r})\hat{e})=\nabla n(\vec{r})$$
My attempt:
The path element: $$ds=\frac{\partial s}{\partial \theta}d\theta + \frac{\partial r}{\partial r}dr $$
Since we want the path to always be in the $\hat{\theta}$ direction: $dr=0$ $$ds=\frac{\partial s}{\partial \theta}d\theta =rd\theta$$ Plugging this into the Eikonal equation, we get for the radial component:
$$\frac{n(r)}{r}\frac{d}{d\theta}(\hat \theta )=\frac{dn(r)}{dr}\hat{r}$$ After evaluating the derivative on the LHS we get:
$$-\frac{n(r)}{r}\hat{r}=\frac{dn(r)}{dr}\hat{r}$$ We can solve the ODE by separation:
$$\frac{dn}{n}=-\frac{dr}{r}$$
Integrating: $$ln(n(r))=-ln(r)+Const$$ And finally:$$n(r)=\frac{Const}{r}$$
But this cannot be correct because this function does not have a maximum! The ray would refract inwards, circling in until it reaches the origin.
My question:
Is my intuition incorrect? Can I not think of this as a type of waveguide?
OR
Is my intuition correct, and my solution of the Eikonal equation incorrect?