Source: https://www.ataraxy.info/COEUR/Modules/DAEUB/Exercices/TD2-Fonctions-I.pdf