Source: https://www.maths-france.fr/MathSup/Exercices/15-primitives-corrige.pdf