The rapid increase of computational capability due to high-performance processors and parallel processing, as well as continual decreases of hardware costs, have revived interest in previously overlooked numerical methods. The practical application of Dynamic Programming, one such method for trajectory optimization, has been prevented by the “menace of the expanding grid”, otherwise known as the dimensional difference problem. This problem occurs in cases where the number of control variables is fewer than that of state variables. The present paper proposes a promising method that overcomes the problem by piecewise linear approximation to obtain the optimum return function. The accuracy achieved by the method is illustrated with a simple example in which the exact solution is provided analytically. Furthermore, the method may be applied to aircraft longitudinal flight optimization, where it generates the most efficient and practically applicable reference flight trajectory in real time.