A ball of mass $m$ is moving inside a vertical hollow hoop with radius $L$ and with angular velocity $\omega$.
I was asked to find a term for the total potential energy of the ball.
Intuitively, I thought of the term $u=mgL(1-cos\theta )$ since when $\theta=0$ I expect it to be $0$ and when $\theta=180$ to be $2mgL$.
Can someone help me understand if and why this term works? how can I get to it with looking on the energy in the system?