# Solving a Competitive Equilibrium

Let's take our basic competitive equilibrium from chapters 4 and 5, and work through it with the following specifications:

• The consumer has preferences described by the utility function $$U(C,l)=\ln(C)+\ln(l)$$
• The production function is Cobb-Douglass: $$zF(K,N) = z K^\alpha N^{1-\alpha}$$ with $$\alpha = \frac{1}{2}$$.
• Exogenous parameters are as follows: TODO

Then the model looks like this:

#### Example Competitive Equilibrium:

Given exogenous $$\left\{ h,z,K,g \right\}$$, a competitive equilibrium is a set of allocations $$\left\{ C,l,N_s,N_d,T \right\}$$ and a real wage $$\left\{ w \right\}$$ which satisfy the following:

• Consumer Optimization: Taking the real wage as given, the representative consumer chooses an allocation $$\left\{ C,l,N_s \right\}$$ such that $$N_s = h-l$$ and such that their allocation solves: $\max_{C,l}\; \ln(C) + \ln(l)$ subject to the constraints: \begin{gather} C\geq 0, \quad \quad h \geq l \geq 0 \tag{NonNeg}\\ C \leq w\cdot(h-l) + \pi - T \tag{Budget}\\ \end{gather}
• Firm Optimization: Taking the real wage as given, the representative firm chooses their labor demand, $$N_d$$ to maximize profits: $\max_{N_d}\; \left[z K^\alpha N_d^{1-\alpha} - w N_d \right]$ subject to the constraint that $$N_d \geq 0$$.
• Markets Clear: \begin{gather} N_d = N_s \tag{labor}\\ C + g = z K^\alpha N_d^{1-\alpha} \tag{goods}\\ \end{gather}
• The government's budget is balanced: $$T=g$$

#### Step 1: Characterizing the Consumer's Problem.

First note that $$U$$ is strictly increasing, so at the optimum, the budget constraint will hold with equality.

Also note that the constriant $$C \geq 0$$ and $$l\geq 0$$ will be nonbinding because $\lim_{C \to 0} \frac{\partial U}{\partial C} = +\infty \quad \text{and} \quad \lim_{l \to 0} \frac{\partial U}{\partial l} = +\infty$

Assuming that $$l < h$$, we can write the Lagrangian for the consumer's problem like so:

$\mathcal{L} = \ln(C) + \ln(l) - \lambda\cdot \left[ C - w\cdot(h-l) + \pi - T \right]$

Taking the partial derivatives of this, and setting them equal to zero, we get the First-order conditions:

\begin{align} 0 =& \frac{\partial \mathcal{L}}{\partial C} = {1 \over C} - \lambda \\ 0 =& \frac{\partial \mathcal{L}}{\partial l} = {1 \over l} - \lambda w \\ 0 =& \frac{\partial \mathcal{L}}{\partial \lambda} = - C + w\cdot(h-l) + \pi - T \\ \end{align}

The first two FOCs can be combined to get the equation $${1 \over l} = {1 \over C} w$$, and then rearranging things, we get the following system of equations which characterizes the solution to the consumer's problem:

$\boxed{\begin{gather} {C \over l} = w \\ C = w\cdot(h-l) + \pi - T \\ \end{gather}}$

#### Step 2: Characterizing the Firm's Problem.

First note that the constraint $$N_d \geq 0$$ will be nonbinding because $\lim_{N \to 0} \frac{\partial F}{\partial N} = +\infty$

Since there is only one choice variable, take the derivative of the profit function and set it equal to zero:

\begin{split} 0 &= {\partial \over \partial N_d}\left[z K^\alpha N_d^{1-\alpha} - w N_d \right] \\ &= (1-\alpha) \cdot z \cdot K^\alpha N_d^{-\alpha} - w \\ &= (1-\alpha) \cdot z \cdot \left( {K \over N_d} \right)^\alpha - w \\ \end{split}

Solving for $$N_d$$, we get:

\begin{align} w &= (1-\alpha) z K^\alpha N_d^{-\alpha} \\ N_d^\alpha w &= (1-\alpha) z K^\alpha \\ N_d^\alpha &= \left( \frac{(1-\alpha) z K^\alpha }{w} \right) \\ N_d &= \left( \frac{(1-\alpha) z }{w} \right)^{1 \over \alpha} K \\ \end{align}

#### Step 3: Combining the Results

If we combine the characterizing equations from each agent's problem with the other equilibrium conditions, we get the following system of equations:

\begin{align} {C \over l} &= w \tag{MRS=w} \\ C &= w\cdot(h-l) + \pi - T \tag{Budget} \\ N_d &= \left( \frac{(1-\alpha) z }{w} \right)^{1 \over \alpha} K \tag{Firm's Choice}\\ N_d &= N_s = h-l \tag{Labor Market}\\ C + g &= z K^\alpha N_d^{1-\alpha} \tag{Goods Market}\\ g &= T \tag{Gov Budget}\\ \pi = z K^\alpha N_d^{1-\alpha} - w N_d \tag{Profit} \\ \end{align}

Any solution to this system of equations will give us a competitive equilibrium for this economy.

#### Step 4: Solving

Todo: set w = 1/2 and wwork things out

First let's solve this system of equations without plugging in our exogenous parameters. We can combine the first and second equations above to get:

$C = lw$ $lw = w\cdot(h-l) + \pi - T$ $l = \frac{wh+\pi-T}{2w} = {h \over 2} + {\pi - T \over 2w}$ $C = \frac{wh+\pi-T}{2}$

And of course, we can plug $$g=T$$into this to get

$l = \frac{wh+\pi-T}{2w} = {h \over 2} + {\pi - g \over 2w}$ $C = \frac{wh+\pi-g}{2}$

From the market-clearing condition for the labor market, we get

\begin{split} N_d = N_s &= h-l \\ &= h - {h \over 2} - {\pi - g \over 2w} \\ &= {h \over 2} - {\pi - g \over 2w} \end{split}

Plug the formula for profit into the budget constraint to get:

$C &= w\cdot(h-l) + z K^\alpha N_d^{1-\alpha} - w N_d - g$

And $$h-l=N_s=N_d$$, so

$C &= z K^\alpha N_d^{1-\alpha} - g$ $C=lw=(h-N)w$ $w= (1-\alpha) z K^\alpha N_d^{-\alpha}$ Need to solve for C,w,N $C &= N^{1-\alpha} -0$ $C=lw=(h-N)w$ $w= (1-\alpha) N^{-\alpha}$ --- $C &= N_d^{1-\alpha}$ $C=lw=(h-N)w$ $w= (1-\alpha) N^{-\alpha}$ $N^{1-\alpha} = (h-N)w$ $w= {N^{1-\alpha} \over (h-N)$

#### Step 4: Solving Again

This time, let's start by plugging in the values given for the exogenous parameters. Then the characterizing system of equations becomes:

\begin{align} {C \over l} &= w \\ C &= w\cdot(h-l) + \pi - T \\ N_d &= \left( \frac{(1-\alpha) z }{w} \right)^{1 \over \alpha} K \\ N_d &= N_s = h-l \\ C + g &= z K^\alpha N_d^{1-\alpha} \\ g &= T \\ \pi = z K^\alpha N_d^{1-\alpha} - w N_d \\ \end{align} h = 1 K = 1 g = 1 z = 1 alpha = 1/2 \begin{align} C &= lw = w(1-N) \\ C &= wN + \pi - 1 \\ N &= \left( {1 \over 2w} \right)^2 = {1 \over 4w^2} \\ C + 1 &= z K^\alpha N_d^{1-\alpha} \\ \pi &= N_d^{1-\alpha} - w N_d \\ \end{align} 2wN +pi-1=w - pi +1 N = w-pi+1 / 2w

knjnjnjinij

$C = lw$ $lw = w\cdot(h-l) + \pi - T$ $l = \frac{wh+\pi-T}{2w} = {h \over 2} + {\pi - T \over 2w}$ $C = \frac{wh+\pi-T}{2}$

And of course, we can plug $$g=T$$into this to get

$l = \frac{w+\pi-1}{2w} = {1 \over 2} + {\pi - 1 \over 2w}$ $C = \frac{w+\pi-1}{2}$

From the market-clearing condition for the labor market, we get

\begin{split} N_d = N_s &= h-l \\ &= h - {h \over 2} - {\pi - g \over 2w} \\ &= {1 \over 2} - {\pi - 1 \over 2w} \end{split} Combining these: $N = {1 \over 2} - {\pi - 1 \over 2w}$ $\pi = N^{1\over 2} - w N$ $C = wN + \pi - 1 = N^{1\over 2} - 1$ -- $wN=N^{1\over 2}-\pi$ $N^{1\over 2}-\pi + \pi - 1 = N^{1\over 2} - 1$ $N^{1\over 2} = N^{1\over 2}$