# Sign of potential in double Atwood machine

I'm feeling very confused about which sign to the potential should I choose. A specific exercise I've had trouble with is in this link. in this exercise a double Atwood machine is given. when I tried calculating the potential, I drew gravity pointing downwards, and the axis system I chose was y pointing downwards and x pointing right. I chose the reference plane to be the canter of the top pulley (marked in green in the picture). so when I calculated the total potential energy V, for all the masses, I got the same expression as in the article, but in an opposite sign. What did I miss?

Thank you very much for your help.

edit: that's how I tried to solve this:

• Can you show your work? Feb 5, 2020 at 12:24
• @FissionChips I've added my solution (at least what Iv'e tried to do). thank you! Feb 5, 2020 at 13:12

The direction of $$g$$ has to be such that the potential energy is decreasing as energy has to be conserved. (Kinetic energy depends only on the magnitude of $$v$$ which keeps increasing under free fall). This is violated in your co-ordinate frame unless $$g\to-g$$. If you do so, then your Lagrangians will match.