This study presents a novel algorithm that can solve a class of second-order nonlinear boundary value problems (BVPs) with arbitrary boundary conditions. The proposed approach combines the homotopy perturbation method (HPM) with multiscale functions. Firstly, the HPM transforms the nonlinear governing equations into a series of linear subproblems. Multiscale functions are then employed to find approximate solutions to the linear equations. Rigorous convergence analysis and error estimates have been established for the algorithm. Numerical examples are examined to validate the efficiency and stability of the scheme. These examples include second-order nonlinear BVPs and systems of nonlinear equations incorporating various boundary conditions, such as Dirichlet, Neumann, integral and Robin types. The test results demonstrate that the proposed method yields highly accurate approximations that closely match the analytical solutions. Compared with several existing schemes documented in the literature, the proposed method offers improved accuracy.
Zhang et al. (Tue,) studied this question.