Introduction to methods of optimization