Source: https://courses.ex-machina.ma/downloads/FCG/MGT/MGT1/S1/Mathematiques_appliquees_a_la_gestion/montrer_qu-une_fonction_admet_un_extremum.pdf