In this paper, the Cauchy problem for the Helmholtz equation, also known as the continuation problem, is considered. The continuation problem is reduced to a boundary inverse problem for a well-posed direct problem. A generalized solution to the direct problem is obtained and an estimate of its stability is given. The inverse problem is reduced to an optimization problem solved using the gradient method. The convergence of the Landweber method with respect to the functionals is compared with the convergence of the Nesterov method. The calculation of the gradient in discrete form, which is often used in the numerical solutions of the inverse problem, is described. The formulation of the conjugate problem in discrete form is presented. After calculating the gradient, an algorithm for solving the inverse problem using the Nesterov method is constructed. A computational experiment for the boundary inverse problem is carried out, and the results of the comparative analysis of the Landweber and Nesterov methods in a graphical form are presented.