Let $I=[0,T]$ with $T>0$. Let $V\subset \mathbb{R}^n$ and $W\subset \mathbb{R}^m$ be open sets, and let $f:V\times W\to \mathbb{R}^n$ and $h:V\to \mathbb{R}^p$ be $C^2$ maps. Let $u:I\to W$ be continuous, let $K:I\to \mathbb{R}^{n\times p}$ be bounded, let $x,\hat{x}:I\to V$ be $C^1$ curves, and let $y:I\to \mathbb{R}^p$ be the output curve satisfying, for every $t\in I$ with derivatives understood one-sidedly at the endpoints,