Implementation of Advanced Differentiation Methods for Optimal Trajectrory Computation