How Demand Affects Optimal Prices and Product Differentiation