# How to solve Bertrand Equilibrium with a non-constant MC?

I know that Bertrand Oligopolies will charge a price equal to marginal cost. But if marginal cost is, say,

2Q or 4Q^2

(i.e. not constant) then how does one determine where, on the MC curve, the equilibrium lies?

If there are 5 Bertrand firms, then do I just find where MC intersects the Demand Curve and divide the quantity by 5, and then set price equal to MC at that quantity?

Conceptually this sounds reasonable, but I'm not sure that this is correct. If these firms charge this price then it seems to me that one of them will under produce to charge a lower price until (if MC is 2Q for instance) price and quantity = 0. So that no firms will produce because if they do then someone will charge a cent less till we reach 0 again.

In this case, your candidate for the equilibrium is when all firms set the price $p^*$, where all firms produce $$q^* = \frac{D(p^*)}{5}$$ and where $$p^* = MC(q^*).$$ Is this really an equilibrium, or could a firm profit by deviating to a slightly lower price $p'$?
If say firm 1 were to deviate to $p' < p^*$ while the other firms still charge $p^*$ then all consumers would seek out firm 1. Since $p' < p^*$ and demand is non-increasing in price $$D(p') > D(p^*).$$ Firm 1 has to fulfill this alone, so $$q_1 = D(p') > D(p^*) = 5 \cdot q^*.$$ Because marginal cost is non-decreasing you also have $$MC(q_1) > MC(q^*).$$ So now firm one charges a price lower than $p^* = MC(q^*)$ but it has to produce so much that the marginal cost is larger than $p^*$, hence it earns negative profits, hence deviation from $p^*$ was not profitable.