Foundations of Dynamic Economic Analysis: Optimal Control Theory and Applications