# Properties of the $\frac{1}{2}x^2$ function relevant for variational analysis in mathematical physics

There is a theorem in mathematical physics that, by the looks of it, hinges on the nature of the function $f(x)=\frac{1}{2}x^2$
This question is about examining properties of the $f(x)=\frac{1}{2}x^2$ function, that is why I am submitting this question here, and not in physics.stackexchange.

Context of this question:
the theorem that by convention is referred to as: 'the principle of least action',

The expression for the kinetic energy of a mass is the function that I'm interested in:

Kinetic energy $E_k$

$$E_k = \frac{1}{2}v^2$$

That is, the kinetic energy is proportional to the square of the velocity 'v'.

As an example the simplest application of 'least action': A point mass is subject to a constant force 'F' acting downwards. In that case the potential energy $E_p$ function is linear. With the letter 'h' for 'height' the expression for the Potential Energy is Force * height: $Fh$

Under these conditions the trajectory of a point mass with an initial upward velocity will be a parabola, illustrated with the included diagram. Horizontal: time ; vertical: height

The following diagram displays two graphs, the red one shows $E_k$ as a function of time, the green one shows $-E_p$ as a function of time (note the minus sign). The two graphs are for the case of the true trajectory. (The choice of zero point for the potential energy is arbitrary; here the point of zero height has been chosen as point of zero potential energy.) Horizontal: time ; vertical: energy

At every point along the horizontal axis the two graphs are parallel to each other. At every point in time the rate of change of kinetic energy must be an exact match for the rate of change of potential energy, otherwise there would be a violation of conservation of energy. If the potential energy is increasing the kinetic energy must be decreasing in step.

In mathematical physics the integral over time of the sum of the two graphs is called the 'Action', the standard notation for the Action is 'S'. (I like the mnemonic S=Summation). In the diagram this integral is represented as the shaded area.

The Action has the following mathematical property:
for the Action between two points in time: for the true trajectory the Action will be least.

In the diagram the starting point is -1, and the end point is 1.
In mathematical notation:

$$S = \int_{-1}^1 (E_k - E_p)dt$$

(The above is a minimized version of a discussion of Least Action on my own website.)

In mathematical physics it has been demonstrated that this is generally valid. This for-the-true-trajectory-the-action-is-least is valid for all functions for the potential energy. (Well, it's valid for cases where the potential energy is a function of position.) For any potential energy function: for the true trajectory the value of the Action will be an extremum (either minimum or maximum). Thus a problem that presents itself as requiring differential calculus has been restated in terms of a problem in variational calculus.

Since the function for the potential energy can by any function only one common factor remains: the function for the kinetic energy, $\frac{1}{2}v^2$.

With that I have arrived at my question:
Is this behavior unique to the function $f(x)=\frac{1}{2}x^2$?
Is there a very straightforward way to demonstrate what gives rise to that property?

The reason I'm submitting this question:
A recurring question on physics.stackexchange is: 'why on earth do you have to subtract the potential energy from the kinetic energy to find the true trajectory'. The presence of that minus sign is felt to be a very puzzling, inexplicable twist.

Physics textbooks do provide mathematical proofs that Newton's second law and the principle of least action are mathematically equivalent. However, these proofs proceed in a very indirect way (using, for example, integration by parts). As a consequence, these proofs do not shed light on why that minus sign is there, and why least action should give the true trajectory. To the puzzled physicist it is indistinguishable from magic.

That is my main purpose: can this area of mathematical physics made more transparent? An important contribution to that would be to demonstrate in a straightforward way that it comes down to a property of the function $f(x)=\frac{1}{2}x^2$.

General disclaimer:
It is widely known that the historical name 'least action' is awkward. For the sake of keeping the wording simple I have referred to the-action-is-least. Of course correct wording would have been the-action-is-an-extremum; depending on what the function for the potential energy is it can be either a minimum or a maximum.

[LATER EDIT] (10 hours after posting the question)
On my own webpage I discuss the least action mathematics in a purely visual/graphical manner. It's like proving Pythagoras' theorem with a purely visual/graphical proof. On my webpage several of the diagrams have a slider so that the reader can change a parameter's value and see what difference it makes.

An integral can be represented algebraically, but it can also be represented as a shaded area on a diagram. Is it possible at all to demonstrate the validity of least action mathematics in a purely visual/graphical manner?

If $S=\int_a^b L dt,\,L:=T(\dot{x})-V(x)$, then $S$ is stationary iff $T'(\dot{x})\ddot{x}=-V'(x)\dot{x}$, so $T+V$ is conserved. (Note that $T'(\dot{x})\ddot{x}+V'(x)\dot{x}=0$ is both an Euler-Lagrange equation and the energy conservation condition. The $-$ sign you're worried about essentially comes from $\frac{d}{dt}\frac{\partial L}{\partial\dot{x}}\color{red}{-}\frac{\partial L}{\partial x}=0$.) So no, the choice $T=\frac{1}{2}mv^2$ isn't unique in that respect. It does have the advantages, however, that (i) $T$ is minimised at $v=0$ and (ii) the equation of motion simplifies to $m\ddot{x}=-V'(x)$, provided $m$ is constant.