The costate variables can be interpreted as Lagrange multipliers associated with the state equations. The state equations represent constraints of the minimization problem, and the costate variables represent the marginal cost of violating those constraints. The state equations are subject to an initial condition and are solved forwards in time. The costate equations must satisfy a terminal condition and are solved backwards in time, from the final time towards the beginning. For more details see Pontryagin's minimum principle.