Trying to solve a demand-supply equilibrium here and them find a partial derivative of the equilibrium with respect to the parameters.
S(q_) := -Log(q) d(Il_, beta_) := phi*v*zeta/(1 - beta - delta)*(A/(v*zeta*(1 + phi*Il)))^(v/(v - 1)) S1(Il_, beta_, ig_) := S((delta + beta)*i - beta*ig - (1 - beta - delta)*Il)
d is the demand and
S1 is the supply. The equilibrium price is expressed in terms of the parameters
f(beta_, ig_) := x /. Solve(d(x, beta) == S1(x, beta, ig), x, Reals)((1))
Now I want to look at the partial derivative of the equilibrium wrt
ig as a function of beta.
Eff(beta_) := D(f(beta, ig), ig) /. ig -> 0.03
Eff() at any value is taking forever to compute. The function
f() is well-defined and is giving me quick output when I plug in some arguments.
Is there anything wrong in the code or is it just computationally time-consuming?