2. Cake-eating Problem
Andy Lim receives his favorite chocolate cake on his
birthday celebration. He wants to maximize his
consumption on the chocolate cake before his siblings
arrive within 40 minutes.
His problem is represented by:
2
40 y t
max dt
0 2
Subject to x’ = y; x(0) = 20; x(40) = 0
where t is time;
x is the size of the cake (state variable); and
y is his consumption (control variable).
3. The Hamiltonian:
where λ is the co-state variable
We must satisfy the following conditions:
1. Maximize H with respect to y
7. Integrating and x’ yields to and
respectively.
Substituting:
At t = 0, x = 20
8. At t = 40, x = 0
So our optimal solutions are: ,
and
9. Interpretation
If Andy maximizes his consumption on the cake, the
size of the cake changes by .
His consumption decreases at a constant rate of
and his marginal utility is also .