# How to numerically calculate equilibrium when the problem is non-linear?

I have recently started reading about financial related topics and I have stumbled upon the term “equilibrium”. In general when supply increases, the price of the product tends to increase as well and vice verse, when the demand increases, the price decreases. In all of the examples that I have gone through, the problems were linear, and to numerically solve them is not too complicated. An example is: These are based on having traders A, B, C, D and E all looking to supply 10 goods with limit prices of \$15, \$20, \$25, \$30, and $35 per good respectively, and F, G, H , I, and J looking to buy with limit prices of \$15, \$20, \$25, \$30, and \$35 respectively.

The equilibrium in this case is visible in the graph and it is \\$25. However, the problem can be solved by setting $$Qs = c_1 + d_1P$$ and $$Q_d = c_2 + d_2P$$ to equal, where $$d_1$$ and $$d_2$$ are found by calculating $$d=\frac{\Delta Q}{\Delta P}$$ and $$c_1$$ and $$c_2$$ are found by picking random points from the graph and substituting in the equation. If the problem is non-linear, this solution will not work.

If we assume, for example, that “D” can supply more than 10 goods, 30 for example, or if the price set by “D” increases more than 5 cents and thus changing the slope after D, how would the equilibrium be solved then?