The following work shows the application of DASPK in EcosimPro™ with the aim of to calculate the partial derivatives of the state variables with respect to the decision variables (sensitivities) and to improve the dynamic optimization. The implementation of DASPK was tested in three examples: disturbance rejection in a stirred tank with heater, the optimal production policy of hydrogen in a model of a hydrodesulfuration plant and the optimal trajectory of the feeding in a batch bioreactor. The sensitivities with DASPK was compared with another two possible options: obtain the gradients using finite differences and to solve the extended system with the analytical expressions of the sensitivities. The outcomes shows that the implementation of DASPK is a suitable option to ensure optimality in dynamics optimization without the need of writing the sensitivities by hand, nevertheless the CPU time must be improved to become this option attractive.