Optimal Control Theory and Static Optimization in Economics