A first course in optimization theory