Hello All

I wondering if any one can write the equation that proof the stability and instability of ball on concave and convex surface as shown in the figure below

this figure is always used to show the stability and instability . In the first case the ball is in neutral condition , and in the second case the ball is in

stable condition as if it moved from the equilibrium position it will back again to the first position (equilibrium position) or at least oscillate around it if there is no friction.

and in the third case the ball is unstable because any small perturbation will make the ball move a way from it's equilibrium position.

can any body proof that or have any reference about that, I think that one first has to write the differential equation that describe this (i think that the equation that describe that ball may be like that describe the pendulum ) and after that using any test for instability by adding small perturbation on the initial condition or using Lyapunov method.

thanks in advance