In the example above at instances $A$ and $C$ the potential energy is given by
$$U = mgh$$
However, Potential Energy is defined in my book as:
Potential energy is the capacity of a system to do work
Which is a bit of a circular definition if you ask me, since the definition of work depends on energy as far as I can tell.
Regardless, it's also mentioned in my book that the force of tension in the string is not contributing to the potential energy since it's always perpendicular to the direction of motion.
My question is, why is the potential energy at instances $A$ and $C$ given by
$$U = mgh$$
Shouldn't it be $U = mg\sin\theta\cdot l\theta$ or something, where $l\theta$ is the arc length?
Because only the vector component $mg\sin\theta$ is doing actual work. So going by the definition of potential energy given in my book, shouldn't that component be the only force that's considered?
Why is the whole $mg$ doing work? The $mg\cos\theta$ is also always perpendicular to the direction of motion (also cancels out with force of tension).
Something to do with conservative vs non-conservative forces I'm guessing?