Potential energy of an oscillating pendulum The following question always confuses me. for an oscillating pendulum why the potential energy is given by:
$$V = mgL(1-\cos\theta)$$
Why not $$V = mgL\cos\theta$$
Is this a convention or there something logical behind it.
I appreciate any help
 A: The gravitational potential energy lost appears as the potential energy of the pendulum (which periodically changes to kinetic energy and back), in accordance with conservation of energy.

As shown in the figure, the change in potential energy = $ mgh = mgL - mgLcos \theta = mgL(1- cos \theta)$
Whereas, $mgLcos \theta$ is the final gravitational potential energy with respect to ground, not change in potential energy.
I hope I clarified the confusion, but if you have any other doubt, feel free to ask in the comments
A: I have a simple explanation for this.Let's take the lowest point of the path of the pendulum at zero potential energy.Consider the position when bob is at angle $\theta$ from equilibrium position.Now the potential energy of Bob at this point has increased from zero to $mgL(1-cos\theta)$

A: The ground is chosen as refrence for zero PE,then if the angle made by string from vertical is $\theta$ and length of string is $L$ then obviously the height of Bob from ground is $L(1-cos\theta)$. I cannot understand how you are reaching to $Lcos\theta $. Maybe the reference or sign convention is different
