  Let $F(y):=\displaystyle\int_t^TL(s, y(s), y'(s))\,ds$ be a positive
functional (the "energy"), unnecessarily autonomous, defined on the space of
Sobolev functions $W^{1,p}([t,T]; \mathbb R^n)$ ($p\ge 1$). We consider the
problem of minimizing $F$ among the functions $y$ that possibly satisfy one, or
both, end point conditions. In many applications, where the lack of regularity
or convexity or growth conditions does not ensure the existence of a minimizer
of $F$, it is important to be able to approximate the value of the infimum of
$F$ via a sequence of Lipschitz functions satisfying the given boundary
conditions. Sometimes, even with some polynomial, coercive and convex
Lagrangians in the velocity variable, thus ensuring the existence of a
minimizer in the given Sobolev space, this is not achievable: this fact is know
as the Lavrentiev phenomenon. The paper deals on the avoidance of the
Lavrentiev phenomenon under the validity of a further given state constraint of
the form $y(s)\in\mathcal S\subset\mathbb R^n$ for all $s\in [t,T]$.
  Given $y\in W^{1,p}([t,T];\mathbb R^n)$ with $F(y)<+\infty$ we give a
constructive recipe for building a sequence $(y_h)_h$ of Lipschitz
reparametrizations of $y$, sharing with $y$ the same boundary condition(s),
that converge in energy to $F(y)$. With respect to previous literature on the
subject, we distinguish the case of (just) one end point condition from that of
both, enlarge the class of Lagrangians that satisfy the sufficient conditions
and show that $(y_h)_h$ converge also in $W^{1,p}$ to $y$. Moreover, the
results apply also to extended valued Lagrangians whose effective domain is
bounded. The results gives new clues even when the Lagrangian is autonomous,
i.e., of the form $L(s,y,y')=\Lambda (y,y')$. The paper follows two recent
papers \[23, 24] of the author on the subject.
