A uniform rod of mass M and length l is held in position shown in the figure. Than find the potential energy of the rod