Supply and demand analysis

ratprint:false; kill(all);

demand: solve(Q=-0.5*P+40,P)[1];

supply: solve(Q=P-20, P)[1];

plot2d([rhs(demand), rhs(supply)], [Q, 0,40], [y, 0, 100]);

supply2: eliminate([Q=PS-20, PS=P-8],[PS])[1];

supply3: solve(supply2=0, P)[1];

plot2d([rhs(demand), rhs(supply), rhs(supply3)], [Q, 0,40], [y, 0, 100]);

demand; supply3;

float(solve([demand, supply3], [P,Q]));

Legal Notice: The copyright for this application is owned by the authors.
The authors are not responsible for any errors contained within and are not liable
for any damages resulting from the use of this material.
This application is intended for non-commercial, non-profit use only.
Contact the authors for permission if you wish to use this application in for-profit activities.
Contact address: Prof. Yukari Shirota, Faculty of Economics, Gakushuin University, 1-5-1 Mejiro,
Toshima-ku, Tokyo, 171-8588 JAPAN,  yukari.shirota@ipsj.or.jp