Optimal control examines trajectory generation by considering the system dynamics and a reward function. Optimal control seeks the time-series trajectory or feedback law that maximizes the reward function [1]} (or equivalently, minimizes a cost function). The system dynamics are formulated as differential equations. Consider a system with the following dynamics,
\(\dot{x} = f(x(t),u(t))\) 
