Solution
= Solution
The Lagrangian $\mathcal L=z^{-2}\sqrt{1+z'^2}$ has no explicit $x$ dependence, so its <Beltrami identity> is conserved:
$$
\mathcal L-z'\frac{\partial\mathcal L}{\partial z'}
=\frac1{z^2\sqrt{1+z'^2}}
=\text{constant}.
$$
At the turning point $z=z_{\max}$ and $z'=0$, the constant is $z_{\max}^{-2}$. Rearrangement gives
$$
1+z'^2=\frac{z_{\max}^4}{z^4},
\qquad
\boxed{\frac{dz}{dx}
=\pm\sqrt{\frac{z_{\max}^4}{z^4}-1}}.
$$