Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Part III: Continuous-Time Dynamic Models in Macroeconomics

kapitaali.com

Connects to: Principles Ch. 5 (Solow, RCK), Ch. 12 (investment), Ch. 25 (OLG)


Continuous time is the natural habitat of growth theory and optimal control. The differential equation k~˙=sf(k~)μk~\dot{\tilde{k}} = sf(\tilde{k}) - \mu\tilde{k} is a single, clean object with a well-developed analytical theory; the phase plane of the RCK model reveals the saddle-path geometry of optimal saving at a glance; and the Hamiltonian framework of Pontryagin unifies all intertemporal optimization problems into a single set of necessary conditions.

This part derives the full mathematical solutions to the growth models of Principles Part I, using the ODE and phase-diagram tools of Chapter 3. Chapter 3 was preparation; this part is the application. Every model here was introduced verbally and graphically in Principles; here we solve it.

Chapter 10 solves the Solow growth model as a Bernoulli ODE, derives the closed-form transition path, proves existence and uniqueness of the steady state from the Inada conditions, and derives the Golden Rule algebraically. Chapter 11 develops the full apparatus of optimal control theory — Hamiltonians, Pontryagin’s maximum principle, costate equations, the transversality condition — and applies it to the Ramsey–Cass–Koopmans model to derive the Euler equation and saddle-path solution. Chapter 12 analyzes the continuous-time Blanchard–Yaari overlapping-generations model, the tractable alternative to the Diamond (1965) discrete-time OLG. Chapter 13 returns to the Tobin’s qq investment model, deriving the investment dynamics from an optimal control problem and using real options theory to analyze irreversibility.

The level of mathematical detail in this part is high. Every proof is complete; every algorithm is stated in language-neutral pseudocode before any code is shown. Readers who want only the results without the derivations can follow the boxed equations and worked examples; readers who want to understand why each result holds should work through each proof step by step.


Chapter 10: The Solow Growth Model

Solving the Fundamental Differential Equation

“The Solow model is the starting point for almost all analyses of economic growth. It is simple, tractable, and delivers surprisingly rich insights.” — Robert Barro and Xavier Sala-i-Martin

Cross-reference: Principles Ch. 5.2 (Solow–Swan model and the fundamental ODE); Ch. 5.5 (convergence, conditional and unconditional) [P:Ch.5.2, P:Ch.5.5]


10.1 Setting Up the Fundamental ODE from First Principles

Principles Chapter 5 presented the Solow ODE as a given. Here we derive it from the underlying production and saving assumptions, making explicit every step and every assumption.

The model’s building blocks:

  • A single good is produced by capital KK and effective labour ALAL using a neoclassical production function Y=F(K,AL)Y = F(K, AL).

  • Population grows at rate nn: L˙/L=n\dot{L}/L = n.

  • Technology grows at rate gg: A˙/A=g\dot{A}/A = g.

  • A constant fraction s(0,1)s \in (0,1) of output is saved: K˙=sYδK\dot{K} = sY - \delta K.

  • Capital depreciates at rate δ>0\delta > 0.

Definition 10.1 (Intensive Form). Define capital per unit of effective labour k~K/(AL)\tilde{k} \equiv K/(AL) and output per unit of effective labour y~Y/(AL)=f(k~)\tilde{y} \equiv Y/(AL) = f(\tilde{k}), where f(k~)F(k~,1)f(\tilde{k}) \equiv F(\tilde{k}, 1) is the intensive-form production function.

Deriving the ODE. Differentiate k~=K/(AL)\tilde{k} = K/(AL) with respect to tt:

k~˙=K˙ALKALA˙L+AL˙AL=K˙ALk~(A˙A+L˙L)=sYδKALk~(g+n).\dot{\tilde{k}} = \frac{\dot{K}}{AL} - \frac{K}{AL}\cdot\frac{\dot{A}L + A\dot{L}}{AL} = \frac{\dot{K}}{AL} - \tilde{k}\left(\frac{\dot{A}}{A} + \frac{\dot{L}}{L}\right) = \frac{sY - \delta K}{AL} - \tilde{k}(g+n).

Substituting Y=ALf(k~)Y = ALf(\tilde{k}) and δK=δk~AL\delta K = \delta\tilde{k}AL:

k~˙=sf(k~)δk~(n+g)k~=sf(k~)(n+g+δ)μk~.\dot{\tilde{k}} = sf(\tilde{k}) - \delta\tilde{k} - (n+g)\tilde{k} = sf(\tilde{k}) - \underbrace{(n+g+\delta)}_{\equiv\,\mu}\tilde{k}.

Definition 10.2 (Fundamental Solow ODE). The fundamental equation of the Solow model is:

k~˙=sf(k~)μk~,μn+g+δ.\boxed{\dot{\tilde{k}} = sf(\tilde{k}) - \mu\tilde{k}, \quad \mu \equiv n + g + \delta.}

Every element of this equation has a clear interpretation: sf(k~)sf(\tilde{k}) is actual investment per effective worker; μk~=(n+g+δ)k~\mu\tilde{k} = (n+g+\delta)\tilde{k} is the break-even investment — the investment required to keep k~\tilde{k} constant as population grows (nn), technology improves (gg), and capital depreciates (δ\delta).


10.2 The Cobb–Douglas Special Case: Closed-Form Solution

With f(k~)=k~αf(\tilde{k}) = \tilde{k}^\alpha, α(0,1)\alpha \in (0,1), the Solow ODE becomes:

k~˙=sk~αμk~.\dot{\tilde{k}} = s\tilde{k}^\alpha - \mu\tilde{k}.

10.2.1 The Steady State

Definition 10.3 (Steady State). The steady state k~\tilde{k}^* satisfies k~˙=0\dot{\tilde{k}} = 0:

sk~α=μk~    k~α1=μs    k~=(sμ)1/(1α).s\tilde{k}^{*\alpha} = \mu\tilde{k}^* \implies \tilde{k}^{*\alpha-1} = \frac{\mu}{s} \implies \tilde{k}^* = \left(\frac{s}{\mu}\right)^{1/(1-\alpha)}.

Steady-state output and consumption per effective worker:

y~=k~α=(sμ)α/(1α),c~=(1s)y~=(1s)(sμ)α/(1α).\tilde{y}^* = \tilde{k}^{*\alpha} = \left(\frac{s}{\mu}\right)^{\alpha/(1-\alpha)}, \qquad \tilde{c}^* = (1-s)\tilde{y}^* = (1-s)\left(\frac{s}{\mu}\right)^{\alpha/(1-\alpha)}.

10.2.2 The Bernoulli ODE: Closed-Form Transition Path

The Cobb–Douglas Solow ODE is a Bernoulli equation — a nonlinear first-order ODE of the form z˙+P(t)z=Q(t)zα\dot{z} + P(t)z = Q(t)z^\alpha. The substitution v=k~1αv = \tilde{k}^{1-\alpha} linearizes it.

Let vk~1αv \equiv \tilde{k}^{1-\alpha}. Differentiating:

v˙=(1α)k~αk~˙=(1α)k~α(sk~αμk~)=(1α)(sμv).\dot{v} = (1-\alpha)\tilde{k}^{-\alpha}\dot{\tilde{k}} = (1-\alpha)\tilde{k}^{-\alpha}(s\tilde{k}^\alpha - \mu\tilde{k}) = (1-\alpha)(s - \mu v).

This is a linear first-order ODE in vv! It has the form v˙=(1α)μv+(1α)s\dot{v} = -(1-\alpha)\mu v + (1-\alpha)s, with steady state v=s/μ=k~1αv^* = s/\mu = \tilde{k}^{*1-\alpha} and convergence rate λ=(1α)μ\lambda = (1-\alpha)\mu.

Theorem 10.1 (Closed-Form Solow Transition Path). The transition path of the Cobb–Douglas Solow model from initial condition k~0>0\tilde{k}_0 > 0 is:

k~(t)=[v+(v0v)eλt]1/(1α),\tilde{k}(t) = \left[v^* + (v_0 - v^*)e^{-\lambda t}\right]^{1/(1-\alpha)},

where v0=k~01αv_0 = \tilde{k}_0^{1-\alpha}, v=s/μ=k~1αv^* = s/\mu = \tilde{k}^{*1-\alpha}, and λ=(1α)μ\lambda = (1-\alpha)\mu.

Proof. The solution to v˙=λv+(1α)s\dot{v} = -\lambda v + (1-\alpha)s with initial condition v0v_0 is:

v(t)=v+(v0v)eλt,v=(1α)sλ=(1α)s(1α)μ=sμ.v(t) = v^* + (v_0 - v^*)e^{-\lambda t}, \quad v^* = \frac{(1-\alpha)s}{\lambda} = \frac{(1-\alpha)s}{(1-\alpha)\mu} = \frac{s}{\mu}.

Converting back via k~(t)=v(t)1/(1α)\tilde{k}(t) = v(t)^{1/(1-\alpha)} gives the result. \square

This is the exact transition path — not a linearization. It is valid for any initial condition k~0\tilde{k}_0, not just those near k~\tilde{k}^*.


10.3 Linearization and the Convergence Rate

For empirical work — particularly convergence regressions — we need the local approximation of the transition path near the steady state.

Theorem 10.2 (Linear Convergence Rate). Near the steady state k~\tilde{k}^* of the Cobb–Douglas Solow model, the log-deviation k^(t)lnk~(t)lnk~\hat{k}(t) \equiv \ln\tilde{k}(t) - \ln\tilde{k}^* evolves approximately as:

k^(t)k^0eλt,λ=(1α)μ=(1α)(n+g+δ).\hat{k}(t) \approx \hat{k}_0 e^{-\lambda t}, \quad \lambda = (1-\alpha)\mu = (1-\alpha)(n+g+\delta).

Proof. From the exact solution, near v0vv_0 \approx v^*:

v(t)vv=v0vveλt.\frac{v(t) - v^*}{v^*} = \frac{v_0 - v^*}{v^*}e^{-\lambda t}.

Since v=k~1αv = \tilde{k}^{1-\alpha} and lnv(1α)lnk~\ln v \approx (1-\alpha)\ln\tilde{k} for k~\tilde{k} near k~\tilde{k}^*, we have v^(t)(1α)k^(t)\hat{v}(t) \approx (1-\alpha)\hat{k}(t), so k^(t)k^0eλt\hat{k}(t) \approx \hat{k}_0 e^{-\lambda t}. \square

Definition 10.4 (Half-Life of Convergence). The half-life is the time for the gap to halve: τ1/2=ln2/λ\tau_{1/2} = \ln 2 / \lambda.

Calibration: With α=1/3\alpha = 1/3, n=0.01n = 0.01, g=0.02g = 0.02, δ=0.05\delta = 0.05: μ=0.08\mu = 0.08, λ=(2/3)(0.08)=0.053\lambda = (2/3)(0.08) = 0.053, τ1/2=ln2/0.05313\tau_{1/2} = \ln 2/0.053 \approx 13 years. This matches the empirical estimates of cross-country convergence rates of approximately 2–3% per year — which corresponds to λ=0.02\lambda = 0.020.03, somewhat below the model’s prediction with these parameters. The discrepancy is partly explained by international capital flows and human capital omitted from the basic model.


10.4 Existence and Uniqueness: The Inada Conditions

For general production functions, the existence and uniqueness of k~\tilde{k}^* requires the Inada conditions.

Definition 10.5 (Inada Conditions). The production function f:R+R+f: \mathbb{R}_+ \to \mathbb{R}_+ satisfies the Inada conditions if:

f(0)=0,f(k~)>0,f(k~)<0,limk~0f(k~)=+,limk~+f(k~)=0.f(0) = 0, \quad f'(\tilde{k}) > 0, \quad f''(\tilde{k}) < 0, \quad \lim_{\tilde{k}\to 0}f'(\tilde{k}) = +\infty, \quad \lim_{\tilde{k}\to+\infty}f'(\tilde{k}) = 0.

Theorem 10.3 (Existence and Uniqueness of the Steady State). If ff satisfies the Inada conditions and s(0,1)s \in (0,1), μ>0\mu > 0, then the equation sf(k~)=μk~sf(\tilde{k}) = \mu\tilde{k} has a unique positive solution k~>0\tilde{k}^* > 0, and this steady state is globally asymptotically stable.

Proof. Define g(k~)sf(k~)μk~g(\tilde{k}) \equiv sf(\tilde{k}) - \mu\tilde{k}. The Solow ODE is k~˙=g(k~)\dot{\tilde{k}} = g(\tilde{k}).

Existence: g(0)=sf(0)0=0g(0) = sf(0) - 0 = 0... but we need g(0)>0g'(0) > 0 and g()<0g'(\infty) < 0 to guarantee a crossing above zero. At k~=0+\tilde{k} = 0^+: sf(0+)=+>μsf'(0^+) = +\infty > \mu, so g(k~)>0g(\tilde{k}) > 0 for small k~>0\tilde{k} > 0. As k~\tilde{k} \to \infty: f(k~)0f'(\tilde{k}) \to 0, and by L’Hôpital-style argument f(k~)/k~0f(\tilde{k})/\tilde{k} \to 0 (since ff is concave with f0f' \to 0), so g(k~)=k~[sf(k~)/k~μ]g(\tilde{k}) = \tilde{k}[sf(\tilde{k})/\tilde{k} - \mu] \to -\infty. By the intermediate value theorem, gg crosses zero at some k~>0\tilde{k}^* > 0.

Uniqueness: g(k~)=sf(k~)μg'(\tilde{k}) = sf'(\tilde{k}) - \mu. Since f<0f'' < 0, gg' is strictly decreasing. At the crossing, g(k~)=sf(k~)μg'(\tilde{k}^*) = sf'(\tilde{k}^*) - \mu. The sign of g(k~)g'(\tilde{k}^*) determines local stability: the crossing is from above (stable) iff g(k~)<0g'(\tilde{k}^*) < 0, i.e., sf(k~)<μsf'(\tilde{k}^*) < \mu. By convexity of the μk~\mu\tilde{k} line and concavity of sf(k~)sf(\tilde{k}), they can cross only once, and at the crossing the slope of sfsf is below the slope of μk~\mu\tilde{k}. Hence k~\tilde{k}^* is unique and stable. \square


10.5 The Golden Rule: Optimal Saving

Definition 10.6 (Golden Rule Capital Stock). The Golden Rule capital stock k~GR\tilde{k}^{GR} maximizes steady-state consumption per effective worker c~=f(k~)μk~\tilde{c}^* = f(\tilde{k}^*) - \mu\tilde{k}^* over ss (equivalently over k~\tilde{k}^*, since k~\tilde{k}^* is a monotone function of ss):

maxk~c~=f(k~)μk~    f(k~GR)=μ=n+g+δ.\max_{\tilde{k}^*} \tilde{c}^* = f(\tilde{k}^*) - \mu\tilde{k}^* \implies f'(\tilde{k}^{GR}) = \mu = n + g + \delta.

Theorem 10.4 (Golden Rule). The Golden Rule capital stock satisfies f(k~GR)=μf'(\tilde{k}^{GR}) = \mu, which corresponds to the saving rate:

sGR=μk~GR/f(k~GR)=α(for Cobb–Douglas).s^{GR} = \mu\tilde{k}^{GR}/f(\tilde{k}^{GR}) = \alpha \quad \text{(for Cobb–Douglas)}.

Proof (Cobb–Douglas): With f(k~)=k~αf(\tilde{k}) = \tilde{k}^\alpha, the Golden Rule condition f(k~GR)=αk~GRα1=μf'(\tilde{k}^{GR}) = \alpha\tilde{k}^{GR\,\alpha-1} = \mu gives k~GR=(α/μ)1/(1α)\tilde{k}^{GR} = (\alpha/\mu)^{1/(1-\alpha)}. The corresponding steady state has sGRk~GRα=μk~GRs^{GR}\tilde{k}^{GR\,\alpha} = \mu\tilde{k}^{GR}, so sGR=μk~GR1α=μ(α/μ)=αs^{GR} = \mu\tilde{k}^{GR\,1-\alpha} = \mu(\alpha/\mu) = \alpha. \square

The Golden Rule saving rate equals the capital share α\alpha for Cobb–Douglas production. Countries with s>sGR=αs > s^{GR} = \alpha save too much (dynamically inefficient); countries with s<αs < \alpha save too little. For the U.S.: α0.33\alpha \approx 0.33 and s0.20<αs \approx 0.20 < \alpha, suggesting the U.S. is below the Golden Rule — a common finding for advanced economies [P:Ch.5.3].

Dynamic efficiency: The RCK model (Chapter 11) shows that optimizing households choose s<sGRs < s^{GR} in general, so market economies are dynamically efficient. The Golden Rule is relevant when policy interventions (mandatory saving, social security) push ss above α\alpha.


10.6 Numerical Solution: The Shooting Algorithm

For production functions that do not yield a closed-form Bernoulli ODE solution, we solve numerically. The shooting algorithm finds the transition path from k~0\tilde{k}_0 to (near) k~\tilde{k}^* by integrating the ODE forward using RK4.

Algorithm 10.1 (Solow Transition Path).

Input: ff, ss, μ\mu, k~0\tilde{k}_0, time horizon TT, step size hh.

  1. Set t=0t = 0, k~[0]=k~0\tilde{k}[0] = \tilde{k}_0.

  2. For n=0,1,,T/h1n = 0, 1, \ldots, T/h - 1:

    • F(k~)sf(k~)μk~F(\tilde{k}) \leftarrow sf(\tilde{k}) - \mu\tilde{k}

    • Apply RK4 step: k~[n+1]RK4(F,k~[n],h)\tilde{k}[n+1] \leftarrow \text{RK4}(F, \tilde{k}[n], h)

    • tt+ht \leftarrow t + h

  3. Return {k~[n]}\{\tilde{k}[n]\}.

For the RCK model (Chapter 11), the shooting is more complex because the initial value of the control variable cc is not given — only the initial value of the state variable kk is. The shooting algorithm must find c0c_0 such that the trajectory starting at (k0,c0)(k_0, c_0) converges to the saddle-point steady state rather than diverging.


10.7 Worked Example: Mankiw–Romer–Weil Convergence Regression

Cross-reference: Principles Ch. 5.5 (convergence evidence) [P:Ch.5.5]

Mankiw, Romer, and Weil (1992) test the Solow model’s conditional convergence prediction by regressing long-run average growth rates on initial income, saving rates, and population growth. The model predicts the log-linearized growth equation:

lny(T)lny(0)=(1eλT)[α1αlnsα1αln(n+g+δ)lny(0)],\ln y(T) - \ln y(0) = (1-e^{-\lambda T})\left[\frac{\alpha}{1-\alpha}\ln s - \frac{\alpha}{1-\alpha}\ln(n+g+\delta) - \ln y(0)\right],

where y=Y/Ly = Y/L is output per worker (not per effective worker). Setting T=25T = 25 years, g=0.02g = 0.02, δ=0.03\delta = 0.03 (so g+δ=0.05g+\delta = 0.05), and estimating λ0.02\lambda \approx 0.02 from the data (implying α0.60\alpha \approx 0.60, suggesting physical plus human capital together):

lny(T)lny(0)=0.393[0.600.40lns0.600.40ln(n+0.05)lny(0)].\ln y(T) - \ln y(0) = 0.393\left[\frac{0.60}{0.40}\ln s - \frac{0.60}{0.40}\ln(n+0.05) - \ln y(0)\right].

The predicted coefficients: on lns\ln s approximately +0.59; on ln(n+g+δ)\ln(n+g+\delta) approximately -0.59; on lny(0)\ln y(0) approximately -0.39. MRW report empirical estimates very close to these, providing strong support for the augmented Solow model.

APL

⎕IO←0 ⋄ ⎕ML←1

⍝ 1. Parameters
alpha ← 1÷3 ⋄ s ← 0.20 ⋄ mu ← 0.08

⍝ 2. Steady State & Convergence
kstar ← (s ÷ mu) * ÷ 1 - alpha
ystar ← kstar * alpha
'Steady State [k*, y*]:' (⍕ 2 ⍕ kstar ystar)

lambda ← (1 - alpha) × mu
halflife ← (⍟2) ÷ lambda
'Convergence Lambda & Half-life:' (⍕ 2 ⍕ lambda halflife)

⍝ 3. Transition Path (Closed Form)
vstar ← kstar * 1 - alpha
k0 ← 0.5 ⋄ v0 ← k0 * 1 - alpha
T ← 101 ⋄ t ← ⍳T
v_path ← vstar + (v0 - vstar) × *-lambda × t
k_path ← v_path * ÷ 1 - alpha
gap ← |k_path - kstar
'Gap at t=0, 13, 26:' (⍕ 2 ⍕ gap[0 13 26])

⍝ 4. MRW Simulation (100 Countries)
N ← 100
⍝ Kap-safe randoms (0-1 floats)
rand ← {(?N⍴1000)÷1000}
s_i   ← 0.05 + 0.35 × rand 0
n_i   ← 0.00 + 0.03 × rand 0
mu_i  ← n_i + 0.05
k0_i  ← 0.5 + 2 × rand 0

kstar_i ← (s_i ÷ mu_i) * ÷ 1 - alpha
lny0_i  ← ⍟ k0_i * alpha
lnyT_i  ← ⍟ kstar_i * alpha
growth_i ← lnyT_i - lny0_i

⍝ 5. MRW Regression (OLS)
⍝ Flatten the coefficients
b_flat ← , b_ols

⍝ Define the labels
labels ← 'ln(s)' 'ln(n+g+d)' 'ln(y0)' 'Constant'

⍝ Format each number individually
formatted_b ← {⍕ 4 ⍕ ⍵}¨ b_flat

⍝ Zip and Mix (Notice the ⊂ around the colon!)
'MRW Coefficients (OLS Estimates):'
↑ labels ,¨ (⊂' : ') ,¨ formatted_b

⍝ In APL/Kap, ⌹ (Domino) handles the (X'X)^-1 X'y part automatically!
⍝ Simply: b = y ⌹ X
b_ols ← growth_i ⌹ Xmat

'MRW Coefficients [ln(s), ln(n+g+d), ln(y0), constant]:'
⍕ 3 ⍕ b_ols
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Python

import numpy as np
import matplotlib.pyplot as plt

# Parameters
alpha, s, mu = 1/3, 0.20, 0.08
lambda_ = (1-alpha)*mu
kstar = (s/mu)**(1/(1-alpha))
vstar = kstar**(1-alpha)

# Closed-form transition path
k0 = 0.5
T = 100
t = np.arange(T)
v0 = k0**(1-alpha)
v_path = vstar + (v0 - vstar)*np.exp(-lambda_*t)
k_path = v_path**(1/(1-alpha))

fig, axes = plt.subplots(1, 2, figsize=(12, 5))

ax = axes[0]
ax.plot(t, k_path, 'b-', linewidth=2, label='k̃(t)')
ax.axhline(kstar, color='red', linestyle='--', label=f'k̃* = {kstar:.2f}')
ax.set_xlabel('Time (years)'); ax.set_ylabel('k̃')
ax.set_title('Solow Transition Path (Closed Form)')
ax.legend()

# MRW simulation
np.random.seed(42)
N = 100
s_i   = np.random.uniform(0.05, 0.40, N)
n_i   = np.random.uniform(0.00, 0.03, N)
mu_i  = n_i + 0.05
kstar_i = (s_i/mu_i)**(1/(1-alpha))
lns   = np.log(s_i); lnmu = np.log(mu_i)

# Simulate 25-year growth: use linearized convergence
lny0  = np.random.normal(np.log(kstar_i**alpha), 0.3)   # random initial incomes
conv  = 1 - np.exp(-lambda_*25)
lnyT  = lny0 + conv*(np.log(kstar_i**alpha) - lny0)
growth_25 = lnyT - lny0

# OLS regression: growth on ln(s), ln(n+g+d), ln(y0)
X = np.column_stack([lns, lnmu, lny0, np.ones(N)])
b = np.linalg.lstsq(X, growth_25, rcond=None)[0]
print("MRW regression coefficients:")
print(f"  ln(s):         {b[0]:.3f}  (predicted: +{alpha/(1-alpha)*conv:.3f})")
print(f"  ln(n+g+δ):     {b[1]:.3f}  (predicted: {-alpha/(1-alpha)*conv:.3f})")
print(f"  ln(y₀):        {b[2]:.3f}  (predicted: {-conv:.3f})")

ax2 = axes[1]
ax2.scatter(lny0, growth_25, alpha=0.5, s=20)
ax2.set_xlabel('ln(y₀)'); ax2.set_ylabel('25-year growth')
ax2.set_title('Conditional convergence (MRW simulation)')
plt.tight_layout(); plt.show()

Julia

using LinearAlgebra, Statistics, Random

Random.seed!(42)
alpha, mu = 1/3, 0.08
lambda_ = (1-alpha)*mu

# Closed-form path
kstar(s) = (s/mu)^(1/(1-alpha))
vstar(s) = kstar(s)^(1-alpha)

function solow_path(k0, s, T)
    v0 = k0^(1-alpha); vs = vstar(s)
    t = 0:T-1
    v_t = vs .+ (v0-vs).*exp.(-lambda_.*t)
    return v_t.^(1/(1-alpha))
end

k_path = solow_path(0.5, 0.20, 100)
println("k̃* = $(round(kstar(0.20), digits=3))")
println("k̃(50) = $(round(k_path[51], digits=3))  (should be ≈ k̃*)")

# MRW simulation
N = 100
s_i  = 0.05 .+ 0.35*rand(N)
n_i  = 0.00 .+ 0.03*rand(N)
mu_i = n_i .+ 0.05
ks_i = kstar.(s_i ./ mu_i .* mu_i)   # simplify: kstar per country
lny0 = log.(kstar.(s_i).*alpha) .+ 0.3*randn(N)
conv = 1 - exp(-lambda_*25)
lnyT = lny0 .+ conv.*(log.(kstar.(s_i).^alpha) .- lny0)
growth = lnyT .- lny0

X = hcat(log.(s_i), log.(mu_i), lny0, ones(N))
b = X \ growth
println("\nMRW OLS: coefficients = ", round.(b, digits=3))

R

alpha <- 1/3; mu <- 0.08; lambda_ <- (1-alpha)*mu

# Closed-form path
kstar <- function(s) (s/mu)^(1/(1-alpha))
solow_path <- function(k0, s, T) {
  v0 <- k0^(1-alpha); vs <- kstar(s)^(1-alpha)
  t <- 0:(T-1)
  v_t <- vs + (v0-vs)*exp(-lambda_*t)
  v_t^(1/(1-alpha))
}

k_path <- solow_path(0.5, 0.20, 100)
cat(sprintf("k̃* = %.3f,  k̃(50) = %.3f\n", kstar(0.20), k_path[51]))

# MRW regression simulation
set.seed(42); N <- 100
s_i  <- runif(N, 0.05, 0.40); n_i <- runif(N, 0, 0.03); mu_i <- n_i + 0.05
lny0 <- log(kstar(s_i)^alpha) + rnorm(N, 0, 0.3)
conv <- 1 - exp(-lambda_*25)
lnyT <- lny0 + conv*(log(kstar(s_i)^alpha) - lny0)
growth <- lnyT - lny0

df <- data.frame(growth, lns=log(s_i), lnmu=log(mu_i), lny0=lny0)
fit <- lm(growth ~ lns + lnmu + lny0, data=df)
cat("\nMRW OLS coefficients:\n"); print(round(coef(fit), 3))

10.8 Programming Exercises

Exercise 10.1 (APL — Phase Diagram)

Write a dfn solow_phase ← {s mu alpha ← ⍵ ⋄ ...} that takes parameters and returns: (a) the steady state k~\tilde{k}^*, convergence rate λ\lambda, and half-life τ1/2\tau_{1/2}; (b) vectors k_grid, invest, breakeven of length 100 over k~[0.01,3k~]\tilde{k} \in [0.01, 3\tilde{k}^*]; (c) the crossing point. Plot using ]Plot or export to CSV. Verify the crossing is at k~\tilde{k}^*.

Exercise 10.2 (Python — Parameter Sensitivity)

For α{0.2,0.33,0.5}\alpha \in \{0.2, 0.33, 0.5\} and s{0.10,0.15,,0.40}s \in \{0.10, 0.15, \ldots, 0.40\}, compute: (a) the steady-state capital k~\tilde{k}^* and output y~\tilde{y}^*; (b) the Golden Rule saving rate sGR=αs^{GR} = \alpha; (c) the fraction (ssGR)/sGR(s - s^{GR})/s^{GR}. Plot a 3×63\times6 table of the dynamic efficiency gap for each (α,s)(\alpha, s) combination.

Exercise 10.3 (Julia — Non–Cobb–Douglas)

Implement the RK4 solver for the Solow model with the CES production function f(k~)=[γk~ρ+(1γ)]1/ρf(\tilde{k}) = [\gamma\tilde{k}^\rho + (1-\gamma)]^{1/\rho} (which nests Cobb–Douglas as ρ0\rho \to 0). For γ=0.4\gamma = 0.4, ρ{1,0.5,0.1,0.1,0.5,1}\rho \in \{-1, -0.5, -0.1, 0.1, 0.5, 1\}, s=0.25s = 0.25, μ=0.08\mu = 0.08: (a) find k~\tilde{k}^* numerically using Newton–Raphson; (b) compare the convergence rate to the Cobb–Douglas approximation. Does higher substitution elasticity (ρ1\rho \to 1) speed or slow convergence?

Exercise 10.4 (R — The Augmented Solow Model)

Mankiw, Romer, and Weil (1992) augment the Solow model with human capital HH: Y=KαHβ(AL)1αβY = K^\alpha H^\beta (AL)^{1-\alpha-\beta}. The fundamental equations become a 2D ODE system in (k~,h~)(\tilde{k}, \tilde{h}). (a) Derive the two ODEs. (b) Show the steady state satisfies k~=(sk1βshβ/μ)1/(1αβ)\tilde{k}^* = (s_k^{1-\beta}s_h^\beta/\mu)^{1/(1-\alpha-\beta)} and similarly for h~\tilde{h}^*. (c) Simulate 100 countries with skU[0.05,0.30]s_k \in U[0.05, 0.30], shU[0.02,0.15]s_h \in U[0.02, 0.15], nU[0,0.03]n \in U[0, 0.03], α=1/3\alpha = 1/3, β=1/3\beta = 1/3, and run the MRW regression. Do the coefficients match the theoretical predictions?

Exercise 10.5 — The AK Model Failure (\star)

For the AK production function f(k~)=Ak~f(\tilde{k}) = A\tilde{k} (linear, no diminishing returns): (a) show the Solow ODE becomes k~˙=(sAμ)k~\dot{\tilde{k}} = (sA - \mu)\tilde{k}, a linear ODE with solution k~(t)=k~0e(sAμ)t\tilde{k}(t) = \tilde{k}_0 e^{(sA-\mu)t}; (b) there is no finite steady state — the economy grows forever at rate g=sAμg^* = sA - \mu if sA>μsA > \mu; (c) the Inada conditions fail (the lower Inada condition f(0)=+f'(0) = +\infty is violated since f(k~)=Af'(\tilde{k}) = A is constant); (d) explain what this implies for the convergence result: show that cross-country income differences are permanent in the AK model but transitory in the Solow model.

Exercise 10.6 — Dynamic Efficiency Test (\star\star)

Abel, Mankiw, Summers, and Zeckhauser (1989) test dynamic efficiency by comparing aggregate profits Π=YwL\Pi = Y - wL to aggregate investment I=K˙+δKI = \dot{K} + \delta K across countries. Show that the economy is dynamically efficient iff Π>I\Pi > I (net factor payments to capital exceed net investment). (a) Express this condition in terms of the capital share α\alpha, the investment-to-output ratio I/Y=sI/Y = s, and the capital-output ratio K/YK/Y. (b) For the U.S.: α0.33\alpha \approx 0.33, s0.20s \approx 0.20, K/Y2.5K/Y \approx 2.5; evaluate the AMSZ test. (c) Simulate 50 OECD countries (with calibrated parameters from the Penn World Tables documentation) and identify which are dynamically inefficient.


10.9 Chapter Summary

Key results:

  • The Solow ODE k~˙=sf(k~)μk~\dot{\tilde{k}} = sf(\tilde{k}) - \mu\tilde{k} is derived by differentiating k~=K/(AL)\tilde{k} = K/(AL) and substituting capital accumulation and factor growth.

  • For Cobb–Douglas f(k~)=k~αf(\tilde{k}) = \tilde{k}^\alpha: the substitution v=k~1αv = \tilde{k}^{1-\alpha} transforms the nonlinear ODE into a linear one, yielding the closed-form path k~(t)=[v+(v0v)eλt]1/(1α)\tilde{k}(t) = [v^* + (v_0-v^*)e^{-\lambda t}]^{1/(1-\alpha)} with λ=(1α)μ\lambda = (1-\alpha)\mu.

  • The convergence rate λ=(1α)μ\lambda = (1-\alpha)\mu and half-life τ1/2=ln2/λ13\tau_{1/2} = \ln 2/\lambda \approx 13 years (for standard calibration) match empirical cross-country convergence estimates.

  • The Inada conditions guarantee existence and uniqueness of the steady state; a formal existence-uniqueness proof uses the intermediate value theorem and concavity.

  • The Golden Rule saving rate equals sGR=αs^{GR} = \alpha for Cobb–Douglas — countries saving more than α\alpha are dynamically inefficient; most OECD countries save less than α\alpha and are efficient.

  • In APL: the closed-form path is v_path ← vstar + (v0-vstar) × * (-lambda) × ⍳T; k_path ← v_path * ÷ 1-alpha — the entire transition path in two lines.

Connections forward: Chapter 11 shows why optimizing households (RCK) choose s<sGRs < s^{GR}, avoiding dynamic inefficiency. Chapter 17 implements the stochastic RBC extension of the Solow model by adding TFP shocks to the capital accumulation equation and solving via value function iteration.


Next: Chapter 11 — The Ramsey–Cass–Koopmans Model: Optimal Control and the Euler Equation