We now want to mention how the maximum principle can be extended in another direction. We usually assume that the initial state is fixed, while the final state may vary within some set . Here, let us briefly consider the possibility that may vary as well, so that we have an initial set instead of a fixed initial state. We can impose separate constraints on and or, more generally, we can require that belong to some surface in . The latter formulation allows us to capture situations where there is a joint constraint on and ; for example, if the trajectory is to be closed--i.e., the initial state is free but the trajectory must return to it--then is the ``diagonal" in . The terminal time can be either free or fixed, as before.

It turns out that this more general set-up can be easily handled by modifying the transversality condition, which will now involve the values of the costate both at the initial time and at the final time. Namely, the transversality condition will now say that the vector must be orthogonal to the tangent space to at :

The total number of boundary conditions for the system of canonical equations is still , since each additional degree of freedom for leads to one additional constraint on .