Solution (source code)

= Solution

For
$$
L=\frac{\sqrt{1+y'^2}}x,
$$
one has $L_y=0$ and
$$
L_{y'}=\frac{y'}{x\sqrt{1+y'^2}}.
$$
A circle of radius $R$ centred at $(0,c)$ on the $y$-axis satisfies
$$
x^2+(y-c)^2=R^2,
\qquad
y'=-\frac{x}{y-c}.
$$
On any arc that does not cross $y=c$,
$$
\sqrt{1+y'^2}=\frac R{|y-c|},
\qquad
L_{y'}=-\frac{\operatorname{sgn}(y-c)}R,
$$
which is constant. Hence $dL_{y'}/dx=0=L_y$, so the <Euler-Lagrange equation> holds and $\delta I=0$. These circles are the coordinate-swapped form of a <Geodesic in the Poincare half-plane model>.