The Ramsey Model (p2)

In part 2, we deal with the continous-time version. First, we take a look at the Lagrangian method and then apply the insights to formulate a Hamiltonian solution.

For economic intuitive intepretations, see the free book Campante, Filipe, Sturzenegger, Federico and Velasco, Andrés (2021) Advanced macroeconomics: an easy guide. LSE Press, London, UK. ISBN 9781909890688.

This article is Part 2 in a 2-Part Series.

Continuous Time

One can also write the utility function (similar to discrete-time) in a continuous time version.

\[U_t = \int_{0}^{\infty} e^{-\rho t} u(c(t)) dt\ \ (1)\]

The budget constraint:

\[\dot{k}(t) = f(k(t)) - \delta k(t) - c(t) \ \ (2) \\ k(0) > 0\]

The Lagrangian Method

Everything begins with the Lagrangian function. In fact, it’s more intuitive to start here than going straight to Hamiltonian:

\[\mathcal{L} = \int_{0}^{\infty} e^{-\rho t} u(c(t)) dt + \int_{0}^{\infty} \lambda(t) \left[ F( k(t)) - \delta k(t) - c(t) - \dot{k}(t) \right] dt\]

It’s the sum of 2 integrals with the same boundary and the same variables (time), so we can sum them up and rewrite the Lagrangian:

\[\mathcal{L} = \int_{0}^{\infty} \left\{ e^{-\rho t} u(c(t)) + \lambda(t) \left[ F( k(t)) - \delta k(t) - c(t) - \dot{k}(t) \right] \right\} dt\]

We want to maximize $c(t)$ with respect to $k(t)$, but $\dot{k}(t)$ is not independent with $k(t)$. So $\dot{k}(t)$ needs to be got rid of, and can somehow be expressed in terms of $k(t)$.

First, separate the $\dot{k}(t)$ term out of the integral.

\[\mathcal{L} = \int_{0}^{\infty} \left\{ e^{-\rho t} u(c(t)) + \lambda(t) \left[ F( k(t)) - \delta k(t) - c(t) \right] \right\} dt - \int_{0}^{\infty} \lambda(t)\dot{k}(t)dt\]

Using integration by parts [^1] for the second integral term:

\[\int_{0}^{\infty} \lambda(t) \dot{k}(t) dt \\ = \lambda(t) k(t) \Big|_0^\infty - \int_{0}^{\infty} \dot{\lambda}(t)k(t)dt \\ = \lambda(\infty) k(\infty) - \lambda(0) k(0) - \int_{0}^{\infty} \dot{\lambda}(t)k(t)dt\]

Notice that if $k$ at time $t=\infty$ is indeed $\infty$, and $\lambda(\infty)$ (the penalty term) is also non-zero, then there is no reason to consume now. The household will wait until the very very end of time close to infinity since the utility is essentially infinity. On the other hand, if $k$ at $t=\infty$ is $-\infty$, there is no reason to save, it’s better to consume everything and leave nothing left. Such extreme cases would appear if $\lambda(\infty)k(\infty)$ is not bounded and it will dominate everything.

To counter that problem, we introduce the transversality (no Ponzi-scheme) condition.

\[\lim_{t\to\infty} \lambda(t)k(t) = 0\]

We also assume $k(0)$ is given and is a constant (the economy needs something to start with), meaning it will disappear when we derive the FOC. As it is given, there should be no penalty term ($\lambda(0) = 0$). Thus, we have:

\[\int_{0}^{\infty} \lambda(t)\dot{k}(t) dt = - \int_{0}^{\infty} \dot{\lambda}(t) k(t) dt\]

Plugging back to the Lagrangian $\mathcal{L}$, we obtain:

\[\mathcal{L} = \int_{0}^{\infty} \left\{ e^{-\rho t} u(c(t)) + \lambda(t) \left[ F( k(t)) - \delta k(t) - c(t) \right] \right\} dt + \int_{0}^{\infty} \dot{\lambda}(t)k(t)dt\]

Sum them back to under 1 integral again:

\[\mathcal{L} = \int_{0}^{\infty} \left\{ e^{-\rho t} u(c(t)) + \lambda(t) \left[ F( k(t)) - \delta k(t) - c(t) \right] + \dot{\lambda}(t)k(t) \right\} dt\]

The Lagrangian enables us to maximize the function at each point in time, so we only care about maximizing the functional form inside the integral (we don’t care about time anymore). Rewrite the term inside the integral as $\triangle$, call this the modified Lagrangian. The following 2 expressions are equivalent.

\[\triangle = {e^{-\rho t} u(c(t)) + \lambda(t) \left[ f( k(t)) - \delta k(t) - c(t) \right]} - \lambda(t)\dot{k}(t) \ \ (3) \\ \triangle = \underbrace{e^{-\rho t} u(c(t)) + \lambda(t) \left[ f( k(t)) - \delta k(t) - c(t) \right]}_{\text{Hamiltonian}}+ \dot{\lambda}(t)k(t) \ \ (4)\]

Terminologically speaking: $c(t)$ is the control variable since it can jump (taking any value at any point in time) while $k(t)$ is the state variable because it accumulates over time. ${\lambda}(t)$ is the co-state variable (also known as shadow price in economics because it shows the marginal cost of violating the constraints at each point in time).

Sticking with the Lagrangian method, we derive the FOC:

\[(c(t)): \frac{d\triangle}{d c(t)} = e^{-\rho t} u'(c(t)) - \lambda(t) = 0 \ \text{(using Eq. (3))} \\ (k(t)): \frac{d\triangle}{d k(t)} = \lambda(t) [ f'(k(t)) - \delta] + \dot{\lambda}(t) = 0 \ \text{(using Eq. (4))} \\ (\lambda(t)): \frac{d\triangle}{d \lambda(t)} = f(k(t)) - \delta k(t) - c(t) = 0 \ \text{(using Eq. (3))}\]

We need to get rid of $\lambda$. From $(c(t))$ condition, we derive:

\[\lambda(t) = e^{-\rho t} u'(c(t))\]

Thus, $\dot{\lambda}(t)$ can be derived as:

\[\dot{\lambda}(t) = \frac{d \lambda(t)}{dt} = -\rho e^{-\rho t} u'(c(t)) + e^{-\rho t} u''(c(t)) \dot{c}(t)\]

And we obtain:

\[\frac{\dot{\lambda}(t)}{\lambda(t)} = -\rho \frac{u'(c(t))}{u'(c(t))} + \frac{u''(c(t))}{u'(c(t))}\dot{c}(t) = - \rho + \frac{u''(c(t))}{u'(c(t))}\dot{c}(t)\]

For a functional form of $u$, especially with CRRA (constant relative risk aversion), we can explicitly derive the condition. For simplicity, let $u(c) = \ln(c)$, then $u’(c(t)) = \frac{1}{c(t)}$ and $u’‘(c(t)) = \frac{-1}{c^2(t)}$. Plugging back to the above equation, we obtain:

\[\frac{\dot{\lambda}(t)}{\lambda(t)} = -\rho - \frac{\dot{c}(t)}{c(t)} \ \ (5)\]

From the FOC of $k(t)$, we know that:

\[- \frac{\dot{\lambda}(t)}{\lambda(t)} = f'(k(t)) - \delta\]

Combining with Eq. (5) yields the Euler equation:

\[\frac{\dot{c}(t)}{c(t)} = f'(k(t)) - \delta -\rho\]

This condition constitutes the optimal path of consumption chosen by the household.

The Hamiltonian Method

One can derive a similar condition at Eq. (6) by using the Hamiltonian. Actually, Hamiltonian is just a shortcut.

We continue from Eq. (4) with the modified Lagrangian $\triangle$. Define the Hamiltonian function $H(t)$ as:

\[H(t) = e^{-\rho t} u(c(t)) + \lambda(t)\left[f(k(t)) - \delta k(t) - c(t) \right]\]

The discount term $e^{-\rho t}$ is attached to the utility function, so this is also called Present-Value hamiltonian. Thus:

\[\triangle = H(t) + \dot{\lambda}(t) k(t) \\ \triangle = H(t) - \lambda(t) \dot{k}(t)\]

The FOC:

\[(c(t)): \frac{\partial \triangle}{\partial c(t)} = \frac{\partial H(t)}{\partial c(t)} = e^{-\rho t} u'(c(t)) - \lambda(t) = 0 \\ (k(t)): \frac{\partial \triangle}{\partial k(t)} = \frac{\partial H(t)}{\partial k(t)} + \dot{\lambda}(t) = \lambda(t)f'(k(t)) - \delta + \dot{\lambda}(t) = 0 \\ (\lambda(t)): \frac{\partial \triangle}{\partial \lambda(t)} = \frac{\partial H(t)}{\partial \lambda(t)} - \dot{k}(t) = 0 \\ \lim_{t\to\infty} \lambda(t)k(t) = 0\]

Some prefer to write shorter by ignoring the modified Lagrangian and go straight to the FOCs after formulating Hamiltonian (link).

\[\frac{\partial H(t)}{\partial c(t)} = 0 \qquad \Rightarrow \lambda(t) = e^{-\rho t} u'(c(t)) \\ \frac{\partial H(t)}{\partial k(t)} = -\dot{\lambda}(t) \quad \Rightarrow \lambda(t)\left[f'(k(t)) - \delta \right] = -\dot{\lambda}(t) \\ \frac{\partial H(t)}{\partial \lambda(t)} = \dot{k}(t) \quad \Rightarrow \dot{k}(t) = f(k(t)) - \delta k(t) - c(t) \\ \lim_{t\to\infty} \lambda(t)k(t) = 0\]

The solution still agrees with what we have solved at Eq. (5) and the consumption path thus can be derived analogously.

[^1] This is the integral version of the product rule of differentiation ($(uv)’ = u’v + v’u$). Integration by parts formula states that: \(\int_{a}^{b} u(x) v'(x) dx \\ = u(x)v(x) \Big|_a^b - \int_{a}^{b} u'(x)v(x) dx \\ = u(b)v(b) - u(a)v(a) - \int_{a}^{b} u'(x) v'(x) dx\)

Or simply:

\[\int u \ dv = uv - \int v du\]

I own a spiritual debt to Constantin Burgi and his lectures on Youtube. This note stems from lectures by Prof. Kitagawa Akiomi and Tomoaki Kotera at Tohoku University.

Written on February 20, 2022