I’m studying classical mechanics with Mathematical Methods of classical mechanics, by Arnold, doing some exercises lists and got stuck on this part.
Being . Consider a material point of mass 1 moving under the constant conservative force and linked to$$V=\{(x,y,z)\vert z=W(x,y)\}$$ This means that, the point is linked to the graph of the W function. Write the Lagrangian.
As $F$ s conservative, then $F = -\nabla U\Rightarrow U = z + C_0$
taking $C_0=0$ and assuming unity mass, the movement kinetic energy is
$$ T = \frac 12(\dot x^2+\dot y^2+\dot z^2) = \frac 12\left(\dot x^2+\dot y^2+(W_x(x,y)\dot x+W_y(x,y)\dot y)^2\right) $$
and the lagrangian
$$ L = T-U =\frac 12\left((1+W_x^2(x,y))\dot x^2+2W_x(x,y)W_y(x,y)\dot x\dot y+(1+W_y^2(x,y))\dot y^2\right)-W(x,y) $$