Convex And Nonconvex Optimization