Hamilton's principle states that a dynamic system always follows a path such that its action integral is stationary (that is, maximum or minimum).
Why should the action integral be stationary? On what basis did Hamilton state this principle?
Hamilton's principle states that a dynamic system always follows a path such that its action integral is stationary (that is, maximum or minimum).
Why should the action integral be stationary? On what basis did Hamilton state this principle?
The notes from week 1 of John Baez's course in Lagrangian mechanics give some insight into the motivations for action principles.
The idea is that least action might be considered an extension of the principle of virtual work. When an object is in equilibrium, it takes zero work to make an arbitrary small displacement on it, i. e. the dot product of any small displacement vector and the force is zero (in this case because the force itself is zero).
When an object is accelerating, if we add in an "inertial force" equal to $\,-ma\,$, then a small, arbitrary, time-dependent displacement from the objects true trajectory would again have zero dot product with $\,F-ma,\,$ the true force and inertial force added. This gives
$$(F-ma)\cdot \delta q(t) = 0$$
From there, a few calculations found in the notes lead to the stationary action integral.
Baez discusses D'Alembert more than Hamilton, but either way it's an interesting look into the origins of the idea.
There is also Feynman's approach, i.e. least action is true classically just because it is true quantum mechanically, and classical physics is best considered as an approximation to the underlying quantum approach. See Feynman's Thesis — A New Approach to Quantum Theory or A call to action, by Edwin F. Taylor.
Basically, the whole thing is summarized in a nutshell in Richard P. Feynman, The Feynman Lectures on Physics (Addison–Wesley, Reading, MA, 1964), Vol. II, Chap. 19. (I think, please correct me if I'm wrong here). The fundamental idea is that the action integral defines the quantum mechanical amplitude for the position of the particle, and the amplitude is stable to interference effects (-->has nonzero probability of occurrence) only at extrema or saddle points of the action integral. The particle really does explore all alternative paths probabilistically.
You likely want to read Feynman's Lectures on Physics anyway, so you might as well start now. :-)
Let us remember that the equations of motion with initial conditions $q(0), (dq/dt)(0)$ were advanced first and the least action principle was formulated later, as a sequence. Although beautiful and elegant mathematically, the least action principle uses some future, "boundary" condition $q(t_2)$, which is unknown physically. There is no least action principle operating only with the initial conditions.
Moreover, it is implied that the equations have physical solutions. This is so in the Classical Mechanics but is wrong in the Classical Electrodynamics. So, even derived from formally correct "principle", the equations may be wrong on physical and mathematical level. In this respect, formulating the right physical equations is a more fundamental task for physicists than relying on some "principle" of obtaining equations "automatically". It is we physicists who are responsible for correctly formulating equations.
In CED, QED, and QFT one has to "repair on go" the wrong solutions just because the physics was guessed and initially implemented incorrectly.
P.S. I would like to show how in reality the system "chooses" its trajectory: if at $t = 0$ the particle has a momentum $p(t)$, then at the next time $t+dt$ it has the momentum $p(t) + F(t)\cdot dt$. This increment is quite local in time, it is determined by the present force value $F(t)$ so no future "boundary" condition can determine it. The trajectory is not "chosen" from virtual ones; it is "drawn" by the instant values of force, coordinate, and velocity.
I generally tell the story that the action principle is another way of getting at the same differential equations -- so at the level of mechanics, the two are equivalent. However, when it comes to quantum field theory, the description in terms of path integrals over the exponentiated action is essential when considering instanton effects. So eventually one finds that the formulation in terms of actions is more fundamental, and more physically sound.
But still, people don't have a "feel" for action the way they have a feel for energy.
Instead of specifying the initial position and momentum just like we have done in Newton's formalism, let’s reformulate our question as following:
If we choose to specify the initial and final positions: $\textbf{What path does the particle take?}$
Let's assert we can recover the Newton's formalism by the following formalism, so-called Lagrangian formalism or Hamiltonian principle.
To each path illstrated on above figure, we assign a number which we call the action
$$S[\vec{r}(t)] = \int_{t_1}^{t_2}dt \left(\dfrac{1}{2}m\dot{\vec{r}}^2-V(\vec{r})\right)$$
where this integrand is the difference between the kinetic energy and the potential energy.
$\textbf{Hamilton's principle claims}$: The true path taken by the particle is an extremum of S.
$\textbf{Proof:}$
1.Change the path slightly:
$$\vec{r}(t) \rightarrow \vec{r}(t) +\delta \vec{r}(t)$$
2.Keep the end points of the path fixed:
$$ \delta \vec{r}(t_1) = \delta \vec{r}(t_2) = 0 $$
3.Take the variation of the action $S$:
finally, you will get
$$ \delta S = \int_{t_1}^{t_2} \left[-m\ddot{\vec{r}} - \nabla V\right] \cdot \delta \vec{r} $$
The condition that the path we started with is an extremum of the action is
$$\delta S = 0$$
which should hold for all changes $\delta \vec{r}(t)$ that we make to the path.The only way this can happen is if the expression in $[\cdots]$ is zero. This means
$$ m\ddot{\vec{r}} = -\nabla V$$
Now we recognize this as $\textbf{Newton’s equations}$. Requiring that the action is extremized is equivalent to requiring that the path obeys Newton’s equations.
For more details you could read this pdf lecture.
Hope it helps.
As you can see from the image below, you want the variation of the action integral to be a minimum, therefore $\displaystyle \frac{\delta S}{\delta q}$ must be $0$. Otherwise, you are not taking the true path between $q_{t_{1}}$ and $q_{t_{2}}$ but a slightly longer path. However, even following $\delta S=0$, as you know, you might end up with another extremum.
Following the link from j.c., you can find On a General Method on Dynamics, which probably answers your question regarding Hamilton's reasoning. I haven't read it but almost surely it is worthwhile.
It is possible in classical physics to derive the Euler-Lagrange equations from D'Alembert principle, without any reference to the notion of action. They come from Newton's laws with the additional assumption that the forces are conservative. In this case there is a Lagrangian, and the equation of movement (EOM) is the Euler-Lagrange equation.
Suppose that a function q(t) is a solution for the EOM in a certain interval. q can be expanded as a Taylor series, that is a power series: $q(t) = \sum_j a_jt^j$.
The action is: $S(L) = \int_{t1}^{t2} Ldt$ where L is the Lagrangian that corresponds to the EOM. Because the integral is in $t$, and we are taking the derivative with respect to the coeficients $a_j$, it can go inside the integral. For each $a_j$. $$\frac{\partial S}{\partial a_j} = \int_{t1}^{t2} \frac{\partial L}{\partial a_j}dt$$
L is a function of $q$ and $\dot q$, so applying the chain rule:
$$\frac{\partial L}{\partial a_j} = \frac{\partial L}{\partial q}\frac{\partial q}{\partial a_j} + \frac{\partial L}{\partial \dot q}\frac{\partial \dot q}{\partial a_j}$$
Integrating this differential between 2 instants of time: $$\int_{t1}^{t2}\frac{\partial L}{\partial a_j}dt = \int_{t1}^{t2}\frac{\partial L}{\partial q}\frac{\partial q}{\partial a_j}dt + \int_{t1}^{t2}\frac{\partial L}{\partial \dot q}\frac{\partial \dot q}{\partial a_j}dt $$
The last term can be separated using integral by parts, using that differentiating with respect to time: $d\left (\frac{\partial q}{\partial a_j}\right ) = \frac{\partial \dot q}{\partial a_j} dt$: $$\int_{t1}^{t2}\frac{\partial L}{\partial \dot q}\frac{\partial \dot q}{\partial a_j}dt = \frac{\partial L}{\partial \dot q}\frac{\partial q}{\partial a_j}\bigg|_{t1}^{t2} - \int_{t1}^{t2}\frac {\partial \frac {\partial L}{\partial \dot q}}{\partial t} \frac{\partial q}{\partial a_j}dt$$
So: $$\int_{t1}^{t2}\frac{\partial L}{\partial a_j}dt = \int_{t1}^{t2}\frac{\partial L}{\partial q}\frac{\partial q}{\partial a_j}dt - \int_{t1}^{t2}\frac {\partial \frac {\partial L}{\partial \dot q}}{\partial t} \frac{\partial q}{\partial a_j}dt + \frac{\partial L}{\partial \dot q}\frac{\partial q}{\partial a_j}\bigg|_{t1}^{t2} $$
Joining the integrals, we get between parentheses the Euler-Lagrange equation, that is the EOM itself! If q is solution by hypothesis, this integral must be zero.
$$\int_{t1}^{t2}\frac{\partial L}{\partial a_j}dt = \int_{t1}^{t2}\left (\frac{\partial L}{\partial q} - \frac {\partial \frac {\partial L}{\partial \dot q}}{\partial t} \right) \frac{\partial q}{\partial a_j}dt + \frac{\partial L}{\partial \dot q}\frac{\partial q}{\partial a_j}\bigg|_{t1}^{t2} $$
For the last term, the second order integral needs 2 boundary conditions. If $q(t_1)$ and $q(t_2)$ are known, they are fixed and $\frac{\partial q}{\partial a_j}\bigg|_{t1} = \frac{\partial q}{\partial a_j}\bigg|_{t2} = 0 \implies$ this term vanishes.
Now, we get to the conclusion that the derivative of the action with respect to all coeficients must be zero in the interval, what is the same as to say that the action must be stationary.
In this answer I will proceed from $F=ma$ to Hamilton's stationary action in forward steps.
Some historical remarks:
In his 1834 paper William Rowan Hamilton described an approach that combined two different variations: variation of the trajectory and variation of the end point.
Carl Gustav Jacob Jacobi, in the course of his 'Vorlesungen über Dynamik' 1842-1843, at the University of Königsberg, asserted that the variation of the end point was superfluous, so he omitted it.
Note that the action concept that found widespread adoption is Jacobi's formulation. (Hamilton is known to have expressed disagreement with Jacobi, but for reasons unknown Hamilton did not publish about stationary action again.)
While that is the actual history: repeated use has solidified the name: 'Hamilton's stationary action'.
Still, it's worthwhile to keep in mind that what we know under that name is not Hamilton's original concept; it's Jacobi's version of it.
The goal of proceeding from $F=ma$ to Hamilton's stationary action will be reached in three stages, each stage building onto the result of the preceding stage:
The stages as presented overlap only partially with the historical sequence of events. I like to think of it as cutting a new straight path for a river that meanders through the landscape.
In preparation: a relation will be derived between position, velocity, and acceleration.
The basis for that relation:
$$ v = \frac{ds}{dt} \ \Leftrightarrow \ ds = v \ dt \tag{1.1} $$
$$ a = \frac{dv}{dt} \ \Leftrightarrow \ dv = a \ dt \tag{1.2} $$
(1) and (2) will be used to process the following integral: $\int_{s_0}^s a \ ds $
Here $a$ represents an arbitrary acceleration profile. That is, the acceleration that is evaluated can be any function of the position coordinate.
$$ \int_{s_0}^s a \ ds \tag{1.3} $$ $$ \int_{t_0}^t a \ v \ dt \tag{1.4} $$ $$ \int_{t_0}^t v \ a \ dt \tag{1.5} $$ $$ \int_{v_0}^v v \ dv \tag{1.6} $$
To go from (1.3) to (1.4) the substitution $ds=v \ dt$ was used, with corresponding change of limits.
To go from (1.5) to (1.6) the substitution $a \ dt=dv$ was used, with corresponding change of limits.
In all the operations from (1.3) to (1.6) give the following result:
$$ \int_{s_0}^s a \ ds = \tfrac{1}{2}v^2 - \tfrac{1}{2}v_0^2 \tag{1.7} $$
I want to emphasize just how general the validity of (1.7) is: it is valid for an arbitrary acceleration profile, and all it requires is (1.1) en (1.2).
$$ F = ma \tag{1.8} $$
And we specify integration of both sides with respect to the position coordinate:
$$ \int_{s_0}^s F \ ds = \int_{s_0}^s ma \ ds \tag{1.9} $$
By using (1.7) to process the right hand side we arrive at the work-energy theorem:
$$ \int_{s_0}^s F \ ds = \tfrac{1}{2}mv^2 - \tfrac{1}{2}mv_0^2 \tag{1.9} $$
(1.9) gives us a wealth of implications.
The work-energy theorem motivates the definitions of potential energy and kinetic energy.
Historically: for several centuries, from the time of Huygens to the time of Hamilton, the concept of 'living force' was used, which was defined as $mv^2$. It was in the 1850's that the physics community shifted to a new name and a new definition: $\tfrac{1}{2}mv^2$. The benefit of that shift: by defining kinetic energy as an integral (integral of $ma$ with respect to the position coordinate) the concept of kinetic energy is defined in terms of the work-energy theorem.
Potential energy is defined as the negative of work done. When the expression for work done is well defined we have: during interconversion between potential energy and kinetic energy the amount of change of potential energy matches the amount of change of kinetic energy:
$$ \Delta E_p + \Delta E_k = 0 \tag{1.10} $$
The importance of the concepts of kinetic energy and potential energy cannot be overstated. (More about that further down, after completion of the announced three stages.)
To avoid misunderstanding: I use the name 'Lagrange equation' for a particular equation that Joseph Louis Lagrange arrived at without application of calculus of variations; Lagrange used other means.
In (1.9) integration with respect to the position coordinate was specified.
At this point we build onto the preceding result by making use of the fundamental theorem of Calculus: differentiation and integration are each other's inverse.
We take (1.9) and we specify the inverse of how the work-energy theorem was derived: we specify differentiation with respect to the position coordinate:
$$ \frac{d \big(\int F \ ds \big)}{ds} = \frac{d \big(\tfrac{1}{2}mv^2 \big)}{ds} \tag{2.1} $$
Given that differentiation is the inverse of integration we know in advance that processing this differentiation will recover $F=ma$.
About the right hand side of (2.1):
That differentiation can be restated in a way that makes it easier to process; the following two differentiation operations are equivalent:
$$ \frac{d \big(\tfrac{1}{2}mv^2 \big)}{ds} \ \Leftrightarrow \ \frac{d}{dt}\frac{d (\tfrac{1}{2}mv^2)}{d v} \tag{2.2} $$
To verify that the left hand side and right hand side of (2.2) are equivalent we process both:
$$ \frac{d(\tfrac{1}{2}mv^2)}{ds} = \tfrac{1}{2}m\left( 2v\frac{dv}{ds} \right) = m\frac{ds}{dt}\frac{dv}{ds} = m\frac{dv}{dt} = ma $$
$$ \frac{d}{dt}\frac{d (\tfrac{1}{2}mv^2)}{d v} = m\frac{d}{dt}v = m\frac{dv}{dt} = ma $$
With (2.2) corroborated: The following is a restatement of (2.1), making use of (2.2):
$$ \frac{d(-E_p)}{ds} = \frac{d}{dt}\frac{d (E_k)}{d v} \tag{2.3} $$
Rearrange to have both terms on the same side:
$$ \frac{d(-E_p)}{ds} - \frac{d}{dt}\frac{d (E_k)}{d v} = 0 \tag{2.4} $$
The following change of notation is only a visual change because $\partial E_k/\partial s$ is zero, and $\partial E_p/ \partial v$ is zero.
$$ \frac{\partial(E_k - E_p)}{\partial s} - \frac{d}{dt}\frac{\partial (E_k - E_p)}{\partial v} = 0 \tag{2.5} $$
The reason, of course, for stating (2.4) in the form of (2.5), is that (2.5) is the same form as the Euler-Lagrange equation for Lagrangian mechanics.
Towards stationary action the following property is key:
Differentiation and integration are linear operations.
As we know: that means we can move additions and subtractions in and out:
$$ \frac{d \ f(x)}{dx} + \frac{d \ g(x)}{dx} = \frac{d \big(f(x) + g(x) \big)}{dx} $$
$$ \int f(x)dx + \int g(x)dx = \int \big(f(x) + g(x) \big) dx $$
About following motion over time versus evaluating differentiation wrt variation:
We have that the true trajectory has the property that the sum of potential energy and kinetic energy is constant. That is to say: followed over time the potential energy and the kinetic energy are counter-changing, with matching rate of change.
When evaluating derivatives of variation the corresponding values of the potential energy and kinetic energy are co-changing.
(3.1) is a repeat of (2.1). Upon sweeping out variation: at the point in variation space where (3.1) is valid (3.2) is valid also:
$$ \frac{d \big( \int F \ ds \big)}{ds} = \frac{d(\tfrac{1}{2}mv^2)}{ds} \tag{3.1} $$
$$ \frac{\delta \big(\int_{t_1}^{t_2} \ (\int F \ ds) \ dt \big)}{\delta s} = - \frac{\delta \big(\int_{t_1}^{t_2} \ (\tfrac{1}{2}mv^2) \ dt \big)}{\delta s} \tag{3.2} $$
In (2.8) the $\delta$ symbol is used to specify that the differentiation is differentiation with respect to variation.
About the transition from (3.1) to (3.2): there is an implicit minus sign switch.
While it is the case that (3.1) specifies differentiation with respect to the position coordinate, it expresses following motion over time, and in that case work done and kinetic energy are co-changing. (3.2) is stated in terms of differentiating with respect to variation, and in that case it's not work-done-and-$E_k$ that are co-changing, but the pair $E_p$ and $E_k$.
In (3.3) the $E_p$-term has been moved to the other side of the equals sign, so it has picked up a minus sign, and that minus sign has been moved to the inside of the integration.
$$ \frac{\delta \big(\int_{t_1}^{t_2} \ -E_p \ dt \big)}{\delta s} + \frac{\delta \big(\int_{t_1}^{t_2} \ E_k \ dt \big)}{\delta s} = 0 \tag{3.3} $$
In (3.4) the two terms of (3.3) have been combined into a single term; (3.42.10) expresses Hamilton's stationary action.
$$ \frac{\delta \big(\int_{t_1}^{t_2} E_k - E_p \ dt \big)}{\delta s} = 0 \tag{3.4} $$
Equation (3.1) through (3.4) express: The true trajectory has the property that the rate of change of kinetic energy matches the rate of change of potential energy.
Hamiltons stationary action states: when the trial trajectory coincides with the true trajectory the derivative of Hamilton's action is zero.
The connection: When A and B match, then A minus B is zero
Connection with the derivation of the Euler-Lagrange equation
The transition (3.1) to (3.2) and the derivation of the Euler-Lagrange equation are each other's inverse.
To show that I must point out the connection between taking the derivative with respect to position, and taking the derivative with respect to variation
As we know: in mechanics: when the Euler-Lagrange equation is derived the starting point is to set up derivation of Hamilton's action with respect to variation.
We choose a pair of points in time $t_1$ and $t_2$. The size of the time interval between $t_1$ and $t_2$ is arbitrary; the validity of the reasoning extends all the way to an infinitesimally small time interval between $t_1$ and $t_2$.
With $f(t)$ for the true trajectory we set up a function $f_v(t)$ ('v' for variation), that will be multiplied with a factor $\epsilon$ to sweep out variation. $f_v(t)$ must satisfy $f_v(t_1) = 0$ and $f_v(t_2) = 0$, but is otherwise arbitrary. Let $f_{\epsilon}(t)$ represent the function subjected to variation.
$$ f_{\epsilon}(t) = f(t) + \epsilon f_v(t) \tag{3.3} $$
And then, with $L$ for the Lagrangian, the following differentiation is executed:
$$ \frac {d}{d \epsilon} \int_{t_1}^{t_2} \ L \ dt \tag{3.4} $$
Over the course of the derivation of the EL-equation: taking the derivative with respect to the multiplication factor $\epsilon$ is transformed to taking the derivative with respect to the position coordinate.
Summerizing:
Taking the derivative with respect to variation and taking the derivative with respect to position coordinate is mathematically equivalent, because the variation is exclusively in the direction of the position coordinate.
The animation below consists of screenshots of an interactive diagram. The purpose of the diagram is to demonstrate all of the concepts in a single diagram.
The set of four panels demonstrates the transition from (3.1) to (3.2) for a specific case. The demonstration generalizes to all cases.
The upturned parabola in the upper left sub-panel represents height as a function of time, of an object that is thrown vertically upward. The object ascends, decelerated by a uniform force, and is then accelerated back down.
The slider at the bottom of the diagram represents sweeping out variation. When the variation is at the value zero the trial trajectory coincides with the true trajectory.
The following three relations are plotted:
upper-left subpanel: height as a function of time
upper-right and lower-left: Kinetic energy (red) and Work done (green) as a function of time
lower-right: the value of the integral as a function of the applied variation.
The height of the trial trajectory increases in proportion to the value of the variation. When the trial trajectory is made steeper all the corresponding plots become steeper, but not at the same rate.
The true trajectory has the property that the rate of change of kinetic energy matches the rate of change of work done. That property propagates to the integrals of the respective curves. That is: when a curve becomes steeper by a factor $\epsilon$ the derivative of the corresponding integral grows by that factor $\epsilon$.
When the variation hits the point in variation space where the trial trajectory coincides with the true trajectory the rate of change of the integral of the kinetic energy matches the rate of change of the integral of work done.
The importance of the concepts of kinetic energy and potential energy.
The wonderful thing about kinetic energy is that it slots in with Pythagoras' theorem.
Let there be three degrees of freedom, $x$, $y$, and $z$. Then the total kinetic energy is equal to the sum of the component kinetic energies of the three degrees of freedom.
$$ \tfrac{1}{2}mv_x^2 + \tfrac{1}{2}mv_y^2 + \tfrac{1}{2}mv_z^2 = \tfrac{1}{2}mv^2 \tag{4.1} $$
That is: when mechanics is expressed in terms of kinetic energy and potential energy then when setting up the equations for the respective degrees of freedom there is no need to use sines and cosines to calculate the components, you can just add up the component energies. That is a huge advantage.
Very often all of the properties of a theory can be explored at the level of the Lagrangian of that theory. When you explore a theory at the level of its Lagrangian then you are deferring the act of taking the derivative with respect to the position coordinate. Often you can defer that indefinitely.
Generalized coordinates
Expression of the force-acceleration principle is not confined to cartesian coordinates. The form of the force-acceleration principle transfers to systems of coordinates other than cartesian coordinates.
The best known example is using polar coordinates.
with:
$\tau$ Torque
$\Theta$ angle
$I$ moment of inertia
The second time derivative of the angle coordinate (angular acceleration) is proportional to the amount of exerted torque, divided by the moment of inertia.
$$ \frac{d^2 \Theta}{dt^2} = \frac{\tau}{I} \tag{4.2} $$
Comparison: the second time derivative of position coordinate (acceleration) is proportional to the amount of force, divided by the inertial mass.
with:
$F$ Force
$s$ position
$m$ mass
$$ \frac{d^2 s}{dt^2} = \frac{F}{m} \tag{4.3} $$
Stated in more general terms:
The recurring pattern is: the dynamics of some phenomenon can be expressed in terms of the following three entities: a state (twice differentiable with respect to time), a tendency towards change of that state, an opposition to change of that state.
In situations where it turns out an equation of motion can be formulated at all the form of that equation is then seen to be: second time derivative of the state is proportional to the tendency towards change, divided by opposition to change.
Example:
The case of electric current in a circuit:
change of current strength is the second derivative of position of charge.
A coil with self-inductance will oppose change of current strength.
Through an inductor: change of current strength is proportional to electromotive force (electric potential), divided by the coefficient of self-induction (inductance).
When you have a Lagrangian that is expressed in terms of some form of generalized coordinates then there is never an obstacle to taking the derivative with respect to the corresponding generalized position coordinate(s). The differentiation with respect to the generalized position coordinate results in an equation of motion in terms of a generalized acceleration and a generalized force.
For further reading: the discussion of generalized forces by Richard Fitzpatrick.