Source: https://www.capes-de-maths.com/3eme/Devoirs1617/3cont4.pdf