Discrete approximations in optimal control Numerical methods mathematics