load(draw)$ 
set_draw_defaults(draw_realpart=false)$
 fpprintprec:5$ ratprint:false$kill(all)$

# Price-Searcher Markets

Three types of markets consist for firms whose output affects the firm's
(or firms') product price. We refer to these as price-searcher markets, 
for the firm must search for the profit-maximizing price.

The simplest type of such a market is the monopoly, in which the market
is served by a single firm, and in which no entry occurs. A second type
is monopolistic competition, in which each of many firms sells a 
slightly distinctive product, but in which entry can occur as long as 
profits are to be earned. 

In both of these cases, the firm ignores the effect of is output on the 
other firms' behavior. In the first case, no other firms exist. In the 
second case, no firm is large enough to significantly affect the price. 

This chapter treats these two cases. The next chapter addresses oligopoly, 
in which a few firms constitute the industry. In this case we must model 
the effect that each firm has on the decisions of other firms. 

## Monopoly

## Upward-sloping Marginal Revenue

## Monopolistic Competition

### A Constant-Cost Industry

### Equilibrium

### Efficiency

### An Increasing-Cost Industry

This section continues to consider an industry composed of identical firms, 
but the number of firms affects the cost of firms. Specifically, we multiply the 
marginal cost curve by the term n^e where n is the number of firms and e
is the elasticity of response of the marginal cost with respect to n.

kill(all)$assume(c+1>0)$    mc(x,c,e,n):=(x^c)*n^e$
VC: integrate(mc(x,c,e,n), x)$
tc(x,c,e,n) := ''(ratsimp(subst(x=1,n^e - VC)) + VC)$
ac(x,c,e,n):=''(ratsimp(tc(x,c,e,n)/x))$   matrix(
  ["MC","Variable Cost","Total Cost","Average Cost"], 
  [mc(x,c,e,n), VC, ratsimp(tc(x,c,e,n)), ac(x,c,e,n)]);

The zero profit condition still holds. The expression must be amended
slightly to include parameter e.

zeroP(n,pavg,A,a,c,e):=''(pavg-ac(x,c,e,n));

TeX:
The next cell derives the inverse demand (price) expression and the
marginal revenue expression from the demand curve that faces the
individual firm. We use the same specification as in the case of 
constant-cost industries.

/*This is copied from the earlier section and pasted
  here because the kill( ) command deletes this information. */
x(p, n, A, a, b,pavg) := A*pavg^a*(1/n - b*(p-pavg))$
solve(x(p, n, A, a, b,pavg) - x, p)$
p(x,n,A,a,b,pavg):=''(rhs(%[1]))$ mr(x,n,A,a,b,pavg):=
''(ratsimp(diff(p(x,n,A,a,b,pavg)*x,x)))$
transpose(matrix(["Demand","Price","Marginal Revenue"],
  [x(p,n,A,a,b,pavg),p(x,n,A,a,b,pavg),
   mr(x,n,A,a,b,pavg)]));

The next figure shows a demand curve and the associated marginal revenue 
curve for a set of parameter values, along with the average and marginal
cost curves. This illustration does not represent equilibrium, because
the 10 firms in the industry earn profits. This is like its counterpart in the 
preceding section, except that the per-unit cost curves are higher.
The point (1,1) appears for reference only.

[n0,A0,a0,b0,pavg0,c0,e0]:[10,15,-0.25,0.5,1.2,0.5,0.05]$
wxdraw2d(yrange=[0,2],xlabel="x",ylabel="$ per unit",
 line_type=dots,points_joined=true,
 points([[0,1],[1,1],[1,0]]),line_type = solid,line_width=2,
 key="Average Cost and Marginal Cost",explicit(
 mc(x,c0,e0,n0),x,0,2),key = "",explicit(ac(x,c0,e0,n0),x,0,2),
 color=red,key = "Demand and Marginal Revenue",
 explicit(p(x,n0,A0,a0,b0,pavg0),x,0,2),key="",
explicit(mr(x,n0,A0,a0,b0,pavg0),x,0,2) )$

As before, each firm must produce the quantity at which its marginal
revenue equals its marginal cost. The expression xeq states that 
condition as an implicit equation of x and pavg. 

solve(mr(x,n,A,a,b,pavg)= mc(x,c,e,n), x)$
xeq(x, n, pavg, A, a, b, c,e) := ''(x - rhs(%[1]));

The third condition for equilibrium is identical to its counterpart in 
the preceding section.

Xeq(x, n, pavg, A, a,b,c,e) := ''(n*x - A*pavg^a);

Equilibrium. Again, mnewton( ) determines equilibrium values values.

load(mnewton)$     mnewton([Xeq(x,n,pavg,A0, a0,b0,c0,e0),
  xeq(x,n,pavg,A0,a0,b0,c0,e0),zeroP(n,pavg,A0,a0,c0,e0)], 
  [x, n, pavg], [1, 15, 1] )$
[x1,n1,pavg1]:[rhs(%[1][1]),rhs(%[1][2]),rhs(%[1][3])]$
p1:p(x1,n1,A0,a0,b0,pavg1)$     
matrix(
  ["x1","n1","pavg","p1","mr1","mc1","ac1"],
  [x1,n1,pavg1,p1,mr(x1,n1,A0,a0,b0,pavg1), 
   mc(x1,c0,e0,n1), ac(x1,c0,e0,n1)]);

Efficiency. The cell below shows the deadweight loss due to 
underproduction (p > mc) in each firm and the consumer surplus 
generated by each firm's production.

xeff1:find_root(p(x,n1,A0,a0,b0,pavg1)-mc(x,c0,e0,n1),
  x,0.0001,2)$    dwl1:float(integrate(
  p(x,n1,A0,a0,b0,pavg1)-mc(x,c0,e0,n1),x,x1,xeff1 ))$
cs1:float(integrate(p(x,n1,A0,a0,b0,pavg1)-p1,x,0,x1))$
matrix(["Efficient x","cs","dwl"],[xeff1,cs1,dwl1]);

Industry dwl and cs values are determined as before.

[n1*dwl1,n1*cs1];

Inefficiency due to overcapacity is similar to that in the constant-cost
illustration.  Assign each of n1 firms an output of 1 unit. Total cost 
equals n1 times 1.1537 (the cost per unit when each firm produces x = 1).
Thus cost is about 1% higher than it would be if all economies of scale
were exploited.

TC1:n1*ac(x1,c0,e0,n1)$   minTC1:n1*tc(1,c0,e0,n1)$ 
excesscost1:TC1-minTC1$  matrix(["Cost","Minimum Cost",
"Excess Cost"],[TC1, minTC1, excesscost1]);

Effects of Market Size. In an increasing-cost industry, increased market size 
can drive up the price. Given the parameters used here, the price increases slightly 
when A0 is replaced by 2*A0. 

mnewton([Xeq(x,n,pavg,2*A0,a0,b0,c0,e0),
 xeq(x,n,pavg,2*A0,a0,b0,c0,e0),zeroP(n,pavg,2*A0,a0,c0,e0)], 
 [x,n,pavg],[1,30,1])$   [x2,n2,pavg2]:
  [rhs(%[1][1]),rhs(%[1][2]),rhs(%[1][3])]$p2:p(x2,n2,2*A0,
   a0,b0,pavg2)$      matrix(
 ["x1","x2","p1","p2","n1","n2"],[x1,x2,p1,p2,n1,n2]);

### Firm-Specific Cost