When firms make a profit in a perfectly competitive market, new firms enter the market and drive the price down. My textbook says that the existing firms will then adjust inputs that are fixed in the short term, such as capital, in order to operate with a lower average cost:
This is in order to maximize profit, but I don't understand why the short-run average cost curve would change at all. In my opinion, the minimum point of the long-run average cost curve, where there are constant returns to scale, is the profit-maximizing point in the long run. In order to substantiate this claim, I came up with a short-run total cost function
$$TC=0.001Q^3-0.09Q^2+2.95Q+20$$
and derived the average total cost
$$ATC=0.001Q^2-0.09Q+2.95+20/Q$$
and marginal cost
$$MC=0.003Q^2-0.18Q+2.95$$
Assume that the price is variable. Then profit
$$\Pi=Q(MC-ATC)=0.002Q^3-0.09Q^2-20$$
can be thought of as a function that relies only on marginal cost and average cost, because at the profit-maximizing point, $MC=MR=P$. But as $Q\to \infty$, $\Pi \to \infty$ because $\Pi$ is a cubic equation with a positive coefficient on the $Q^3$ term. This means that the higher the price is above the minimum point of the short-run average total cost curve, the higher profit will be. Thus, profit is maximized when the lowest possible short-run average total cost curve is selected, in any perfectly competitive market condition, at least for cubic total cost curves (and I assume that the cubic function is the most applicable for a total cost curve). The lowest ATC curve is obviously the one where there are constant returns to scale.
You can see the difference between marginal cost and average total cost getting larger and larger here: