  In the present paper we find optimal conditions separating the regular case
from the one with Lavrentiev gap for the borderline case of double phase
potencial and related general classes of integrands. We present new results on
density of smooth functions.
