Text this: Development of a numerical method for solving optimization problems approximation of the function given approximately and its derivatives based on the variational approach