Cubic Cost Functions
and Major Market Structures

Oliver Nikutowski, Viktor Leis and Robert K. von Weizsäcker

Chair of Economics
Technische Universität München


Virtually every microeconomic textbook presents a stepwise and detailed discussion of households’ and firms’ objective functions before both sides are brought together within the framework of different market structures. Undoubtedly, this is the high road to standard microeconomic theory. But along this road the useful combination of total, marginal and welfare analysis and the dual relationship between production, cost and profit functions are not always applied. Moreover, at the end of the road a comparative summary and a visualization of the implications of major market structures are missing.

This is where this Web site wants to add: Taking representative cubic cost and linear demand functions as given it combines total, marginal and welfare analysis for the cases of perfect competition, monopoly and monopsony within a single Java Applet. It illustrates the price dependence of consumer, producer and total rents – which are not covered in standard microeconomic textbooks. It also allows for the analysis of exogenous price shifts from the perspective of a price taking firm and calculates the equilibrium values.

Instructors may use the applet accompanying different course chapters. Applying check-boxes for every single curve, aspects of temporarily minor relevance can be suppressed or highlighted individually. Therefore, it invites for step by step presentations and may enable to habituate students more efficiently to the graphical analysis of profits and rents. On the other hand students may use it to test themselves regarding qualitative comparative statics or concrete calculations.

online applet
download standalone version
download paper (PDF)


When explaining the microeconomic interaction of supply and demand one has to decide on some pedagogical trade-offs. To name just two: How much formalism is necessary for accuracy or even useful for clarity - and what is its price with respect to intuition and attention? How much redundancy is necessary for consolidating definitions and concepts and what is its price with respect to forgone topics or in-depth analysis? It may be not too speculative to guess that a combination of these trade-offs lead many microeconomic textbook authors to decide against a unified exposition of price dependent rent functions.

This paper presents a Java Applet in favor of a different evaluation of these trade-offs. The applet is a graphical exposition in the above mentioned sense based on the example of a representative cubic cost and a linear demand function. We decided in favor of the cubic cost function because it is the canonical textbook example for U-shaped marginal cost curves and also contains the less complicated linear example as a special case. Furthermore, students are already familiar with polynomial functions by school.

After a stage setting introduction to the underlying framework, the applet will be discussed. The next section adds some cautionary remarks and describes the tool’s value added before the final section concludes.

A Single Good Market Framework

A summary of marginal, total and welfare analysis for different market regimes naturally has to rest on some simplifying building blocks. Even a cursory discussion of their underlying assumptions would go far beyond the scope of this paper but is extensively dealt with in standard microeconomic textbooks. Instead, we solely introduce the applet’s core elements and relegate them to the corresponding literature where this seems adequate. In the following we number these elements (functions, solutions and parameters) relating to the total (T), marginal (M) or welfare (W) diagrams. The reader not interested in a formal sketch of the standard microeconomic supply and demand calculus for the cases of perfect competition, monopoly and monopsony may skip this section.

The applet adopts the usual partial framework of a single good market. On the supply side a representative producer is assumed to be characterized by a cubic cost function for exogenously given factor prices depending on the quantity q  as well as on the short vs. long run - operationalized by the time horizon h ∈ {SR, LR  } :

        ||   3     2
        { aq  + bq +  cq + d  (q ≥ 0 ∧ h = SR ) ∨ (q > 0 ∧ h = LR )
C (q) = |
        |( 0                   q = 0 ∧ h = LR

This cost function implies a marginal cost function

M  C(q) = 3aq2 + 2bq + c(q > 0)

and a average variable cost function

AV  C (q) = aq2 + bq + c(q > 0).

More restrictively, we assume the average total cost function to be given by

AT  C(q) = aq2 + bq + c + d(q > 0).

The parameters a, b,c,d  in (T1) are restricted to guarantee non-negative marginal and fixed costs. 1

On the demand side we assume a representative consumer 2 with a marginal willingness to pay, pD  , linearly decreasing in the quantity q

pD (q) = e - fq

where e  is a positive and f  is a non-negative real value. Alternatively one may think of pD  as the marginal product of a factor demanded by a representative firm confronted with a constant price for the single final good sold. This interpretation may be of special relevance for the monopsony case.

We consider three major market structures:

To operationalize these we introduce the variables SB, DB   ∈ {P T,P M } representing price taking or price making supply and demand behavior. As these cases are explicitly dealt with in standard undergraduate textbooks we forgo some of the applet’s underlying calculations, and instead concentrate on the repetition of major cases and principles as well as on describing the decisions made for some borderline cases.

The total analysis describes the perspective of the supply side and neglects the potentially restricting demand side. The representative firm maximizes its profits, that is, revenue minus costs

π(q) = T R(q) - C (q).

While costs depend on the time horizon h  , revenue

         ||{  D
           p  (q) ⋅ q, SB =  PM
T R(q) = |
         |( p* ⋅ q,    SB  =  PT

depends crucially on the market structure. It becomes a linear function for price taking and an inverted U-shaped function for price making behavior. Correspondingly, the marginal revenue

          || ( D )′         D
          {  p    (q) ⋅ q + p (q), SB  =  PM
M  R(q) = |
          |( p*,                   SB  =  PT

equals the equilibrium price p* for price taking behavior. In the case of price making behavior marginal revenue also equals price iff f = 0  . For f >  0  instead, the marginal revenue falls short of the equilibrium price due to (   )
 pD  ′ < 0  .

The necessary condition for an (interior) profit maximizing production level becomes

π′(q) =!0 ⇔  M C (q) = M R (q).

Taking also into account that a non-negative profit or a non-negative producer surplus

PS (q) := π (q) + d

is a sufficient condition in the long or the short run, respectively, implies a critical quantity qcϵℝ ∪ {∞  } :

 c              AV  C (q ),  h =  SR
q  = inf argiqnf|
              |( AT  C(q),  h =  LR

(a) 0 < qc < ∞ (b) qc = ∞ (c) qc = 0

Figure 1: The three qualitatively different cases for qc  .

and the corresponding critical price

pc = M C (qc).

With the help of this rather complicated formalisations one gains a rather simple expression for the supply graph

     |{ { (q,M  C (q))|q ≥ qc} ∪ {(0,p)|p <  pc},       SB  = P T
Γ S =
     ||(       D                       D        c
       { (q,p  (q))|M  C (q ) = M R (q),p  (q) ≥ p },  SB  = P M

as the geometric locus of all finite points (q, p)  where profits/rents are maximized. Thus, in the price making case the supply is modeled as being non-existent, containing a single point of the demand curve only, or being globally identical with the marginal cost curve. The latter occurs in the degenerate cases where average (total) costs and willingness to pay are equal for all quantities (see Figure 1, cases (b) and (c)).

On the demand side, rents are measured using the Marshallian Consumer Surplus

         ∫ q
CS (q) =    pD (q)dq - E (q)

where, analogously to (T3), the expenditure function is given as

        ||                                c
        { M C (q) ⋅ q, DB  = P M  ∧ q ≥ q
E (q) = |                                 .
        |( p* ⋅ q,     DB   = P T

Furthermore, rent maximizing behavior on the demand side yields the necessary condition for interior solutions

CS ′(q) =!0 ⇔  M E (q) = pD (q)

which uses the marginal expenditure function

          ||{     ′                                    c
            M C  (q ) ⋅ q + M C (q), DB = P M  ∧ q ≥ q
M E (q) = |                                            .
          |( p*,                    DB  = P T

Although, almost analogously defined to (M6) the corresponding demand graph

      ||                  f
      ||| {(q,w (q))|q ∈ [0;e]},                             DB  = P T
      {                         D
Γ D = | {(q,M  C (q))|M E (q) = p (q)∨
      |||                                                   DB  = P M
      |(              (q=qc,M  C (q ) ≤ pD (q) < M E (q))},

includes the only true corner solution, where the willingness to pay falls short of the marginal expenditure for all quantities. We omit the solutions for the case pD (qc) < M C (qc)  . In these constellations the monopsonist is forced to choose a quantity where the marginal willingness to pay for the last unit falls short of the price to fulfill the no-shutdown condition. Because of its minor pedagogical value this solution is left out.

(a) interior solution(b) corner solution (c) not included
M E(q*) = pD(q*)  q* = qc  pD (qc) < M C (qc)

Figure 2: Monopsony solutions for different values of e  .

For given parameters a,b,c,d,e,f,h,SB,  DB  the intersection

ϕ := Γ D ∩ Γ S

describes a subset of equilibria with 0,1, or infinite elements. The infinite case occurs for Γ S = Γ D  , that is, globally overlapping horizontal demand and supply graphs. All other cases included in ϕ  are usual textbook solutions. Further solutions where either the supply or demand graph is perfectly (in)elastic are ommited because they do not fit well into our rent and profit focused framework of cubic cost and linear demand functions.

The applet combines the common marginal and total diagrams with a third diagram which depicts price makers’ rents as functions of an exogenously given price. This diagram assumes that at least one market side is imperfectly elastic and that the shorter market side determines the quantity produced and traded. This yields

˜q(p) = min {q|(q, ˆp) ∈ Γ S ∪ Γ D, ˆp = p}

and allows for the following formulation of price dependent rents

           ∫ ˜q
CS  *(p) =    pD (˜q)d ˜q - p˜q

               ∫ ˜q
PS *(p) = p˜q -    M  C(˜q)dq˜

TS *(p) = CS (p) + PS (p).

The Applet

With the above explanations and definitions only few comments on the applet remain to be added: At the top of the window all parameters of the model can be configured using the sliders, text fields, and radio buttons or the drop-down box which contains convenient example configurations. Furthermore, the applet consists of three diagrams and a panel describing the equilibrium (q*,p*)  if ϕ  consists of exactly one element, that is, if a unique solution exists. The diagrams contain the curves discussed in the previous section and are labeled accordingly except for the curves π,Γ ,Γ
   S   D  which, for technical reasons, are labeled as P i,S,D  respectively.

The upper left total diagram shows the relevant functions from the perspective of the producer. The diagram below depicts the usual marginal analysis containing also rents and the deadweight loss as areas between price, marginal willingness to pay and marginal costs. If the rent contribution of some marginal unit becomes negative the corresponding areas are colored gray. This is, for example, the case for the deadweight loss in the natural monopoly, or for U-shaped marginal costs and certain prices. The welfare diagram in the lower right corner shows the price dependent rents in the sense defined above (W1,W2,W3). This diagram illustrates the influence of market structures on welfare as they lead to different rent distributions. Two further modes allow to choose prices exogenously:

In these two modes, some of the applet’s elements are not applicable and are therefore disabled. This includes the total diagram in the price/rent analysis mode, the welfare diagram in the supply decision mode, as well as some curves which are not well defined or of no interest.

To simplify the use of the applet and encourage experimentation with different parameter configurations, the maximum ordinate and abscissa values of all diagrams are automatically adjusted, so that the relevant functions are visible. Additionally, it is possible to turn off the automatic zoom, which is useful to perform comparative statics. With the automatic zoom the effects of changing a parameter may be hard to localize because many curves in the diagrams (just) seem to change.


Cautionary remarks and pedagogical suggestions

The presented applet is mainly conceptualized as a summary tool for the comparison of different major market structures regarding their price, quantity and welfare implications. Perhaps more important than explaining what the applet is about, may be telling what it is not about. By taking as given representative agents on both sides of the market as well as a cubic cost function of rather specific time-dependence, the applet assumes away any problems of aggregation as well as most complications related to short and long run cost considerations. Especially due to the latter the applet seems not very well suited for an unguided use by freshmen. Instead it should be embedded in a discussion of the aggregation problem and the relationship between long and short run cost curves (e.g. along the line of the - in this sense complementary - paper (Mixon and Tohemy 2002)) before students may use it on their own.

It may also be useful to offer alternative interpretations of cost curves that do not change with a shift from the short to the long run, except for q = 0  . Besides taking this shift as an implicit modification of the underlying technology - which would not allow for a before-after comparison of both states - it could also be interpreted as reflecting a technology with variable and quasi-fixed but without fixed factors. Using the applet in the class room demands some comment on the cubic cost function as being a reduced form of a more general one depending on both, the quantity produced and the factor price vector (the latter assumed being constant in the applet).

Value added

Some of the critical aspects discussed above could have been easily circumvented by restricting the applet to the short or the long run exclusively. Problems of the interrelation of short and long run cost curves would have disappeared and the link between the cost and its underlying production function would have been less focused. We did not do so because besides its summarizing character we wanted the applet to be as universal and flexible as possible: Students should be able to use the applet for short and long run equilibrium calculations as well as for testing their intuition on how parameter changes influence different curves or points of intersection. For instructors it should work as a flexible diagram to be used in different chapters of a microeconomic course. Therefore we introduced checkboxes for every single curve which allow to focus or to suppress single aspects at all times. This enables instructors to present and discuss the applet’s elements step by step.

Although the applet’s exposition is conventional in most respects, its composition of major market structures within a unifying diagram of marginal, total and rent analysis may add something new. Especially the diagram of price-dependent rent functions is not adopted in standard microeconomic textbooks although it vividly illustrates the basically symmetric conflict over prices between supply and demand in a certain range. The reason for why this picture is not widespread may be its symmetry itself: Switching from monopoly to monopsony is redundant in a technical sense because it essentially repeats how market power is used to maximize one’s own rent by taking into account the objective function vis-á-vis. The usual textbooks explicitly circumvent the confrontation of monopoly and monopsony by either ignoring the latter altogether or by choosing different and distant markets to illustrate both structures. While monopoly is usually discussed in final good markets and therein compared with the case of perfect competition the illustration of monopsony usually takes place in factor markets and without any rent discussion. Although this procedure has its merits - especially in terms of avoided redundancy - the approach chosen in the applet may be advantageous as a summarizing tool.

Concluding Comment

The paper presents a tool for marginal, total and rent analysis of the three major market structures perfect competition, monopoly and monopsony in the case of cubic cost and linear demand functions. Its exposition of price dependent rents perhaps most naturally summarizes these cases within a single picture. The applet also deals with the supply decision of price taking firms. Due to its flexibly adaptable elements it might be used concomitantly to introductory or intermediate microeconomic courses as well as for summarizing purposes or as a tool for students to test their intuition and to calculate concrete exercises.


1Sufficiently one could have restricted   a,b,c,d    such that either   a = 0 ∧b,c,d ≥ 0     or  a,d,c > 0  , b < 0∧ 3ac > b2  is fulfilled. The former constellation assures monotonically increasing costs while the latter restricts the cubic case to a U-shaped MC-Curve with its angular point in quadrant I (this directly follows by applying the method of completing the square see e.g. (Chiang 1984)). Nevertheless, the applet is less restrictive and also allows for cases where the angular point of a U-shaped marginal cost curve lies in QII or QIII but with the additional restriction of a positiv point of intersection with the ordinate - again assuring positive fixed and marginal costs in QI.

2For a brief analysis of the preconditions for a positive or normative representative agent to exist see (Mas-Colell et al. 1995, 116-123). Because we are interested in the usual textbook discussion of rents, rather than in the discussion of their distribution, we could have equivalently assumed pD  to reflect the aggregated marginal willingness to pay.



Chiang, A. (1984). Fundamental Methods of Mathematical Economics. McGraw Hill, 3rd edition.
Mas-Colell, A., Whinston, M., and Green, J. (1995). Microeconomic Theory. Oxford University Press.
Mixon, J. W. and Tohemy, S. M. (2002). Cost curves and how they relate. Journal of Economic Education, 33(1).