Managerial Economics: How to Determine LongRun Equilibrium
Profit maximization depends on producing a given quantity of output at the lowest possible cost, and the longrun equilibrium in perfect competition requires zero economic profit. Therefore, firms ultimately produce the output level associated with minimum longrun average total cost.
Marginal cost must pass through the minimum point of average total cost. Therefore, in the longrun equilibrium, price equals three costs: minimum longrun average total cost, LRATC; the minimum point on one shortrun averagetotalcost curve, SRATC; and marginal cost, MC.
The illustration shows the longrun equilibrium in perfect competition. The left diagram illustrates the equilibrium price, P_{E}, being determined by the intersection of demand and supply in the market. The perfectly competitive firm is a price taker, so this price is the firm’s marginal revenue curve, P = MR = d, in the right diagram.
This price also corresponds to minimum longrun average total cost to ensure zero economic profit in the long run. Thus, new firms have no incentive to enter the market, and existing firms have no incentive to leave the market. Price or marginal revenue equals marginal cost at q_{0}, ensuring that profit is maximized.
Assume the shortrun averagetotalcost function associated with minimum longrun average total cost is
The longrun equilibrium requires that both average total cost is minimized and price equals average total cost (zero economic profit is earned). In order to find the longrun quantity of output produced by your firm and the good’s price, you take the following steps:

Take the derivative of average total cost.
Remember that 12,500/q is rewritten as 12,500q^{1} so its derivative equals –12,500q^{2} or 12,500/q^{2}.

Set the derivative equal to zero and solve for q.
or average total cost is minimized at 500 units of output.

Determine the longrun price.
Remember that zero economic profit means price equals average total cost, so substituting 500 for q in the averagetotalcost equation equals price.
The longrun equilibrium price equals $60.00. So the firm earns zero economic profit by producing 500 units of output at a price of $60 in the long run.
Firms have no difficulty moving into or out of a perfectly competitive market. If economic profit is greater than zero, your business is earning something greater than a normal return. This profit attracts other firms to enter the market. This situation is illustrated below.
At the initial price P_{A}, your firm maximizes profits at q_{A} based on marginal revenue equals marginal cost. At q_{A}, your firm earns positive profit because price is greater than average total cost. This profit provides incentive for new firms to enter the market, increasing the market supply from S_{A} to S_{LR}.
The entry of new firms results in a lower equilibrium price for the good, P_{LR}. As price decreases, your profitmaximizing quantity moves to q_{LR} and your economic profit moves toward zero because price now equals average total cost. When economic profit reaches zero, no one has any incentive for entry or exit.
Similarly, if initial economic losses exist, firms leave the market, moving the perfectly competitive market to its longrun equilibrium. The loss of firms decreases supply from S_{B} to S_{LR}, resulting in upward pressure on price, from P_{B} to P_{LR}. With the increase in price, your firm’s profitmaximizing quantity increases from q_{B} to q_{LR}, and zero economic profit is reached because the price P_{LR} now equals average total cost.
So no matter where you start, in perfect competition your economic profit ultimately becomes zero. And at this point, Yogi Berra might say it’s over.