Many principles of economics texts do not correctly draw the graph showing zero economic profit for a monopolistically competitive firm. The average total cost curve and the marginal cost curve are not consistent with each other. That is, they are not derived from the same total cost curve (as shown by numerical inspection of these curves). Also, the marginal revenue line is often not twice as steep as the demand line.
Using a total cost curve of the form TC = fixed cost + aQ3 – bQ2 + cQ and a linear demand line, I find the general form equation for calculating the slope and intercept of both demand and marginal revenue for a chosen quantity. That quantity is such that P = ATC, MR = MC, the slope of marginal revenue is twice as steep as the demand line and both the ATC and MC lines are derived from the same total cost curve. These equations are used to generate the correct graph in a spreadsheet program.