Consider we have a certain metric. For instance: \begin{equation} ds^2 = \frac{dr^2}{r^2-Ml^2} +r^2d\phi^2. \end{equation}
In order to find the shortest length between two angles $\phi=\alpha$ and $\phi=\beta$, we have to minimize this function, \begin{equation} S = \int_\alpha^\beta d\phi \quad \sqrt{\frac{1}{r^2-Ml^2}\left(\frac{dr}{d\phi}\right)^2+r^2}. \end{equation}
Now because of the square root, the function to minimize is a bit complicated. Is there an equivalent function to minimize that is less complicated?
By application of Euler Lagrange equation for the functional $ f(y,y') = f $ ( when no x terms occur explicitly), we have
$$ f - y' \frac{\partial f}{ \partial y'}= C_1 \tag1 $$
and for the square rooted functional
$$ \sqrt{f} - y' \frac{\partial \sqrt{f}}{ \partial y'}= C_2 $$
Or
$$ f - \frac{y'}{2} \frac{\partial f}{ \partial y'}= C_2\sqrt{f} \tag 2 $$
(1) and (2) are quite different and in general cases lead to different ODEs. I believe there is no workaround.
Check for simple cases
$$ f= y'/y \text{ and } f= y^{'2}/y^2$$
result respectively in different ODEs
$$ C_1=0 \text{ and } C_2 y^2 + y^{'2}=0 $$
In the present case we have after applying Euler Lagrange
$$\frac{r^2}{ \sqrt{\frac{1}{(r^2-Ml^2)}\left(\frac{dr}{d\phi}\right)^2+r^2}} = C_1$$
which can be squared and simplified easily. May be elliptic function solutions.