Now includes a function to do Cobb-Douglas with energy.