I have the Lagrange function:
$$L=\sqrt{\frac{\dot{x}^2+\dot{y}^2}{-y}}.\tag{1}$$
The energy is then:
$$H=\dot{x}\frac{\partial L}{\partial \dot{x}}+\dot{y}\frac{\partial L}{\partial \dot{y}}-L=0.\tag{2}$$ Can I somehow apply in this case the Hamilton or Hamilton-Jacobi formalism to find the motion?