This paper investigates and discusses modification on the gradient of continuous function input introduced to Extended Conjugate Gradient Method algorithm (ECGM) employed in solving optimal control problems with the state variable constrained by a differential equation. Numerical results show some improvement over the classical methods.