Source: http://jl.maths-lfb.fr/1ES/derivation/ex398_couts_benef_cout_moyen.pdf