The behaviour of optimal Lyapunov functions