Skip to content
Tutorials Center
My learning

Topics

Lesson 14 of 37 ยท Nash Equilibrium

Cournot Duopoly: Nash Equilibrium with Continuous Choices

Solve the Cournot quantity-competition game with best-response functions, sympy and iteration; compare the equilibrium with monopoly and collusion, and extend to n firms.

So far every game had a few actions you could list in a table. Many real decisions are continuous: how many units to produce, what price to charge, how much effort to put in. The Nash equilibrium idea works unchanged, you just replace "check each cell" with "solve for the point where every best-response function agrees." The classic example, and the oldest equilibrium analysis in economics, is the Cournot duopoly, introduced by Antoine Augustin Cournot in 1838.

Two firms sell the same product. Each decides, simultaneously, how many units to produce. The market price falls as the total quantity rises. Each firm wants to maximize its own profit. You will find the equilibrium three ways: with calculus, with sympy and with a simulation of best-response adjustment. You will also compare it with a monopoly and with collusion, which is a nice example of the dilemmas in Pareto Efficiency and Social Dilemmas.

The model

  • Two firms choose quantities q1 and q2, both at least 0.
  • The market price is P = a - (q1 + q2) as long as it is positive (a linear demand curve). We use a = 100.
  • Each firm has the same constant cost c per unit. We use c = 10.
  • Firm i earns profit u_i = (P - c) * q_i = (a - q1 - q2 - c) * q_i.

This is a normal-form game with players {1, 2}, strategy sets [0, infinity) and these payoff functions. Because profit is a smooth concave function of q_i, the best response is found by setting the derivative to zero.

For firm 1: d u_1 / d q1 = a - c - 2 q1 - q2 = 0, so

q1 = (a - c - q2) / 2 (the best-response function, clipped at 0).

By symmetry q2 = (a - c - q1) / 2. A Nash equilibrium is a point where both equations hold. Substituting one into the other gives the Cournot-Nash quantity

q* = (a - c) / 3.

With a = 100 and c = 10, q* = 30, total quantity 60, price 40 and profit (40 - 10) * 30 = 900 for each firm.

flowchart LR
    Q2["Rival's quantity q2"] --> BR1["Best response of firm 1<br/>q1 = (a - c - q2) / 2"]
    Q1["Rival's quantity q1"] --> BR2["Best response of firm 2<br/>q2 = (a - c - q1) / 2"]
    BR1 --> E["Equilibrium: both hold<br/>q1 = q2 = (a - c) / 3"]
    BR2 --> E

A Nash equilibrium is where the two best-response curves cross.

Solving with sympy

Sympy can do the calculus for us. We write profits symbolically, differentiate, solve the first-order conditions simultaneously and check the second-order condition (concavity).

Python Cournot equilibrium with sympy

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second derivative is -2, negative, so the stationary point is a maximum and the best response is valid.

Watching best responses converge

Imagine that firms do not solve equations but adjust in turns. Firm 1 sets its best response to firm 2's last quantity; then firm 2 responds to that, and so on. If the process converges, it converges to a Nash equilibrium, because at the limit nobody wants to change. This is best-response dynamics.

Python Best-response dynamics

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The quantities approach 30 from opposite sides and settle there. Convergence is not guaranteed in every game, but here each best-response curve has slope -1/2, so the process shrinks the distance to the equilibrium at every step.

Monopoly and collusion

Suppose instead that the two firms could agree to act as one, and share the monopoly output. A monopolist maximizes (a - Q - c) Q, giving Q = (a - c) / 2 = 45 and price 55. Profit is (55 - 10) * 45 = 2025, shared equally, 1012.5 each, which is more than the Cournot profit of 900. But the agreement is not stable. If firm 2 produces 22.5, firm 1's best response is (90 - 22.5) / 2 = 33.75, not 22.5, and it earns more by cheating. Collusion is a prisoner's dilemma in disguise.

Python Collusion versus competition

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

For consumers, collusion is bad: it means lower quantity and a higher price. That is why competition law forbids such agreements. For the firms it is a dilemma: collusion earns 1012.5 each, cheating earns 1139.1 for the cheater, mutual competition earns 900. In a repeated game firms can sustain collusion with threats to punish cheating, which you will see in repeated games.

More firms

With n identical firms the equilibrium quantity per firm is (a - c) / (n + 1), total quantity n (a - c) / (n + 1), and price (a + n c) / (n + 1). As n grows, the price tends to the cost c, which is the outcome of perfect competition. Cournot's model thus links monopoly (n = 1) and perfect competition (n very large) in one formula.

Python From monopoly to perfect competition

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The profit per firm collapses quickly: the 1000th firm earns almost nothing. The table also shows why even two firms can be enough to cut prices substantially compared with a monopoly.

Note: This is the quantity game. If firms choose prices instead (Bertrand competition) and products are identical, the equilibrium is price equal to cost already with two firms. Small changes in what players choose change the answer dramatically, so always model the strategic variable carefully.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In the Cournot model with P = a - Q and cost c, what is each firm's best-response quantity to the rival's q2?

    Setting the derivative of (a - q1 - q2 - c) q1 to zero gives q1 = (a - c - q2) / 2.
  2. 2. With a = 100 and c = 10, what is the Cournot-Nash quantity per firm in a duopoly?

    The equilibrium quantity is (a - c) / 3 = 90 / 3 = 30.
  3. 3. Why is a collusive agreement to produce the monopoly quantity unstable?

    At the collusive quantity the best response is higher, so each firm gains by deviating; collusion is a prisoner's dilemma.
  4. 4. What happens to the Cournot price as the number of firms n grows very large?

    Price = (a + n c) / (n + 1), which tends to c as n goes to infinity.

Summary

  • With continuous strategies, equilibrium is where the best-response functions cross.
  • In the linear Cournot duopoly the best response is (a - c - q_other) / 2 and the equilibrium quantity is (a - c) / 3 per firm.
  • Best-response dynamics can converge to the equilibrium; here they do because the slopes are -1/2.
  • Collusion beats competition for firms but is not an equilibrium, so it is a prisoner's dilemma.
  • With n firms, price falls from the monopoly price toward cost as n increases.

Next: Mixed Strategies