https://9lib.org/document/qmj6pjn5-numerical-solution-of-optimal-control-problems.html