# Maximize profits by setting price

I am working on a model to set a price that maximizes profits. The equation for profits is:

Profits=price x (# sold) - (fixed cost) x (# sold)


I have models that predict (# sold) and (fixed cost) is a constant. So my first thought is to take the derivative of Profits with regards to price and set it equal to 0:

dProfits/dprice = 0


but since profits is linear and (# sold) and (fixed cost) are basically constants in this scenario, wouldn't that just be:

dProfits/dprice = (# sold)


My calculus is a little rusty, so any tips are very much appreciated. Or if there's something I'm missing about the profit equation, or if there's some algorithm I could use in this situation.

• If # sold were constant (and > 0), the optimal price would be infinity. But #sold is not constant, and presumably is a function of price (what is called the demand curve). Generally, demand (# sold) is a downward sloping function of price. However, the opposite can occur, to an extent, for a so-called Veblen good. – Mark L. Stone May 23 '18 at 15:03
• @MarkL.Stone Thank you for getting back to me so quickly. I have forecasts that will predict the (# sold) for a particular day. So on a particular day, if I know the forecasted (# sold) I was trying to figure out how to set the price to maximize the profits. So are you suggesting I need to get (# sold) as a function of price instead of just using the output from the forecast? – user3476463 May 23 '18 at 15:50
• What is your (current) forecast based on? Doesn't price affect forecast? Do you think you can sell the same number of ice cream cones for \$1 trillion each as for \$1 each? That is Economics 101. – Mark L. Stone May 23 '18 at 15:53
• @MarkL.Stone Ok so you're suggesting don't treat the forecasted value of (# sold) for that day as a constant. Instead substitute the forecast formula for (# sold) in the profit equation and take the derivative. Is that correct? – user3476463 May 23 '18 at 16:08
• Something like that. But derivative is only appropriate if the function is differentiable, and even then, not applicable if the optimum lies on a boundary (for instance, at quantity zero). – Mark L. Stone May 23 '18 at 16:12