We present an algorithm to implement the second order Newton method on ordinary differential equation (ODE) and partial differential equation (PDE) optimization programs. The algorithm is based on the direct computation of the Newton step without explicitly calculating the second derivative (Hessian) of the objective function. The method poses the search for the Newton step as a convex quadratic optimization program. We apply our method to (a) dynamical systems driven by ODEs and to (b) constrained PDE optimization programs in the context of air traffic flow. In both cases, our implementation of the Newton method shows much faster convergence than first order algorithms, while not significantly increasing computational time.