Suppose the double Atwood machine is composed of three masses, connected by two chords of length and respectively through two ideal pulleys. The system has two degrees of freedom, since the height of can be found from the height of and the second pulley. The most convenient set of generalized coordinates to describe the motion are : the distance from to the the top pulley, and : the distance from to the second pulley. Given these coordinates, the distance from to the top pulley is , and the distance from to the top pulley is .
The kinetic energy of the system is then:
,
where the dot denotes a time derivative. By setting the potential energy to zero at the height of the top pulley, the total potential energy of the system is:
.
The Lagrangian is then or:
.
The equations of motion then follow from evaluating the Euler-Lagrange equations:
,
.
Differentiating and simplifying these equations give the following equations of motion for the double Atwood machine:
,
.
Rearranging terms gives the accelerations of each block as:
,
,
.
where we used that and solved for , the position of the third mass.