Here's an example.
Let's consider the case of a free particle in a force field given by a potential $U$. If $$L=T-U,$$
then the Newton's equations of motion $$\dot {\mathbf p}=-\dfrac{\partial U}{\partial \mathbf r}$$
are equivalent to Lagrange's equation in Cartesian coordinates:
$$\dot {\mathbf p} = \frac{\partial L}{{\partial \mathbf q}},$$
with $\mathbf q = \mathbf r$.
The principle of least action states that motion $\gamma$ beetween two points of the generalized configurations space, $(\mathbf r _1,t_1)$ and $(\mathbf r _2,t_2)$, is the one that makes the action $S(\gamma)=\int _{t_1}^{t_2} L(\gamma (t),\dot\gamma(t)) \text d t$ stationary, meaning that the linear part (the so called differential) of the variation $$\delta S(\gamma,h)=S(\gamma+h)-S(\gamma)$$
is zero in $\gamma $.
This two things are linked by the fact that (for a sufficiently nice $L$) this condition is equivalent to the Lagrange's equation above mentioned.
An interesting feature of this principle is that it doesn't depend on the system of coordinates chosen, which gives a lot of freedom in choosing the more appropriate set of coordinates for the problems.
To give an application, suppose that $\mathbf r=(x,y)$ are the cartesian coordinates of a point in the plane and let $\pi= (r,\theta):\mathbb R ^2 \to \mathbb R ^2$ be the polar coordinates. Suppose that $$\mathbf r(t)=(x(t),y(t))$$
is a solution of the equations of motion. Then we can show easily that $$\mathbf q(t)=\pi (\mathbf r(t)),$$ which is the projection onto the polar plane of this solution, solves the equations of motion $$\dfrac{\text d }{\text d t} \dfrac{\partial \tilde L}{\partial \dot {\mathbf q}}=\dfrac{ \partial \tilde L}{\partial \mathbf q},$$
that is, Lagrange's equation are still valid in the new system of coordinates, with a new Lagrangian given by $$\tilde L(\mathbf q ,\dot {\mathbf q})=L(\mathbf r,\dot {\mathbf r}).$$ In fact by definition of $\tilde L$, we have $$\int _{t_1} ^{t_2} \tilde L(\mathbf q (t),\dot { \mathbf q}(t)) \text d t=\int _{t_1} ^{t_2} L(\mathbf r (t),\dot { \mathbf r}(t) )\text d t.$$
Since $\mathbf r$ satisfies Lagrange's equations, it minimizes the action associated to $L$. So $\mathbf q$ minimizes the action associated to $\tilde L.$ So $\mathbf q$ satisfies Lagrange's equations with the new Lagrangian.
NOOOOOOOOOO!!!!
– possible Jan 05 '14 at 15:48