Source: https://arnaud.jobin.pro/Polys/Cours/CH12/exos_Variables_a_densite.pdf