The first chapter in Goldstein's Classical Mechanics ends with 3 examples about how to apply Lagrange's eqs. to simple problems. The second example is about the Atwood's machine. The book says that the tension of the rope can be ignored, but I don't understand why. The two masses can move vertically and the constraining forces (one on each mass) have the same vertical direction so shouldn't they do virtual work?