A nonlinear oscillatory system described by ordinary differential equations with variable coefficients is considered. It is assumed that in the time interval under consideration, the solution of the system is sufficiently smooth - without discontinuities, collisions and bifurcations. From an inhomogeneous system of equations, terms that depend linearly on coordinates, velocities and accelerations and terms that depend non-linearly on these variables are explicitly distinguished. A new approach is proposed for numerical solution by the step method of the initial problem described by such a system of ordinary differential equations of the second order. At the integration step, unknown functions are represented as a sum of functions satisfying the initial conditions: a linear Euler solution and several given correcting functions in the form of polynomials of the second and higher degrees with unknown coefficients. The differential equations at the step are satisfied approximately in the sense of a weak solution by the Galerkin method on a system of corrective functions. Algebraic equations with nonlinear terms are obtained, which are solved by iteration, starting in the first approximation with a linear solution. The resulting solution at the end of this step is used as the initial conditions for the next step. As an example, we consider one homogeneous second-order differential equation without the first derivative with strong cubic nonlinearity in coordinate (at maximum amplitude, the nonlinear force is twice the linear force). This equation has an exact periodic solution in the form of an integral of the energy of a conservative system, which is used to estimate the accuracy of numerical solutions obtained by Galerkin, Runge-Kutta and Adams methods of the second order, as well as by Radau5 and BDF methods at various time intervals (up to 8000 periods of free oscillations of the system) using various constant integration steps (from 0.0025 fractions of a period). At the same time, in the Galerkin method, four identical correction functions were used at each step in the form of polynomials from the second to the fifth degree. It is shown that for large time intervals of calculations, the Galerkin method has a higher accuracy compared to other numerical methods considered. Therefore, it can be used for the numerical solution of nonlinear problems in which it is required to solve them over long time intervals; for example, when calculating steady-state limit cycles of nonlinear oscillations and chaotic nonlinear oscillations with strange attractors.
Русских С.В., Шклярчук Ф.Н. Применение одношагового метода Галеркина для решения системы обыкновенных дифференциальных уравнений с начальными условиями. Математическое моделирование и численные методы, 2022, № 3, с. 18–32.