Chari Boru Bariso's Econ Guidses

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Dowling02fit.

wxmx 1 / 36

Ch 2: Economic Applications of Graphs


and Equations
TABLE OF CONTENTS

1. About this worksheet: Dowling02.wxmx -------------------------- 1


2. Using at(...), define(...), kill(...) and rhs(...) ------------------------ 1
3. Isocost Lines ------------------------------------------------------------- 4
4. Supply and Demand Analysis --------------------------------------- 10
5. Income Determination Models -------------------------------------- 19
6. IS-LM Analysis ----------------------------------------------------------- 25
7. Multiple Plots, Changing Plot Sizes with wxplot_size,
grid option -------------------------------------------------------------------- 29
8. Proportional Axes Plots ----------------------------------------------- 32
9. Colors ---------------------------------------------------------------------- 34

1 About this worksheet: Dowling02.wxmx


We use Maxima to solve a few of the problems (and draw some of the plots) in Ch. 2 of the
supplemental text: Introduction to Mathematical Economics, 3rd ed, (Schaum's Outline
Series), by Edward T. Dowling (1992, 2001), McGraw-Hill. This modestly priced text is a
bargain with many worked out examples. You should compare the examples worked out
"by hand" in this text with what we do using Maxima. Section numbers [x.y] refer to sections
in Dowling's text.

We have slightly changed some of the symbols used in particular problems.

A reference I have consulted is Baldani, Bradfield, and Turner,


Mathematical Economics, 2nd ed, 2005.

Ted Woollett
https://web.csulb.edu/~woollett/
Feb., 2021

➔ load(draw)$ set_draw_defaults(line_width=2, draw_realpart=false)$


fpprintprec:5$ ratprint:false$ kill(all)$

➔ [fpprintprec, ratprint];
(%o1) [ 5 , false ]

2 Using at(...), define(...), kill(...) and rhs(...)


Dowling02fit.wxmx 2 / 36

example of using the Maxima at (...) function:

➔ [eq1 : a*x + y = 0, eq2 : b*y + x^2 = 1];


(%o2) [ y + a x = 0 , b y + x 2 = 1 ]

➔ solve ( [eq1, eq2], [a, b] );


y x2 − 1
(%o3) [ [ a = − ,b=− ]]
x y

➔ solns : %[1];
y x2 − 1
(solns) [ a = − ,b=− ]
x y

➔ at (b, %);
x2 − 1
(%o5) −
y

➔ b : at (b,solns);
x2 − 1
(b) −
y

➔ b;
x2 − 1
(%o7) −
y

Using at (b,solns) to define b(x,y) in the usual way doesn't work:

➔ b (x,y) := at (b,solns);
(%o8) b ( x , y ) := at ( b , solns )

➔ b(2,3);
x2 − 1
(%o9) −
y

➔ b (x,y) := ''at (b,solns);


(%o10) b ( x , y ) := at ( b , solns )

➔ b(2,3);
x2 − 1
(%o11) −
y
Dowling02fit.wxmx 3 / 36

wrapping at(...) with the ev function ends up working.

➔ b (x,y) := ev (at (b,solns) );


(%o12) b ( x , y ) := ev ( at ( b , solns ) )

➔ b(2,3);
(%o13) − 1

➔ b(x,y);
x2 − 1
(%o14) −
y

but you can't subsequently change the definition of 'solns' with this method.

If we have the symbol b assigned as the expression above, we can define b(x,y)
by using the double single quote ('') in front of b:

➔ b(x,y) := ''b;
x2 − 1
(%o15) b ( x , y ) := −
y

➔ b(2,3);
(%o16) − 1

If we don't have the bound symbol b as above, we can use the Maxima function:
define (func, expr) together with 'expr' being an 'at' expression.

➔ define (b(x,y), at (b,solns) );


x2 − 1
(%o17) b ( x , y ) := −
y

➔ b(2,3);
(%o18) − 1

We still have the symbol b bound to the original expression.

➔ b;
x2 − 1
(%o19) −
y
Dowling02fit.wxmx 4 / 36

➔ b(x, y);
x2 − 1
(%o20) −
y

➔ [a,b];
x2 − 1
(%o21) [ a , − ]
y

Using kill(all) removes the bindings and function definitions above.

➔ kill(all)$

➔ b(2,3);
(%o1) b ( 2 , 3 )

➔ [a,b,solns];
(%o2) [ a , b , solns ]

An example of using at(...) and rhs(...)

➔ Values : [ m = 1.2*10^3, v = 100*10^3/(60*60)];


Energy : W = 1/2*m*v^2;
250
(Values) [ m = 1200.0 , v = ]
9
m v2
(Energy) W =
2

➔ at (Energy, Values);
(%o5) W = 4.6296 10 5

➔ W_mech : rhs (%);


(W_mech) 4.6296 10 5

➔ kill(all)$

3 Isocost Lines [2.1]


Dowling02fit.wxmx 5 / 36

An isocost line represents the different combinations of two inputs or factors of production
that can be purchased with a given expenditure.

In a context of purchasing units of capital K and units of labor L, given an available


budget E (expenditure), the general formula is pk*K + pl * L = E, where K and
L are respectively units of capital and units of labor, pk and pl their respective per unit
prices, and E the amount allotted to expenditures (budget).

In isocost analysis, the individual prices and the expenditure are initially held constant;
only the different combinations of inputs (K, L) are allowed to change. The function can then
be graphed by expressing one variable in terms of the other, as seen in the following
example and Problems 2.5 and 2.6.

As an example, solve for K in terms of L holding the prices constant:

➔ eqn : pk*K + pl*L = E$


soln : solve (eqn, K);
L pl − E
(soln) [ K =− ]
pk

Now express this in the canonical straight line form y = m*x + b, with K on the y-axis, L on the
x-axis.

➔ soln, expand;
E L pl
(%o3) [ K = − ]
pk pk

When L = 0, K = E/pk (all the expenditure goes for capital which is the "y intercept" b.
The slope (rise over run) is m = - pl/pk. As L increases, the number of units of capital K
decreases in a straight line (an isocost line). If we choose two different expenditures E,
we get two parallel lines (same slope).
====================================================================

Prob. 2.5
A person has $120 to spend on two goods (X, Y) whose respective prices are $3 and $5.
(a) Draw a budget line showing all the different combinations of the two goods that can be
bought with the given budget (B). What happens to the original budget line (b) if the budget
falls by 25 percent, (c) if the price of X doubles, (d) if the price of Y falls to 4?

First find the reduced budget Br, assuming Br is a 25% reduction from 120.

➔ Bsoln : solve ( (120 - Br)/120 = 0.25, Br);


(Bsoln) [ Br = 90 ]
Dowling02fit.wxmx 6 / 36

➔ Br : at (Br, Bsoln);
(Br) 90

Consider the general case: start with the budget eqn, find y(x,px,py,B), and xmax, ymax
solutions for arbitrary x, px, py, B.

➔ eqn : px*x + py*y = B;


soln : solve (eqn, y);
(eqn) py y + px x = B
px x − B
(soln) [ y =− ]
py

➔ define (y (x, px, py, B), at (y, soln) );


px x − B
(%o8) y ( x , px , py , B ) := −
py

we are forcing Maxima to do some work here, even though we could define
this function easily without any help.

case a has px = 3, py = 5, B = 120. find y for x = 10:

➔ y(10,3, 5, 120);
(%o9) 18

For general values of the parameters, what is x when y = 0?


(all budget spent on units of x defines xmax).

Again, finding these values by hand is trivial, but we are forcing


Maxima to help us, since the experience may be useful in more complicated
cases. We start with the general case.

➔ soln;
px x − B
(%o10) [ y = − ]
py

➔ xmsoln : solve ( subst (0,y,soln), x);


B
(xmsoln) [ x = ]
px

➔ xmax : at(x, xmsoln);


B
(xmax)
px
Dowling02fit.wxmx 7 / 36

choose xmax0 and ymax0 to correspond with case a.

➔ xmax0 : xmax, B = 120, px = 3;


(xmax0) 40

when zero units of good x are purchased, the budget can be spent
on good y, which defines ymax.

➔ ymsoln : solve (subst (0, x, soln), y);


B
(ymsoln) [ y = ]
py

➔ ymax : at (y, ymsoln);


B
(ymax)
py

➔ ymax0 : ymax, B = 120, py = 5;


(ymax0) 24

=======================================

Case a budget line:

➔ wxdraw2d ( key = "Case a budget line", yrange = [0, 1.2*ymax0],


explicit (y(x, 3, 5, 120), x, 0, 1.2*xmax0), ylabel = "y", xlabel = "x",
title ="Case a: px = 3, py = 5, B = 120", grid = [2,2] );

(%t17)

(%o17)
Dowling02fit.wxmx 8 / 36

Obviously, the more units of X purchased, the less units of Y, given a fixed budget.

What happens to the original budget line (b) if the budget


falls by 25 percent, (c) if the price of X doubles, (d) if the price of Y falls to 4?
------------------------------------------------------------------------

Case b: budget falls by 25% with no changes in per unit prices.

➔ wxdraw2d ( title = "Original and Reduced Budget Lines", xlabel = "x", ylabel = "y",
yrange = [0, 1.1*ymax0], grid = [2,2],
key = "Case a: B = 120 ", explicit (y(x, 3, 5, 120), x, 0, 1.1* xmax0 ),
color = red, key = "Case b: B = 90 ", explicit (y(x, 3, 5, 90), x, 0, 1.1*xmax0 ) )$

(%t18)

With a reduced budget, less units of both x and y can be purchased, but the slope
(rise over run) of the budget line remains the same.
-----------------------------------------------------------------------------

Case c: price per unit of X doubles ($3 per unit of X to $6 per unit of X)
Dowling02fit.wxmx 9 / 36

➔ wxdraw2d ( title = "Original and Double X Price Budget Lines", xlabel = "x", ylabel = "y",
yrange = [0, 1.1*ymax0], grid = [2,2],
key = "Case a: px = 3", explicit (y(x, 3, 5, 120), x, 0, 1.1*xmax0 ),
color = red, key = "Case c: px = 6 ", explicit (y(x, 6, 5, 120), x, 0, 1.1*xmax0 ) )$

(%t19)

Less units of X can be purchased for a given number of units of Y purchased.


------------------------------------------------------------------------------------------

Case d: price of Y decreases (from $5 per unit of Y to $4 per unit of Y)

➔ wxdraw2d ( title = "Original and Decreased Y Price Budget Lines", xlabel = "x", ylabel = "y",
yrange = [0, 1.1*ymax0], grid = [2,2],
key = "Case a: py = 5 ", explicit (y(x, 3, 5, 120), x, 0, 1.1*xmax0 ),
color = red, key = "Case d: py = 4 ", explicit (y(x, 3, 4, 120), x, 0, 1.1*xmax0 ) )$

(%t20)
Dowling02fit.wxmx 10 / 36

More units of Y can be purchased for a given number of units of X.

End Problem 2.5

4 Supply and Demand Analysis [2.2]


Equilibrium in supply and demand analysis occurs when Qs = Qd. By equating the supply
and demand functions, the equilibrium price and quantity can be determined.
See Example 2 and Problems 2.1 to 2.4 and 2.11 to 2.16.

Qs is the quantity supplied as a function of the per unit price p.


Qd is the quantity demanded as a function of the per unit price p.

An example is

➔ [Qs : -5 + 3*p, Qd : 10 - 2*p, soln : solve (Qs = Qd, p)];


(%o21) [ 3 p − 5 , 10 − 2 p , [ p = 3 ] ]

Substituting p = 3 into Qs or Qd then gives the equilibrium quantity (4) with a per unit
price of 3.

➔ [Qs, Qd], soln;


(%o22) [ 4 , 4 ]

=========================================================
Prob 2.1.
A complete demand function is given by the equation

Qd = - 30 P + 0.05 Y + 2 Pr + 4T

where P is the price of the good, Y is income, Pr is the price of a related good (here a
substitute), and T is taste.

Can the function be graphed?

Since the complete function contains five different variables (Qd, P, Y, Pr, T), it cannot
be graphed as is. In ordinary demand analysis, however, it is assumed that all the
independent variables except price are held constant so that the effect of a change in
price on the quantity demanded can be measured independently of the
influence of other factors, or ceteris paribus ("all other things being equal" or "with
other conditions remaining the same"). If the variables (Y, Pr,T) are held constant, the
we can plot Qd vs. P.
-------------------------------------------------------------------------
Dowling02fit.wxmx 11 / 36

Prob 2.2 + 2.3

(a) Draw the graph for the demand function in Problem 2.1, assuming Y = 5000, Pr = 25,
and T = 30.
(b) What does the typical demand function drawn in part (a) show?
(c) What happens to the graph if the price of the good changes from 5 to 6?
(d) What happens if any of the other variables change? For example, if income
increases to 7400?
---------------------------

a) By adding the new data to the equation in Problem 2.1, the function is easily graphable.

we start with a function Qd for the general case.

➔ Qd (P, Y, Pr, T) := -30*P + 0.05*Y + 2*Pr + 4*T;


(%o23) Qd ( P , Y , Pr , T ) := ( − 30 ) P + 0.05 Y + 2 Pr + 4 T

Define an expression Qd_a to be the price dependent quantity demanded for the given
values of Y, Pr, and T.

➔ Qd_a : Qd (P, 5000, 25, 30);


(Qd_a) 420.0 − 30 P

➔ pmsoln : solve (Qd_a = 0, P);


(pmsoln) [ P = 14 ]

➔ pmax0 : at (P, pmsoln);


(pmax0) 14

➔ qmax0 : Qd_a, P = 0;
(qmax0) 420.0

If we choose to put Qd_a on the vertical axis and P on the horizontal axis,
Dowling02fit.wxmx 12 / 36

➔ wxdraw2d ( key = "demand function Qd ", yrange = [0, 1.2*qmax0],


explicit (Qd_a, P, 0, 1.2*pmax0), ylabel = "Q", xlabel = "P, $ per unit",
title = "Case a: Y = 5000, Pr = 25, T = 30", grid = [2,2],
color = black, label ( [ sconcat (" Qd = ", Qd_a), 12, 300 ] ) );

(%t28)

(%o28)

In Economics supply and demand analysis, it is customary to place price P on the vertical
axis and Qd on the horizontal axis, even though P is the independent variable and Qd is
the dependent variable. To construct such a plot, we then need Pd(Q), price as a function
of quantity Q, to make the plot in Maxima. Pd(Q) is the so-called "inverse demand function",
or "the marginal value curve".

➔ Qd_a;
(%o29) 420.0 − 30 P

➔ psoln : solve ( Q = Qd_a, P);


Q − 420
(psoln) [ P = − ]
30

➔ Pd_a : at (P, psoln);


Q − 420
(Pd_a) −
30
Dowling02fit.wxmx 13 / 36

➔ wxdraw2d ( key = "inverse demand function Pd " , yrange = [0, 1.2*pmax0],


explicit (Pd_a, Q, 0, 1.2*qmax0), ylabel = "P, $ per unit", xlabel = "Q ",
title = "Case a: Y = 5000, Pr = 25, T = 30", grid = [2,2],
color = black, label ( [ sconcat (" Pd = ", Pd_a), 300, 12 ] ),
label ( [ sconcat (" Qd = ", Qd_a), 350, 10 ] ) );

(%t32)

(%o32)

b) The demand function graphed in part (a) shows all the different quantities of the good
that will be demanded at different prices, assuming a given level of income, taste, and
price of substitutes (here 5000, 30, 25) which are not allowed to change.

c) If nothing changes but the price of the good, the graph remains exactly the same since
the graph indicates the different quantities that will be demanded at all the possible prices.
A simple change in the price of the good occasions a movement along the curve which is
called a "change in quantity demanded." When the price goes from 5 to 6, the quantity
demanded falls from 270 to 240 ), a movement from A to B on the curve.
A = (P = 5, Q = 270) → B = (P = 6, Q = 240).

➔ Qd_a;
(%o33) 420.0 − 30 P

➔ [ev (Qd_a, P = 5), ev (Qd_a, P = 6) ];


(%o34) [ 270.0 , 240.0 ]
Dowling02fit.wxmx 14 / 36

➔ wxdraw2d ( key = "inverse demand function Pd " , yrange = [0, 1.2*pmax0],


explicit (Pd_a, Q, 0, 1.2*qmax0), ylabel = "P, $ per unit", xlabel = "Q ",
title = "Case a: Y = 5000, Pr = 25, T = 30", grid = [2,2],
color = black, label ( [ sconcat (" Pd = ", Pd_a), 300, 12 ] ),
label ( [ sconcat (" Qd = ", Qd_a), 350, 10 ] ), key = "",
point_type = filled_circle, point_size = 2, points ([ [270,5], [240,6] ]),
label ( ["A", 270, 6], ["B", 240, 7] ) );

(%t35)

(%o35)

Side by side plots using wxplot_size takes some experimentation.


Dowling02fit.wxmx 15 / 36

➔ Qplot : gr2d ( key = "", yrange = [0, 1.2*qmax0], grid = [2,2],


explicit (Qd_a, P, 0, 1.2*pmax0), ylabel = "Q", xlabel = "P, $ per unit",
color = black, point_type = filled_circle, point_size = 2, points ([ [5,270], [6,240] ]),
label ( ["A", 5.2, 300], ["B", 6.2, 270] ) )$

Pplot : gr2d ( yrange = [0, 1.2*pmax0], key = "", grid = [2,2],


explicit (Pd_a, Q, 0, 1.2*qmax0), ylabel = "P, $ per unit", xlabel = "Q ",
color = black, point_type = filled_circle, point_size = 2, points ([ [270,5], [240,6] ]),
label ( ["A", 280, 6], ["B", 250, 7] ) )$

wxdraw ( Qplot, Pplot, columns = 2), wxplot_size = [880, 480];


(%t38)

(%o38)

----------------------------------------------------------------------------
d)

If any of the other variables change, there will be a shift in the curve. This is called a
"change in demand" because it results in a totally new demand function (and curve)
in response to the changed conditions. If income increases to 7400, the new demand
function becomes Qd = - 30P + 540. This is graphed as a (red) dashed line.

➔ Qd_shift : Qd (P, 7400, 25, 30);


(Qd_shift) 540.0 − 30 P

➔ psoln : solve (Q = Qd_shift, P);


Q − 540
(psoln) [ P = − ]
30
Dowling02fit.wxmx 16 / 36

➔ Pd_shift : at (P, psoln);


Q − 540
(Pd_shift) −
30

➔ Qplot : gr2d ( key = "", yrange = [0, 1.5*qmax0], grid = [2,2],


explicit (Qd_a, P, 0, 1.5*pmax0), ylabel = "Q", xlabel = "P, $ per unit",
color = black, point_type = filled_circle, point_size = 2, points ([ [5,270], [6,240] ]),
label ( ["A", 5.2, 300], ["B", 6.2, 270] ), color = red, line_type = dashes,
explicit (Qd_shift, P, 0, 1.5*pmax0) )$

Pplot : gr2d ( yrange = [0, 1.5*pmax0], key = "", grid = [2,2],


explicit (Pd_a, Q, 0, 1.5*qmax0), ylabel = "P, $ per unit", xlabel = "Q ",
color = black, point_type = filled_circle, point_size = 2, points ([ [270,5], [240,6] ]),
label ( ["A", 280, 6], ["B", 250, 7] ), color = red, line_type = dashes,
explicit (Pd_shift, Q, 0, 1.5*qmax0) )$

wxdraw ( Qplot, Pplot, columns = 2), wxplot_size = [880, 480];


(%t44)

(%o44)

--------------------------------------------------------------------------------------
Prob 2.4

(a) Graph the demand function Qd = - 4 P + 0.01Y - 5 Pr + 10 T when Y = 8000, Pr = 8,


and T = 4

Ans: For these values, the last two terms cancel, the second term = 80, so Qd = - 4 P + 80.
When P = 0, Qd = 80 = Qmax. When Qd = 0, P = 20 = Pmax
Dowling02fit.wxmx 17 / 36

➔ wxdraw2d ( key = "demand function Qd ", yrange = [0, 100],


explicit (- 4*P + 80, P, 0, 25), ylabel = "Qd", xlabel = "P, $ per unit",
title = " Y = 8000, Pr = 8, T = 4", grid = [2,2],
color = black, label ( [ " Qd = - 4*P + 80" , 12, 50 ] ) );

(%t45)

(%o45)

. (b) What type of good is the related good?

Ans:
The related good Pr has a negative coefficient. This means that a rise in the price of the
related good will lead to a decrease in demand for the original good. The related good
is, by definition, a "complementary good. "

(c) What happens if T (taste) increases to 8, indicating greater preference for the good,
independent of the price?

Ans: The straight line curve shifts to a higher quantity demanded, no matter the price:
the slope remains the same. Qd = - 4 P + 120, Qmax = 120, Pmax = 30.
Dowling02fit.wxmx 18 / 36

➔ wxdraw2d ( yrange = [0, 140], key = "T = 4",


explicit (- 4*P + 80, P, 0, 35), ylabel = "Qd", xlabel = "P, $ per unit",
title = " original and increased preference cases" , grid = [2,2],
color = red, key = "T = 8", line_type = dashes, explicit (- 4*P + 120,P, 0, 35) );

(%t46)

(%o46)

(d) Construct the graph along the traditional economic lines with P on the vertical axis
and Q on the horizontal axis.

Ans: In both the original and modified cases, solve for P(Q);

➔ [soln1, soln2] : [ solve ( Q = - 4*P1 + 80, P1), solve ( Q = - 4*P2 + 120, P2) ];
Q − 80 Q − 120
(%o47) [ [ P1 = − ] , [ P2 = − ]]
4 4

➔ [P1 : at (P1, soln1), P2 : at (P2, soln2)];


Q − 80 Q − 120
(%o48) [ − ,− ]
4 4
Dowling02fit.wxmx 19 / 36

➔ wxdraw2d ( yrange = [0, 40], key = "T = 4",


explicit (P1, Q, 0, 140), ylabel = "P, $ per unit", xlabel = "Q",
title = " original and increased preference cases" , grid = [2,2],
color = red, key = "T = 8", line_type = dashes, explicit (P2,Q, 0, 140) );

(%t49)

(%o49)

5 Income Determination Models [2.3]


We consider the market for goods in which consumers, investors, and the
government all compete for goods. Equilibrium in that market for goods
requires that the quantity of goods supplied, which is the national
income Y, be equal to the aggregate demand for goods, which,
(neglecting exports and imports) is C + I + G ( a three-sector economy).

"Income determination models" which include export and import


express the equilibrium level of (national) income in a four-sector economy as
(each component measured in dollars):

Y = C + I + G + (X - Z)

where Y = national income (GDP), C = (personal) consumption of goods and services,


I = investment (from saving), G = government expenditures on goods and services
(but not social security or welfare), X = exports, and Z = imports.

By substituting the information supplied in the problem, it is an easy matter to


solve for the equilibrium level of income Y. Aggregating (summing) the variables
on the right allows the equation of be graphed in a two-dimensional space.
See Example 3 and Problems 2.7 to 2.10 and 2.17 to 2.22.
Dowling02fit.wxmx 20 / 36

--------------------------------------------
Example 3 considers a "two sector economy" in which only consumption (C) and
investment are taken into account. We assume Y = C + I, with C = C0 + b Y,
and I = I0 = constant. Solving for Y gives

Y = (C0 + I0)/ (1 - b) = (C0 + I0)/ (1 - MPC)

In economics, the marginal propensity to consume (MPC) is defined as the


proportion of an aggregate raise in pay that a consumer spends on the
consumption of goods and services, as opposed to saving (and hence investing) it.

So MPC = dC/dY = (first derivative of consumption with respect to Y) = b in this


case where C = C0 + b Y = "consumption function". The sum C + I is the
"aggregate demand function" D.

Marginal propensity to consume is a component of Keynesian macroeconomic


theory and is calculated as the change in consumption divided by the change
in income. MPC is depicted by a consumption line, which is a sloped line
created by plotting the consumption on the vertical "y" axis and the income
on the horizontal "x" axis.

MPC varies by income level. MPC is typically lower at higher incomes.

MPC is the key determinant of the Keynesian multiplier, which describes the
effect of increased investment or government spending as an economic stimulus.

With C0 = 85, b = 0.9, I0 = 55, C0 + I0 = 140, 1/(1-b) = 10, Y = 1400,


C = 85 + 0.9*1400 = 1260, C/Y = 0.9.

C0 and I0 are "autonomous expenditures", since they are constant and are not
affected by the size of the income Y. The factor 1/(1-b) is the "autonomous expenditure
multiplier" which is a measure of the multiple effect of each dollar of autonomous
spending on the equilibrium level of income. Y is an endogenous variable, and
C0, I0, and b are exogenous variables.
----------------------------------------------------------------------------

Prob. 2.7

Assume Y = C + I, with C = 50 + 0.8 Y = "consumption function", and I = I0 = 50


(a) plot the consumption function
Dowling02fit.wxmx 21 / 36

➔ wxdraw2d ( key_pos = top_left, key = "C = 50 + 0.8*Y ", yrange = [0, 600],
explicit (50 + 0.8*Y, Y, 0, 600), ylabel = "C", xlabel = "Y", grid = [2,2] );

(%t50)

(%o50)

(b) plot the "aggregate demand function" C + I0

Ans: C + I0 = 100 + 0.8 Y is a line parallel (same slope) to the consumption function

➔ wxdraw2d ( key_pos = top_left, key = "C = 50 + 0.8*Y ", yrange = [0, 600],
explicit (50 + 0.8*Y, Y, 0, 600), ylabel = "C, I", xlabel = "Y", grid = [2,2],
line_width = 3, key = "C + I0", color = dark_green, explicit (100 + 0.8*Y, Y, 0, 600) );

(%t51)

(%o51)
Dowling02fit.wxmx 22 / 36

(c) A graphical method to find the equilibrium value of Y


is to use equal units for Y on the horizontal axis and
aggregate demand C + I0 on the vertical axis, and then
draw a 45 deg line from the origin and locate its intersection
with the aggregate demand (C + I0) line. Thus find Y = 500.
We use the proportional_axes = xy option for such a graphical
"solution".

➔ wxdraw2d ( proportional_axes = xy, yrange = [0, 600], key_pos = top_left, grid = [2,2],
ylabel = "C, I", xlabel = "Y", key = "C = 50 + 0.8*Y ", explicit (50 + 0.8*Y, Y, 0, 600),
line_width = 3, key = "C + I0", color = dark_green, explicit (100 + 0.8*Y, Y, 0, 600),
line_width = 2, key = "", color = red, line_type = dashes, explicit (Y, Y, 0, 600),
color = black, line_width = 1, explicit (500,Y,0,500), parametric (500, t, t, 0, 500) ),
wxplot_size = [480,480];

(%t52)

(%o52)

or find algebraically:

➔ solve (Y = 100 + 0.8*Y, Y);


(%o53) [ Y = 500 ]
Dowling02fit.wxmx 23 / 36

-------------------------------------------------------------------------------
Prob. 2.10
Effects of including a proportional tax (a tax depending on income) on the
parameters of the income determination model.

Case 1: no proportional tax scenario:


Y = D = C + I, I = 30, C = 85 + 0.75 Y,

➔ I : 30$ C : 85 + 0.75*Y$ D : C + I$

➔ D;
(%o57) 0.75 Y + 115

➔ solve (Y = D, Y);
(%o58) [ Y = 460 ]

Case 2: with proportional tax: C = 85 + 0.75 Yd, Yd = Y - T, T = 20 + 0.2*Y.


Yd is a "reduced income". To find D = C + I, work backwards in Maxima:

➔ T : 20 + 0.2*Y$ Yd : Y - T$ C : 85 + 0.75*Yd$ D : C + 30$

➔ D, expand;
(%o63) 0.6 Y + 100.0

➔ solve (Y = D, Y);
(%o64) [ Y = 250 ]

plot of both cases plus 45 deg line and graphical solution


Dowling02fit.wxmx 24 / 36

➔ wxdraw2d ( title = "Prob 2.10", key_pos = top_left, proportional_axes = xy, key = "C + I0, no tax ",
explicit (115 + 0.75*Y, Y, 0, 600), ylabel = "C + I", xlabel = "Y", grid = [2,2],
line_width = 3, key = "C + I, w/ tax", color = dark_green, explicit (100 + 0.6*Y, Y, 0, 600),
line_width = 2, key = "45 deg line", color = red, line_type = dashes, explicit (Y, Y, 0, 600),
color = black, line_type = solid, color = black, key = "Y = 250", parametric (250, t, t, 0, 250) ,
color = magenta, key = " Y = 460", parametric (460, t, t, 0, 460)), wxplot_size = [680, 680];

(%t65)

(%o65)

Because of the imposed tax structure, the equilibrium income falls from 460 (no tax)
to 250 (with tax), and the MPC (marginal propensity to consume) falls from 0.75 to 0.6.

We have not used plot2d so far. Here is an example of using wxplot2d syntax instead
of wxdraw2d with prob 2.10. Use the option [same_xy, true] for a graphical solution.
Dowling02fit.wxmx 25 / 36

➔ wxplot2d ( [ Y, 115 + 0.75*Y, 100 + 0.6*Y, [parametric, 250, t,[t,0,250] ],


[parametric, 460, t,[t,0,460] ] ], [Y, 0, 600], [style, [lines,2]], [same_xy, true],
[grid2d, true], [color, red, blue, "#259452", black, magenta],
[legend, "45 deg line", "C + I0, no tax", " C + I, w/ tax", "Y = 250", "Y = 460"],
[gnuplot_preamble, "set key top left;"] ), wxplot_size = [680,680]$

(%t66)

6 IS-LM Analysis [2.4]


Dowling02fit.wxmx 26 / 36

The "IS schedule" is a locus of points representing all the different combinations of interest
rates and income levels consistent with equilibrium in the goods (commodity) market.
Equilibrium in the goods market demands that planned "investment" and planned "saving"
be equal, which is where "IS" comes from.

The "LM schedule" is a locus of points representing all the different combinations of interest
rates and income levels consistent with equilibrium in the money market. The "L" stands for
"liquidity preference" (as the demand for money is sometimes known) and the "M" stands for
the quantity of money supplied.

IS-LM analysis seeks to find the level of income and the rate of interest at which both the
commodity market and the money market will be in equilibrium simultaneously. This can be
accomplished with the techniques used for solving simultaneous equations.

Unlike the simple income determination model in Section 2.3, IS-LM analysis deals explicitly
with the interest rate (i) and incorporates its effect into the model. See Example 4 and Problems
2.23 and 2.24.

The commodity market for a simple two-sector economy is in equilibrium when Y = C + I.

The money market is in equilibrium when the supply of money (Ms) equals the demand
for money (Md).

The demand for money (Md) is composed of the transaction-precautionary demand for
money (Mt ) and the speculative demand for money (Mz ). Md = Mt + Mz

6.1 Numerical Example

-------------------------------------------------------------------------------------------
Ex 4
Assume a two-sector economy where Y = C + I, C = 48 + 0.8 Y, I = 98 - 75i, Ms = 250,
Mt = 0.3Y, and Mz = 52 - 150 i. Here we use i for the (decimal) interest rate on money.
-------------------------------------------------------------------------------------------
Commodity equilibrium (IS) exists when Y = C + I, or Y - C - I = 0.

➔ kill(all)$ C : 48 + 0.8*Y$ I : 98 - 75*i$


IS : Y - C - I = 0;
(IS) 75 i + 0.2 Y − 146 = 0

Monetary equilibrium (LM) exists when Ms = Md = Mt + Mz.


Dowling02fit.wxmx 27 / 36

➔ Ms : 250$ Mt : 0.3*Y$ Mz : 52 - 150*i$


LM : Ms - Mt - Mz = 0;
(LM) 150 i − 0.3 Y + 198 = 0

➔ soln : solve ([IS, LM], [Y, i] ), numer;


(soln) [ [ Y = 700 , i = 0.08 ] ]

➔ [C, I, Mt, Mz, Mt + Mz], soln;


(%o9) [ 608.0 , 92.0 , 210.0 , 40.0 , 250.0 ]

6.2 Matrix Solution to a Symbolic IS-LM Model

Assume four exogenous variables are three levels of autonomous spending C0, I0, and G0,
and the constant stock of money M0. The four endogenous variables to be determined by the
model are Y, C, I, and r (rate of interest), such that the four equations
Y = C + I + G0
C = C0 + a Y
I = I0 + e r
f Y - g r = M0
are satisfied. The solutions will depend on C0, I0, G0, and r, and will be expressed in terms of
f, g, e, and a.

The first three equations clear the goods market, and the fourth equation clears the money
market.

We can write these four equations as one matrix equation.

X.M=B

in which X is a column matrix with unknown elements ( Y, C, I, r), M is a 4 x 4 square matrix of


coefficients, and B is a 4 element column matrix with elements (C0, I0, G0, M0).

The matrix solution is then X = M^(-1) . B, in which M^(-1) is the matrix inverse of M.
Using Maxima syntax translates the right hand side into invert(M) . B or M^^-1 . B
Dowling02fit.wxmx 28 / 36

➔ kill(all)$
M : matrix ([1,-1,-1,0], [a,-1,0,0],[0,0,1,e], [f,0,0,-g] );
B : transpose (matrix ( [G0,-C0, I0, M0] ));
1 −1 −1 0

a −1 0 0
(M)
0 0 1 e

f 0 0 −g

G0

− C0
(B)
I0

M0

➔ X : invert(M) . B, ratsimp;
( I0 + G0 + C0 ) g + M0 e

( a−1) g−e f

( ( I0 + G0 ) a + C0 ) g + C0 e f + M0 a e

( a−1) g−e f
(X)
( I0 a − I0 ) g + ( G0 + C0 ) e f + ( M0 a − M0 ) e
( a−1) g−e f

( I0 + G0 + C0 ) f + M0 a − M0

( a−1) g−e f

➔ [Y : X[1,1], C : X[2,1], I : X[3,1], r : X[4,1] ];


( I0 + G0 + C0 ) g + M0 e ( ( I0 + G0 ) a + C0 ) g + C0 e f + M0 a e
(%o4) [ − ,− ,
( a−1) g−e f ( a−1) g−e f
( I0 a − I0 ) g + ( G0 + C0 ) e f + ( M0 a − M0 ) e ( I0 + G0 + C0 ) f + M0 a − M0
,− ]
( a−1) g−e f ( a−1) g−e f

6.3 Using solve instead


Dowling02fit.wxmx 29 / 36

➔ kill(all)$
eq1 : Y - C - I = G0$
eq2 : a*Y - C = - C0$
eq3 : I + e*r = I0$
eq4 : f*Y - g*r = M0$
soln : solve ( [eq1, eq2, eq3, eq4], [Y, C, I, r] );
I0 g + G0 g + C0 g + M0 e
(soln) [ [ Y =− ,C=−
a g−g−e f
a ( I0 g + M0 e ) + C0 ( g + e f ) + G0 a g
,I=
a g−g−e f
a ( I0 g + M0 e ) − I0 g + G0 e f + C0 e f − M0 e I0 f + G0 f + C0 f + M0 a − M0
,r =− ]]
a g−g−e f a g−g−e f

➔ soln : soln[1], ratsimp;


( I0 + G0 + C0 ) g + M0 e ( ( I0 + G0 ) a + C0 ) g + C0 e f + M0 a e
(soln) [ Y =− ,C=−
( a−1) g−e f ( a−1) g−e f
( I0 a − I0 ) g + ( G0 + C0 ) e f + ( M0 a − M0 ) e ( I0 + G0 + C0 ) f + M0 a − M0
,I= ,r =− ]
( a−1) g−e f ( a−1) g−e f

7 Multiple Plots, Changing Plot Sizes with wxplot_size,


grid option
=================================================================

example of using grid = [nx,ny] option with draw pkg. This shows two (2) grid
intervals between each numbered tick mark on both axes. Also example of
using the external modifying option wxplot_size to get larger than the default size.
Dowling02fit.wxmx 30 / 36

➔ sinplot : gr2d( color = blue, key="sin (x)",grid=[2,2], explicit( sin(x), x,0,2*%pi ) )$


cosplot : gr2d( color = red, key_pos = top_center, key="cos (x)",grid=[2,2], explicit(cos(x), x,0,2*%p
wxdraw ( sinplot, cosplot ), wxplot_size = [680,680]$

(%t9)

default size, next to each other (two columns):


Dowling02fit.wxmx 31 / 36

➔ wxdraw ( sinplot, cosplot, columns = 2);

(%t10)

(%o10)

larger sizes, next to each other (two columns):

➔ wxdraw ( sinplot, cosplot, columns = 2), wxplot_size = [880, 480];


(%t11)

(%o11)

default size, on top of each other (two rows)


Dowling02fit.wxmx 32 / 36

➔ wxdraw ( sinplot, cosplot );

(%t12)

(%o12)

8 Proportional Axes Plots


➔ wxplot2d ([x, 4 + 0.2*x, 4 + 0.4*x, [ parametric, 5, t, [t, 0, 5]], [parametric, 20/3, t, [t, 0, 20/3]] ],
[x, 0, 10], [style, [lines,2]], [same_xy, true], [grid2d, true],
[ gnuplot_preamble, "set key bottom right;"] )$

(%t13)
Dowling02fit.wxmx 33 / 36

➔ wxdraw2d (key_pos = top_left, line_width = 2, proportional_axes = xy,


key = "y = x", explicit (x, x, 0, 10), color = red, key = "4 + 0.2*x",
explicit (4 + 0.2*x, x, 0, 10), color = green, key = "4 + 0.4*x",
explicit (4 + 0.4*x, x, 0, 10), color = magenta, key = "x = 5",
parametric (5, t, t, 0, 5), color = black, key = " x = 20/3",
parametric (20/3, t, t, 0, 20/3));

(%t14)

(%o14)
Dowling02fit.wxmx 34 / 36

➔ wxdraw2d (key_pos = top_left, line_width = 2, proportional_axes = xy,


key = "y = x", explicit (x, x, 0, 10), color = red, key = "4 + 0.2*x",
explicit (4 + 0.2*x, x, 0, 10), color = green, key = "4 + 0.4*x",
explicit (4 + 0.4*x, x, 0, 10), color = magenta, key = "x = 5",
parametric (5, t, t, 0, 5), color = black, key = " x = 20/3",
parametric (20/3, t, t, 0, 20/3)), wxplot_size = [680, 680];

(%t15)

(%o15)

9 Colors
default plot2d colors
Dowling02fit.wxmx 35 / 36

➔ wxplot2d ( [ [discrete, [ [0,0], [0,5] ] ], [discrete,[[2,0],[2,5]]],


[discrete,[[4,0],[4,5]]], [discrete,[[6,0],[6,5]]], [discrete,[[8,0],[8,5]]], [discrete,[[10,0],[10,5]]],
[discrete,[[12,0],[12,5]]], [discrete,[[14,0],[14,5]]] ], [x,-2,20], [y, -2,8],
[style, [lines, 4] ] );

(%t16)

(%o16)

plot2d: naming colors with [color, c1, c2, ...] option

➔ wxplot2d ( [ [discrete, [ [0,0], [0,5] ] ], [discrete,[[2,0],[2,5]]],


[discrete,[[4,0],[4,5]]], [discrete,[[6,0],[6,5]]], [discrete,[[8,0],[8,5]]], [discrete,[[10,0],[10,5]]],
[discrete,[[12,0],[12,5]]], [discrete,[[14,0],[14,5]]] ], [x,-2,20], [y, -2,8],
[style, [lines, 4] ], [color, blue, red, green, magenta, black, cyan, "#259452", "#25cd62"] );

(%t17)

(%o17)

wxdraw2d default color is blue.


Dowling02fit.wxmx 36 / 36

➔ wxdraw2d ( line_width = 4, yrange = [0,30], explicit (x,x,0,10),


color = dark_magenta, explicit (x^1.5,x,0,10),
color = "#259452", explicit (x^1.8, x, 0, 10) )$

(%t18)

You might also like