Source: https://www.math.univ-paris13.fr/~tournier/fichiers/macs2/2012/partiel_corr.pdf