Denote by $\mathcal L$ the set of continuously differentiable real valued functions on $[0, 1]$ with Lipschitz continuous derivative. Does there exist a Borel measurable function $ f: [0, 1] \times \mathbb R \to \mathbb [0, \infty) $ such that


$$\inf\_{g \in \mathcal L} \int\_{0}^{1} f(t, g(t)) \ dt < \inf\_{h \in C^2([0, 1])} \ \int\_{0}^{1} f(t, h(t)) \ dt?$$


*Note: Here the integrals are allowed to take the value $+\infty$.*



Lavrentiev phenomenon between $C^1$ + Lipschitz derivative and $C^2$
Edited.


Let $g\_0^\prime(x)=|x-1/2|,\; g\_0(x)=\int\_0^xg\_1(t)dt,\; 0\leq x\leq1$.
Then $g\_0$ has continuus derivative, namely $g\_0^\prime$, which is Lipschitz,
but the second derivative is discontinuous. Let $L=\{(x,y):y=g\_0(x)\}$
be the graph of $g\_0$.


Now define $f(x,y)=0$ when $0\leq x\leq 1, y=g\_0(x)$ and
$$f(x,y)=(\mathrm{dist}(x,y),L)^{-3}+1$$
otherwise.
Evidently $f$ is measurable, and
$\int\_0^1 f(x,g\_0(x))dx=0$, while $\int\_0^1f(x,g(x))dx>c$ for every $C^2$ function $g$, where $c$ is an absolute constant.


Of course, the last fact requires an accurate proof, but on the other hand, it seems evident. Moreover, one can replace $3$ in the exponent
by some larger constant, to make it more evident. The idea is that when the graph of $g$ is too close to $L$, the integral is large.


