From the book "Radio Occultations Using Earth Satellites" by William G. Melbourne:
From Calculus of Variations a necessary condition for stationarity is that the ray at all points must satisfy Euler's differential equation or its integral equivalent at points of discontinuity in n. Euler's equation in polar coordinates is given by
\begin{equation} \frac{d}{dr}\frac{\delta}{\delta\theta'} \left(n\sqrt{1 + (r\theta')^2}\right) - \frac{\delta}{\delta\theta}\left(n\sqrt{1 + (r\theta')^2}\right) = 0 \end{equation}
(Note: $\theta' = d\theta/dr$)
When $n$ is a function of $r$ only, one can integrate to obtain
\begin{equation} \frac{\delta}{\delta\theta'}\left(n\sqrt{1+(r\theta')^2}\right) = \text{constant} = a \end{equation}
What are the steps in performing said integral?
what I've tried:
\begin{equation} \int d\frac{\delta}{\delta\theta'} \left(n\sqrt{1 + (r\theta')^2}\right) = \int \frac{\delta}{\delta\theta}\left(n\sqrt{1 + (r\theta')^2}\right) dr \end{equation}
\begin{equation} \frac{\delta}{\delta\theta'} \left(n\sqrt{1 + (r\theta')^2}\right) = \int n \frac{\delta}{\delta\theta}\left(\sqrt{1 + (r\theta')^2}\right) dr \end{equation}
I'm stuck on the partial derivative.
Caution: Since I don't have the book, I'm sort of speculating. But I hope this will help you at least a bit anyway.
It looks like the action is just Fermat's principle $$ S = \int dt = \int \frac{1}{v} ds = \int n(r,\theta ) \sqrt{ 1 + (r \theta') ^2 } dr $$ In the above, you are parameterizing the path by $ r $, so that $ \theta $ is a function of $ r $. The $ \sqrt{ 1+ (r \theta') ^2 } dr $ is the differential line element $ ds $. When you have an action of the form: $$ \int L\left(r,\theta(r), \theta'(r)\right) dr $$ The Euler-Lagrange equation, which tell you what the stationary paths are, looks like $$ \frac{d}{d r} \frac{\partial}{\partial \theta'} L - \frac{\partial}{\partial \theta} L = 0 $$ I don't know why he writes the partials in the way that he does, but it is not standard notation. Ignoring this difference, you can check that the Euler-Lagrange equations give what you have above: $$ \frac{d}{d r} \frac{\partial}{\partial \theta'} \left( n(r,\theta) \sqrt{ 1 + (r \theta') ^2 } \right) - \frac{\partial}{\partial \theta} \left( n(r,\theta) \sqrt{ 1 + (r \theta') ^2 } \right) = 0 $$
Finally, suppose $ n $ only depends on $ r $ and not $ \theta $. Then there is no dependence on $ \theta $ at all in $ n \sqrt{1 + (r \theta')^2} $. So the term above on the right with $ \frac{\partial}{\partial \theta } $ goes away. You're left with: $$ \frac{d}{d r} \frac{\partial}{\partial \theta'} \left( n(r,\theta) \sqrt{ 1 + (r \theta') ^2 } \right) = 0 $$ which of course means that with respect to $ r $ $$ \frac{\partial}{\partial \theta'} \left( n(r,\theta) \sqrt{ 1 + (r \theta') ^2 } \right) = \text{constant} $$ In the context of classical mechanics, this is basically saying that when the lagrangian is independent of position, the momentum is conserved.