Optimal control with multiple control periods

The multiperiod optimal control problem is formulated and solved using dynamic programming.