The article presents some preliminary results on combining two new ideas from nonlinear control theory and dynamic optimization. We show that the computational framework facilitated by pseudospectral methods applies quite naturally and easily to Fliess' implicit state variable representation of dynamical systems. The optimal motion planning problem for differentially flat systems is equivalent to a classic Bolza problem of the calculus of variations. We exploit the notion that derivatives of flat outputs given in terms of Lagrange polynomials at Legendre-Gauss-Lobatto points can be quickly computed using pseudospectral differentiation matrices. Additionally, the Legendre pseudospectral method approximates integrals by Gauss-type quadrature rules. The application of this method to the two-dimensional crane model reveals how differential flatness may be readily exploited.