  In this paper, we consider the problem of constructing new optimal explicit
and implicit Adams-type difference formulas for finding an approximate solution
to the Cauchy problem for an ordinary differential equation in a Hilbert space.
In this work, I minimize the norm of the error functional of the difference
formula with respect to the coefficients, we obtain a system of linear
algebraic equations for the coefficients of the difference formulas. This
system of equations is reduced to a system of equations in convolution and the
system of equations is completely solved using a discrete analog of a
differential operator $d^2/dx^2-1$. Here we present an algorithm for
constructing optimal explicit and implicit difference formulas in a specific
Hilbert space. In addition, comparing the Euler method with optimal explicit
and implicit difference formulas, numerical experiments are given. Experiments
show that the optimal formulas give a good approximation compared to the Euler
method.
