<p>Thank you very much for feedback. I see now that the key mistake I was making was forgetting that when we solve our system e.g. through backwards induction, our optimal choice of <span class="math-container">$C_t$</span> is always as a result of the state i.e. our constant <span class="math-container">$k_t$</span>. I have worked out the problem from scratch below which gives the same result as the envelope theorem.</p>
<p><strong>Understanding the envelope theorem:</strong> In laymen's terms would it be correct to say that when differentiating the Value function with respect to a parameter, the Envelope Theorem allows us to ignore the indirect effect of our parameters through the optimal value of the choice variables. Because we will usually get some kind of terms where they go to 0 using the FOC as I have done.</p>
<p>And that therefore, <span class="math-container">$f(k_t)$</span> is considered because the effect of <span class="math-container">$k_t$</span> is just transformed by <span class="math-container">$f$</span>, is is not happening indirectly through our Optimal Choice variable.</p>
<p><span class="math-container">$V(k_t, t) = u(c_t(k_t)) + \beta V(f(k_t) - c_t(k_t), t + 1)$</span></p>
<p>Note: <span class="math-container">$k_{t+1} = f(k_t) - c_t(k_t)$</span></p>
<p>Assuming we have solved for the optimal value of our choice variable and we denote this <span class="math-container">$c_t(k_t)$</span></p>
<p><span class="math-container">$\frac{\partial V(k_t, t)}{\partial k_t} = u'(c_t(k_t)) c_t'(k_t) + \beta V'(f(k_t) - c_t(k_t), t+1)(f'(k_t)-(c_t'(k_t))$</span></p>
<p>Where <span class="math-container">$V'(f(k_t) - c_t(k_t), t+1)$</span> is the derivative of <span class="math-container">$V$</span> with respect to <span class="math-container">$k_t$</span></p>
<p><span class="math-container">$= u'(c_t(k_t)) c_t'(k_t) + \beta V'(k_{t+1}, t+1)(f'(k_t)-(c_t'(k_t))$</span></p>
<p>= <span class="math-container">$[u'(c_t(k_t)) - \beta V'(k_{t+1}, t+1)]c_t'(k_t) + \beta V'(k_{t+1}, t+1)(f'(k_t)$</span></p>
<p>Where as a result of <span class="math-container">$c_t(k_t)$</span> being our optimal value <span class="math-container">$[u'(c_t(k_t)) - \beta V'(k_{t+1}, t+1)] = 0$</span> and hence</p>
<p><span class="math-container">$\frac{\partial V(k_t, t)}{\partial k_t} = \beta V'(k_{t+1}, t+1)(f'(k_t))$</span></p>
<p><strong>Edit 15/04/2023</strong></p>
<p>I still felt like the calculus I did wasn't quite demonstrative enough, so I added the details. But it's a hassle to type. Please let me know if it's correct!</p>
<p><a href="https://i.sstatic.net/AKMWp.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AKMWp.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-04-15T08:48:28.967Z
A quick comment yes or no, or up vote or whatever, to confirm my calculus is correct, would be much appreciated! Thank!
CormJack
CC BY-SA 4.0
2023-04-14T20:15:50.723Z
2023-04-15T08:42:27.253Z
2023-04-15T08:42:27.253Z
CormJack
<p>The key thing to note here is that in the optimum, <span class="math-container">$c_t$</span> will depend on <span class="math-container">$k_t$</span>. Thus, the value function is</p>
<p><span class="math-container">\begin{align}
V(k_t, t) &amp;= \max\{u(c_t) + \beta V(f(k_t) - c_t, t + 1)\}\\
&amp;= u(c_t(k_t)) + \beta V(f(k_t) - c_t(k_t), t + 1)\},
\end{align}</span></p>
<p>where <span class="math-container">$c_t(k_t)$</span> is the optimal choice. You could either differentiate this and plug in the first order condition with respect to <span class="math-container">$c_t$</span>, or use the envelope theorem. Now, the envelope theorem says that for any (sufficiently nice) <span class="math-container">$f(y) = \max_x g(x, y)$</span>,</p>
<p><span class="math-container">$$
\frac{\mathrm{d}f(y)}{\mathrm{d}y} = \frac{\partial g(x, y)}{\partial y} \bigg\rvert_{x = x(y)},
$$</span>
where <span class="math-container">$x(y)$</span> maximizes <span class="math-container">$g$</span> for any given <span class="math-container">$y$</span>.</p>
<p>I hope this gives you what you need to fill in the rest. I recommend trying both approaches.</p>

CC BY-SA 4.0
2023-04-14T20:17:14.713Z
Thanks alot for this, your key observation was very helpful. I worked through the problem directly to get the manuel calculus aligned with the envelope theorem result. I believe I have done it correctly. Please do let me know! Thanks!
CormJack
CC BY-SA 4.0
2023-04-14T20:45:06.650Z
Looks correct to me! @CormJack
Wittgenstein's Poker
CC BY-SA 4.0
2023-04-15T08:47:33.923Z
I've updated It again. Just to be more specific, can you let me know if it's correct? Particularly the triple chain rule part! Thanks!
CormJack
CC BY-SA 4.0
2023-04-14T11:32:34.940Z
2023-04-14T11:32:34.940Z
Wittgenstein's Poker
<p>I'm unsure where the envelope theorem comes into play when i differentiate the Bellman Equation with respect to <span class="math-container">$k_t$</span>.</p>
<p>To me it looks like the regular chain rule and in fact the exact opposite of the envelope theorem?</p>
<p>Given the general Bellman Equation:</p>
<p><span class="math-container">$V(k_t, t) = max\{u(c_t) + δV(k_{t+1}, t + 1)\}$</span>
<span class="math-container">$s.t. k_{t+1} = f(k_t)-  c_t$</span></p>
<p>When we ply in the constraint to the objective function we get:</p>
<p><span class="math-container">$V(k_t, t) = max\{u(c_t) + δV(f(k_t)-  c_t, t + 1)\}$</span></p>
<p>I'm then told to &quot;<em>differentiate with respect to <span class="math-container">$k_t$</span> using the envelope theorem</em>&quot;, giving:</p>
<p><span class="math-container">$V'(k_t, t) = δV'(f(k_t), t + 1)f'(k_t)$</span></p>
<ol>
<li>To me this is what i would get if they told me to differentiate with respect to <span class="math-container">$k_t$</span> without any mention of the envelope theorem, i.e. just using the chain rule.</li>
<li>My understanding of the envelope theorem is that when we differentiate a value function, with respect to a constraint we are bale to ignore the indirect effect of such parameters on the objective function. Surely given that <span class="math-container">$k_t$</span> appears &quot;indirectly&quot; via <span class="math-container">$f$</span> i.e.  <span class="math-container">$f(k_t)$</span> then the Envelope theorem would imply we could ignore it?</li>
</ol>
<p>Obviously I'm missing something. So the usual helpful insights are much appreciated!</p>

CC BY-SA 4.0
2023-04-14T11:16:44.187Z
Hi @CornJack. I used this text during course. Lots of focus on envelope theorem and Bellmans. See maybe the example on p.162 https://andrewclausen.net/teaching/econtheory.pdf
EB3112
CC BY-SA 4.0
2023-04-14T20:22:34.630Z
Thanks alot for your comment @EB3112 . I've now written out an answer and I feel like I understand it. But I must confess I'm unsure about some things on the example on page 162. It's not obvious to me how he get's rid of $βV'(k)$ and I don't understand the notation $k' = k'(k)$ the derivative of k is the derivative of k as a fcuntion of k?
CormJack
CC BY-SA 4.0
2024-06-18T10:05:31.940Z
@EB3112: Thanks for the link but something happened to it that I don't think if correctable without contacting the professor of the course. It's blank when I go there. Maybe he made it restricted ?
mark leeds
CC BY-SA 4.0
2024-06-18T10:42:59.333Z
Sorry @markleeds. It's been over a year since I was on that particular course (as an adult course thing). However, I think if you contacted Dr. Clausen, he would provide you with a manuscript to read
EB3112
CC BY-SA 4.0
2024-06-18T19:29:38.380Z
Thanks EB3112. I'll ask Dr. Clausen about the econtheory.pdf file and the class !!!!! It sounds like a worthwhile class.  If he gives me a different link, I'll post it here.  Your help is appreciated.
mark leeds
CC BY-SA 4.0
2024-06-19T03:16:13.013Z
EB3112: I spoke to Dr. Clausen and it was a problem with latex. So, he fixed the problem and the link works now. I'll check out the document and maybe get a print of it if I really like it. Thanks again for your help.
mark leeds
CC BY-SA 4.0
2024-06-19T03:21:34.663Z
At a quick glance, it looks amazing. The appendices themselves make it worthwhile to get it bounded. No econ book that I know of has that kind of coverage. At the same time, I'm not knowledgeable about what's out there book wise. All the best.
mark leeds
<optimization><dynamic-programming><bellman-equations>
Bellman Equation & Envelope Theorem
CormJack
# Bellman Equation & Envelope Theorem

(Asked by: username_0 on 2023-04-14)

I'm unsure where the envelope theorem comes into play when i differentiate the Bellman Equation with respect to $k\_t$.

To me it looks like the regular chain rule and in fact the exact opposite of the envelope theorem?

Given the general Bellman Equation:

$V(k\_t, t) = max\{u(c\_t) + δV(k\_{t+1}, t + 1)\}$
$s.t. k\_{t+1} = f(k\_t)- c\_t$

When we ply in the constraint to the objective function we get:

$V(k\_t, t) = max\{u(c\_t) + δV(f(k\_t)- c\_t, t + 1)\}$

I'm then told to "*differentiate with respect to $k\_t$ using the envelope theorem*", giving:

$V'(k\_t, t) = δV'(f(k\_t), t + 1)f'(k\_t)$

1. To me this is what i would get if they told me to differentiate with respect to $k\_t$ without any mention of the envelope theorem, i.e. just using the chain rule.
2. My understanding of the envelope theorem is that when we differentiate a value function, with respect to a constraint we are bale to ignore the indirect effect of such parameters on the objective function. Surely given that $k\_t$ appears "indirectly" via $f$ i.e. $f(k\_t)$ then the Envelope theorem would imply we could ignore it?

Obviously I'm missing something. So the usual helpful insights are much appreciated!

**Tags:** optimization, dynamic-programming, bellman-equations

> **Comments:**
> **username_1**: Hi @CornJack. I used this text during course. Lots of focus on envelope theorem and Bellmans. See maybe the example on p.162 https://andrewclausen.net/teaching/econtheory.pdf  
> **username_0**: Thanks alot for your comment @username_1 . I've now written out an answer and I feel like I understand it. But I must confess I'm unsure about some things on the example on page 162. It's not obvious to me how he get's rid of $βV'(k)$ and I don't understand the notation $k' = k'(k)$ the derivative of k is the derivative of k as a fcuntion of k?  
> **username_2**: @username_1: Thanks for the link but something happened to it that I don't think if correctable without contacting the professor of the course. It's blank when I go there. Maybe he made it restricted ?  
> **username_1**: Sorry @markleeds. It's been over a year since I was on that particular course (as an adult course thing). However, I think if you contacted Dr. Clausen, he would provide you with a manuscript to read  
> **username_2**: Thanks username_1. I'll ask Dr. Clausen about the econtheory.pdf file and the class !!!!! It sounds like a worthwhile class.  If he gives me a different link, I'll post it here.  Your help is appreciated.  
> **username_2**: username_1: I spoke to Dr. Clausen and it was a problem with latex. So, he fixed the problem and the link works now. I'll check out the document and maybe get a print of it if I really like it. Thanks again for your help.  
> **username_2**: At a quick glance, it looks amazing. The appendices themselves make it worthwhile to get it bounded. No econ book that I know of has that kind of coverage. At the same time, I'm not knowledgeable about what's out there book wise. All the best.  

---

## 2 answers

### Answer by username_3 on 2023-04-14. Score: 3 | Accepted answer

The key thing to note here is that in the optimum, $c\_t$ will depend on $k\_t$. Thus, the value function is

\begin{align}
V(k\_t, t) &= \max\{u(c\_t) + \beta V(f(k\_t) - c\_t, t + 1)\}\\
&= u(c\_t(k\_t)) + \beta V(f(k\_t) - c\_t(k\_t), t + 1)\},
\end{align}

where $c\_t(k\_t)$ is the optimal choice. You could either differentiate this and plug in the first order condition with respect to $c\_t$, or use the envelope theorem. Now, the envelope theorem says that for any (sufficiently nice) $f(y) = \max\_x g(x, y)$,

$$
\frac{\mathrm{d}f(y)}{\mathrm{d}y} = \frac{\partial g(x, y)}{\partial y} \bigg\rvert\_{x = x(y)},
$$
where $x(y)$ maximizes $g$ for any given $y$.

I hope this gives you what you need to fill in the rest. I recommend trying both approaches.

> **Comments:**
> **username_0**: Thanks alot for this, your key observation was very helpful. I worked through the problem directly to get the manuel calculus aligned with the envelope theorem result. I believe I have done it correctly. Please do let me know! Thanks!  
> **username_3**: Looks correct to me! @username_0  
> **username_0**: I've updated It again. Just to be more specific, can you let me know if it's correct? Particularly the triple chain rule part! Thanks!  

---

### Answer by username_0 on 2023-04-14. Score: -1

Thank you very much for feedback. I see now that the key mistake I was making was forgetting that when we solve our system e.g. through backwards induction, our optimal choice of $C\_t$ is always as a result of the state i.e. our constant $k\_t$. I have worked out the problem from scratch below which gives the same result as the envelope theorem.

**Understanding the envelope theorem:** In laymen's terms would it be correct to say that when differentiating the Value function with respect to a parameter, the Envelope Theorem allows us to ignore the indirect effect of our parameters through the optimal value of the choice variables. Because we will usually get some kind of terms where they go to 0 using the FOC as I have done.

And that therefore, $f(k\_t)$ is considered because the effect of $k\_t$ is just transformed by $f$, is is not happening indirectly through our Optimal Choice variable.

$V(k\_t, t) = u(c\_t(k\_t)) + \beta V(f(k\_t) - c\_t(k\_t), t + 1)$

Note: $k\_{t+1} = f(k\_t) - c\_t(k\_t)$

Assuming we have solved for the optimal value of our choice variable and we denote this $c\_t(k\_t)$

$\frac{\partial V(k\_t, t)}{\partial k\_t} = u'(c\_t(k\_t)) c\_t'(k\_t) + \beta V'(f(k\_t) - c\_t(k\_t), t+1)(f'(k\_t)-(c\_t'(k\_t))$

Where $V'(f(k\_t) - c\_t(k\_t), t+1)$ is the derivative of $V$ with respect to $k\_t$

$= u'(c\_t(k\_t)) c\_t'(k\_t) + \beta V'(k\_{t+1}, t+1)(f'(k\_t)-(c\_t'(k\_t))$

= $[u'(c\_t(k\_t)) - \beta V'(k\_{t+1}, t+1)]c\_t'(k\_t) + \beta V'(k\_{t+1}, t+1)(f'(k\_t)$

Where as a result of $c\_t(k\_t)$ being our optimal value $[u'(c\_t(k\_t)) - \beta V'(k\_{t+1}, t+1)] = 0$ and hence

$\frac{\partial V(k\_t, t)}{\partial k\_t} = \beta V'(k\_{t+1}, t+1)(f'(k\_t))$

**Edit 15/04/2023**

I still felt like the calculus I did wasn't quite demonstrative enough, so I added the details. But it's a hassle to type. Please let me know if it's correct!

[![enter image description here](https://i.sstatic.net/AKMWp.jpg)](https://i.sstatic.net/AKMWp.jpg)

> **Comments:**
> **username_0**: A quick comment yes or no, or up vote or whatever, to confirm my calculus is correct, would be much appreciated! Thank!  

---

