Source: https://www.math.univ-toulouse.fr/~weiss/Docs/Exercices/Optimisation4A/Examen_CC2_Optim_Correction_1415.pdf