Source: https://promath.fr/boutoille/3e/exercices/exos_2016/05_notion_de_fonction.pdf