Market Demand and Cost Curves