math | assignment – 2019 – Steven Tschantz

2019 – Steven Tschantz

math | assignment – 该题目是一个常规的math的练习题目代写, 是比较有代表性的math等代写方向, 该题目是值得借鉴的assignment代写的题目

math代写 代写math 数学代做

math 3660 – Spring 2019

Mathematical Models in Economics

Steven Tschantz

1/15/

Profit maximizing firms

assignment 2

Instructions

Save a copy of this notebook, complete the exercises, save and submit on Brightspace your final
version by start of class Tues. Jan. 22.

Enter your name here

Edit the line above that reads Enter your name here, inserting instead your name. You may also want
to save to a file name that includes your name. By adding your name into the file and file name, you
reduce the chance I will mix-up your submission with someone elses.

Exercises

Clear all of the symbols we will be using.
In[1]:=Clear [ p1, p2, q1, q2, a11, a12, a21, a22, b1, b2, mc1, mc2, profit1, profit2 ] ;
As above, suppose the demands for products are 1 and 2 are linear functions given by
In[2]:=q1 [ p1 _ , p2 _] : = a11 * p1 + a12 * p2 + b1;
q2 [ p1 _ , p2 _] : = a21 * p1 + a22 * p2 + b2;

1. At times x, y, and z, we observe the prices and demand for products 1 and 2,

obtaining the following (hypothetical) data. Determine the coefficients a11,

a12, a21, a22, b1, and b2 of the linear demand functions that match this data.

(Set up a system of equations, given as a list, and solve for the coefficients.)

In[4]:=p1x = 50.; p2x = 40.; q1x = 100.; q2x = 120.; p1y = 55.; p2y = 40.; q1y = 80.; q2y = 130.; p1z = 50.; p2z = 45.; q1z = 105.; q2z = 100.; TableForm [{{ p1x, p2x, q1x, q2x } , { p1y, p2y, q1y, q2y } , { p1z, p2z, q1z, q2z }} , TableHeadings {{ "time x", "time y", "time z" } , { "price 1", "price 2", "demand 1", "demand 2" }}] Out[7]//TableForm= price 1 price 2 demand 1 demand 2 time x 50. 40. 100. 120. time y 55. 40. 80. 130. time z 50. 45. 105. 100.

In[8]:=conditions ={ q1 [ p1x, p2x ] == q1x, q2 [ p1x, p2x ] == q2x,
q1 [ p1y, p2y ] == q1y, q2 [ p1y, p2y ] == q2y, q1 [ p1z, p2z ] == q1z, q2 [ p1z, p2z ] == q2z }
Out[8]={50. a11+ 40. a12+ b1 == 100., 50. a21+ 40. a22+ b2 == 120., 55. a11+ 40. a12+ b1 == 80.,
  1. a21+ 40. a22+ b2 == 130., 50. a11+ 45. a12+ b1 == 105., 50. a21+ 45. a22+ b2 == 100.}
In[9]:=soln = Solve [ conditions, { a11, a12, a21, a22, b1, b2 }]
Out[9]={{a11 -4., a12  1., a21  2., a22 -4., b1  260., b2  180.}}
In[10]:= { a11, a12, a21, a22, b1, b2 }={ a11, a12, a21, a22, b1, b2 }/. soln [[ 1 ]]
Out[10]={-4., 1., 2.,-4., 260., 180.}

2. Determine the own elasticities and cross elasticities for these products at

time x. (The Mathematica function D[formula,variable] gives the partial

derivative of the formula with respect to the variable.)

In[11]:=elast11x = D [ q1 [ p1, p2 ] , p1 ]* p1  q1 [ p1, p2 ]/. { p1  p1x, p2  p2x }
Out[11]=-2.
In[12]:=elast12x = D [ q1 [ p1, p2 ] , p2 ]* p2  q1 [ p1, p2 ]/. { p1  p1x, p2  p2x }
Out[12]=0.
In[13]:=elast21x = D [ q2 [ p1, p2 ] , p1 ]* p1  q2 [ p1, p2 ]/. { p1  p1x, p2  p2x }
Out[13]=0.
In[14]:=elast22x = D [ q2 [ p1, p2 ] , p2 ]* p2  q2 [ p1, p2 ]/. { p1  p1x, p2  p2x }
Out[14]=-1.

3. Suppose constant marginal costs for the products are as given below and

take fixed costs to be 0. Define functions profit1 and profit2 for the profits on

products 1 and 2 (profit1[p1_,p2_]:=… and profit2[p1_,p2_]:=…).

In[15]:=mc1 = 25; mc2 = 15;
In[16]:=profit1 [ p1 _ , p2 _]=  p1 - mc1 * q1 [ p1, p2 ]

Out[16]=- 25 + p1260.- 4. p1+ 1. p2

In[17]:=profit2 [ p1 _ , p2 _]=  p2 - mc2 * q2 [ p1, p2 ]

Out[17]=180.+ 2. p1- 4. p2-^15 + p2

4. If firm 1 sets it price at 50. what is the optimal price for firm 2? If firm 2 sets its

price to this amount what is the optimal price for firm 1? And then if firm 1

takes this price what would firm 2 do, and then what would firm 1 respond?

In[18]:=p1a = 50.

Out[18]=50.

In[19]:=p2b = p2 /. Solve [ D [ profit2 [ p1a, p2 ] , p2 ] == 0., p2 ][[ 1 ]]

Out[19]=42.

In[20]:=p1c = p1 /. Solve [ D [ profit1 [ p1, p2b ] , p1 ] == 0., p1 ][[ 1 ]]

Out[20]=50.

In[21]:=p2d = p2 /. Solve [ D [ profit2 [ p1c, p2 ] , p2 ] == 0., p2 ][[ 1 ]]

Out[21]=42.

In[22]:=p1e = p1 /. Solve [ D [ profit1 [ p1, p2d ] , p1 ] == 0., p1 ][[ 1 ]]

Out[22]=50.

And we are clearly converging quickly to an equilibrium.

5. Find the Nash equilibrium prices, i.e., the prices p1e and p2e such that

profit1[p1,p2e] is a maximum at p1=p1e and profit2[p1e,p2] is a maximum at

p2=p2e, so that firm 1 is doing the best it can given what firm 2 is doing, and

firm 2 is doing the best it can given what firm 1 is doing.

In[23]:=nashsoln = Solve [{ D [ profit1 [ p1, p2 ] , p1 ] == 0, D [ profit2 [ p1, p2 ] , p2 ] == 0 } , { p1, p2 }]

Out[23]={{p1 50.3226, p2 42.5806}}

In[24]:= { p1e, p2e }={ p1, p2 }/. nashsoln [[ 1 ]]

Out[24]={50.3226, 42.5806}

6. If the firms merge, they will only be concerned about the total profit on the

two products. Find the prices the merged firm will charge to maximize total

profit, i.e., the prices p1m and p2m such that profit1[p1,p2]+profit2[p1,p2] is a

maximum at p1=p1m and p2=p2m.

In[25]:=profit [ p1 _ , p2 _]= profit1 [ p1, p2 ]+ profit2 [ p1, p2 ]

Out[25]=180.+ 2. p1- 4. p2- 15 + p2+- 25 + p1260.- 4. p1+ 1. p2

In[26]:=mergersoln = Solve [{ D [ profit [ p1, p2 ] , p1 ] == 0, D [ profit [ p1, p2 ] , p2 ] == 0 } , { p1, p2 }]

Out[26]={{p1 59.7273, p2 49.2727}}

In[27]:= { p1m, p2m }={ p1, p2 }/. mergersoln [[ 1 ]]

Out[27]={59.7273, 49.2727}

In[28]:=  p1m - p1e  p1e

Out[28]=0.

In[29]:=  p2m - p2e  p2e

Out[29]=0.

Prices would increase 19% and 16% if there is a merger.