In this work, we propose a generalized, second-order, nonstandard finite difference (NSFD) method for non-autonomous dynamical systems. The proposed method combines the NSFD framework with a new non-local approximation of the right-hand side function. This method achieves second-order convergence and unconditionally preserves the positivity of solutions for all step sizes. Especially, it avoids the restrictive conditions required by many existing positivity-preserving, second-order NSFD methods. The method is easy to implement and computationally efficient. Numerical experiments, including an improved NSFD scheme for an SIR epidemic model, confirm the theoretical results. Additionally, we demonstrate the method's applicability to nonlinear partial differential equations and boundary value problems with positive solutions, showcasing its versatility in real-world modeling.
翻译:暂无翻译