Source: https://warwick.ac.uk/fac/sci/maths/people/staff/mark_pollicott/p3/minimization_notes-12october.pdf