Dynamic programming in optimal control and differential games Hamilton-Jacobi theories mathematics