Dynamic optimization :the calculus of variations and optimal control in economics and management