Source: http://laure.gonnord.org/pro/teaching/pascal/minmax/corrige.pdf