Source: http://gchagny.perso.math.cnrs.fr/AgregTP2ScilabCorrection2017_2018.pdf