{'fraction_non_alphanumeric': 0.05889902060114826, 'fraction_numerical': 0.01729145558932793, 'mean_word_length': 3.8171465755653164, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Absence of Lavrentiev's gap for anisotropic functionals

We establish the absence of the Lavrentiev gap between Sobolev and smooth maps for a non-autonomous variational problem of a general structure, where the integrand is assumed to be controlled by a function which is convex and anisotropic with respect to the last variable. This fact results from new results on good approximation properties of the natural underlying unconventional function space. Scalar and vector-valued problems are studied.


Introduction
We study the well-posedness of minimization of the following variational functional over an open and bounded set Ω ⊂ R n , n ≥ 1, where F : Ω × R × R n → R is merely continuous with respect to the second and the third variable. We suppose that there exist constants 0 < ν, β < 1 < L such that νM (x, βξ) ≤ F (x, z, ξ) ≤ L(M (x, ξ) + 1), for all x ∈ Ω, z ∈ R, ξ ∈ R n , for an N -function M : Ω × R n → [0, ∞) that is continuous with respect to both variables. This function is called anisotropic because it depends on ξ not necessarily via |ξ|. We focus on the issue whether the minimizers can be approximated by regular functions in the topology that is natural for the problem. As an answer, we find sharp conditions on M ensuring the absence of the Lavrentiev gap between Sobolev and smooth maps that precisely capture the anisotropic version of double-phase and multi-phase functionals. This fact results from fine approximation properties of the natural underlying unconventional function space. The natural function space to study minimizers to problems like (1) is a Sobolev type space equipped with a Luxemburg norm defined by the means of a functional ξ → Ω M (x, ξ) dx applied to a distributional gradient of a function u ∈ W 1,1 (Ω) with ∇u in a relevant Musielak-Orlicz spaces. Since the growth of M does not need to be doubling, it should be taken into account that the Musielak-Orlicz spaces E M and L M (being norm and modular closure of L ∞ , respectively) may differ. Consequently, their Sobolev-type versions V 1 0 E M (Ω) and The situation when the infimum of a variational problem over a family of regular functions (e.g. smooth or Lipschitz) is strictly greater than the infimum taken over all functions satisfying the same boundary conditions is called Lavrentiev's phenomenon after his seminal paper [43]. To give a flavour of a great deal of classical results and new developments in this area, let us refer to [3,4,9,10,13,14,15,28,31,32,46,53] and references therein. In our setting, having u 0 ∈ V 1 E M (Ω), if M is not sufficiently regular, it might happen that Since [53,55] by Zhikov, it is known that log-Hölder continuity of the variable exponent of M (x, ξ) = |ξ| p(x) ensures that the above scenario is excluded. In other kinds of isotropic generalized Orlicz growth problems, the role of this continuity condition is typically played by an assumption (A1') from [37,38], embracing conditions from [7,25,28,31] needed for study on M (x, ξ) = |ξ| p + a(x)|ξ| q with possibly vanishing weight a. Such conditions are inevitable due to the examples of functions that cannot be approximated [3,32,33,45,54].
Smooth approximation properties of an inhomogeneous and anisotropic space of Musielak-Orlicz-Sobolevtype were proven under some far from sharp conditions [17,19,35] and improved recently to a truly local and anisotropic one in [9]. Nonetheless, in the view of [3,12,13], there was still some room for progress. Apart from the intrinsic mathematical interest of Lavrentiev's phenomenon, we shall indicate that the Musielak-Orlicz-Sobolev spaces are used as a framework in modelling of modern materials involving electrorheological and non-Newtonian fluids, thermo-visco-elastic ones, as well as in image restoration processing, see [16,36,41,52]. Henceforth, we provide a precise tool into their analysis. Section 6 describes how our result directly extend the existence results of [17,35] and other contributions.
One of the most important feature of the space that we want to include in our analysis is anisotropy. A weak N -function M : Ω × R n → [0, ∞) is called isotropic if M (x, ξ) = m(x, |ξ|) with a weak N -function m : Ω × [0, ∞) → [0, ∞) and anisotropic if its dependence on ξ is allowed to be more complicated. One can consider the functions admitting a decomposition called orthotropic (studied e.g. in [11,29] If an anisotropic function is not comparable to any function admitting a decomposition that after an affine and invertible change of variables has the above form, we call it essentially fully anisotropic. A relevant example can be found in [22]. Fully anisotropic spaces are considered since [40,42,50] and [8,23,49]. They serve as a setting for nonlinear partial differential equations or calculus of variations, see e.g. [2,5,24,51]. Recently, we can observe more and more attention paid to problems that are both inhomogeneous and anisotropic at the same time, e.g. [12,17,18,19,21,35,36,39,44,52] and sharp conditions for the density of smooth functions are strikingly missing in the theory. Our goal is to detect the optimal conditions that need to be imposed on M to exclude the case of strict inequality in (3). The key accomplishments of the present paper yield the absence of Lavrentiev's phenomenon (Theorem 1) and the modular density of smooth functions (Theorem 2). Both of the mentioned results holds for weak N -functions satisfying some balance condition reflecting a log-Hölder continuity of the variable exponent of a sharp range of powers in the double-phase case. In order to present the conditions, given a weak N -function M : Ω × R n → [0, ∞) and a ball B, we define M − B (ξ) = ess inf y∈B M (y, ξ) and M + B (ξ) = ess sup y∈B M (y, ξ) .
The considered conditions read as follows.
Isotropic condition (B iso γ ). Let us assume that M : Ω × [0, ∞) → [0, ∞) is a weak N -function. Suppose there exist constants c ♦ , C ♦ ≥ 1 such that for every ball B with radius r ≤ 1 and for all ξ ∈ R n satisfying |ξ| ≤ c ♦ r γ−1 there holds Orthotropic condition (B ort γ ). Let us assume that are weak N -functions and ξ = (ξ 1 , . . . , ξ n ). Suppose there exist constants c ♦ , C ♦ ≥ 1 such that for every ball B with radius r ≤ 1, all i, and for all ξ i ∈ R satisfying The above conditions (B iso γ ) and (B ort γ ) covering the most typical settings are special cases of a fully anisotropic condition (B gen γ ), see Section 4. They force that the growth of a weak N -function with respect to the second variable is not perturbed much in a small spacial region. The first of our main accomplishments yields precise result on the absence of Lavrentiev's phenomenon, i.e., whereas the second one -the approximation result in anisotropic Musielak-Orlicz-Sobolev spaces, i.e., Here C ∞ c (Ω) mod stands for the closure in the sequential modular topology of L M of the gradients. Theorem 1 is supplied with its extended versions in Section 4, which are more complicated in the exposition, but cover more general functionals. We embrace and extend the results on the absence of Lavrentiev's phenomenon from [1,13,32] to precisely capture local nature of the problem, as well as anisotropy and general growth of F with respect to the last variable. Moreover, in the regions of low growth of M we improve the known anisotropic approximation results of [9,17,35]. When the growth is isotropic, we do it up to the known borderline cases, see [4,7,33,53]. In turn, we supply the existence theory that holds in the absence of Lavrentiev's phenomenon [12,17,18,19,21,35] with precise information when the methods therein apply. Let us show two simple examples directly illustrating how our main results extend the state of the art.
Main models. A consequence of our main result, that is Theorem 1, is that for a double-phase functional where b : Ω × R → R satisfies 0 < ν < b(·, ·) < L and is merely continuous with respect to the last variable, 1 ≤ p ≤ q, a : Ω → [0, ∞) such that a ∈ C 0,α (Ω), and for whenever q ≤ p + α .
Consequently, even in the classical isotropic case, Theorem 1 extends the known results. In particular, it generalizes the very recent contribution [13] relaxing growth by allowing for functionals involving integrands dependent on three variables (precisely, F like (1) under the assumption (2) with M substituted by H iso ). In the appearance of more phases, we give more precise bound than [13]. Furthermore, having a priori knowledge on the regularity of a minimizer Theorem 1 enables to improve the range (8). Namely, for u, u 0 ∈ C 0,γ (Ω), γ ∈ [0, 1], we get that (7) holds whenever q ≤ p + α 1 − γ .
Since we need only continuity of b and only with respect to the second variable, we relax the assumptions of [7,Theorem 4] yielding the absence of Lavrentiev's gap for H iso under extra assumptions on the decay of the modulus of continuity of b with respect to both variables. The range from (8) cannot be improved for p < n due to [3]. Our main model, that was not covered by the literature, is the following anisotropic functional where G : Ω × R × R n → R is continuous with respect to all its variables and νH (x, ξ) ≤ G(x, z, ξ) ≤ LH (x, ξ) , for all x ∈ Ω, z ∈ R, ξ ∈ R n and some constants ν, L > 0, where As a consequence of our main result, it holds where V 1,H 0 (Ω) := {u ∈ W 1,1 0 (Ω) : |∇u| ∈ L H (Ω)}, whenever Furthermore, in this case we can also trade a priori known regularity of a minimizer with this range. For u, u 0 ∈ C 0,γ (Ω), γ ∈ [0, 1], by Theorem 1 we get that (11) holds whenever So far, the best known result for the absence of Lavrentiev's phenomenon in this kind of anisotropic doublephase spaces was due to [9] and covered the ranges for the exponents q i p i ≤ 1 + α i n , i = 1, . . . , n. Note that when p i < n, this range of admissible p i and q i is smaller than (12). This means that in the current study, we admit a worse modulus of continuity of H and still provide (11). See also Remark 4.2.
In Corollary 1.2, we give more examples where the modulus of continuity is essentially improved compared to [9], including anisotropic variable exponent double-phase functionals and functionals Orlicz phases. Remark 4.1 illustrates our results in the setting of the general growth and full anisotropy. To our best knowledge, there is no anisotropic counterexample available so far in the literature.
Let us pass to presenting our main accomplishments. Function space L M is defined in Section 2. Our main results concern Absence of Lavrentiev's phenomenon. Let us formulate our general result that under a balance condition Lavrentiev's phenomenon for F does not occur between Sobolev and smooth maps. It is followed by a long list of examples being of separate attention in the field.
Let Ω be a bounded Lipschitz domain in R n and functional F be given by (1) with F : Ω × R × R n → R satisfying (2) for a weak N -function M that is continuous with respect to both variables and such that M ∈ ∆ 2 . Assume further that F is measurable with respect to the first variable and continuous with respect to the second and the third variable. Then we observe the absence of Lavrentiev's phenomenon in the following cases.
has a modulus of continuity ω a , then Lavrentiev's phenomenon for F does not occur For a refinement of this result without assumption φ, ψ ∈ ∆ 2 , see Section 4.
Moreover, we have the following anisotropic consequences of Theorem 1.
. . , n, then Lavrentiev's phenomenon for F does not occur between V 1,M 0 (Ω) and C ∞ c (Ω) as well as between Density results. We will distinguish between two kinds of density -the modular density and the norm one.
In order to do so, let us define the following two kinds of convergence.
We say that a sequence {ξ k } ∞ k=1 converges modularly to ξ in L M (Ω; R n ) (and denote it by ξ k The topologies generated by modular and norm convergences coincide when M grows regularly enough, Our main result on approximation reads as follows. Theorem 2 (Density of smooth functions). Let Ω be a bounded Lipschitz domain in R n and M be a weak N -function that is continuous with respect to both variables. Then the following assertions hold true.
Methods of the proofs. The main tool of our proof is to employ convolution-based approximation, which is classical and widely used in many contexts. In particular, it is used in the proofs by Gossez [34] of the smooth density in the modular topology in the classical Orlicz spaces and in the anisotropic version of this result [2]. We cannot apply it directly due to x-dependence of the weak N -function defining the underlying function space and the relevant (modular) convergence. In such situation one is forced to use some continuity properties of M , cf. e.g. [1,32,55]. The proof gets even more complicated in the presence of anisotropy. The search for optimal conditions resulted in many contributions, including [1,9,12,17,35]. Typically, these attempts make use of the greatest convex minorant of local infima of M and balancing its behaviour with some quantities that are possible to control. In the isotropic case, M − B is 'almost convex', that is, Jensen's inequality holds for this function with an intrinsic constant, see [38,Lemma 4.3]. For anisotropic functions, such constant does not exist in general. In fact, even if x → M (x, ·) is regular, (M − B ) * * can be arbitrarily far from M − B . Due to the very recent results, it is possible to restrict the set on which good properties of (M − B ) * * are needed (see [9]) and to find a concise and verifiable condition on M (see [39]) that was sufficient for construction of approximation. A different approach to this part can be found in [12,13], where in the middle of a convolution-based approximation procedure the Young inequality for convolution is applied combined with the fact that differentiation commutes with convolution. This enabled to relax the necessary condition, in particular to capture the whole range q ≤ p + α in double-phase functional from (6) for b ≡ 1. Nonetheless, the isotropic and doubling approach of [13] is not crafted to track the growth of M locally, nor allows studying b : Ω × R → R. Despite the crucial idea comes from anisotropic attempt of [12], the condition therein does not keep precise control on anisotropy.
We extend applicability of all the mentioned contributions, i.e., [1,9,12,13,17], to the borderline cases and to capture phenomena that have local, general growth, and anisotropic nature in one shot. The main novelty of our approach, that allows to relax all previous conditions and additionally describe precisely the density in , is actually elementary. The mentioned trick of [12] is substituted with a different inequality, which is intermediate to the mentioned one. We estimate pointwise the gradient of convolution of our function with a mollifier by a C 0,γ -norm of our function and a parameter of mollification raised to a relevant power, see Lemma 3.3. This simple change is surprisingly powerful. Further use of topological arguments makes our procedure independent of any particular structure of the functional, which typically needs to be controlled, cf. [7,13,28,31]. In particular, unlike [7, Theorem 4], we do not make use of any iterative procedure. Consequently, in the case of (6), no decay of moduli of the continuity of b with respect to any of its variables is required. In fact, we infer the absence of Lavrentiev's phenomenon for any F given by (1) with F : Ω × R × R n → R which is continuous with respect to the last two variables and such that (2), as long as M satisfies one of the prescribed balance conditions. In the case of (6) it means that b can be taken merely bounded with respect to x and continuous with respect to u. Moreover, convexity is imposed only on ξ → M (·, ξ), not on ξ → F (·, ·, ξ). It is remarkable how simple is the proof of Theorem 1 while having Theorem 2. The mentioned methods allow providing counterparts of these results for vector-valued maps by almost the same arguments, see Theorems 5 and 6.
Organization. The framework of Musielak-Orlicz and Musielak-Orlicz-Sobolev spaces, as well as notation and other general information, is exposed in Section 2. The proofs of the main results, that is Theorems 1 and 2, are given in Section 3. Section 4 provides extended results on the absence of Lavrentiev's phenomenon for functionals of general growth and full anisotropy. Section 5 is devoted to the corresponding results for problems with vector-valued maps. In Section 6, we present a direct application of the theory of existence in the framework of [17]. We end our contribution with Appendix containing easy computations showing the meaning of (B iso γ ) and (B ort γ ) in the special cases.

Preliminaries
Notation. Throughout the paper, we assume Ω ⊂ R n is a bounded Lipschitz domain, n ≥ 1. If U is a fixed set, for γ ∈ (0, 1] we denote the Hölder seminorm of a function h as It is well known that the quantity defined above is a seminorm and when [h] 0,γ;U < ∞, we will say that h belongs to the Hölder space C 0,γ (U ). When clear from the context, we will omit the reference to U , i.e.: [h] 0,γ;U ≡ [h] 0,γ . For functions f, g, we write that f (t) = o(g(t)), if lim t→0 Convex functions. Our main reference for inhomogeneous and anisotropic Musielak-Orlicz and Musielak-Orlicz-Sobolev spaces is [17]. In their definitions, the main role is played by a weak N -function.
We say that a weak N -function M : Ω × R n → R satisfies ∆ 2 condition close to infinity (denoted M ∈ ∆ 2 ) if there exist constants c, C > 0 and nonnegative integrable function h : Ω → R such that for a.e. x ∈ Ω it holds M (x, 2ξ) ≤ cM (x, ξ) + h(x) for all ξ ∈ R n : |ξ| > C. Directly from the definition, we see that The space E M (Ω; R n ) coincides with the set of all measurable functions for which ̺ M ;Ω ( 1 λ ξ) < ∞ for every λ > 0. Moreover, unlike L M , space E M is always separable.
If M ∈ ∆ 2 , then E M (Ω; R n ) = L M (Ω; R n ) = L M (Ω; R n ) and L M (Ω; R n ) is separable. When both M, M * ∈ ∆ 2 then L M (Ω; R n ) is reflexive, see [17]. We define the Musielak-Orlicz-Sobolev space V 1 L M (Ω) and V 1 E M (Ω) as follows where ∇ stands for distributional derivative. The space is considered endowed with the norm Zero-trace versions of the spaces will be defined as follows By the Lebesgue's dominated convergence theorem, one can justify the following fact.
A typical condition we refer to once studying variable exponent spaces is log-Hölder continuity of the exponent. We say that a function p is log-Hölder continuous, if there exists c > 0, such that for x, y close enough it holds that .
The set of all log-Hölder continuous functions on a bounded set Ω will be denoted as P log (Ω).

Proof of the density result
Our approximation in based on the convolution with shrinking.
Let U be a bounded star-shaped domain with respect to a ball B(x 0 , R) and let κ R δ = 1 − δ/R. For a measurable function ξ : R n → R n with supp ξ ⊂ U , we define where ρ δ (x) = ρ(x/δ)/δ n is a standard regularizing kernel on R n (i.e. ρ ∈ C ∞ (R n ), supp ρ ⋐ B(0, 1) and , such that 0 ≤ ρ ≤ 1). Let us notice that S U,δ (ξ) ∈ C ∞ c (R n ; R n ). Moreover, for δ < R 4 we have κ R,δ (U − x 0 ) + B(x 0 , δ) ⊆ U , which means that for sufficiently small δ it holds that S U,δ (ξ) ∈ C ∞ c (U ). Moreover, let us point out that S U,δ ξ = (ρ δ * ξ) x 0 + (·)−x 0 κ R δ , and therefore Let us prove the following lemma. Proof. Let us firstly abbreviate the notation by setting S δ := S U,δ and κ δ := κ R δ . Without loss of generality, we assume that U is star-shaped with respect to a ball B(0, R). For a general case one should change variables moving the centre of B(x 0 , R) to the origin, then proceed with the proof as below, and then reverse the change of variables. Since convergence in L 1 implies convergence in measure it suffices to show that Let us take a function g ∈ C ∞ c (R n ). For some ball B = B(0, r) we have We fix any ǫ > 0 and take g ∈ C ∞ c (R n ) such that ξ − g L 1 < ǫ. By Young inequality, it holds that By taking ǫ → 0, we obtain S δ ξ − ξ L 1 − −− → δ→0 0, which implies that lim δ→0 S δ ξ = ξ.  Proof. Let S δ := S U,δ and κ δ := κ R δ . As in Lemma 3.1, without loss of generality, we assume that U is star-shaped with respect to a ball B(0, R). Observe that ∇S δ ϕ = 1 κ δ S δ (∇ϕ) and we have 1 0 and the proof is complete.
Next, we prove the following inequalities.
The proof of Theorem 2 makes use of the following equivalent modification of (B iso γ ) as well as (B ort γ ).
General condition (B gen γ ). Let us assume that where M j : Ω × R ℓ j → [0, ∞) are weak N -functions, L > 0, ξ j ∈ R ℓ j , and lin j {ξ j } = R n . Suppose there exist constants c ♦ , C ♦ > 1 such that for every ball B with radius r ≤ 1, every x ∈ B, all j, and for all ξ j ∈ R ℓ j satisfying ( In this condition, function M can be taken fully anisotropic, even for L = 1.
We have the following modification of [39, Theorem 1.2].
Proposition 3.4. For a weak N -function M , the general condition (B gen γ ) implies that there exist constants C, c > 0 such that for every ball B with radius r ≤ 1, every x ∈ B, and for all ξ ∈ R n it holds Proof. First we show that condition (B gen γ ) is equivalent that for every j there exists c j , C j such that for every ball B with radius r ≤ 1, every x ∈ B, all j and for all ξ j ∈ R ℓ j and ( The prof of this fact follows almost the same lines as [39,Theorem 1.2] with the only difference that instead which means that constants in the proof are bounded independently on δ. We note that there exists c such that for every {ξ j : The last inequality is due to the fact that Remark 3.5. Careful inspection of [39] shows that if condition (B gen γ ) holds for C ♦ , then C and c from Proposition 3.4 depend only on C ♦ , c ♦ , m −1 1 (1), m −1 2 (1). We are in a position to prove our general result on approximation.

Proof of the absence of the Lavrentiev phenomenon
Once we are equipped with the result on modular density in our anisotropic space (Theorem 2), we are in a position to concentrate on whether the minimizers of functionals like F from (1) can be obtained as a limit of smooth maps.
. Let us concentrate on showing the opposite inequality. For an arbitrary ε > 0 there exist Therefore it is enough to show that for any ε > 0 it holds Let us fix ε > 0 and denote u := u ε − u 0 . By Theorem 2, there exists {u k } k≥1 ⊂ C ∞ c (Ω) such that u k → u strongly in L 1 (Ω) and in measure, and ∇u k → ∇u modularly in L M . Since F is continuous with respect to the second and the third variable, we infer that Therefore, to get (29), by the Vitali Convergence Theorem, we only need to show that the family F (x, u k (x) + u 0 (x), ∇u k (x) + ∇u 0 (x)) k≥1 is uniformly integrable.

Results for functionals of more general growth
Full anisotropy. Let us recall condition (B gen γ ) formulated right before Proposition 3.4. We remind that full anisotropy is covered by this condition already with the choice of L = 1. This is the generality under which the method of the proof of Theorem 1 is directly valid.

Theorem 3.
Let Ω be a bounded Lipschitz domain in R n and functional F be given by (1) with F : Ω × R × R n → R satisfying (2) for a weak N -function M that is continuous with respect to both variables and such that M ∈ ∆ 2 . Assume further that F is measurable with respect to the first variable and continuous with respect to the second and the third variable. Then we observe the absence of Lavrentiev's phenomenon in the following cases.
(i) If γ = 0, u 0 ∈ V 1 L M (Ω), and M satisfies condition (B gen γ ), then General growth. We shall stress an essential difference between the formulation of results, if one does not assume M ∈ ∆ 2 . Indeed, this complicates the choice of the natural function space for the problem. Since [34] it is known that in general the smooth approximation in the classical Orlicz-Sobolev spaces is possible only with respect to the so-called modular topology (not in norm). Under the doubling regime, sequential modular and norm closures coincide.
and the ambiguity disappears. Let us point out that our main results are valid actually without this structure, and that we allow for a natural gap between V 1 0 L M and V 1 0 E M . In order to relax the growth of M to allow for M ∈ ∆ 2 , condition (B gen γ ) needs to be strengthened to the following condition.
Condition (B gen γ+ ). Let us assume that Let us note again, that full anisotropy is covered by this case in particular with the choice of L = 1. Then, the non-doubling version of Theorem 1 reads as follows.

Theorem 4.
Let Ω be a bounded Lipschitz domain in R n and functional F be given by (1) with F : Ω × R × R n → R satisfying (2) for a weak N -function M that is continuous with respect to both variables. Assume further that F is measurable with respect to the first variable and continuous with respect to the second and the third variable. Then we observe the absence of Lavrentiev's phenomenon in the following cases.
(i) If γ = 0, u 0 ∈ V 1 E M (Ω), and M satisfies condition (B gen γ+ ), then (ii) If γ ∈ (0, 1], u 0 ∈ V 1 E M (Ω) ∩ C 0,γ (Ω), and M satisfies condition (B gen γ+ ), then Proof. The proof of Theorem 4 follows the same lines as the proof of Theorem 1 with the only difference that in the lack of M ∈ ∆ 2 , it needs to be proven that the approximate sequence {∇u n } converge modularly for any λ > 0. This is equivalent to the fact that ∇u n → ∇u strongly in L M . To get this, one needs to use a slightly modified version of Theorem 2. We observe that under (B gen γ+ ) for any λ 0 there exists δ small enough that (26) holds and further modular convergence holds for any λ > 0. In turn, we get that C ∞ c is dense in the norm topology in  . This function Φ does not satisfy ∆ 2 , but it is trapped between |ξ| p and |ξ| p log(1 + |ξ|). We consider M (x, ξ) = |ξ| p + a(x)Φ(ξ). In turn, we can infer that Lavrentiev's phenomenon for F does not occur between W 1 0 E M (Ω) and C ∞ c (Ω) whenever 0 ≤ a ∈ P log (Ω). We can also consider Orlicz double-phase, that is M (x, ξ) = φ(|ξ|) + a(x)ψ(|ξ|), without an assumption that Young functions φ, ψ ∈ ∆ 2 . Then, the Lavrentiev's phenomenon for F does not occur if modulus of continuity of a satisfies ω a (t) ≤ ϑ(o(t γ−1 )), where ϑ(t) = φ(t) ψ(t) . The proof follows the same line as in (33).

Vector-valued maps
Let us consider a variational functional over an open and bounded set Ω ⊂ R n , n, d ≥ 1, where F : Ω × R d × R n×d → [0, ∞) is merely continuous with respect to the second and the third variable. Its growth is given by the means of a weak N -function M : Ω×R n×d → [0, ∞) that is continuous with respect to both variables and has the following decomposition.
We denote ξ = (ξ 1 , . . . , ξ d ) ∈ R n×d , ξ i ∈ R n , i = 1, 2, . . . , d, and we define a family of weak N -functions We suppose that there exist constants 0 < ν, β < 1 < L such that We recall that (B iso γ ) or (B ort γ ) are special cases of (B gen γ ), so the general case we present in particular embraces the case of Theorem 1. Our most general result reads as follows.
Theorem 5 (Absence of Lavrentiev's phenomenon for vector valued maps). Let Ω be a bounded Lipschitz domain in R n and functional F for a weak N -function M that is continuous with respect to both variables and such that M ∈ ∆ 2 and (32) are satisfied. Then we observe the absence of Lavrentiev's phenomenon in the following cases.
(i) If γ = 0, u 0 ∈ V 1 L M (Ω), and M satisfies condition (B gen γ ), then The proof of the above theorem bases on the following approximation result.
Theorem 6 (Density of smooth functions for vector-valued maps). Let Ω be a bounded Lipschitz domain in R n and M be a weak N -function that is continuous with respect to both variables and such that (32) is satisfied. Then the following assertions hold true. Moreover, in both above cases, if ϕ ∈ L ∞ (Ω; R d ), then there exists c = c(Ω) > 0, such that ϕ δ L ∞ (Ω;R d ) ≤ c ϕ L ∞ (Ω;R d ) .

Applications to PDEs
One of the direct consequences of our main results is a supplement to the current state of theory of existence of solutions to boundary value problems that are posed in the anisotropic Musielak-Orlicz spaces, which are equipped with modular density of smooth functions. For an illustration, let us consider a secondorder elliptic PDE of a form for some constants c 1 , c 2 , c 3 , c 4 > 0, fixed h 1 , h 2 ∈ L 1 (Ω), almost all x ∈ Ω and all ξ ∈ R n . Note that the appearance of all of these constants matters, as there is no kind of doubling condition considered. As it is not important from the point of view of the application of Theorem 2, we skip conditions on B that need to be imposed to obtain existence. Such problems with a regular datum f in the class of weak solutions as well as for merely integrable f in the class of renormalized solutions were studied in [17,21,35]. Despite the formulations of the theorems there prescribe more restrictive assumptions on an N -function M , they are used only in order to ensure the modular approximation properties of the space V 1 0 L M (Ω). In fact, it is enough to make use of Theorem 2 (i) precisely in the form it is stated for example -instead of [ Similarly, one can relax assumptions in [21] and, after minor adaptations, in the case of parabolic problems of [12,18,19,44] and [17,Chapters 4.2]. A bit more challenging is the application of our ideas in the proof of existence of renormalized solutions to parabolic problems when M defining the space is changing not only in space but also along time, i.e., M = M (t, x, ξ), see [20] and [17,Chapter 5.3].