Utility maximization and cost curves