LBFGS method for solving quadratic functions