Solving the task optimization problem using quasi-Newton methods.