Consider the problem of minimising $$ J(u(.)) \triangleq \int_0^T l(x(t),u(t)) d t + \phi(x(T)), \: T> 0 $$ over a space of controls $\mathcal{U}$ with the constraint $$ \dot x(t) = f(x(t),u(t)), \: t >0, \: x(0) = x_0. $$ To make it simple, everything is $\mathbb{R}$ valued. We also assume that the functions $l,\phi,f$ and the space of controls $\mathcal{U}$ satisfy appropriate conditions for having a well-posed problem.
Under this form we can employ either Bellman or Pontryagin principles to study the optimal control.
Question. Can we / How to use this framework to impose a terminal value for $x$? say $x(T) = x_\star$.