# Tariffs and Quotas in Price-takers and
 Price-searcher markets

This workbook explores the impacts that a tariff rate (we use per-unit,
but ad valorem could be used) and an equilivalent import quota have in
a market where supply is from many price-taking firms versus a market
in which a single seller's product faces the domestic demand curve. 
The workbook is limited to the case in which the world price is less 
the domestic price in the absence of trade.

We assume that the product is well-defined and that its quality is
not affected by either the tariff or the quota. Thus the model ignores
the possibility that a quota defined in terms of a maximu number of 
units will lead to higher-quality items being imported. If you are
curious about this potential effect, see Aw and Roberts at
http://www2.econ.iastate.edu/classes/econ655/lapan/Readings/MeasuringQualityChangeinQuotaConstrainedMarketsAW&ROBERTS.pdf
and the references in that article.

## Price-takers

The demand curve and the supply curve appear in the next cell. Also,
the equilibrium autarkic price is determined. We do not shift either
of these curves in this exercise, so we keep the specification simple.
The names xA and pA refer to the autarkic quantity and price.

kill(all)$ fpprintprec:5$ ratprint:false$
[pd : 500 - x/4, ps : 100 + x/6];
xA : find_root(pd=ps,x,0,2000);
pA : subst(x=xA, pd); check:subst(x=xA,ps);

Determine Consumer Surplus, Producer Surplus, and Total
Surplus absent trade.

/*Input. Execute (ctrl-enter) for results */
csA : integrate(pd-pA,x,0,xA); 
/*or*/ (500-pA)*xA/2;
psA: integrate(pA - ps,x,0,xA);
/* or */ (pA - 100)*xA/2;
tsA : csA + psA;

Suppose that the world price of this good is $150. Determine
the quantity imported and the values of the surpluses.

/*Input. Execute (ctrl-enter) for results */
xdFT : find_root(pd = 150,x,0,2000);
xsFT : find_root(ps = 150,x,0,2000);
xiFT : xdFT - xsFT;
csFT : integrate(pd - 150,x,0,xdFT);
psFT : integrate(150 - ps,x, 0, xsFT);
tsFT : csFT + psFT;

Impose a tariff of $40 per unit imported. Determine the quantity
imported and the effects on the surpluses. 

/*Input. Execute (ctrl-enter) for results */
xdTariff : find_root(pd = 190,x,0,2000);
xsTariff : find_root(ps = 190,x,0,2000);
xiTariff : xdTariff - xsTariff;
csTariff : integrate(pd - 190,x,0,xdTariff);
psTariff : integrate(190 - ps,x, 0, xsTariff);
tsTariff : csTariff + psTariff;

Replace the tariff with a quota that equals the number of units 
imported with the tariff in place. Confirm that the domestic 
price and, therefore, the quantity consumed remain the same.

Who gains by replacing the tariff with a quota? 

/*Input. Execute (ctrl-enter) for results */
solve(ps=p,x);
xsQ : rhs(%[1] + 700); 
xdQ : rhs(solve(pd=p,x)[1]);
find_root(xsQ-xdQ,p,0,500);

## Domestic monopoly

Suppose that the marginal cost curve coincides with the 
supply curve. That is, suppose that the price-taking firms
can be replaced by a single seller without any effect on 
cost. For simplicity, also assume that fixed cost is zero.
The latter assumption does not affect any comparisons, but
does make profit computation a bit easier.

mc : 100 + x/6;

Suppose that the country is autarkic. That is, suppose that
no foreign trade occurs in this sector: no imports, no exports.

Determine the profit-maximizing quantity and price. Determine
the profit level.

/*Input. Execute (ctrl-enter) for results */
mr : 500 - x/2; 
xMA: find_root(mr = mc, x, 0, 1200);
pMA: subst(x=xMA, pd);
csMA: integrate(pd-pMA,x,0,xMA);
psMA: integrate(pMA - mc, x, 0, xMA);

[xMA,pMA];

Graph the relevant relationships above.

/*Input. Execute (ctrl-enter) for results */
wxdraw2d(xlabel="x",ylabel="$ per unit",
 points_joined=true,points([[0,pMA],[xMA,pMA],[xMA,0]]),
 line_width=2,
 key = "demand", explicit(pd,x,0,2000), color=red, 
 key = "marginal revenue", explicit(mr,x,0,1000),
color = black, key = "marginal cost",explicit(mc,x,0,1500)
)$

Digression: Confirm that at x = xMA, mr = mc = 200. Then confirm
that a price between 200 and pA (260) causes the domestic seller
to increase output. Why?

/*Input. Execute (ctrl-enter) for results */
subst(x=xMA,mr);

Discussion:
When the world price falls in this range, then the firm is a price taker
for quantities up to the intersection of the price line and the domestic
demand curve. See the graph below.

/*Input. Execute (ctrl-enter) for results */
x_break : if x < 2000 - 4*pw then pw else mr;
subst(pw=200,x_break);
wxdraw2d(line_width=2,xlabel="x",ylabel="$ per unit",
 xaxis=true,
 key = "d", explicit(pd,x,0,2000), color=red, 
 key = "mr", explicit(mr,x,0,1500),
color = black, key = "mc",explicit(mc,x,0,1500),
 key="kinked mr",
 color= gray, explicit(subst(pw = 200,x_break),x,0,1500)
)$

Refer to the graph above to explain why, for 260 <= p <= 350,
imports will equal zero and quantity will be determined by
the demand curve. That is, the domestic monopolist's output
decreases as the world price increases and its profit increases.

Next, start with a world price of $190,
impose a tariff of $10 per unit and determine the quantity
demanded, quantity supplied domestically, and quantity imported.
Also, determine the domestic seller's profit level

/*Input. Execute (ctrl-enter) for results */
xM0: find_root(mc = 190, x,0,1500);
xd0: find_root(pd=190, x, 0, 1500);
xI0: xd0 - xM0;
P0: integrate(190 - mc,x,0,xM0);

Now, impose a tariff of $40 per unit and determine the quantity
demanded, quantity supplied domestically, and quantity imported.

/*Input. Execute (ctrl-enter) for results */
xM1: find_root(mc = 230, x,0,1500);
xd1: find_root(pd=230, x, 0, 1500);
xI1: xd1 - xM1;

Determine the domestic seller's profit level.

/*Input. Execute (ctrl-enter) for results */
integrate(230-mc,x,0,xM1);

/*Input. Execute (ctrl-enter) for results */
wxdraw2d(line_width=2,xlabel="x",ylabel="$ per unit",
 key = "demand", explicit(pd,x,0,2000), color=red, 
 key = "marginal revenue", explicit(mr,x,0,1000),
color = black, key = "marginal cost",explicit(mc,x,0,1500),
 color=orange,key="world price",explicit(190,x,0,1500),
 color=green,key="price w/tariff",explicit(230,x,0,1500)
)$

Finally, remove the tariff but set a quota of 300 units and 
determine the results.

/*Input. Execute (ctrl-enter) for results */

/*Determine the demand for the domestically-produced good.*/
xdQ : 2000 - 4*p - 300;

/*Determine the implied inverse demand.*/
solve(xdQ=x,p); pdQ : expand(rhs(%[1]));

/*Determine the implied marginal revenue */
mrQ : expand(diff(pdQ*x,x));

/*Determine the profit-maximizing domestic quantity */
xMQ: find_root(mrQ=mc,x,0,2000);

/*Confirm that the the implied price does not equal the
   price when a tariff is used to limit input. */
pMQ: subst(x=xMQ,pdQ);

xMQ; pMQ;

The monopolist gains by restricting total quantity from 1080
to 300 + 240.63 = 540.63. Also, it gains because the government
does not collect any revenue.* Determine its profit level under
this regime.

*This assumes that the domestic seller can buy the 300 units 
from overseas and sell them abroad. If a third party has this
right, then 300*(pMQ - 190) accrues to that third party.

/*Input. Execute (ctrl-enter) for results */
float(integrate(pMQ - mc,x, 0,xMQ));
/*If a third party gains the premium for imports,
the monopolist's profit is lower */
 % - (pMQ-190)*300;

Graph the autarkic equilibrium for this monopolist and
its counterpart when 300 units are imported from abroad.

/*Input. Execute (ctrl-enter) for results */
wxdraw2d(xlabel="x",ylabel="$ per unit",
 points_joined=true,points([[0,pMA],[xMA,pMA],[xMA,0]]),
 points([[0,pMQ],[xMQ,pMQ],[xMQ,0]]), 
 line_width=2,
 key = "demand", explicit(pd,x,0,2000), color=gray,
 key="demand w/quota", explicit(pdQ,x,0,425*4),
color=red, 
 key = "marginal revenue", explicit(mr,x,0,1000),
color=orange, key = "marginal revenue w/quota",
 explicit(mrQ,x,0,425*2),
color = black, key = "marginal cost",explicit(mc,x,0,1500),
dimensions=[480,480])$