Solution (source code)

= Solution

If $f$ is independent of $y$, then $f_y=0$ and the <Euler-Lagrange equation> reduces to $d f_{y'}/dx=0$. Therefore the <first integral> is
$$
\boxed{f_{y'}=C.}
$$
This is the conserved generalized momentum for a <cyclic coordinate>.