Source: https://math.unice.fr/~rubentha/enseignement/poly-integration-probas.pdf