Chapter 18 - Calculus of Variation and Dynamic Programming