💼 Case: consider that we know the path that minimizes the action and call it $x(t)$
We imagine deforming it slightly to a non-minimal path $x(t)+\delta x(t)$
🗒️ Note: $\delta x(t)$ is completely arbitrary except that it is assumed very small with respect to $x(t)$ and that the deformed path must obey the same boundary conditions as the original which means
$$ \delta x(t_0)=\delta x(t_1)=0 $$
On the true path $L=L\left ( x(t),\dot x(t) \right )$
On the modified path $L\left ( x(t)+\delta x(t),\,\dot x(t)+\frac{\text d}{\text dt}(\delta x(t)) \right )\equiv L+\delta L$
Since $\delta x(t)$ is assumed to be small we can Taylor expand $L$
$$ \delta L=\frac{\partial L}{\partial x}\delta x(t)+\frac{\partial L}{\partial \dot x}\left [ \frac{\text d}{\text dt}\left ( \delta x(t)\right ) \right ] $$
So the amount by which the action changes is
$$ \delta S=\int^{t_1}{t_0}\delta L\,\text dt=\int ^{t_1}{t_0} \left [ \frac{\partial L}{\partial x}\delta x(t)+\frac{\partial L}{\partial \dot x}\left [\frac{\text d}{\text dt}(\delta x(t)) \right ] \right ]\text dt $$
We integrate by parts using $u=\frac{\partial L}{\partial \dot x}$ and $\text dv=\text d(\delta x(t))$ and therefore have $\text du=\frac{\text d}{\text dt}(\frac{\partial L}{\partial \dot x})$ and $v=\delta x(t)$ hence this gives
$$ \int^{t_1}{t_0}\frac{\partial L}{\partial \dot x}\left [ \frac{\text d}{\text dt}(\delta x(t)) \right ]\text dt=\left [ \frac{\partial L}{\partial \dot x}\delta x(t) \right ]^{t_1}{t_0}-\int^{t_1}_{t_0}\frac{\text d}{\text dt} \left ( \frac{\partial L}{\partial \dot x} \right )\delta x(t)\,\text dt $$
The first term is zero because of the boundary condition ($\delta x(t_0)=\delta x (t_1)=0$ ) The second term can therefore be inserted into the previous equation and a common factor $\delta x(t)$ extracted:
$$ \delta S=\int^{t_1}{t_0}\delta L\,\text dt=\int ^{t_1}{t_0} \left [ \frac{\partial L}{\partial x}-\frac{\text d}{\text dt} \left ( \frac{\partial L}{\partial \dot x} \right ) \right ] \delta x(t)\,\text dt $$
We want the path $x(t)$ to be such that small variations away from it do not affect the action, corresponding to $\delta S=0$.
For this to be the case either the integrand is positive and negative in different places and sums to zero or the integrand is zero everywhere. We want to be allowed to deform the path in any way we like so want $\delta x(t)$ to be arbitrary.
Thus it must be that
$$ \frac{\text d }{\text dt}\left ( \frac{\partial L}{\partial \dot x} \right )=\frac{\partial L}{\partial x} $$
💎 Conclusion: the least action principle directly implies that $x(t)$ obeys Lagrange’s equation therefore it directly also implies Newton’s laws.
🗒️ Note: We derived the Least action for a 1D system with DoF $x$, it is straightforward to derive it for arbitrary systems. In general when $L$ depends on $N$ degrees of freedom, we label the generalized coordinates $\{ q_i \}$ with corresponding velocities $\{ \dot q_i\}$. In this case we get
$$ \frac{\text d }{\text dt}\left ( \frac{\partial L}{\partial \dot q_i} \right )=\frac{\partial L}{\partial q_i} $$
It is customary to phrase it as the minimization of
$$ \int^{x_1}_{x_0}f(\{y_i(x)\},\{y_i'(x)\},x)\,\text dx $$
This is minimized if
$$ \delta \left ( \int^{x_1}_{x_0}f(\{y_i\},\{y'_i\},x)\text dx \right )=0 $$
which is the case if
$$ \frac{\text d}{\text dx} \left ( \frac{\partial f}{\partial y'_i}\right )=\frac{\partial f}{\partial y_i} $$
💃 Example 1: what is the shortest path between two points
🦎 Infinitesimal step
$$ \begin{aligned} \text dD&=\sqrt{\text dx^2+\text dy^2}\\ &=\sqrt{1+\left ( \frac{\text dy}{\text dx} \right )^2}\,\text dx \\ &=\sqrt{1+y'^2}\,\text dx \end{aligned} $$
👣 Total distance
$$ D=\int^{x_1}_{x_0}\sqrt{1+y'^2}\,\text dx $$