Confusion with potential in simple pendulum I'm a maths student taking a course in classical mechanics and I'm having some confusion with the definition of a potential.
If we consider a simple pendulum then the forces acting on the end are $mg$ and $T$. Now I know that the potential is defined such that $F = -\nabla V$. Now I also know that the total energy of this system is $$\frac{1}{2}m \dot{\vec{x}}^2 + mgz.$$ Now if we take the gradient of the potential we have $(0,0,mg)$. My question is, why doesn't the potential involve the tension in the pendulum?
 A: From the perspective of Lagrangian mechanics, the tension $T$ is a constraint force that does no virtual work. Can you see why? Hence it can the be ignored in the Lagrangian formulation, cf. D'Alembert's principle. See also e.g. this Phys.SE post. The only remaining force in the Lagrangian formulation is gravity, which we encode via its corresponding potential $V=mgz$. 
A: So you've seen that $\frac{1}{2} m \dot{\vec{x}}^2+ mgz$ doesn't describe everything. Now, you'll learn about how to go from a formula almost like this to equations of motion later, but let's ignore that for a bit. Let's say there's a potential $U(\vec{x})$ which is zero on the circle, and off the circle is equal to a constant $k$ times the shortest distance to the circle, squared.
This is like a rigid pendulum. Imagine $k$ getting larger and larger. Due to conservation of energy, the point in question is constrained to only move within a certain distance of the desired curve. As $k$ gets larger and larger, this distance of constraint shrinks. As $k\to \infty$, the distance shrinks to $0$.
Now in this idealization when the particle is on the path, $U(x)$ is - in this limiting sense - zero on the circle and infinite everywhere else. There are mathematical proofs that this works (or discussions of it) in Arnold, Mathematical Methods of Classical Mechanics. 
The physical intuition behind this is that you can have a lot of force without any energy. If you compress water as hard as you can, when released you won't notice anything. If you compress air as hard as you can, when released there can be a big explosion.
