Decomposition of superpositions of density functions and discrete