Source: https://www.ljll.math.upmc.fr/~bonnivard/documents/Cours-Optimisation.pdf