# Independent Variables of a Lagrangian [duplicate]

Let us consider a particle in one spatial dimension $x$ and one temporal dimension $t$. Its Lagrangian $L$ is given by

\begin{eqnarray*} L &=& T- V \\ &=& \frac{1}{2} m\dot{x}^2 - V(x) \\ &=& L(x, \dot{x}) \end{eqnarray*}

But if I write $L = \frac{1}{2} m [\frac{d}{dt}({x})]^2 - V(x)$, then it seems to me that $L$ depends only on $x$.

So, my question is why it is said that $L$ is a function of $x$ and its derivative $\dot{x}$ ?

## marked as duplicate by Qmechanic♦Dec 11 '18 at 13:33

• We are free to pick $q$ and $\dot q$ independently as initial conditions. In the calculus of variations, a variation in $q$ induces a variation in $\dot q$. So once we have chosen them (independently) they are then correlated. So we consider them as independent variables even though $v=\dot q$ in practice. – AngusTheMan Aug 23 '15 at 20:05
• Because $\dot x$ is the variable, even if you write it as you have? – Kyle Kanos Aug 23 '15 at 20:06
• Essentially a duplicate of physics.stackexchange.com/q/885/2451 and links therein. – Qmechanic Aug 24 '15 at 15:41

The Lagrangian formalism treats $x$ and $\dot{x}$ as independent variables. In particular, you cannot write $\frac{\mathrm{d}}{\mathrm{d}t}x$ because $x$ is not dependent on time.
What is dependent on time is a particular trajectory $x(t)$ that is the solution to the equations of motion (the Euler-Lagrange equations). Prior to solving the equations of motion, $x$ and $\dot{x}$ are independent variables (formally, coordinates of points in the tangent bundle of the configuration space which has the $x$ as coordinates), where you can choose any point $(x_0,\dot{x}_0)$ as an initial condition for the equations of motion since those are typically second order.
After solving the equations of motion, you can obviously obtain any value of $\dot{x}(t_1)$ on the trajectory from the corresponding $x(t_1)$ since the trajectory is a line - it has only the coordinate $t$, and points on it are fully specified by giving the time, and since you fed $(x,\dot{x})$ as the initial conditions $x(0) = x_0,\left(\frac{\mathrm{d}}{\mathrm{d}t}x\right)(0) = \dot{x}_0$ into the Euler-Lagrange equations, the trajectory indeed has the relation $\dot{x}(t) = \left(\frac{\mathrm{d}}{\mathrm{d}t}x\right)(t)$.
• If this is so, that $x$ and $\dot{x}$ are independent variables, then why does the configuration space only has $x$ variables? Also, the Euler-Lagrangian equation is solved from the calculus of variation method by having boundary value situation where we are given $x$ at $t=0$ and at $t=t_0$. Then how and why do we exactly convert this to an initial value thing where we are given $x$ and $\dot{x}$ at $t=0$? – Naman Agarwal Feb 3 at 4:36
The thing is that when you write the Lagrangian, you don't know the particle's trajectory yet. If you had a specified function $x(t)$, then of course $\dot{x}$ is not independent. But if you only know the particle's position at a given time, its velocity can be anything, because you are free to set position and velocity as initial conditions how you please.