A simple core control code is developed for the control of a nuclear reactor in the load following operation. The core state equations are described by the one-group diffusion equation with moderator temperature and xenon feedbacks and iodine-xenon dynamics equations. The control via control rod, boron, and coolant inlet temperature is considered. To avoid the conventional difficulties of a two-point boundary value problem, the optimal control problem is solved by the direct numerical technique of the mathematical programming without the separation of space and time variables. This quadratic programming problem is solved by the Davidon-Fletcher-Powell method, which is a general unconstrained optimization method. In the cases of the load following operation of Korea Nuclear Units 7 and 8, the results obtained by using the present model show that the scheduled load demand is successfully followed, and the power distribution maintains the desired distribution with a minimum amount of control action.