This paper concerns with the solution of optimal control problems transcribed into nonlinear programming (NLP) problems by using approximations based on the Chebyshev series expansion. We first consider the relationship between the necessary conditions of the optimal control problem and the ones of the corresponding NLP problem. We then consider applying the Chebyshev based method to problems depending on both a time and a space variable by handling the space dependency with finite difference discretizations. We eventually write in AMPL language a collection of optimization problems (most of which includes also a space variable), which we solve with a series of solvers, so to analyze the behavior of the method and the influence on the solution of the parameters of the approximation and of the used solver.