I don't think you can say a=g in your first example, since the acceleration of the rod is not specified. The rod lies in the xy-plane (like on a table), and has a force acting upon it making it slide, and this force causing it to accelerate is not specified. So therefore your Lagrangian in...