open access articleMotivated by the limited work performed on the development of computational techniques for solving the nonlinear Schrödinger equation with time-dependent coefficients, we develop a modified Runge-Kutta pair with improved periodicity and stability characteristics. Additionally, we develop a modified step size control algorithm, which increases the efficiency of our pair and all other pairs included in the numerical experiments. The numerical results on the nonlinear Schrödinger equation with periodic solution verified the superiority of the new algorithm in terms of efficiency. The new method also presents a good behaviour of the maximum absolute error and the global norm in time, even after a high number of oscillations