1. A method for approximation of optimal control for nonlinear discrete time systems comprising the steps of: obtaining state variables from a system model, iteratively generating control sequences to optimize desired control variables for subsequent training a recurrent neural network, the value of each said control variable being independent of the other control variables, mapping said control variables onto the recurrent neural network implemented by a processor and the neural network has the following form, 
 x ( n+ 1)= f ( x ( n ), u ( n )), 
 y ( n+ 1)= h ( x ( n+ 1)), where: n=time increment, u=control variable, x=state variable, y=output vector, f and h are differentiable functions, and generating an optimal control sequence with the following form, 
 x ( n+ 1)= A ( n ) x ( n )+ B ( n ) u ( n ), 
 λ T ( n )=Δ x T ( n ) Q ( n )+λ T ( n+ 1) A ( n ), and 
 δ J ( n )/δ u ( n )=Δ u T ( n ) R ( n )+λ T ( n+ 1) B ( n )=0, where: A(n)=f x (x(n), u(n)) is a state Jacobian of f, B(n)=f u (x(n), u(n)) is a control Jacobian of f, λ T (n)=δJ(n)/δx(n) is an adjoint state vector, Q(n) is a weighting matrix, and R(n) is a weighting matrix.