<p>You can solve it in this way:</p>
<p><span class="math-container">$$\max_{\{(a_1,a_2)\in\mathbb{R}^2_+|(1+\rho)a_1+a_2=(1+\rho)w_1+w_2\}} \left[\left[\max_{\{(x_1,y_1)\in\mathbb{R}^2_+|p_{x,1}x_1+p_{y,1}y_1\leq a_1\}} u(x_1,y_1)\right]+\beta\left[\max_{\{(x_2,y_2)\in\mathbb{R}^2_+|p_{x,2}x_2+p_{y,2}y_2\leq a_2\}} u(x_2,y_2)\right]\right]$$</span></p>
<p>Another way to write the above problem is as follows:</p>
<p>If <span class="math-container">$v(p_X, p_Y, M)$</span> denote the indirect utility function associated with the utility maximisation problem:</p>
<p><span class="math-container">$\displaystyle\max_{(x,y)\in\mathbb{R}^2_+} u(x,y)$</span>
subject to <span class="math-container">$p_Xx+p_Yy\leq M$</span></p>
<p>then the above problem can be re-written as:</p>
<p><span class="math-container">$$\max_{\{(a_1,a_2)\in\mathbb{R}^2_+|(1+\rho)a_1+a_2=(1+\rho)w_1+w_2\}} \left(v(p_{x,1},p_{y,1},a_1)+\beta v(p_{x,2},p_{y,2},a_2)\right)$$</span></p>
<p>which can be written in another way (Bellman-style):</p>
<p><span class="math-container">$$\max_{0\leq a_1\leq w_1+ \frac{w_2}{(1+\rho)}} \left(v(p_{x,1},p_{y,1},a_1)+\beta v(p_{x,2},p_{y,2},(1+\rho)w_1+w_2-(1+\rho)a_1)\right)$$</span></p>
<p>Similar example is discussed in this video: <a href="https://youtu.be/JsVd7nZ1tvs?feature=shared" rel="nofollow noreferrer">https://youtu.be/JsVd7nZ1tvs?feature=shared</a></p>

CC BY-SA 4.0
2024-07-11T04:32:37.150Z
2024-07-11T08:23:50.177Z
2024-07-11T08:23:50.177Z
Amit
<p>I guess you can use a Bellman approach.</p>
<p>Observe that optimal <span class="math-container">$x_2$</span> and <span class="math-container">$y_2$</span> are functions of <span class="math-container">$C_2$</span> and second-period prices - I suppress dependence on second-period prices for notational simplicity.</p>
<p>You then have</p>
<p><span class="math-container">$$\max_{x_1,y_1} U(x_1,y_1) + \beta U(x_2(C_2(C_1(x_1,y_1))),y_2(C_2(C_1(x_1,y_1))))$$</span></p>
<p>Because <span class="math-container">$C_2$</span> is function of <span class="math-container">$C_1$</span> as you write it yourself</p>
<p><span class="math-container">$$C_2 = w_2 + (1+\rho)(w_1 -C_1)$$</span></p>
<p>and offcourse <span class="math-container">$C_1$</span> is function of <span class="math-container">$x_1$</span> and <span class="math-container">$y_1$</span>.</p>
<p>Consider the first order condition for <span class="math-container">$x_1$</span> which is found to be</p>
<p><span class="math-container">$$\frac{\partial U}{\partial x_1} + \beta \frac{\partial U}{\partial x_2}\frac{\partial x_2}{\partial C_2}\frac{\partial C_2}{\partial C_1}\frac{\partial C_1}{\partial x_1} + \beta \frac{\partial U}{\partial y_2}\frac{\partial y_2}{\partial C_2}\frac{\partial C_2}{\partial C_1}\frac{\partial C_1}{\partial x_1}=0$$</span></p>
<p>then you do divide by <span class="math-container">$\frac{\partial C_1}{\partial x_1}$</span> and use that</p>
<p><span class="math-container">$$\frac{\partial U/\partial x_1}{\partial C_1/\partial x_1} = \frac{\partial U}{\partial C_1}$$</span></p>
<p>in order to get</p>
<p><span class="math-container">$$\frac{\partial U}{\partial C_1} + \beta \frac{\partial U}{\partial x_2}\frac{\partial x_2}{\partial C_2}\frac{\partial C_2}{\partial C_1} + \beta \frac{\partial U}{\partial y_2}\frac{\partial y_2}{\partial C_2}\frac{\partial C_2}{\partial C_1}=0$$</span></p>
<p>then use that <span class="math-container">$\partial C_2/\partial C_1 = -(1+\rho)$</span> to get</p>
<p><span class="math-container">$$\frac{\partial U}{\partial C_1} - \beta (1+\rho) \left[\frac{\partial U}{\partial x_2}\frac{\partial x_2}{\partial C_2} + \frac{\partial U}{\partial y_2}\frac{\partial y_2}{\partial C_2}\right]=0,$$</span></p>
<p>and by chain rule it follows</p>
<p><span class="math-container">$$\frac{\partial U}{\partial C_1} - \beta (1+\rho) \frac{\partial U}{\partial C_2} =0,$$</span></p>

CC BY-SA 4.0
2024-07-10T22:23:33.463Z
2024-07-10T22:23:33.463Z
Jesper Hybel
<p>I'm trying to solve a two-period two-good consumption problem. Endowment in the two periods is <span class="math-container">$w_1$</span> and <span class="math-container">$w_2$</span>, the interest rate is <span class="math-container">$\rho$</span>, and total utility is
<span class="math-container">$$
 U(x_1, y_1) + \beta U(x_2, y_2)\ .
$$</span></p>
<p>So far I have that for each <span class="math-container">$t$</span>, total consumption is given by
<span class="math-container">$$
 C_t = x_t p_{xt} + y p_{yt}\ , \qquad \qquad (1)
$$</span>
and the budget constraint is
<span class="math-container">$$
 C_2 = w_2 + (1 + \rho)(w_1 - C_1)\ . \qquad \qquad (2)
$$</span>
So in the end, I need to solve
<span class="math-container">$$
 \max_{x_1, y_1, x_2, y_2} U(x_1, y_1) + \beta U(x_2, y_2)
$$</span>
subject to (1) and (2).</p>
<p>I'm having trouble getting the optimisation off the ground. If I write down the Lagrangian and take derivatives I don't get anything approximating the Euler equation
<span class="math-container">$$
 u'(C_1) = \beta(1 + \rho)u'(C_2) \qquad \qquad (3)
$$</span>
which I see everywhere for these types of problems.</p>
<p>My intuition tells me that I should be able to solve this problem in two stages. If I define <span class="math-container">$u$</span> to be the indirect utility function
<span class="math-container">$$
u(C) = U(x^*(C, p_{x}, p_{y}), y^*(C, p_{x}, p_{y}))\ ,
$$</span>
where <span class="math-container">$x^*$</span> and <span class="math-container">$y^*$</span> are the (still unknown) optimal consumption rules, then I should be able to</p>
<ol>
<li>optimally allocate money over the two periods by solving (3) subject to (2);</li>
<li>optimally consume in each period by solving
<span class="math-container">$$
  \frac{\partial_x U}{p_{xt}} = \frac{\partial_y U}{p_{yt}}
 $$</span>
subject to (1).</li>
</ol>
<p>Is this correct? If so, how can I formalize this argument? If not, what am I missing? References appreciated!</p>

<reference-request><consumer-theory><intertemporal-choice>
Two-period two-good optimal consumption problem
Anthony
# Two-period two-good optimal consumption problem

(Asked by: username_0 on 2024-07-10)

I'm trying to solve a two-period two-good consumption problem. Endowment in the two periods is $w\_1$ and $w\_2$, the interest rate is $\rho$, and total utility is
$$
U(x\_1, y\_1) + \beta U(x\_2, y\_2)\ .
$$

So far I have that for each $t$, total consumption is given by
$$
C\_t = x\_t p\_{xt} + y p\_{yt}\ , \qquad \qquad (1)
$$
and the budget constraint is
$$
C\_2 = w\_2 + (1 + \rho)(w\_1 - C\_1)\ . \qquad \qquad (2)
$$
So in the end, I need to solve
$$
\max\_{x\_1, y\_1, x\_2, y\_2} U(x\_1, y\_1) + \beta U(x\_2, y\_2)
$$
subject to (1) and (2).

I'm having trouble getting the optimisation off the ground. If I write down the Lagrangian and take derivatives I don't get anything approximating the Euler equation
$$
u'(C\_1) = \beta(1 + \rho)u'(C\_2) \qquad \qquad (3)
$$
which I see everywhere for these types of problems.

My intuition tells me that I should be able to solve this problem in two stages. If I define $u$ to be the indirect utility function
$$
u(C) = U(x^\*(C, p\_{x}, p\_{y}), y^\*(C, p\_{x}, p\_{y}))\ ,
$$
where $x^\*$ and $y^\*$ are the (still unknown) optimal consumption rules, then I should be able to

1. optimally allocate money over the two periods by solving (3) subject to (2);
2. optimally consume in each period by solving
   $$
   \frac{\partial\_x U}{p\_{xt}} = \frac{\partial\_y U}{p\_{yt}}
   $$
   subject to (1).

Is this correct? If so, how can I formalize this argument? If not, what am I missing? References appreciated!

**Tags:** reference-request, consumer-theory, intertemporal-choice


---

## 2 answers

### Answer by username_1 on 2024-07-11. Score: 2 | Accepted answer

You can solve it in this way:

$$\max\_{\{(a\_1,a\_2)\in\mathbb{R}^2\_+|(1+\rho)a\_1+a\_2=(1+\rho)w\_1+w\_2\}} \left[\left[\max\_{\{(x\_1,y\_1)\in\mathbb{R}^2\_+|p\_{x,1}x\_1+p\_{y,1}y\_1\leq a\_1\}} u(x\_1,y\_1)\right]+\beta\left[\max\_{\{(x\_2,y\_2)\in\mathbb{R}^2\_+|p\_{x,2}x\_2+p\_{y,2}y\_2\leq a\_2\}} u(x\_2,y\_2)\right]\right]$$

Another way to write the above problem is as follows:

If $v(p\_X, p\_Y, M)$ denote the indirect utility function associated with the utility maximisation problem:

$\displaystyle\max\_{(x,y)\in\mathbb{R}^2\_+} u(x,y)$
subject to $p\_Xx+p\_Yy\leq M$

then the above problem can be re-written as:

$$\max\_{\{(a\_1,a\_2)\in\mathbb{R}^2\_+|(1+\rho)a\_1+a\_2=(1+\rho)w\_1+w\_2\}} \left(v(p\_{x,1},p\_{y,1},a\_1)+\beta v(p\_{x,2},p\_{y,2},a\_2)\right)$$

which can be written in another way (Bellman-style):

$$\max\_{0\leq a\_1\leq w\_1+ \frac{w\_2}{(1+\rho)}} \left(v(p\_{x,1},p\_{y,1},a\_1)+\beta v(p\_{x,2},p\_{y,2},(1+\rho)w\_1+w\_2-(1+\rho)a\_1)\right)$$

Similar example is discussed in this video: <https://youtu.be/JsVd7nZ1tvs?feature=shared>


---

### Answer by username_2 on 2024-07-10. Score: 2

I guess you can use a Bellman approach.

Observe that optimal $x\_2$ and $y\_2$ are functions of $C\_2$ and second-period prices - I suppress dependence on second-period prices for notational simplicity.

You then have

$$\max\_{x\_1,y\_1} U(x\_1,y\_1) + \beta U(x\_2(C\_2(C\_1(x\_1,y\_1))),y\_2(C\_2(C\_1(x\_1,y\_1))))$$

Because $C\_2$ is function of $C\_1$ as you write it yourself

$$C\_2 = w\_2 + (1+\rho)(w\_1 -C\_1)$$

and offcourse $C\_1$ is function of $x\_1$ and $y\_1$.

Consider the first order condition for $x\_1$ which is found to be

$$\frac{\partial U}{\partial x\_1} + \beta \frac{\partial U}{\partial x\_2}\frac{\partial x\_2}{\partial C\_2}\frac{\partial C\_2}{\partial C\_1}\frac{\partial C\_1}{\partial x\_1} + \beta \frac{\partial U}{\partial y\_2}\frac{\partial y\_2}{\partial C\_2}\frac{\partial C\_2}{\partial C\_1}\frac{\partial C\_1}{\partial x\_1}=0$$

then you do divide by $\frac{\partial C\_1}{\partial x\_1}$ and use that

$$\frac{\partial U/\partial x\_1}{\partial C\_1/\partial x\_1} = \frac{\partial U}{\partial C\_1}$$

in order to get

$$\frac{\partial U}{\partial C\_1} + \beta \frac{\partial U}{\partial x\_2}\frac{\partial x\_2}{\partial C\_2}\frac{\partial C\_2}{\partial C\_1} + \beta \frac{\partial U}{\partial y\_2}\frac{\partial y\_2}{\partial C\_2}\frac{\partial C\_2}{\partial C\_1}=0$$

then use that $\partial C\_2/\partial C\_1 = -(1+\rho)$ to get

$$\frac{\partial U}{\partial C\_1} - \beta (1+\rho) \left[\frac{\partial U}{\partial x\_2}\frac{\partial x\_2}{\partial C\_2} + \frac{\partial U}{\partial y\_2}\frac{\partial y\_2}{\partial C\_2}\right]=0,$$

and by chain rule it follows

$$\frac{\partial U}{\partial C\_1} - \beta (1+\rho) \frac{\partial U}{\partial C\_2} =0,$$


---

