New Examples on Lavrentiev Gap Using Fractals

Zhikov showed 1986 with his famous checkerboard example that functionals with variable exponents can have a Lavrentiev gap. For this example it was crucial that the exponent had a saddle point whose value was exactly the dimension. In 1997 he extended this example to the setting of the double phase potential. Again it was important that the exponents crosses the dimensional threshold. Therefore, it was conjectured that the dimensional threshold plays an important role for the Lavrentiev gap. We show that this is not the case. Using fractals we present new examples for the Lavrentiev gap and non-density of smooth functions. We apply our method to the setting of variable exponents, the double phase potential and weighted p-energy.


Introduction
The Lavrentiev gap is a phenomenon that may occur in the study of variational problems. In particular, the minimum of the integral functional G taken over smooth functions may differ from the one taken over the associated energy space.
The first example for Lavrentiev gap was constructed by Lavrentiev in [14]. A simpler one was provided by Maniá in [15], who considered the functional G(w) := 1 0 x − (w(x)) 3 2 |w ′ (x)| 2 dx subject to the boundary condition w(0) = 0 and w(1) = 1. Now, Maniá showed that there exists τ > 0 such that G(w) ≥ τ for all w ∈ C 1 ([0, 1]) with w(0) = 0 and w(1) = 1. However, the function x 1 3 ∈ W 1,1 ((0, 1)) has strictly smaller energy, namely G(x 1 3 ) = 0. This gap between zero and τ is the so called Lavrentiev gap. In the example of Maniá the integrand f (x, w, ξ) := (x − w 3 ) 2 |ξ| 2 depends on x, w and ξ. If the integrand only depends on x and ξ, then the Lavrentiev gap does not appear in the case of one-dimensional problems, see [14]. The corresponding question for two and higher dimensional problems with integrands of the form f (x, ∇w(x)) remained open for a very long time.
The important feature of this example is that the exponent p has a saddle point, where it crosses the dimensional threshold, i.e. p 1 < 2 < p 2 . Moreover, the vector field b satisfies div b = 0 in the sense of distributions, so Ω b · ∇w dx = 0 for w ∈ C ∞ 0 (Ω). However, for a suitable cut-off function η ∈ C ∞ 0 (Ω), we have Ω b · ∇(ηu) dx = −1 (see Proposition 22 and 23). Thus, b doesn't see the gradients of C ∞ 0 (Ω)-functions but it sees the one of ηu ∈ W 1,ϕ(·) 0 (Ω). Therefore, the vector field b is also called separating vector field. Another useful feature is that |b|·|∇u| = 0 almost everywhere.
However, u cannot be approximated by smooth functions u n . Indeed, it follows from u n ∈ W 1,p2 (Q 1 ) ∩ W 1,p2 (Q 3 ) and the continuity of u n at 0 that the u n are uniformly Hölder continuous on Q 1 ∪ Q 3 with exponent α := 1 − 2 p2 > 0 uniformly in n, but the limit u is not even continuous.
It is possible to generalize this example to higher dimensions, i.e. Ω = (−1, 1) d with d ≥ 2. Again the variable exponent p has a saddle point at zero. It takes the value p 2 > d on the double cone Ω ∩ {x = (x ′ , x d ) : |x d | ≥ |x ′ |} and p 1 < d on its complement. The crucial point is again that W 1,p2 (Ω) ֒→ C 0,α (Ω) for α = 1 − d p2 . So the exponent has a saddle point, where it just crosses the dimension d.
Up to now no other examples of H 1,p(·) (Ω) = W 1,p(·) (Ω) with variable exponents were known. This led people to the question if the dimension plays a critical role, i.e. that it is important that at the saddle point the variable exponent p crosses the threshold d. This question has been repeatedly raised by Zhikov and also by Hästö [6].
The saddle point setup is the simplest geometry for the Lavrentiev gap to appear. It has been shown by Zhikov [19] that if p(·) takes only two values separated by a smooth surface, then H 1,p(·) (Ω) = W 1,p(·) (Ω). Even more, if we take a piecewise constant exponent which takes three constant values in three sectors of the plane separated by rays emanating from the origin, then also H 1,p(·) = W 1,p(·) . This is a special case of the montonicity condition on cones by Edmunds and Rakosnik [7] that ensures H 1,p(·) (Ω) = W 1,p(·) (Ω).
Another situation for H 1,p(·) (Ω) = W 1,p(·) (Ω) is, when p has certain regularity. In 1995 Zhikov [22] found the celebrated local log-Hölder condition . This condition allows to use mollification to prove density of smooth functions [22], [4], [5,Section 4.6]. The log-Hölder continuity is also important for many other properties like boundedness of the maximal operator, the Riesz potential, singular integral operators and sharp Sobolev embeddings. For more details we refer to the books [5,3,12]. For the density of smooth functions it is possible to weaken the modulus of continuity slightly by an extra double log factor, see [21]. In Zhikov's original example the exponent p(·) jumped at the saddle point. However, it is possible to modify the exponent to a uniformly continuous one (not log-Hölder continuous). Again the exponent has a saddle point, where it crosses the dimensional threshold. Such examples have been obtained independently by Zhikov [22] and Hästö [11].
Zhikov also showed with his counter example that the notion of p(·)-harmonic functions becomes ambiguous. In particular, minimizers of for given nice boundary may differ depending if we minimize in H 1,p(·) (Ω) or in W 1,p(·) (Ω).
One of the goals of this paper is to provide new examples of variable exponents, such that the Lavrentiev gap occurs, but which do not need to cross the dimensional threshold, see Subsection 4.1. We also show the non-density of smooth functions, i.e. H 1,p(·) (Ω) = W 1,p(·) (Ω) and the ambiguity of p(·)-harmonicity.
where 1 < p < q < ∞ and a ∈ C 0,α (Ω) is a non-negative weight. He constructed with a similar checkerboard setup a weight a ∈ C 0,α (Ω) with α = 1, Ω = (−1, 1) 2 and p < 2 < 2 + α = 3 < q such that the Lavrentiev gap occurs. On the quadrants Q 1 and Q 3 he chose a(x) = x1x2 |x| and on the quadrants Q 2 and Q 4 he chose a(x) = 0. The exponents take the same values as in Figure 1 with p 1 = p and p 2 = q.
Again he showed that there exists a functional G(w) = F (w) . This example was generalized by Esposito, Leonetti and Mingione in [8] to the case of higher dimensions and less regular weights, i.e. α ∈ (0, 1]. In particular for Ω = (−1, 1) d , they constructed a weight a ∈ C 0,α (Ω) and exponents 1 < p < d < d + α < q such that the Lavrentiev gap occurs. For this they changed a to a( In both examples by Zhikov and Esposito-Leonetti-Mingione the two exponents p and q cross the dimensional threshold d. So again, there was the question, if this threshold is important for the Lavrentiev gap.
This phenomenon for the double phase potential can also be seen as a lack of higher regularity, see Marcellini [16] for the first example in this direction. In fact, local minimizers of F need not be W 1,q -functions unless a, p and q satisfy certain assumptions. In fact, if q p ≤ 1 + α d and a ∈ C 0,α , then minimizers of F are automatically in W 1,q , see [2]. Moreover, bounded minimizers of F are automatically W 1,q if a ∈ C 0,α and q ≤ p+α, see [1]. If the minimizer is from C 0,γ , then the requirement can be relaxed to q ≤ p + α 1−γ [1, Theorem 1.4]. The example of Esposito-Leonetti-Mingione shows that in some sense these estimates are sharp. However, they are sharp only for p = d − ε with ε > 0 small. In this paper we will provide new examples for the Lavrentiev gap that get rid of this condition p = d − ε. We will present new examples that show that the conditions q ≤ p + α and q ≤ p + α 1−γ are sharp for a much wider range of p and q, see Subsection 4.2. In particular, we present examples without the dimensional threshold.
The question of Lavrentiev gap can also be viewed from the point of function spaces. In fact, the energy F defines a generalized Sobolev-Orlicz space W 1,ϕ(·) (Ω) and its counterpart W 1,ϕ(·) 0 (Ω) with zero boundary values, see Subsection 3.1 for the precise definition of the spaces. Then the above Lavrentiev gap can be also written as (Ω) is the closure of C ∞ 0 (Ω) functions in W 1,ϕ(·) (Ω). Hence, the question of the Lavrentiev cap is closely related to the density of smooth functions, i.e. if H 1,ϕ(·) 0 (Ω) = W 1,ϕ(·) 0 (Ω) and H 1,ϕ(·) (Ω) = W 1,ϕ(·) (Ω). We present fractal examples without the dimensional threshold that support the Lavrentiev gap, the non-density of smooth functions and the ambiguity of the related harmonicity.
1.3. Weighted p-Energy. Zhikov also considered another example, namely the one of weighted Sobolev spaces. In particular, he considered the energy Again, he used a checkerboard setup to construct weights a, resp. ω that provide for p = 2 a Lavrentiev gap and non-density of smooth functions, see [22,Example 3.3]. His weight is unbounded but it is bounded from above and below by two Muckenhoupt weights from A 2 . In [20, Section 5.3] he presented another more complicated example with a bounded weight, see Remark 37. Again, we present fractal examples without the dimensional threshold that support the Lavrentiev gap, the non-density of smooth functions and the ambiguity of the related harmonicity.
If a itself is a Muckenhoupt weight, then it is well known that smooth functions are dense, so W 1,ϕ(·) (Ω) = H 1,ϕ(·) (Ω). For other results on the density in the context of weighted Sobolev spaces with even variable exponents, we refer to [17,18].

1.4.
Structure of the Article. The structure of the article is as follows. In Section 2 we will use fractals to construct the functions u and b that we need later in our applications. We start with a modified version of the checker board example by Zhikov, which works in all dimensions. Then we introduce the necessary fractals of Cantor type to construct function u and the vector field b without the problem of the dimensional threshold.
In Section 3 we show how u and b can be used to deduce the Lavrentiev gap, the non-density of smooth functions and ambiguity of the related harmonicity. In this section we also introduce the necessary function spaces.
In Section 4 we apply out technique to the model of variable exponents, the double phase potential and weighted p-energy. From the point of applications these are the main results of our paper.

Construction of Fractal Examples
In this section we will use fractals to construct the functions u and b, which are necessary to study later in Section 3 the Lavrentiev gap and the other phenomena. The construction of these functions is independent of the models that we consider in Section 4. Let us clarify our notation. By B m r (x) we denote the ball of R m with radius r and center x. We denote by ½ A the indicator function of the set A. By L p (Ω) and W 1,p (Ω) we denote the usual Lebesgue and Sobolev spaces. Moreover, let W 1,p 0 (Ω) be the Sobolev space with zero boundary values. By L 1 loc (Ω) we denote the space of locally integrable functions (integrable on compact subsets) with W 1,1 loc (Ω) defined analogously. We use c > 0 for a generic constants whose value may change from line to line but does not depend on critical parameters. We also abbreviate f g for f ≤ c g.
2.1. One Building Block. We begin with a multidimensional, revised version of the Zhikov example. We will use it later as the building block for fractal examples.
In Figure 2 it is shown how our revised version of Zhikov's checkerboard example looks for d = 2. The picture shows the function u 2 , the (2, 1)-component of A 2 and a possible exponent p. The picture should be compared to the one of Figure 1. There are two main differences. First, our version is rotated by 45 • counterclockwise. Second, there is an additional area, where u 2 = 0. This fact will be very useful later. Note that on the shaded region of u 2 , resp. A 2 , we have |x 1 | |x 2 | |x|, which allows us later a freedom in the choice of variable on the shaded region. Another difference to the example of Zhikov is the improved regularity away from ). Moreover, the following estimates hold In particular, |∇u d | · |b d | = 0.
Proof. It is easy to see that u d , A d , b d ∈ C ∞ (R d \ {0}) and u d ∈ L ∞ (R d ). Moreover, u d and A d have the ACL property (absolutely continuous on almost every line parallel to the axis). Now, the estimates for |∇u d |, |b d | are also straight forward. They imply immediately that ∇u d , b d ∈ L 1 loc (R d ). This proves the claim.
Note that This is a crucial property of b d , since it implies that b d is orthogonal to the gradient of smooth functions. This will allow us later to separate u d from the smooth functions. Therefore, we call b d also separating vector field.
It follows from (2) and the regularity of b d that Another important feature of u d and b d is the following proposition on the boundary integral that we would obtain it if we were allowed to use partial integration on Ω b d · ∇u d dx (we are not, since b d / ∈ W 1,1 (Ω)).
For a better understanding we show in Figure 3 the values for b 2 u 2 that we need in Proposition 3. Before we get to the proof we need the following lemma.
Let use define g : Then by the definition of A d we get Thus, by the theorem of Gauß using that σ d−1 is the surface area of the d − 1-dimensional sphere. This proves the claim.
We can now prove Proposition 3.

Proof of Proposition 3. Note that
using Lemma 4.

Cantor Sets.
In the Zhikov's example the contact set S consists just of one point, the origin, which has dimension zero. For our new examples we want to use contact sets of higher, fractal dimension. For this reason we start with the definition of a few fractal Cantor sets that we need later.
We begin with the one dimensional generalized Cantor set C λ with λ ∈ (0, 1 2 ), which is also known as the (1-2λ)-middle Cantor set. We start with the interval C λ,0 := (− 1 2 , 1 2 ). Then we define C λ,k+1 inductively by removing the middle 1 − 2λ parts from C λ,k . In particular, we define C λ := ∩ k≥1 C λ,k . The corresponding Cantor measure µ λ (also Cantor distribution) is then defined as the weak limit of the measures µ λ,k : We will also need the m-dimensional Cantor sets C m λ and its distribution µ m λ , which are just the Cartesian products of C λ and µ λ . In the construction of our fractal examples we need a smooth approximation of This is the purpose of the following lemma.
but not the smoothness requirement. Therefore, we need to mollify this function depending on the |x|-value. For this let {ψ t } denote a standard mollifier, i.e. supp( The factor 1 100 in the scaling of the mollifier is chosen so small such that the smeared version of the jump set The following two lemmas provides further technical estimates that are used later to determine the integrability of our fractal examples. Lemma 6. Let λ ∈ (0, 1 2 ), 1 ≤ m ≤ d and D := dim(C m λ ) = −m log(2)/ log(λ). We use the notation x = (x,x) ∈ R m × R d−m . Then we have the following properties: (c) For all τ ∈ (0, 4] there holds Proof. Choose k ∈ Z such that λ k+1 < r < λ k . Let A 1 , . . . , A 2 mk denote the connected components of C m λ,k . We begin with (b). We estimate Let us prove (a). If d(x, C m λ ) > r, then µ m λ (B m r (x)) = 0. This explains the indicator function in (a). Clearly, By the construction of C m λ,k the sets A j are pairwise disjoint translates of (0, λ k ) m . So the number of indices l such that the intersection B m r (x) ∩ A l is nonempty does not exceed 2 m . Thus This finishes the proof of (a). Let us prove (c). Note that Now, the claim follows by an application of (a) with r = τ |x|.
The following lemma will be useful to determine later the integrability of our fractal examples.
Remark 8. Note that integrability exponents d β and d−D β in Lemma 7 are sharp.
In particular, |x|

Construction of Fractal Examples.
We can now construct our fractal examples, namely the functions u and b. The contact set S will in our examples be a subset of We will provide some pictures after the formal definition.
on Ω distinguishing three cases: (a) (Matching the dimension; Zhikov) p 0 = d:   Remark 11. The use of the skew-symmetric A allows us to avoid the language of differential forms: (a) For d = 2 we can rewrite A as Then div A = curl v. Thus, div div A = div b = 0 becomes the well known div curl v = 0. Hence, for d = 3 we could also work with v and curl v instead of A and div A. Compare also (3) and Proposition 18.
Proof. The case p 0 = d follows from Proposition 2. We continue with the subdimensional case 1 < p 0 < d. It is easy to see that u ∈ C ∞ (Ω \ S) ∩ L ∞ (Ω).
Proposition 14. For 1 < p 0 < ∞ let u, A, b be as is Definition 9.
(a) If p 0 = d, then Proof. We begin with (a). The case p 0 = d follows directly from Proposition 2. We continue with the sub-dimensional case 1 < p 0 < d. It follows from the properties of ρ that

Proposition 2 and Lemma 6 that
This proves the sub-dimensional case. If remains to prove the super-dimensional case p 0 > d. It follows from the properties of ρ that If follows from

Proposition 2 and Lemma 6 that
This proves the super-dimensional case and concludes (a). The estimates in (a) immediately imply that the support of ∇u and b only overlaps at S, which is a null set. This proves (b).
The following corollary clarifies the role of p 0 in Definition 9. We also need localized version of u, A and b.
Definition 17. For 1 < p 0 < ∞ let u, A, b be as is Definition 9. Let η ∈ C ∞ 0 (Ω) The following proposition shows that b and b • are divergence free in the sense of distributions.
Moreover, div b = div b • = 0 in the distributional sense and on Ω\ S in the classical sense.
Proof. For w ∈ C ∞ (Ω) we get by partial integration since A is anti-symmetric. For w ∈ C ∞ 0 (Ω) we also get by partial integration since A is anti-symmetric. It follows that div b = div b • = 0 in the distributional sense. Since by Proposition 13 we have b ∈ C ∞ (Ω \ S), it follows that div b = div b • = 0 on Ω \ S in the classical sense.
Due to Proposition 18 the functions b and b • are called separating vector fields.
Proof. The case p 0 = d is already contained in Proposition 3. Let us continue with the sub-dimensional case 1 < p 0 < d. Note that b = 0 on ∂Ω except on the sets {x d = ±1} ∩ ∂Ω. On these sets u takes the values ± 1 2 and ν = ±e d . Moreover, b d is even with respect to x d . Thus, This, (4), µ d−1 λ (R d−1 ) = 1 and Lemma 4 imply This proves the sub-dimensional case. Let us continue with the super-dimensional case p 0 > d. Note that b = 0 on ∂Ω except on the sets {x d = ±1} ∩ ∂Ω. On these sets u d takes the values ± 1 2 and ν = ±e d . Moreover, b d · e d is even with respect to x d . Thus, Hence, by (5), the theorem of Gauß and Lemma 4 This proves the super-dimensional case.
Proposition 20. For 1 < p 0 < ∞ with the notation of Definition 17 we have The claim follows immediately from the definition, S ⋐ (− 4 6 , 4 6 ) d and Proposition 13.

Important Consequences
Zhikov used the functions u 2 and b 2 in order to derive the Lavrentiev gap, H = W and the different notions of p(·)-harmonic functions. We show in this section that also our fractal examples display these phenomena. We will do this in this section in quite general form and apply it to specific examples in Section 4.

Energy and Generalized Orlicz Spaces.
In this section we introduce the necessary function spaces, the so called generalized Orlicz and Orlicz-Sobolev spaces.
We assume that Ω ⊂ R d is a domain of finite measure 1 . Later in our applications we will only use Ω = (−1, 1) d .
(c) We assume that ϕ and ϕ * are proper, i.e. for every t ≥ 0 there holds Ω ϕ(x, t) dx < ∞ and Ω ϕ * (x, t) dx < ∞. Let L 0 (Ω) denote the set of measurable function on Ω and L 1 loc (Ω) denote the space of locally integrable functions. We define the generalized Orlicz norm by Then generalized Orlicz space L ϕ(·) (Ω) is defined as the set of all measurable functions with finite generalized Orlicz norm For example the generalized Orlicz function ϕ(x, t) = t p generates the usual Lebesgue space L p (Ω).
Proof. Due to Proposition 18 we have S • (w) = 0 for w ∈ C ∞ (Ω) and S(w) = 0 for w ∈ C ∞ 0 (Ω). Now, the claim follows by density. Due to Proposition 22 the functionals S and S • are called separating functionals. Proof. Since ∇u · b = 0 everywhere, we have S(u) = 0. Since u ∂ , v ∂ ∈ C ∞ 0 (Ω \ S), we can use partial integration to get on Ω \ S, we can use partial integration together to get Analogously, we obtain S ∂ (u • ) = 0. Now, This proves the claim.
We come to the main result of this subsection.
3.3. Lavrentiev Gap. In this section we show how to use the function u and the vector field b from Definition 9 for the Lavrentiev gap. In this section, we need the following assumption: Proposition 13,14,19 and 20 hold. Let ϕ be such that u ∈ W 1,ϕ(·) (Ω) and b ∈ L ϕ * (·) (Ω). Also recall, that ϕ * satisfies the ∆ 2 -condition.
From the ∆ 2 -condition of ϕ * , see (7), it follows that We come to the main result of this subsection.
Moreover, assume that there exists s, t > 0 such that where We come to the main result of this subsection.
From the other hand, using Young's inequality, we get for all s > 0 that (Ω), we have S(h t − tu ∂ ) = 0 by Theorem 22. This and S(u ∂ ) = 1 by Proposition 23 imply Combining (11) and (12) we get for all t, s > 0. By Assumption 10 we can find t, s > 0 such that the right hand-side of last inequality is positive. For these t, s we have F (h t ) > F (w t ). This proves the claim for h H := h t and h W := w t .

Applications
We will now apply our results to the following three models: In this section we study the variable exponent model. In particular, we assume that ∞) is a variable exponent. The corresponding energy is (c) (Super-dimensional) p 0 > d: Define In particular, it follows from Proposition 14 that Thus, with Corollary 15 and p − < p 0 < p + we obtain This proves u ∈ W 1,p(·) (Ω) and b ∈ L p ′ (·) (Ω). This proves the validity of Assumption 21.
Using (13) we obtain for all s, t > 0 Now, fix s := t p0 − 1. Then for suitable large t (and therefore large s) we obtain

This proves Assumption 27.
Overall, we have constructed u, b, and p such that the Assumptions 21, 25 and 27 holds. Now, the claim follows from the results of Theorem 24, 26 and 28 of Section 3.
The exponent in Theorem 29 was discontinuous at the singular set S. The following result shows that it is also possible to construct a uniformly continuous exponent with the same phenomena. However, this exponent is not log-Hölder continuous, since this would imply the H 1,p(·) = W 1,p(·) by means of convolution, see [22] and [5,Section 4.6]. (Ω) = 0.
Proof. The proof is similar to the one of Theorem 29. So we only point out the difference. Let u, b be as in Definition 9 and S • as in (8). We have to show that ∇u ∈ L p(·) (Ω) and b ∈ L p ′ (·) (Ω) and to verify Assumption 27.
Overall, we have constructed u, b, and p such that the Assumptions 21, 25 and 27 hold. Now, the claim follows from the results from Theorem 24, 26 and 28 of Section 3.
Theorem 29 and Theorem 30 show in particular that the dimensional threshold is not important for the presence of the Lavrentiev gap and the non-density of smooth functions.
Remark 31. At this point we also have to mention the work of [13], since it seemingly contradicts our results. The authors claimed that where 1 < p < q with a weights a, ω ≥ 0. The corresponding energy is Let us denote by C k the space of k-times differentiable functions. Moreover, denote by C k+β for β ∈ (0, 1) and k ∈ N 0 the space of functions from C k whose k-th derivatives are β-Hölder continuous.
Let s, t > 0 (to be fixed later). By (17) we have Moreover, by (18) we have Thus, we have Since p < p 0 < q, we get Now, fix s := t p0−1 . Then for suitable large t (and therefore large s) we obtain where we have used p < p 0 and q ′ < p ′ 0 . This proves Assumption 27. Overall, we have constructed u, b, and p such that the Assumptions 21, 25 and 27 holds. Now, the claim follows from the results from Theorem 24, 26 and 28 of Section 3.
Remark 33. Theorem 32 shows that the dimensional threshold is not important for the presence of the Lavrentiev gap and the non-density of smooth functions. (Recall that the previous examples needed p < d < d + α < p crossing the dimension.) Since we have overcome the dimensional threshold, it might be surprising that we obtain different conditions on p and q for p ≤ d and p > d. Therefore, let us explain in the following that our conditions are sharp: Consider first the case p ≤ d. In this case we get Lavrentiev gap for q > p + α. Now, it has been shown in [2] that if h is a bounded minimizer of F and q ≤ p + α, then h is automatically in W 1,q (Ω). Since W 1,q (Ω) = H 1,q (Ω) ֒→ H 1,ϕ(·) (Ω) it follows that h ∈ H 1,ϕ(·) (Ω) and there is no Lavrentiev gap. This shows that our condition q > p + α is sharp. The boundeness of the minimizer is a reasonable assumption due to the maximum principle. Also note that our function u is also bounded. This is reflected by the fact that functions in W 1,ϕ(·) (Ω) can always be approximated by L ∞ (Ω) ∩ W 1,ϕ(·) (Ω) functions by means of truncation. Now, consider the case p > d. In this case it has been shown in [1, Theorem 1.4] that if h is a minimizer of F , h ∈ C 0,γ (Ω) and q ≤ p + α 1−γ , then h is automatically in W 1,q (Ω). Again W 1,q (Ω) = H 1,q (Ω) ֒→ H 1,ϕ(·) (Ω) implies that h ∈ H 1,ϕ(·) (Ω) and there is no Lavrentiev gap. Now, in our example we constructed a function u ∈ C 0,D (Ω) with D = p0−d p0−1 . Thus, we can compare our condition q > p + α p−1 d−1 for the Lavrentiev gap with q ≤ p + α 1−γ for γ := D for the absence of the Lavrentiev gap. Now, p + α 1−D = p + α p0−1 d−1 . Since p 0 can be chosen close to p this shows, that our condition q > p + α p−1 d−1 is sharp.
Remark 34. Fonseca, Malý and Mingione studied in [9] the size of possible singular sets of minimizer of the double phase potential. For 1 < p < d < d+α < q < ∞ they constructed a weight a such that the singular set has Hausdorff dimension larger than d − p − ε.
Let us compare this to our result. Since p < d, we can choose p 0 = p+δ with δ > 0 small. Thus, our function u has a singular set of Hausdorff dimension D = d−p 0 = d − p − δ. In particular, we obtain a singular set of the same size. Note however, that our function u is not a minimizer yet, but we expect that we can use u as a competitor to find a minimizer with a singular set of same Hausdorff dimension. . This proves ∇u ∈ L ϕ(·) (Ω). Moreover, by Lemma 7 we have ϕ * (·, |b|) ∈ L s,∞ (Ω) with s = d−D (d−1+β)p ′ > 1 using β < γ = 1 − D − d−D p = d−1 p0−1 (1 − p0 p ). This proves b ∈ L ϕ * (·) (Ω). Now 1 < p < ∞ ensures that ϕ and ϕ * satisfy the ∆ 2 -condition.
Overall, we have constructed u, b, and p such that the Assumptions 21 and 25 hold.
We are now going to verify Assumption 27. This will be the step, where we have to choose ε > 0 small enough. It suffices to prove Assumption 27 in the case of p 0 < d. (The other case are completely analogous.) Let s, t > 0 (to be fixed later). By (20) we have Moreover, by (18)  Overall, we have constructed u, b, and p such that the Assumptions 21, 25 and 27 holds. Now, the claim follows from the results from Theorem 24, 26 and 28 of Section 3.
Remark 37. Note, that Zhikov has also provided in [20, Section 5.3] another example for H 1,ϕ(·) (Ω) = W 1,ϕ (Ω) for the model of the weighted p-energy for p = 2. He was interested in an example, where the weight is bounded. Since, the checker board example does not work in this case, he constructed an example using fractals. For this he split the domain Ω into two parts Ω 1 and Ω 0 separated them by another part N consisting of a Cantor-necklace, see Figure 7. He then constructed a weight a ∈ L ∞ (Ω) with 1 a ∈ L 1 (Ω) and a function u ∈ (L ∞ (Ω) ∩ W 1,ϕ(·) (Ω)) \ H 1,ϕ(·) (Ω) with u = 0 on Ω 0 and u = 1 on Ω 1 . The weight was chosen such that it is integrable on each block of the necklace and scaled by the size on the smaller blocks. So the weight becomes smaller on smaller blocks. His example is contained in the class of possible weights from Theorem 36.