Non-uniqueness of the Lagrangian Goldstein, 3rd ed

$$
\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}_{j}}\right)-\frac{\partial L}{\partial q_{j}}=0\tag{1.57}
$$
expressions referred to as "Lagrange's equations."
Note that for a particular set of equations of motion there is no unique choice of Lagrangian such that above equation lead to the equations of motion in the given generalized coordinates.

I'm not able to understand what does the highlighted statement mean. How can we have different Lagrangians. While deriving the above equation we went through the derivation and ended up defining   $L=T-V$, so the Lagrangian is fixed and always $L=T-V$, so why talk about a different Lagrangian?
Here are the preceding steps of derivation

$$
\frac{d}{d t}\left(\frac{\partial(T-V)}{\partial \dot{q}_{j}}\right)-\frac{\partial(T-V)}{\partial q_{j}}=0
$$
Or, defining a new function, the Lagrangian $L$, as
$$
L=T-V\tag{1.56}
$$
the Eqs. (1.53) become
$$
\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{q}_{j}}\right)-\frac{\partial L}{\partial q_{j}}=0.\tag{1.57}
$$

So we see that we have defined that $L=T-V$ so why talk of a different Lagrangian?
Can anyone please help me.
 A: It may not be obvious that different Lagrangians can
lead to the same equations of motion.
Here is a simple example. Take theses two Lagrangians
$$L = \frac{m}{2}\dot{x}^2-\frac{k}{2}x ^2 \tag{1}$$
$$L' = \frac{m}{2}\dot{x}^2-\frac{k}{2}x ^2+ax\dot{x} \tag{2}$$
These two Lagrangians differ just by the extra term $ax\dot{x}$.
From the Lagrangian (1) you get the equation of motion
$$\frac{d}{d t}\left(\frac{\partial L}{\partial \dot{x}}\right)
= \frac{\partial L}{\partial x}$$
$$m\ddot{x}=-kx \tag{3}$$
From the Lagrangian (2) you get the equation of motion
$$\frac{d}{d t}\left(\frac{\partial L'}{\partial \dot{x}}\right)
= \frac{\partial L'}{\partial x}$$
$$m\ddot{x}+a\dot{x}=-kx+a\dot{x} \tag{4}$$
which is the same as (3).
The above was just an example.
Actually you can add any function $F$ of the form
$$F(x,\dot{x},t)=\frac{\partial G(x,t)}{\partial x}\dot{x}+\frac{\partial G(x,t)}{\partial t}$$
with an arbitrary function $G(x,t)$ to the Lagrangian,
and the equation of motion will remain the same.
This function $F$ can equivalently be written as a total time derivative
$$F(x,\dot{x},t)=\frac{dG(x,t)}{dt}$$
By the way: The example above was constructed using $G(x,t)=\frac{a}{2}x^2$,
thus giving $F(x,\dot{x},t)=ax\dot{x}$.
A: There is indeed no unique Lagrangian that gives particular set of equations of motion. Here's an example taken from David Tong's lectures on the subject (Problem Set 1 of Classical Dynamics, Problem 2).
We're given the Lagrangian
$$L=\frac{1}{12}m^2\dot{x}^4 + m\dot{x}^2V -V^2$$
and we're told that this is classically equivalent to Newton's Lagrangian. Hence, by applying Euler-Lagrange equations we expect to obtain Newton's equations. We have
$$\frac{d}{dt}\frac{\partial L}{\partial \dot{x}} - \frac{\partial L}{\partial x}=0$$
We have
$$\cfrac{\partial L}{\partial x} = m\dot{x}^2V'(x) -2VV'(x)$$
$$\cfrac{d}{dt}\cfrac{\partial L}{\partial \dot{x}} = m^2\dot{x}^2\ddot{x} + 2m\ddot{x}V+2m\dot{x}^2V'(x)$$
By standard calculations, where we have used the fact that $\cfrac{dV}{dt} = \cfrac{\partial V}{\partial x}\cfrac{dx}{dt}$, and primes denote derivative with respect to $x$.
Now, the equation becomes
$$m^2\dot{x}^2\ddot{x} + 2m\ddot{x}V+m\dot{x}^2V'(x) +2VV'(x)=0\Rightarrow m\ddot{x}(m\dot{x}^2+2V) + V'(x)(m\dot{x}^2+2V)=0$$
Now since $m\dot{x}^2+2V=2E \neq 0$ (cannot be zero regardless of $x$ and $\dot{x}$ or else the particle does not have energy to move) we have
$$m\ddot{x} + V'(x)=0$$
which is Newton's equation.
In this particular case Newton's Lagrangian is not scaled by a number neither is a total derivative added (at least one i could see) but gives the same equations of motion.
There are theories like general relativity Einstein-Hilbert action where the lagrangian does not satisfy the definition $T-V$ but gives the correct equations of motion.
A: *

*Given a set of EOMs, there is not a unique Lagrangian (and there might not exists a Lagrangian), whose Lagrange equations reproduce the EOMs.
For starters, one can add total time derivative terms to the Lagrangian, or scale the Lagrangian with a non-zero constant.
See also this example from Goldstein.


*On the other hand, it is true that starting from Newton's Laws and d'Alembert's principle Goldstein derives a Lagrangian in chapter 1. However, it is not unique, cf. point 1.
