February 7, 2021, Christopher D. Carroll Envelope
This handout shows how the Envelope theorem is used to derive the consumption Euler equation in a multiperiod optimization problem with geometric discounting and intertemporally separable utility.
The consumer’s goal from the perspective of date is to
 (1) 
subject to the dynamic budget constraint
 (2) 
The problem can be written in Bellman equation form as
 (3) 
The ﬁrst order condition for (3) can be written as
 (4) 
and we can deﬁne a function that returns the that solves the max problem for any given . That is, for the ﬁrst order condition (4) will hold so that
 (5) 
Now deﬁne a function
 (6) 
with partial derivatives
 (7) 
 (8) 
and note that by deﬁnition
 (9) 
The Chain Rule of diﬀerentiation tells us that

Here’s the key insight: The assumption that consumers are optimizing means that we will always be evaluating the value function and its derivatives at a that satisﬁes the ﬁrstorder optimality condition (5).^{1} Thus we have from (7) that
 (10) 
This means that the second term in (10) is always equal to zero, so from (8) we obtain
 (11) 
Now notice that the RHS’s of (4) and (11) are identical, so we can equate the left hand sides,
 (12) 
and since a corresponding equation will hold in period we can rewrite (11) as
 (13) 
The general principle can be condensed into a rule of thumb by realizing that the Envelope theorem will always imply that the total derivative of a value function with respect to any choice variable must be equal to zero for optimizing consumers (because the ﬁrst order condition holds). Thus we could have obtained the result immediately by treating as though it were a constant (that is, treating the problem as though ) and taking the derivative of Bellman’s equation with respect to directly. This leads immediately to the key result:
 (14) 