Optimal pricing and profit maximization