We want to solve such problems numerically, that is, devise an algorithm that generates an approximation to an optimal piecewise continuous control u∗. We break the time interval [t0, t1] into pieces with specific points of interest t0 = b1, b2, . . . , bN , bN+1 = t1; these points will usually be equally spaced. The approximation will be a vector ~u = (u1, u2, . . . , uN+1), where ui ≈ u(bi). There are various methods of this type which can be employed to solve
optimal control problems. For example, total-enumeration methods or linear programming techniques can be employed . However, as we saw in the previous chapters, any solution to the above optimal control problem must also satisfy
x′(t) = g(t, x(t), u(t)), x(t0) = a,
λ′(t) = −∂H ∂x
= −(fx(t, x, u) + λ(t)gx(t, x, u)), λ(t1) = 0,
0 = ∂H
∂u = fu(t, x, u) + λ(t)gu(t, x, u) at u∗.