Source: https://happymaths.pagesperso-orange.fr/fic5g/5_G4_exercices2.pdf