# Problem 2.4 in Romer

Assume that the instantaneous utility function $u(C)$ in equation $(2.1)$ is $\ln(C(t))$. Consider the problem of a household maximizing $(2.1)$ subject to $(2.6)$. Find an expression for $C$ at each time as a function of initial wealth plus the present value of labor income, the path of $r(t)$, and the parameters of the utility function

$$U = \int_{t=0}^{\infty} e^{-\rho t} u(C(t)) \frac{L(t)}{H} dt \tag{2.1}$$

$$\int_{t=0}^{\infty} e^{- R(t)} C(t) \frac{L(t)}{H} dt \leq \frac{K(0)}{H} + \int_{t=0}^{\infty} e^{- R(t)} W(t) \frac{L(t)}{H} dt \tag{2.6}$$

Firstly I want to check solving for the right right values: initial wealth is $K(0)$, labor income is $W(t)$, $r(t)$ is the real interest rate defined as $R(t) = \int_{\tau=0}^{t} r(\tau) d \tau$, and parameters of the utility function are: $\rho, L(t), H$. I have tried to solve this using the Lagrangian and using an informal approach of calculus of variations so we can ignore the integrals in these terms so that:

$$\mathcal{L} = e^{-\rho t} ln(C(t)) \frac{L(t)}{H} + \lambda \left[ \frac{K(0)}{H} + e^{- r(t)} W(t) \frac{L(t)}{H} - e^{- r(t)} C(t) \frac{L(t)}{H} \right]$$

$$\frac{\partial \mathcal{L}}{\partial C} = \frac{e^{- \rho t} L(t)}{C(t) H} - \frac{\lambda e^{- r(t)} L(t)}{H}$$

$$\Rightarrow C(t) = e^{-\rho t}e^{r(t)} \lambda^{-1}$$

$$\frac{\partial \mathcal{L}}{\partial \lambda} = \frac{K(0)}{H} + e^{- r(t)} W(t) \frac{L(t)}{H} - e^{- r(t)} C(t) \frac{L(t)}{H}$$

Plug the $C(t)$ obtained in the first partial to get

$$\frac{K(0)}{H} + e^{-r(t)}W(t)\frac{L(t)}{H} = e^{-r(t)} \left( e^{-\rho t}e^{r(t)} \lambda^{-1} \right) \frac{L(t)}{H}$$

$$\Rightarrow K(0) + e^{-r(t)}W(t) L(t) = e^{-\rho t} \lambda^{-1} L(t)$$

$$\Rightarrow \lambda = \frac{e^{-\rho t} L(t)}{K(0) + e^{-r(t)} W(t) L(t)}$$

Now plugging this into the $C(t)$ equation to this obtain

$$C(t) = e^{-\rho t}e^{r(t)}* \frac{K(0) + e^{-r(t)} W(t) L(t)}{e^{-\rho t} L(t)}$$

$$= \frac{K(0)e^{r(t)}}{L(t)} + W(t)$$

However the solution manual has the following:

$$C(t) = e^{R(t) - \rho t} \left[ \frac{W(t)}{L(0)/H} (\rho - n) \right]$$

It would be great if these were equivalent! .. but it does not look so to me. And my solution does not include the $\rho$, nor $H$, so somewhere I must have messed up.