Figure 1  Weights and ramp:

This
is a very simple example of the use of the Lagrangian formulation of
Newtonian mechanics to solve a problem. We have two weights,
m_{1} and
m_{2}, attached together with a string of length
l (
figure 1).
One is on a ramp; the other is hanging from the string. The
string goes over a pully. Both weights are initially stationary.
We'll start by neglecting friction, then do it again with
friction
later in the page.
With
x units of string between the pulley and weight
m_{1}, it drops
units below the level of the pulley. So, the (gravitational) potential energy of weight
m_{1} is
(1)
When weight
m_{1} slides
x units down the ramp, weight
m_{2} must
rise x units. So, the (gravitational) potential energy of weight
m_{2} is
(2)
The kinetic energy of the system is, of course,
(3)
So, following equation (
lagrange.4), the Lagrangian for the system is:
(
4)
The partial derivatives we need are:
(
5)
As soon as we start to write the equation of motion, we realize this substitution helps a lot:
(
5b)
And with substitions (
5b), the equation of motion, following (
lagrange.3), is:
(
6)
We can see immediately from (6) that there are three cases. In case (7a), weight
m_{1} slides down the ramp, and weight
m_{2} rises.
(
7a)
In case (7b), the weights balance, and nothing happens.
(
7b)
And in case (7c), weight
m_{1} slides up the ramp, and weight
m_{2} falls.
(
7c)
We can integrate (
6) twice to obtain a closedform solution. Assuming the weights are stationary to start with, and
m_{1} starts at
x_{0}:
(8) 
Once Again, with Friction
We'll assume there's friction at work when
m_{1} slides along the ramp, and we'll use the friction model given in (
lagrange.9). In this case there's just one dimension, so it's very simple:
(9)
We will assume
f_{1} is positive for case (
7a), and negative for case (
7c). (In case (
7b)
nothing moves and friction doesn't matter!) The "cos θ" term is
due to the fact that the force of gravity is straight down, which is at
angle θ to a line perpendicular to the ramp's surface. Note that
the
dimensions of
f_{2} are time/distance, while
f_{1} is dimensionless.
Plugging equations (
5) and friction force (9) into the equation of motion (
lagrange.8), we obtain
(10)
or, slightly rearranged, and again substituting (
5b):
(
11)
We
can see a couple of things immediately by looking at (11). First,
if the "constant friction" is too large, the weights won't move at all;
the initial acceleration will be zero. In order for them to move,
we must have:
(12)
As
the velocity increases, the viscous friction term becomes larger, and
eventually the acceleration again goes to zero; the terminal velocity,
when acceleration is zero, must be:
(
13)
Finally, we can solve for the velocity and position. Let's rearrange (11) a bit:
(
14)
That looks like an exponential. The coefficient of
is positive; the right hand side may be either positive or negative depending on which way the system slides (case (
7a) or case (
7c)). Let's substitute
a and
b for the constants, to reduce clutter, with
a>0:
(15)
A solution to the homogeneous equation (with b=0) is:
(16)
and with a little fiddling we obtain the particular solution (for b≠0):
(17)
Adjusting this to match the initial conditions at t=0 (which were x=x
_{0},
=0), we obtain:
(18)
Taking a firm grip on our pencil and looking back at (
14), we substitute the definitions for
a and
b back into (18), differentiate, and divide out some common factors to obtain the equations for the position and velocity:
(19a)
(19b) 
At time t=0, (19b) is certainly zero, and as t>
, we see that (19b) approaches the terminal velocity we found in (
13),
which encourages us to think that these rather ugly equations might
actually be correct. As is often the case, introducing a general
friction function made the problem a lot messier. Keep in mind
that, in this case, the sign we assumed for
f_{1} depends on the ratio of the masses and the angle of the ramp.
Page
created on 12/1/06. Minor corrections, 12/2/06