# Are generalised coordinates necessarily independent of one another?

I'm solving the equations of motion for a spring attached to a wall with a mass $$m$$ on the other end that is subject to Earth's gravitational field, $$\vec{g}$$. An obvious set of coordinates is the cartesian system, $$(x,y)$$. However, you could also use the elongation of the spring and the vertical position of the mass, $$(q,y)$$. This greatly simplifies the lagrangian since the Hooke potential depends on the elongation and not simply the cartesian coordinates. However, we have:

$$q=\sqrt{(x-x_0)^2+(y-y_0)^2}$$

Where $$x_0$$ and $$y_0$$ are the equilibrium positions. Obviously, then, $$q=q(x,y)$$. The dependency with $$x$$ is irrelevant since we aren't considering it as a generalised coordinate. However, the dependency with $$y$$ seems to be relevant for one of the Lagrange equations, namely:

$$\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{y}} \right)-\frac{\partial L}{\partial y}=0$$

Because $$L$$ depends on $$y$$ both explicitly and implicitly from $$q$$ . Is it simply that, since these are partial derivatives, we are to only consider explicit dependence with $$y$$ and $$\dot y$$?

• Your kinetic term for x (the $\frac{1}{2}m\dot x^2$ term) is going to look really complicated once you substitute in for $\dot x = \dot x(q,y,\dot q, \dot y)$. And you are going to have to account for this in your partials wrt y and $\dot y$. It's because in order to move y with q fixed you also have to move x (and vice versa).
– hft
Jun 2, 2022 at 0:04
• Suggestion to the post (v1): Consider to include a figure for clarity. Jun 2, 2022 at 3:08

I think you are missinterpreting what dependence means. The relation between $$x,y,q$$ implies that only 2 of the 3 variables can be considered independent simultaneously. However, it could be any pair of them. For instance, you could write $$x = x(q,y)$$ where $$x$$ is the dependent variable.
In this case, $$q,y,\dot{q},\dot{y}$$ are independent and $$x,\dot{x}$$ are functions of those (and should be differenciated accordingly if you kept them around on the Lagrangian).