Is there any physical significance to the non-uniqueness of the least action principle? In classical mechanics we often define the action as the quantity
$$ \int_{0}^{T} \left[ T - V \right] dt$$
Which in many applications is some variant of
$$ \int_{0}^{T}  \left[ \frac{1}{2}m \left( x' \right)^2 - V(x) \right] dt. $$
The usual justification for the principle of least action is the observation that if you take integrand above and put it into the euler lagrange equations you get back Newton's law.
I.E. if you believe
$$ \frac{\partial L}{\partial x} - \frac{d}{dt} \left( \frac{\partial L}{\partial x'} \right) + \frac{d^2}{dt^2} \left(\frac{\partial L}{\partial x''} \right) - ... = 0$$
With $L =  \frac{1}{2}m \left( x' \right)^2 - V(x) $ you will find
$$ - \frac{dV}{dx} = mx'' $$
(i.e $F = ma$).
So this is old news that we consider quite well understood but then I realized the following, suppose we try to minimize this action instead:
$$ \int_{0}^{T}  \left[ \frac{1}{2}mxx'' + V(x) \right] dt $$
I.E. $L = \frac{1}{2}mxx'' + V(x) $. If we plug this into the euler lagrange equations we ALSO end up deriving
$$  - \frac{dV}{dx} = mx'' $$
Via
$$ \frac{\partial }{\partial x}[\frac{1}{2}mxx'' + V] + \frac{d^2}{dt^2}\frac{\partial}{\partial x''}\left[ \frac{1}{2}mxx'' + V \right]  = 0 \rightarrow  \frac{1}{2}mxx'' + \frac{dV}{dx} + \frac{1}{2}mxx'' = 0 \rightarrow mxx'' + \frac{dV}{dx} = 0 \rightarrow F = -\frac{dv}{dx}$$
I found this very curious, I recognize the physical significance of $(mx'')*x$ as the classical expression for work (Force x distance). But is there any deeper physical significance to this second lagrangian, or is this just a curious mathematical oddity/not a useful problem solving tool. Can this second lagrangian be used in place of the first in other contexts (ex: in the Feynman path integral).
So it seems that $\frac{1}{2}mxx'' - V$ is a conserved quantity. (I came to this conclusion after checking only one example involving a newtonian gravitational field between two bodies at 2 locations, so maybe this is wrong.)
 A: It is wellknown that given a set of EOMs, the action $S$ is not necessarily unique, cf. e.g. this Phys.SE post. OP points out that the Euler-Lagrange (EL) equations are not affected if we add a boundary term, cf. e.g. this Phys.SE post. However, the caveat is that the boundary conditions (BCs) [which are necessary to impose in order to make the variational principle well-posed] may change!

*

*OP's 1st example:
$$L_1 ~=~ \frac{1}{2}m\dot{q}^2-V(q).\tag{1a}$$
The infinitesimal variation reads
$$ \delta S_1 ~=~\int_{t_i}^{t_f} \! dt~ {\rm EOM}~\delta q + \left[m\dot{q}\delta q \right]^{t=t_f}_{t=t_i}. \tag{1b}$$
If we focus$^1$ on the initial condition (IC), we have to impose either

*

*$\color{red}{\rm weak}$ Dirichlet IC: $ q(t_i)=q_i $,

or

*

*Neumann IC: $ \dot{q}(t_t)=0, $
in order to make the boundary term disappear [which is necessary in order to derive the EL equation from the variational principle]. See also e.g. my Math.SE answer here.


*OP's 2nd example:
$$L_2 ~=~ -\frac{1}{2}mq\ddot{q}-V(q)~=~L_1 - \frac{d^2}{dt^2}(\frac{m}{4}q^2).\tag{2a}$$
The infinitesimal variation reads
$$ \delta S_2 ~=~\int_{t_i}^{t_f} \! dt~ {\rm EOM}~\delta q + \frac{m}{2}\left[\dot{q}\delta q - q\delta \dot{q}\right]^{t=t_f}_{t=t_i}. \tag{2b}$$
We have to impose either

*

*$\color{red}{\rm strong}$ Dirichlet IC: $ q(t_i)=0  $,

or

*

*Neumann IC: $ \dot{q}(t_t)=0 $.

There are no other possibilities!
TL;DR: The lesson is that depending on the physical system and the physically relevant BCs, we might have to choose a specific action for the variational principle.
See also e.g. this related Phys.SE post.
--
$^1$The final condition (FC) is similar.
A: First, the Lagrangian is not a conserved quantity, so $\frac{1}{2} m x \ddot{x} + V$ is not conserved. For example, for a particle in a constant gravitational potential with $V = m g x$, taking the solution $x(t) = - \frac{1}{2} g t^2 $  would yield for this quantity $\frac{1}{4} m g^2 t ^2 - \frac{1}{2} m g^2 t^2 = -\frac{1}{4} m g^2 t^2$, which is obviously not conserved.
Second, if you go through the derivation of the Euler-Lagrange equation, you will find that the non-uniqueness of the Lagrangian follows from the assumption that the variation vanishes at the end points of the path. This allows you to ignore terms in the Lagrangian that are total derivatives; since the difference between the standard kinetic term and the one you wrote down is a total derivative:
\begin{equation}
\frac{1}{2} m \dot{x}^2 - \left(-\frac{1}{2} m x \ddot{x}\right) = \frac{{\rm d}}{{\rm d}t} \left(\frac{1}{2} m \dot x x\right)
\end{equation}
you can treat the Lagrangians as equivalent. Assuming the boundaries of the path are fixed is a common assumption, which is frequently sufficient for what we are interested in.
However, there is information in the variation of the boundary of the action, and in some cases it is important to properly fix the boundary terms. For example, you can derive the canonical momentum from requiring that the variation of the path at the boundary vanishes. In these cases, the Lagrangian is fixed, with no ambiguity about the boundary term, by having a well-defined variational principle. In GR, the so-called Gibbons-Hawking-York boundary term needs to be added to the action, and is important to describe quantum effects. [1]
Finally, in your question you implicitly changed the sign of the action. So long as you are speaking classically and only looking at the system you wrote down, this doesn't create a problem. But if you added your Lagrangian (with the wrong sign) to a standard Lagrangian $\frac{1}{2} M \dot{X}^2 - V(X)$, and added a term coupling $x$ and $X$, then you would find your system had a ghost instability. So, it's a good idea to be careful about the sign of the Lagrangian, and therefore a better way to write your term would have been $-\frac{1}{2} m x \ddot{x} - V$ (even though in your case it wouldn't matter).

[1] http://quark.itp.tuwien.ac.at/~grumil/pdf/lecture7_2018.pdf
A: In the case of Hamilton's stationary action there is no significance in the non-uniqueness you refer to.
The point where the rubber meets the road is the constraint that as an object is moving along, subject to acceleration due to a potential gradient, the rate of change of kinetic energy must match the rate of change of potential energy.
Inserting the Lagrangian ($E_k-E_p$) in the Euler-Lagrange equation achieves the goal of satisfying that constraint.
You can build more convoluted expressions that also satisfy the constraint that rate-of-change-of-kinetic- energy-must-match-rate-of-change-of-potential-energy, but those convoluted expressions do not add anything. They're just ($E_k-E_p$) with unnecessary luggage added.
Hamilton's stationary action does one thing and one thing only: it expresses the constraint that the rate of change of kinetic energy must match the rate of change of potential energy. For a demonstration of that: I refer to an answer I submitted here on physis.SE:
Hamilton's stationary action
(The nature of the demonstration is graphical; the core points are visualized in diagrams.)
