I'm confused by this. In particular, I don't understand when this actually works. For example, for a pendulum, the potential energy function is U(t) = mgL(1-cos(t)), where t is theta. In this case the effective spring constant is mgL, so w = sqrt(gL). Obviously this doesn't agree with the accepted formula (which is also for small angles only). So what's going on here?