A method of goal function second derivatives approximation is developed. It is based on the recurrent least squares method and the modified Kaczmarz algorithm. The technique allows to use highly effective methods of second order, for example, Newton type without additional computational costs to build finite difference approximations of derivatives or other direct methods of derivative calculation. The developed technology is focused on solving convex and non-convex nonlinear programming problems. The two approaches to constructing a recursive procedure for estimating second derivatives can be applied to second-order methods of nonlinear programming. Thus, the starting point of the Hessian is computed (approximated) directly, for example on the basis of finite difference approximations of derivatives. Next, while running the chosen second-order method, the matrix of second derivatives is consistently updated and refined based on the proposed technologies, allowing the significantly reduce the computational costs.