A uniform rod of mass M and length L is held vertically upright on a horizontal surface as shown in figure. Assuming zero potential energy at the base of the rod