A two stage-discrete time system's formula ise
x(k+1)=-x(k)+u(k) and x(0)=10

With dynamic prgramming find u(0) and u(1)

which minimize
J=x^2(2) + \sum_{k=0}^1 \{ x^2(k) + u^2(k)\}

There are no restrictions on u(k)

Thank your for your help