In this paper, we suggest the iterative algorithm for a variational inequality by using the auxiliary principle technique, which is closely related to the optimal boundary control of time-varying population system with age-dependence and spatial diffusion. We also prove the convergence of iterative sequences generated by the algorithm.