4

Note 1.: It is rude to edit a question after it was answered; I had to make significant edits to make my answer consistent. Note 2.: this is not a system of equations. There are two functions defined, but only one equation: $$P_D(q) - P_S(q) = 0$$ What helps here is that inverse demand is decreasing in quantity while inverse supply is increasing. So given ...


2

This builds on @Giskard's answer above. Once you know the range of feasible market-clearing quantities, $q \in [ 0, \bar q ]$, you can directly apply R's uniroot function (R manual), which searches a given interval for the zeros of a function. # What are my demand and supply functions? 1 - q and q, because economics. P_D <- function ( q ) { 1 - q } P_S &...


Only top voted, non community-wiki answers of a minimum length are eligible