Here, we give a two phases algorithm based on integrating differential evolution (DE) algorithm with modified hybrid genetic algorithm (MHGA) for solving the associated nonlinear programming problem of a nonlinear optimal control problem. In the first phase, DE starts with a completely random initial population where each individual, or solution, is a random matrix of control input values in time nodes. After phase 1, to achieve more accurate solutions, we increase the number of time nodes. The values of the associated new control inputs are estimated by linear or spline interpolations using the curves computed in the phase 1. In addition, to maintain the diversity in the population, some additional individuals are added randomly. Next, in the second phase, MHGA starts by the new population constructed by the above procedure and tries to improve the obtained solutions at the end of phase 1. We implement our proposed algorithm on some well-known nonlinear optimal control problems. The numerical results show the proposed algorithm can find almost better solution than other proposed algorithms. |