1 Introduction

The main purpose of this present article is to attain a possibility of global estimates of variable exponent power of the gradient in the framework of Lorentz spaces to weak solutions for the following variational inequalities. Let Ω be a bounded domain in \(\mathbb {R}^{d}\) for \(d\ge2\), with its rough boundary Ω beyond the Lipschitz category specified later. For given ψ obstacle function with

$$\begin{aligned} \psi\in W^{1,2} (\Omega) \quad\mbox{and} \quad\psi\le0 \quad\mbox{a.e. on } \partial\Omega, \end{aligned}$$

we define an admissible set \(\mathcal{A}\) by

$$\begin{aligned} \mathcal{A}= \bigl\{ \phi\in W^{1,2}_{0}(\Omega): \phi\ge \psi\mbox{ a.e. in } \Omega\bigr\} . \end{aligned}$$

Note that \(\mathcal{A}\) is nonempty due to \(\psi^{+} \in\mathcal{A}\). Here we are interested in elliptic obstacle problems by minimizing the energy functional \(\mathcal{J}[u]=\int_{\Omega}( A(x)\nabla u\cdot \nabla u + \mathbf{f}\cdot\nabla u)\,dx\) in the Sobolev spaces \(u\in W^{1,2}_{0}(\Omega)\) satisfying the admissible condition \(u\in\mathcal {A}\). This leads to the following variational inequalities in the weak sense that for the functions \(u\in W^{1,2}_{0}(\Omega)\) lying in \(\mathcal {A}\) such that

$$\begin{aligned} \int_{\Omega} A(x) Du \cdot D( \phi- u)\,dx \ge \int_{\Omega} \mathbf{f} \cdot D( \phi- u)\,dx \quad \mbox{for all } \phi\in\mathcal{A}, \end{aligned}$$
(1.1)

where the coefficient \(A(x)\) is a \(d\times d\) matrix satisfying uniform ellipticity, and the nonhomogeneous term \(\mathbf{f}\in L^{2}(\Omega, \mathbb{R}^{d})\). Such a function \(u\in\mathcal{A}\) is called a weak solution if it satisfies the variational inequalities (1.1). In the context, we mainly focus on the Calderón-Zygmund type estimates of \(\vert Du\vert ^{p(x)}\) in the scale of Lorentz spaces \(L^{(\gamma, q)}\) to weak solutions of variational inequalities (1.1) by imposing optimal regular conditions on the leading coefficients \(A(x)\) and the boundaries of domains Ω, which implies that

$$\begin{aligned} \vert D\psi \vert ^{p(x)}, \vert \mathbf{f}\vert ^{p(x)} \in L^{(\gamma, q)}(\Omega) \quad \Longrightarrow\quad \vert Du\vert ^{p(x)} \in L^{(\gamma, q)}(\Omega) \end{aligned}$$
(1.2)

for every real-valued function \(p(x)\) with locally log-Hölder continuity in Ω, \(\gamma\in[1,\infty) \) and \(q\in(0,\infty]\).

An optimal regularity is always important for mathematics and physics in the classical functional frame with minimal regular given datum, for example, in the Lebesgue spaces \(L^{p}\) and Sobolev spaces \(W^{1,p}\) with p as a fixed constant in \((1,\infty)\). In recent decades, many extensive studies have been made in the field of variable exponent Lebesgue and Sobolev spaces, \(L^{p(\cdot)}\) and \(W^{k,p(\cdot)}\) with \(k \ge1\) (cf. [14]) since the pioneering work of Zhikov in [5]. Indeed, for some materials with inhomogeneities, such as electrorheological fluids, this is not enough for energy with constant exponent, but rather the exponent p should be able to vary. These variable exponent Lebesgue, Sobolev and Lorentz spaces rather than the classical Sobolev spaces and Lorentz spaces are involved in the area of non-Newtonian fluids, as the underlying integral energy is naturally arising in the modeling of electrorheological fluids [6]. Other areas of application of variable exponent spaces include elastic mechanics [5], porous medium [7], and image restoration [8]. Generally speaking, various physical phenomena with strong anisotropy are well described by variable exponent spaces. This leads us to the study of partial differential equations in the setting of variable exponent Lebesgue, Sobolev and Lorentz spaces.

Nowadays the classical Calderón-Zygmund theory with constant exponent for elliptic obstacle problems has been widely studied, for instance, we can refer to Byun et al.’s papers [9, 10] and the references therein for the global \(L^{p}\) regularity to various irregular obstacle problems over a nonsmooth domain. Furthermore, Lorentz spaces are a two-parameter scale of spaces which refine Lebesgue spaces (cf. [11]), and there is a large body of literature on the topic of Lorentz regularity, see [1218]. Baroni [13, 14] obtained Lorentz estimates for evolutionary p-Laplacian systems and obstacle parabolic p-Laplacian respectively by using the large-M-inequality principle introduced by Acerbi and Mingione [19]. Meanwhile, Mengesha and Phuc [15] established the gradient estimates in weighted Lorentz spaces for quasilinear p-Laplacian based on a rather different geometrical approach. Later, Zhang and Zhou [16] extended the result of [15] to quasilinear elliptic \(p(x)\)-Laplacian equations also by using a geometrical argument; Adimurthil and Phuc [12] proved global Lorentz and Lorentz-Morrey estimates below the natural exponent for quasilinear equations; and Zhang and Zheng [17, 18] studied Lorentz estimates for fully nonlinear parabolic and elliptic equations with small BMO nonlinearities and weighted Lorentz estimates of the Hessian of strong solution for nondivergent linear elliptic equations with partially BMO coefficients. Our aim of this paper is inspired by two aspects. One is that recently more attention has been paid to a systematic study on the regularity estimates in variable exponent Sobolev spaces for divergent and nondivergent elliptic problems, see [2, 20]. Another is that the new definition is available to our aim for Lorentz spaces with variable exponent powers proposed by Kempka and Vybíral in [21].

Motivated by these recent papers mentioned above, we are interested in minimizing regular requirements to the variational inequalities (1.1) imposed on the coefficients and the boundary of domain, under which the gradient of weak solution is integrable as the inhomogeneous term and the gradient of obstacle functions in the setting of the generalized Lorentz spaces with variable exponent powers \(p(x)\). Our investigation aim is to attain an optimal natural extension of such elliptic variational inequalities (1.1) from \(L^{p}\)-regularity or \(L^{(p,q)}\)-regularity with constant exponents to the setting of variable exponents. It is an obvious observation that a uniform ellipticity on the coefficients is not enough to ensure the kind of regularity we mentioned above. To this end, it is necessary to impose some suitable minimal regular assumptions on the coefficients \(A(x)\) and geometric restriction on the boundary of the domain under the assumption that the given variable exponent \(p(x)\) has log-Hölder continuity. A recent notable achievement is that Kim and Krylov [22] got a unified approach to consider the \(L^{p}\) solvability to linear elliptic and parabolic problems with partially VMO coefficients. Later, these results were generalized to linear elliptic and parabolic equations/systems in divergence form with (variably) partially BMO/VMO coefficients by Dong and Kim [2325]. Also, Byun et al. in [10] attained a global Calderón-Zygmund estimate to linear elliptic obstacle problems with small partially BMO coefficients over nonsmooth domain by way of rather different geometrical approaches. More precisely, in this article we consider the variational inequalities (1.1) over the Reifenberg flat domain with the leading coefficients being only measurable in one variable, which allows quite arbitrary discontinuities in that direction, while being small BMO with respect to the remaining \((d-1)\)-variables. In fact, this is a typical situation closely related to the equation of linear elastic laminates [26] and composite materials [27] which have been widely applied to various fields. In addition, we suppose that the boundary of nonsmooth domain is flat in the sense of Reifenberg introduced in [28], which is well approximated by the two hyperplanes at each point at each scale. As we know, the class of Reifenberg flat domains contains the domains with rough fractal boundaries. To the best knowledge of the authors of this paper, this is the first time to consider the regularity in the category of the Lorentz spaces with variable exponents for the weak solution of variational inequalities (1.1) under minimal regular assumptions on the leading coefficients and the boundary of domain. We would like to mention that if the leading coefficients \(A(x)\) are only measurable, then there could not exist a unique solution to linear elliptic problems even in a very generalized sense. In 1963, Meyers’ counterexample in [29] demonstrates that the gradient of weak solutions to elliptic equations corresponding to highly oscillatory coefficients cannot be expected to have higher integrability irrespective of the regularity of the data \(f(x)\). Therefore, requiring the coefficients to satisfy a small partially BMO condition not only is necessary to achieve higher integrability, but also is the weakest condition so far even in the Lebesgue spaces \(L^{p}\) with constant exponents.

Note that the variational inequalities (1.1) are concerned with the Lorentz space with variable exponent powers \(p(x)\) of the gradient of weak solution, so that the techniques from harmonic analysis, like the Calderón-Zygmund operator, the maximal function operator and the sharp maximal function operator, might not be suitable for our estimates. Instead, we would like to point out that a key ingredient in our argument is the order \(p(\cdot)\) being a variable function, which is highly influenced for variable exponent Sobolev spaces by Byun et al.’s works [2, 3, 20]. This argument is motivated by the so-called maximal function-free technique in [19]. To this end, an important point of our approach is to make use of the modified Vitali type covering argument on the upper-level set

$$\begin{aligned} \bigl\{ x\in B_{R}(x_{0}) \cap\Omega: \vert Du\vert ^{\frac{2p(x)}{\inf \{p(x): x\in B_{2R}(x_{0}) \cap\Omega\}}} > \lambda\bigr\} \end{aligned}$$

with an increasing level for λ sufficiently large, for each point \(x_{0}\in\overline{\Omega}\) and for some size R sufficiently small, to derive its proper power decay estimate, see Lemma 3.2 in [2]. This present paper focuses on considering the estimate of variable exponent powers \(p(x)\) for the gradient of weak solution in the scale of Lorentz spaces to the obstacle problems (1.1). Therefore, another key ingredient in the generalized Lorentz spaces is to make use of the modified version of the classic Hardy inequality and the reverse Hölder inequality, see Lemmas 3.5 and 3.6 in [13].

Finally, we would like to remark that the obstacle problems provide a basic analysis tool in the study of variational inequalities and free boundary problems [30] for various PDEs, which are deeply involved in various geometric and potential theory problems such as capacities of sets or minimal surfaces. In addition, these also arise naturally in the classical elasticity theory, see [31, 32]. Therefore, our problem also provides a natural extension of Byun et al.’s works in [2, 3] which only studied elliptic equations without obstacles in the framework of classical Sobolev and variable Sobolev spaces, respectively.

The rest of this paper is organized as follows. In Section 2 we introduce some related notations and basic facts. By imposing optimal assumptions on \(p(\cdot)\), \(A(x)\) and the boundary of domain Ω, we finally state our main results. Section 3 is devoted to establishing some technical tools and auxiliary results. Finally, the main result is proved in Section 4.

2 Notations and main result

The section is devoted to introducing some basic notations, facts and stating our main result concerning the variational inequalities (1.1). First of all, let us recall some well-known notations concerning the Lorentz spaces and log-Hölder continuity of \(p(x)\). Lorentz spaces were introduced as a refined generalization of classical Lebesgue spaces.

Definition 2.1

Let \(\mathcal{D}\) be an open subset in \(\mathbb{R}^{d}\). The Lorentz space \(L^{(\gamma,q)}(\mathcal{D})\) with \(\gamma\in[1, +\infty)\) and \(q\in(0, + \infty)\) is the set of measurable functions \(g: \mathcal{D} \rightarrow\mathbb{R}\) such that

$$\begin{aligned} \Vert g\Vert _{L^{(\gamma,q)}(\mathcal{D})} := \biggl(\gamma \int_{0}^{\infty} \bigl(\lambda^{\gamma} \bigl\vert \bigl\{ x\in\mathcal{D}: \bigl\vert g(x)\bigr\vert >\lambda \bigr\} \bigr\vert \bigr)^{\frac{q}{\gamma}}\frac{d\lambda}{\lambda} \biggr)^{\frac {1}{q}} < + \infty. \end{aligned}$$

For \(q=\infty\), the space \(L^{(\gamma,\infty)}(\mathcal{D})\) is set to be the usual Marcinkiewicz space with quasinorm

$$\begin{aligned} \Vert g\Vert _{L^{(\gamma,\infty)}(\mathcal{D})} := \sup_{\lambda >0} \bigl( \lambda^{\gamma} \bigl\vert \bigl\{ x\in\mathcal{D}: \bigl\vert g(x)\bigr\vert >\lambda\bigr\} \bigr\vert \bigr)^{\frac{1}{\gamma}} < + \infty. \end{aligned}$$

We remark that if \(\gamma=q\) then the Lorentz space \(L^{(\gamma,\gamma )}(\mathcal{D})\) is nothing but the classical Lebesgue space \(L^{\gamma }(\mathcal{D})\), which is equivalently defined by

$$\begin{aligned} \Vert g\Vert _{L^{\gamma}(\mathcal{D})}= \biggl( \int_{\mathcal{D}}\bigl\vert g(x)\bigr\vert ^{\gamma}\,dx \biggr)^{\frac{1}{\gamma}} < + \infty. \end{aligned}$$

We would like to mention that Baroni in [13, 14] studied a local Lorentz regularity of the gradient for weak solutions of nonlinear elliptic and parabolic problems with small BMO coefficients based on the approach of the large-M-inequality principle [19].

Note that the main point in this paper is that the exponent \(p(x)\) is a variable function. The basic regularity assumption on the variable exponent \(p(\cdot)\) is the so-called log-Hölder continuity, which ensures the most basic operation available. Indeed, Sharapudinov [33] was the first person to consider the regularity of the exponent function \(p(x)\) with a local log-Hölder continuity, and from then it is the usual hypothesis for harmonic analysis and theory of PDEs. Let \(\mathcal{D}\) be a measurable set of \(\mathbb{R}^{d}\) and \(p(x): \mathcal{D} \rightarrow[1, \infty)\) be a bounded measurable function.

Definition 2.2

We say that \(p(x)\) is locally log-Hölder continuous, denote it by \(p(x)\in LH_{0}(\mathcal{D})\), if there exist constants \(C_{0}\) and \(\delta>0\) such that, for all \(x,y \in \mathcal{D}\) with \(\vert x-y\vert < \delta\), one has

$$\begin{aligned} \bigl\vert p(x)-p(y)\bigr\vert \le\frac{C_{0}}{-\log(\vert x-y\vert )}. \end{aligned}$$

The \(p(x)\) is said to be so-called log-Hölder continuous at infinity, denoted by \(p(x)\in LH_{\infty}(\mathcal{D})\), if there exist constants \(C_{\infty}\) and \(p_{\infty}\) such that, for all \(x\in\mathcal{D}\),

$$\begin{aligned} \bigl\vert p(x)-p_{\infty}\bigr\vert \le\frac{C_{\infty}}{\log( e+ \vert x\vert )}. \end{aligned}$$

If \(p(x)\) is log-Hölder continuous at local point and at infinity also, we denote it by writing \(p(x)\in LH(\mathcal{D})\).

It is also worth to mention that log-Hölder continuity in variable exponent is unavoidable if we want to treat the regularity results in the generalized Lorentz spaces with variable exponent for elliptic and parabolic problems, see [24, 20, 34] and the references therein. In what follows, we assume that \(p(x): \mathcal{D} \rightarrow\mathbb {R}\) is any log-Hölder continuous function, which implies that there exist positive constants \(\gamma_{1}\) and \(\gamma_{2}\) such that

$$\begin{aligned} 2 < \gamma_{1} \le p(x) \le\gamma_{2} < \infty\quad \forall x\in\mathcal{D} \end{aligned}$$
(2.1)

and

$$\begin{aligned} \bigl\vert p(x)-p(y)\bigr\vert \le\omega\bigl(\vert x-y \vert \bigr)\quad \forall x, y \in\mathcal{D}, \end{aligned}$$
(2.2)

where \(\omega: [0,\infty)\rightarrow[0,\infty)\) is a modulus of continuity of \(p(x)\). Without loss of generality, we suppose that ω is a nondecreasing continuous function with \(\omega(0)=0\), and \(\mathop{\lim\sup} _{r \rightarrow0} \omega(r) \log( \frac{1}{r} ) < \infty\). With the above assumptions in hand, it is clear that \(p(x)\in LH_{0}(\mathcal{D})\), and there exists a positive number A such that

$$\begin{aligned} \omega(r) \log\biggl(\frac{1}{r} \biggr) \le A \quad \Longleftrightarrow\quad r^{-\omega(r)} \le e^{A}\quad \forall r\in(0,1). \end{aligned}$$
(2.3)

It is rather important and ubiquitous in the context for the log-Hölder continuity condition (2.3) involved regularity of the exponent function to study various variable exponent problems. Generally speaking, the log-Hölder condition plays a central role in harmonic analysis on variable Lebesgue and Sobolev spaces, which ensures that the Hardy-Littlewood maximal operator is still bounded within the framework of the generalized Lebesgue spaces, a mollification argument is working, variable Sobolev embedding theorem and Poincaré inequalities are available. In addition, a key ingredient in the main proof concerning variable exponent problems is usually the so-called perturbation approach by various local comparisons with these problems of constant local maximal and minimal exponents \(p^{+}\) and \(p^{-}\), which also leads to an indispensable constant controlled by the log-Hölder condition (2.3), for more details, see the main proof in Section 4.

Now, we suppose that the coefficient matrix \(A(x) = ( a^{ij}(x)): \Omega\rightarrow\mathbb{R}^{d\times d}\) is uniformly bounded and elliptic, which means that there exist \(0<\nu\le\Lambda<\infty\) such that

$$\begin{aligned} \nu \vert \xi \vert ^{2} \le A(x)\xi\cdot\xi\le \Lambda \vert \xi \vert ^{2}\quad \forall x\in\Omega, \xi\in \mathbb{R}^{d}. \end{aligned}$$
(2.4)

We are in a position to introduce our principal assumptions on the coefficients \(A(x)\) and the geometric structure of the boundary Ω of domain. To this end, let us recall some useful notations later. For any fixed point \(x = (x_{1},\ldots, x_{d}) = (x_{1}, x')\in \mathbb{R}^{d}\) with \(x'=(x_{2},\ldots, x_{d}) \), we set

$$\begin{aligned} B_{r}(x)=\bigl\{ y\in\mathbb{R}^{d}: \vert x-y\vert < r \bigr\} ,\qquad B'_{r}\bigl(x'\bigr)=\bigl\{ y'\in\mathbb{R}^{d-1}: \bigl\vert x'-y' \bigr\vert < r\bigr\} \end{aligned}$$

and

$$\begin{aligned} Q_{r}(x)= (x_{1}-r, x_{1}+r)\times B'_{r}\bigl(x'\bigr). \end{aligned}$$

For convenience, in the context we write \(B_{r}=B_{r}(0)\), \(B'_{r}=B'_{r}(0)\). We denote the average of f on \(Q_{r}\) with \(r>0\) by

$$\begin{aligned} \bar{f}_{Q_{r}} = \fint_{Q_{r}} f(x)\,dx = \frac{1}{\vert Q_{r}\vert } \int_{Q_{r}} f(x)\,dx, \end{aligned}$$

where \(\vert Q_{r}\vert \) is d-dimensional Lebesgue measure of \(Q_{r}\); and also we denote the \((d-1)\)-dimensional average only with respect to \(x'\) by

$$\begin{aligned} \bar{f}_{B'_{r}}(x_{1}) = \fint_{B'_{r}} f\bigl(x_{1},x'\bigr)\,dx' = \frac{1}{\vert B'_{r}\vert } \int_{B'_{r}} f\bigl(x_{1},x'\bigr)\,dx', \end{aligned}$$

where \(\vert B'_{r}\vert \) is \((d-1)\)-dimensional Lebesgue measure of \(B'_{r}\).

Assumption 2.3

We say that \((A,\Omega)\) with \(A(x)=(a_{ij}(x))\) for all \(i,j=1,2,\ldots ,d\), is \((\delta, R_{0})\)-vanishing of codimension one if for any \(x_{0} \in\Omega\) and for every number \(r\in(0,R_{0}]\) with

$$\begin{aligned} \operatorname{dist}(x_{0}, \partial\Omega) = \min_{z\in\partial\Omega} \operatorname{dist}(x_{0}, z) > \sqrt{2} r, \end{aligned}$$

there exists a coordinate system depending on \(x_{0}\) and r, whose variables are still denoted by \(x=(x_{1},x')\), such that in the new coordinate system \(x_{0}\) is the origin and

$$\begin{aligned} \fint_{Q_{r}(x_{0})}\bigl\vert A(x)- \bar{A}_{B'_{r}(x'_{0})}( x_{1})\bigr\vert ^{2}\,dx \le\delta^{2}. \end{aligned}$$
(2.5)

While, for any \(x_{0} \in\Omega\) and for every number \(r\in(0,R_{0}]\) with

$$\begin{aligned} \operatorname{dist}(x_{0}, \partial\Omega) = \min_{z \in\partial\Omega} \operatorname{dist}(x_{0}, z) = \operatorname{dist}(x_{0}, z_{0}) \le\sqrt{2} r \end{aligned}$$

for some \(z_{0}\in\partial\Omega\), there exists a coordinate system depending on \(x_{0}\) and r, whose variables are still denoted by \(x=(x_{1},x')\), such that in the new coordinate system \(z_{0}\) is the origin,

$$\begin{aligned} B_{3r}(z_{0}) \cap\{x_{1} \ge 3 \delta r\} \subset B_{3r}(z_{0})\cap\Omega\subset B_{3r}(z_{0})\cap\{x_{1}\ge- 3\delta r\} \end{aligned}$$
(2.6)

and

$$\begin{aligned} \fint_{Q_{3r}(z_{0})} \bigl\vert A(x)- \bar{A}_{B'_{3 r}(z'_{0})}( x_{1})\bigr\vert ^{2}\,dx \le\delta^{2}, \end{aligned}$$
(2.7)

where \(A(x)\) is a zero-extension from \(Q_{3r}\cap\Omega\) to \(Q_{3r}\), the parameters \(\delta>0\) and \(R_{0}\) will be specified later.

Remark 2.4

We say that Ω is \((\delta, R_{0})\)-Reifenberg flat if (2.6) holds in the new coordinate system. It is worth noticing that if Ω is \((\delta, R_{0})\)-Reifenberg flat, we obtain the following measure density condition:

$$\begin{aligned}& \begin{aligned}&\sup_{0< r\le R_{0}} \sup_{x_{0} \in\partial\Omega} \frac{\vert B_{r}(x_{0})\vert }{\vert \Omega\cap B_{r}(x_{0})\vert } \le\biggl( \frac{2}{1-\delta} \biggr)^{d}, \\ &A\bigl\vert B_{r}(x_{0})\bigr\vert \le \bigl\vert B_{r}(x_{0})\cap\Omega\bigr\vert \le (1-A)\bigl\vert B_{r}(x_{0})\bigr\vert \quad \forall x_{0}\in\partial\Omega. \end{aligned} \end{aligned}$$
(2.8)

This implies that the boundary Ω satisfies the so-called A-type domain, namely, for the ball \(B_{r}(x_{0})\) of radius r centered at \(x_{0}\), there exists a positive constant \(A\in(0,1)\) such that the Lebesgue measure of \(B_{r}(x_{0}) \cap\Omega\) is comparable to that of \(B_{r}(x_{0})\). As a consequence, A-type domain guarantees a quantified higher integrability of the gradient of weak solutions of the variational inequalities (1.1) near the boundary based on the Gehring-Giaquinta-Modica lemma, see [13, 30, 35].

We would like to point out that at each point y and scale r, the coefficient \(A(x)\) is allowed to be merely measurable in one variable, depending on the point and the scale, but it has a small oscillation in all the other \((d-1)\) variables. Moreover, \(A(x)\) has a small mean oscillation in the flat direction near the boundary. Indeed, the δ-Reifenberg flat domain is so irregular that its boundary might be fractal and it goes beyond the Lipschitz one, which is meaningful in the area of geometric measure theory only if δ is small enough. We here point out that \(R_{0}>0\) can be selected in an arbitrary way due to the scaling invariant of Lemma 3.6 below. Moreover, δ can be selected later in our main proof in a universal way so that it depends only on the basic structural constants like d, ν, Λ, \(\gamma_{1}\), \(\gamma_{2}\) and \(\omega(\cdot)\).

Finally, we are ready to present the main result in this paper.

Theorem 2.5

Let \(p(x)\) be a variable exponent with range \(2< \gamma_{1}=\inf_{\Omega }p(x) \le\gamma_{2}=\sup_{\Omega}p(x) < \infty\), q be a constant exponent defined in \((0, \infty]\) and \(R_{0}>0\). Then there exists a positive constant δ such that if for all \((A(x), \Omega)\) is \((\delta, R_{0})\)-vanishing of codimension one shown as Assumption 2.3, for all \(p(x)\) satisfying log-Hölder continuity, \(\vert D\psi \vert ^{p(x)}\) and \(\vert \mathbf{f}\vert ^{p(x)}\) belonging to \(L^{(\gamma, q)}(\Omega)\), then each weak solution \(u\in\mathcal{A}\) of variational inequalities (1.1) satisfies \(\vert Du\vert ^{p(x)}\in L^{(\gamma, q)}(\Omega)\) with the estimate

$$\begin{aligned} \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} \le C \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)}+1 \bigr)^{\frac{\gamma _{2}}{\gamma_{1}}}, \end{aligned}$$
(2.9)

where \(C=C(d,\nu, \Lambda, \omega(\cdot), \gamma, q, \gamma_{1}, \gamma _{2}, \delta, R_{0}, \vert \Omega \vert )\), \(\gamma\in[1,\infty)\) and \(q\in(0,\infty]\).

3 Preliminaries

Throughout the paper, we denote by \(C_{i}(d,\nu, \Lambda, \ldots)\) for \(i=1,2, \ldots\) , a universal constant depending only on prescribed quantities and possibly varying from line to line. First, let us collect some preliminary results, which are useful in our main proof, see [13], Section 3.2, and [15], Proposition 3.9.

Proposition 3.1

Let \(\mathcal{D}\) be a bounded measurable subset of \(\mathbb{R}^{d}\). Then the following hold:

  1. (1)

    If \(0< q_{1}, q_{2} \le\infty\) and \(1 \le\gamma_{1}<\gamma _{2}<\infty\), then \(L^{(\gamma_{2},q_{2})}(\mathcal{D})\subset L^{(\gamma_{1},q_{1})}(\mathcal{D})\) with the estimate

    $$\begin{aligned} \Vert g\Vert _{L^{(\gamma_{1},q_{1})}(\mathcal {D})} \le C\bigl(\gamma_{1}, \gamma_{2}, q_{1}, q_{2}, \vert \mathcal{D} \vert \bigr) \Vert g\Vert _{L^{(\gamma_{2},q_{2})}(\mathcal{D})}. \end{aligned}$$
    (3.1)
  2. (2)

    If \(1 \le\gamma<\infty\) and \(0< q_{1}<q_{2}\le\infty\), then \(L^{(\gamma,q_{1})}(\mathcal{D})\subset L^{(\gamma,q_{2})}(\mathcal {D})\subset L^{(\gamma,\infty)}(\mathcal{D})\) with the estimate

    $$\begin{aligned} \Vert g\Vert _{L^{(\gamma,q_{2})}(\mathcal{D})} \le C(\gamma,q_{1},q_{2}) \Vert g\Vert _{L^{(\gamma,q_{1})}(\mathcal{D})}. \end{aligned}$$
    (3.2)
  3. (3)

    If for some \(0<\sigma<\infty\), \(\vert g\vert ^{\sigma}\in L^{(\gamma,q)}(\mathcal{D})\), then \(g\in L^{(\sigma\gamma,\sigma q)}(\mathcal{D})\) with the estimate

    $$\begin{aligned} \bigl\Vert \vert g\vert ^{\sigma}\bigr\Vert _{L^{(\gamma,q)}(\mathcal{D})}= \Vert g\Vert _{L^{(\sigma\gamma ,\sigma q)}(\mathcal{D})}^{\sigma}. \end{aligned}$$
    (3.3)
  4. (4)

    If \(f, g \in L^{(\gamma,q)}(\mathcal{D})\), then \(f + g \in L^{( \gamma, q)}(\mathcal{D})\) with the estimate

    $$\begin{aligned} \Vert f + g \Vert _{L^{(\gamma,q)}(\mathcal{D})} \le C(\gamma,q) \bigl( \Vert f \Vert _{L^{(\gamma, q)}(\mathcal{D})} + \Vert g\Vert _{L^{(\gamma, q)}(\mathcal{D})} \bigr). \end{aligned}$$
    (3.4)

In what follows, we shall show some technical tools. The first inequality we need is a variant of the classical Hardy inequality, whose proof can be found in [13].

Lemma 3.2

Let \(f: [0,+ \infty)\to[0,+ \infty)\) be a measurable function such that

$$\begin{aligned} \int_{0}^{\infty} f(\alpha)\,d\alpha< \infty, \end{aligned}$$

then, for any \(\sigma\ge1\) and for any \(\tau>0\), there holds

$$\begin{aligned} \int_{0}^{\infty} \alpha^{\tau} \biggl( \int_{\alpha}^{\infty}f(\beta)\,d\beta\biggr)^{\sigma} \frac{d\alpha}{\alpha} \le C \int_{0}^{\infty} \alpha^{\tau} \bigl(\alpha f( \alpha)\bigr)^{\sigma} \frac{d\alpha}{\alpha}, \end{aligned}$$
(3.5)

where \(C=C(\sigma,\tau)\).

The following reverse Hölder inequality is also a classical consequence that originated from the famous Gehring-Giaquinta-Modica lemma, also see [13]. More precisely, we have the following.

Lemma 3.3

Let \(h: [0,+ \infty)\to[0,+ \infty)\) be a nonincreasing measurable function, \(\sigma_{1}\le\sigma_{2}\le\infty\) and \(\tau>0\). If \(\sigma _{2}<\infty\), then

$$\begin{aligned} \biggl( \int_{\alpha}^{\infty}\bigl(\beta^{\tau}h(\beta) \bigr)^{\sigma_{2}} \frac{d\beta}{\beta} \biggr)^{\frac{1}{\sigma_{2}}} \le\varepsilon \alpha^{\tau} h(\alpha) + C \biggl( \int_{\alpha}^{\infty} \bigl(\beta^{\tau}h(\beta) \bigr)^{\sigma_{1}} \frac{d\beta}{\beta} \biggr)^{\frac{1}{\sigma_{1}}} \end{aligned}$$
(3.6)

for every \(\varepsilon\in(0,1)\) and for any \(\alpha\ge0\), where \(C=C(\tau, \varepsilon, \sigma_{1}, \sigma_{2})\). If \(\sigma_{2}=\infty\), then

$$\begin{aligned} \sup_{\beta> \alpha} \beta^{\tau}h(\beta) \le C \alpha^{\tau} h(\alpha) + C \biggl( \int_{\alpha}^{\infty} \bigl(\beta^{\tau}h(\beta) \bigr)^{\sigma_{1}} \frac{d\beta}{\beta} \biggr)^{\frac{1}{\sigma_{1}}}, \end{aligned}$$
(3.7)

where \(C=C(\tau, \sigma_{1})\).

In the process of the main proof, we also make use of the following iterating lemma, which can be found in [35].

Lemma 3.4

Let ϕ be a bounded nonnegative function on \([r_{1}, r_{2}]\). Suppose that, for any \(s_{1}\), \(s_{2}\) with \(0< r_{1} \le s_{1} \le s_{2} \le r_{2}\),

$$\begin{aligned} \phi(s_{1}) \le\theta_{1} \phi(s_{2}) + \frac{P_{1}}{(s_{2}-s_{1})^{\theta_{2}}} + P_{2}, \end{aligned}$$
(3.8)

where the constants \(P_{1}, P_{2}\ge0\), \(0< \theta_{1} < 1\) and \(\theta _{2}>0\). Then there holds

$$\begin{aligned} \phi(s_{1}) \le C \biggl(\frac{P_{1}}{(s_{2}-s_{1})^{\theta_{2}}} + P_{2} \biggr) \end{aligned}$$

for some positive constant \(C=C(\theta_{1}, \theta_{2})\).

According to the classical \(L^{2}\) solvability to the variational inequalities (1.1) in line with the Lax-Milgram theory, there exists a unique weak solution \(u\in\mathcal{A}\) of (1.1) such that the following lemma holds, for details also see [10].

Lemma 3.5

There is a unique weak solution \(u\in\mathcal{A}\) to the variational inequalities (1.1) such that we have the estimate

$$\begin{aligned} \Vert Du\Vert _{L^{2}(\Omega)} \le C \bigl( \Vert \mathbf{f} \Vert _{L^{2}(\Omega)} + \Vert D\psi \Vert _{L^{2}(\Omega)} \bigr), \end{aligned}$$
(3.9)

where \(C=C(d, \nu, \Lambda)\).

Now, let us employ the fact that the obstacle problem here considered is invariant under scaling and normalization. Then the following property is an immediate consequence by straightforward computations, see Lemma 2.4 in [10].

Lemma 3.6

Fix \(M>1\) and \(0<\rho<1\), we define

$$\begin{aligned} \tilde{A}(x) = A(\rho x), \qquad \tilde{u}(x) = \frac{u(\rho x)}{M\rho}, \qquad \tilde {\psi}(x) = \frac{\psi(\rho x)}{ M \rho}, \qquad \tilde{\mathbf{f}}(x) = \frac{\mathbf{f}(\rho x)}{M} \end{aligned}$$

and the set \(\tilde{\Omega}= \{x/\rho: x\in\Omega\}\). Then we have the following:

  1. (1)

    If \(u\in\mathcal{A}\) is a weak solution to the variational inequalities (1.1) in Ω, then

    $$\begin{aligned} \tilde{u}\in\tilde{\mathcal{A}} = \bigl\{ \phi\in W^{1,2}_{0}( \tilde{\Omega}): \phi\ge\tilde{\psi}, \textit{a.e. in } \tilde{\Omega} \bigr\} \end{aligned}$$

    is a weak solution to the variational inequalities

    $$\begin{aligned} \int_{\tilde{\Omega}} \tilde{A}(x) D\tilde{u} \cdot D(\tilde{\phi}- \tilde{u})\,dx \ge \int_{\tilde{\Omega}} \tilde{\mathbf{f} }\cdot D(\tilde{\phi}-\tilde {u})\,dx,\quad \forall\tilde{\phi} \in\tilde{\mathcal{A}}. \end{aligned}$$
    (3.10)
  2. (2)

    \(\tilde{A}(x)\) satisfies the basic condition (2.4) with the same constants ν and Λ. Moreover, the regularity Assumption  2.3 is invariant with the dilated scale \(R_{0}/\rho\).

Finally, we end this section with presenting a necessary auxiliary result concerning a higher integrability result for (1.1) in the interior and the boundary version, see [35]. This relies on the generalized reverse Hölder inequality first originated from the Gehring-Giaquinta-Modica lemma, and the boundary setting by using the A-condition of \((\delta, R_{0})\)-Reifenberg flat domain, see Remark 2.4. For the setting of any boundary point, we set

$$\begin{aligned} \Omega_{r} := B_{r} \cap\Omega\quad \mbox{and}\quad \partial_{w}\Omega_{r} := B_{r} \cap\partial \Omega\quad \mbox{for any } r>0. \end{aligned}$$

Lemma 3.7

  1. (1)

    Let \(u \in\mathcal{A}\) be a weak solution of (1.1) in \(Q_{4r}\subset\Omega\) for any \(r>0\). Suppose \(\vert \mathbf{f}\vert \) and \(\vert D\psi \vert \in L^{\gamma}(Q_{4r})\) for some \(\gamma>2\), then there exists a small positive constant \(\sigma _{1}\) such that, for all \(\sigma\le\sigma_{1}\),

    $$\begin{aligned}& \fint_{Q_{r}}\vert Du\vert ^{2(1+\sigma)}\,dx \\& \quad \le C \biggl( \biggl( \fint_{Q_{2r}} \vert Du\vert ^{2}\,dx \biggr)^{(1+\sigma)} + \fint_{Q_{2r}} \bigl( \vert F\vert ^{2} + \vert D \psi \vert ^{2} \bigr)^{(1+\sigma)}\,dx \biggr) \end{aligned}$$
    (3.11)

    for some positive constant \(C=C(d,\nu, \Lambda, \gamma)\).

  2. (2)

    Suppose that Ω is a \((\delta, R_{0})\)-Reifenberg flat domain. Let \(u \in\mathcal{A}\) be a weak solution of (1.1) in \(\Omega_{4r}\) and \(u=0\) on \(\partial_{w}\Omega_{4r}\) with

    $$\begin{aligned} Q_{4r}^{+} \subset\Omega_{4r} \subset Q_{4r} \cap\{x_{1}> - 8 \delta r\} \end{aligned}$$

    for any \(0< r< R_{0}\). If \(\vert \mathbf{f}\vert \), \(\vert D\psi \vert \in L^{\gamma}(\Omega_{4r})\) for some \(\gamma>2\), then there exists a small positive constant \(\sigma_{2}\) such that, for all \(\sigma \le\sigma_{2}\),

    $$\begin{aligned}& \fint_{\Omega_{r}}\vert Du\vert ^{2(1+\sigma)}\,dx \\& \quad \le C \biggl( \biggl( \fint_{\Omega_{2r}} \vert Du\vert ^{2}\,dx \biggr)^{(1+\sigma)} + \fint_{\Omega_{2r}} \bigl( \vert F\vert ^{2} + \vert D \psi \vert ^{2} \bigr)^{(1+\sigma)}\,dx \biggr) \end{aligned}$$
    (3.12)

    for some positive constant \(C=C(d,\nu, \Lambda, \gamma, \delta, R_{0})\).

4 Proof of the main result

In this section, we focus on the proof of main Theorem 2.5. First, let us begin this section with the a priori assumption that the unique weak solution \(u\in\mathcal{A}\) of the variational inequalities (1.1) satisfies

$$\begin{aligned} \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert _{L^{(\gamma,q)}(\Omega)} < \infty. \end{aligned}$$
(4.1)

We also assume that \((A(x), \Omega)\) is \((\delta, R_{0})\)-vanishing of codimension one, where \(R_{0}\le1\) is a given number, while δ is to be determined later. Let \(R \in (0, R_{0}/(\vert \Omega \vert +1))\) and \(x_{0}\in\overline{\Omega}\) be fixed, we localize our interest in the region \(\Omega_{2R}(x_{0})\) and write

$$\begin{aligned} 2 < \gamma_{1} \le p^{-} = \inf _{\Omega_{2R}(x_{0})} p(x) \le p^{+} = \sup_{\Omega_{2R}(x_{0})} p(x) \le\gamma_{2} < \infty \end{aligned}$$
(4.2)

and

$$\begin{aligned} \lambda_{0} = \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx + \frac{1}{\delta} \biggl( \fint_{\Omega_{2R}(x_{0})} \bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + 1\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} > 1, \end{aligned}$$
(4.3)

where \(\eta>1\), and small \(\delta>0\) will be specified later. We would like to remark that the δ-flatness Reifenberg condition (2.6) for the boundary of domain is meaningful in the area of geometric measure theory only if δ is small enough, see [28]. For any \(\tau_{1}\), \(\tau_{2}\) with \(1\le\tau_{1} < \tau_{2} \le2 \), we denote an upper-level set by

$$\begin{aligned} E(\lambda) = \bigl\{ x\in\Omega_{\tau_{1}R}(x_{0}): \vert Du \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \lambda\bigr\} , \end{aligned}$$

where λ is large enough such that

$$\begin{aligned} \lambda> \biggl(\frac{16}{7} \biggr)^{d} \biggl( \frac{248}{\tau_{2}-\tau_{1}} \biggr)^{d} \lambda_{0}. \end{aligned}$$
(4.4)

We observe from the upper-level set that

$$\begin{aligned} \Omega_{r}(y) \subset\Omega_{2R}(x_{0}), \quad \forall y\in E(\lambda) \quad \mbox{and}\quad 0< r \le(\tau_{2}- \tau_{1}) R. \end{aligned}$$

Fix any point \(y\in E(\lambda)\), we consider a continuous function \(\Phi _{y}(r)\) defined by

$$\begin{aligned} \Phi_{y}(r) =& \fint_{\Omega_{r}(y)} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \\ &{}+ \frac{1}{\delta} \biggl( \fint_{\Omega_{r}(y)}\bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}},\quad 0< r \le(\tau_{2}-\tau_{1}) R. \end{aligned}$$
(4.5)

The Lebesgue differentiation theorem implies that

$$\begin{aligned} \lim_{r\rightarrow0} \Phi_{y}(r) > \lambda\quad \mbox{for almost every } y\in E(\lambda). \end{aligned}$$

On the other hand, if \((\tau_{2}-\tau_{1}) R/124 \le r \le(\tau _{2}-\tau_{1}) R \), then by using the fact that \(\eta>1\) and the Reifenberg flat boundary satisfies the measure density condition, see Remark 2.4, we have

$$\begin{aligned} \Phi_{y}(r) \le& \frac{\vert \Omega_{2R}(x_{0})\vert }{\vert \Omega_{r}(y)\vert } \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \\ &{} + \biggl( \frac{\vert \Omega_{2R}(x_{0})\vert }{\vert \Omega_{r}(y)\vert } \biggr)^{\frac{1}{\eta}} \frac{1}{\delta} \biggl( \fint_{\Omega_{2R}(x_{0})} \bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} \\ \le& \frac{\vert \Omega_{2R}(x_{0})\vert }{\vert \Omega _{r}(y)\vert } \biggl( \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx + \frac{1}{\delta} \biggl( \fint_{\Omega_{2R}(x_{0})} \bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} \biggr) \\ \le& \frac{\vert B_{r}(y)\vert }{\vert \Omega\cap B_{r}(y)\vert } \frac{\vert B_{2R}(x_{0})\vert }{\vert B_{r}(y)\vert } \lambda_{0} \\ \le&\biggl( \frac{2}{1-\delta} \biggr)^{d} \biggl( \frac{248}{\tau_{2}-\tau_{1}} \biggr)^{d} \lambda_{0} \\ \le&\biggl( \frac{16}{7} \biggr)^{d} \biggl( \frac{248}{\tau_{2}-\tau_{1}} \biggr)^{d} \lambda_{0}. \end{aligned}$$

Putting the above formula into assumption (4.4) yields

$$\begin{aligned} \Phi_{y}(r) < \lambda,\quad \forall y\in E(\lambda) \mbox{ and } \forall r \in\bigl[ (\tau_{2}-\tau_{1}) R/124, (\tau_{2}- \tau_{1}) R \bigr]. \end{aligned}$$

Consequently, we conclude that for almost every \(y\in E(\lambda)\), there exists \(r_{y} = r(y) \in(0, (\tau_{2}-\tau_{1}) R/124)\) such that

$$\begin{aligned} \Phi_{y}(r_{y}) = \lambda\quad \mbox{and}\quad \Phi_{y}(r) < \lambda\quad \forall r \in\bigl(r_{y}, ( \tau_{2}-\tau_{1}) R \bigr]. \end{aligned}$$
(4.6)

Then we infer the following lemma from the well-known Vitali covering lemma due to the property of \(r_{y}\).

Lemma 4.1

Let λ satisfy (4.4). Then there exists a disjoint family \(\{ \Omega_{r_{y_{i}}}(y_{i}) \}_{i=1}^{\infty}\) with \(y_{i}\in E(\lambda)\) and \(r_{y_{i}} \in(0, (\tau_{2}-\tau_{1}) R/124)\) such that

$$\begin{aligned} \Phi_{y_{i}}(r_{y_{i}}) = \lambda\quad \textit{and}\quad \Phi_{y_{i}}(r) < \lambda\quad \textit{for all } r \in\bigl(r_{y_{i}}, ( \tau_{2}-\tau_{1}) R \bigr] \end{aligned}$$

and

$$\begin{aligned} E(\lambda) \subset\bigcup_{i=1}^{\infty} \Omega_{5r_{y_{i}}}(y_{i}). \end{aligned}$$

Lemma 4.2

Under the same hypothesis as in Lemma 4.1, we have

$$\begin{aligned} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert \le& C \biggl( \bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4) \bigr\vert + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr), \end{aligned}$$

where \(\varsigma= \delta/6\) and \(C=C(d,\nu, \Lambda)\).

Proof

With Lemma 4.1 in hand, we then have that one of the following results must hold:

$$\begin{aligned}& \fint_{\Omega_{r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \ge \frac{\lambda}{3},\qquad \fint_{\Omega_{r_{y_{i}}}(y_{i})}\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}\eta}\,dx \ge \biggl( \frac{\delta\lambda}{3} \biggr)^{\eta}\quad \mbox{and} \\& \fint_{\Omega_{r_{y_{i}}}(y_{i})}\vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}\eta}\,dx \ge\biggl( \frac{\delta\lambda}{3} \biggr)^{\eta}. \end{aligned}$$

For the first setting, let us take any

$$\begin{aligned} 0< \epsilon< \min\biggl\{ \frac{\gamma_{1}(1+\sigma _{0})}{\gamma_{1}+\omega(2R)} - 1, \frac{\gamma p^{-}}{2} - 1 \biggr\} , \end{aligned}$$
(4.7)

where \(\sigma_{0} = \min\{\sigma_{1}, \sigma_{2}\}\) is the same as in Lemma 3.7 which is concerned with the higher integrability of Du, and \(\gamma\in[1, \infty)\). It yields the following inequality:

$$\begin{aligned} \frac{p(x)}{p^{-}} (1+ \epsilon) = \biggl(1 + \frac{p(x)-p^{-}}{p^{-}} \biggr) (1+ \epsilon) \le\biggl( 1 + \frac{\omega(2R)}{\gamma_{1}} \biggr) (1+ \epsilon) < 1 + \sigma_{0} \le\gamma_{1}. \end{aligned}$$

Then, by an additivity of the integral with respect to the domain and Hölder’s inequality, we get

$$\begin{aligned} \frac{\lambda}{3} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert \le& \int_{ \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4) } \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx + \int_{\Omega_{r_{y_{i}}}(y_{i}) \backslash E(\lambda/4)} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \\ \le& \bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4) \bigr\vert ^{1-\frac{1}{1+\epsilon}} \biggl( \int_{ \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4) } \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}(1+\epsilon)}\,dx \biggr)^{\frac{1}{1+\epsilon}} + \frac{\lambda}{4} \bigl\vert \Omega _{r_{y_{i}}}(y_{i}) \bigr\vert , \end{aligned}$$

which yields

$$\begin{aligned} \lambda\bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \bigr\vert ^{1-\frac{1}{1+\epsilon}} \le C_{1} \bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4) \bigr\vert ^{1-\frac{1}{1+\epsilon}} \biggl( \fint_{\Omega_{r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}(1+\epsilon)}\,dx \biggr)^{\frac{1}{1+\epsilon}}. \end{aligned}$$
(4.8)

Furthermore, on the basis of higher integrability of the gradient to weak solutions for the variational inequalities (1.1) in lines with Lemma 3.7, we obtain

$$\begin{aligned}& \biggl( \fint_{ \Omega_{r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}(1+\epsilon)}\,dx \biggr)^{\frac{1}{1+\epsilon}} \\& \quad \le C_{2} \biggl( \fint_{\Omega_{2r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx + \biggl( \fint_{\Omega_{2r_{y_{i}}}(y_{i})} \bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr)^{(1+\epsilon)}\,dx \biggr)^{\frac{1}{1+\epsilon}} \biggr). \end{aligned}$$

Now we take \(\eta= 1+ \epsilon\), using Lemma 4.1 yields

$$\begin{aligned} \biggl( \fint_{ \Omega_{r_{y_{i}}}(y_{i}) } \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}(1+\epsilon)}\,dx \biggr)^{\frac{1}{1+\epsilon}} \le C_{3} \lambda. \end{aligned}$$

Putting the above formula into (4.8), we have

$$\begin{aligned} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert \le C_{4} \bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4) \bigr\vert . \end{aligned}$$
(4.9)

For the second setting, we have

$$\begin{aligned} \biggl( \frac{\delta\lambda}{3} \biggr)^{\eta} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert \le& \int_{\Omega_{r_{y_{i}}}(y_{i})}\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}\eta}\,dx \\ =& \eta \int_{0}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \\ \le& ( \varsigma\lambda)^{\eta} \bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \bigr\vert + \eta \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu}. \end{aligned}$$

Taking \(\varsigma= \delta/6\), we get

$$\begin{aligned} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert \le\frac{C_{5}}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu}. \end{aligned}$$
(4.10)

We now estimate the third setting in a similar way, just as doing it in the second setting, and conclude that

$$\begin{aligned} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert \le\frac{C_{6}}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu}. \end{aligned}$$
(4.11)

Finally, putting the three cases (4.9), (4.10) and (4.11) together completes the proof of Lemma 4.2. □

For any fixed point \(y_{i}\) and scale \(r_{y_{i}}\), there are now two possible cases. One is the interior case that \(B_{20r_{y_{i}}}(y_{i}) \subseteq\Omega\). The other is the boundary case that \(B_{20r_{y_{i}}}(y_{i}) \nsubseteq\Omega\). We first look at the interior case. Since \(A(x)\) is \((\delta, R_{0})\)-vanishing of codimension one, we assume that in a new coordinate system \((x_{1}, \ldots, x_{d})\), the origin is \(y_{i}\) and

$$\begin{aligned} \fint_{Q_{20r_{y_{i}}}(y_{i})} \bigl\vert A(x)- \bar {A}_{B'_{20r_{y_{i}}}(y'_{i})}( x_{1})\bigr\vert ^{2}\,dx \le\delta^{2}. \end{aligned}$$
(4.12)

For convenience, we write

$$\begin{aligned} p_{i}^{-} = \inf_{x\in Q_{20r_{y_{i}}}(y_{i})} p(x) \quad \mbox{and}\quad p_{i}^{+} = \sup_{x\in Q_{20r_{y_{i}}}(y_{i})} p(x). \end{aligned}$$

From Lemma 4.1 and the definition of \(\Phi _{y_{i}}(r_{y_{i}})\), we have

$$\begin{aligned} \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \le\lambda \quad \mbox{and} \quad \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})}\bigl( \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} \bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} \le\delta\lambda. \end{aligned}$$
(4.13)

By the re-scaling transformation and perturbation approach based on a local comparison, we obtain

$$\begin{aligned} \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \le C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \quad \mbox{and}\quad \fint_{Q_{20r_{y_{i}}}(y_{i})} \bigl( \vert \mathbf{f}\vert ^{2} + \vert D\psi \vert ^{2} \bigr)\,dx \le C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \delta^{\frac{\gamma_{1}}{\gamma_{2}}} \end{aligned}$$
(4.14)

for some constant \(C_{0}\ge1\) independent of i, and \(\gamma_{1}\), \(\gamma_{2}\) shown as in (4.2). In fact, let \(A_{0} = \Vert \vert \mathbf{f}\vert ^{p(x)}\Vert _{L^{(\gamma, q)}(\Omega)} + \Vert \vert D\psi \vert ^{p(x)}\Vert _{L^{(\gamma, q)}(\Omega )}+1 \ge1\). A direct computation yields that

$$\begin{aligned} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{p_{i}^{+}-p_{i}^{-}} =& \biggl( \frac{1}{\vert Q_{20r_{y_{i}}}(y_{i})\vert } \biggr)^{p_{i}^{+}-p_{i}^{-}} \biggl( \int_{Q_{20r_{y_{i}}}(y_{i})}\vert Du\vert ^{2}\,dx \biggr)^{p_{i}^{+}-p_{i}^{-}} \\ \le& C_{1} \biggl( \frac{1}{40r_{y_{i}}} \biggr)^{d\omega(40r_{y_{i}})} \biggl( \int_{\Omega} \vert Du\vert ^{2}\,dx \biggr)^{p_{i}^{+}-p_{i}^{-}} \\ \le& C_{2} \biggl( \int_{\Omega} \vert Du\vert ^{2}\,dx \biggr)^{p_{i}^{+}-p_{i}^{-}}, \end{aligned}$$
(4.15)

where we used (2.3) based on the log-Hölder condition in the last inequality. On the other hand, by making use of the standard \(L^{2}\) estimates from Lemma 3.5 and Proposition 3.1 due to \(\frac{\gamma\gamma_{1}}{2}>1\) for \(\gamma\in[1, \infty)\) and \(q\in(0, \infty]\), we obtain

$$\begin{aligned} \int_{\Omega} \vert Du\vert ^{2}\,dx \le& C_{3} \biggl( \int_{\Omega} \vert \mathbf{f}\vert ^{2}\,dx + \int_{\Omega} \vert D\psi \vert ^{2}\,dx \biggr) \\ \le& C_{4} \biggl( \int_{\Omega} \vert \mathbf{f}\vert ^{\frac{2p(x)}{\gamma_{1}}}\,dx + \int_{\Omega} \vert D\psi \vert ^{\frac{2p(x)}{\gamma_{1}}}\,dx + \vert \Omega \vert \biggr) \\ \le& C_{5} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{\frac{2p(x)}{\gamma_{1}}} \bigr\Vert _{L^{(\frac{\gamma\gamma _{1}}{2}, \frac{q \gamma_{1}}{2})}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{\frac{2p(x)}{\gamma_{1}}}\bigr\Vert _{L^{(\frac{\gamma\gamma _{1}}{2}, \frac{q \gamma_{1}}{2})}(\Omega)} + \vert \Omega \vert \bigr) \\ =& C_{5} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{\frac{2}{\gamma_{1}}} + \bigl\Vert \vert D\psi \vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega )}^{\frac{2}{\gamma_{1}}} + \vert \Omega \vert \bigr), \end{aligned}$$

which leads to

$$\int_{\Omega} \vert Du\vert ^{2}\,dx \le C_{6} A_{0} \bigl( 1 + \vert \Omega \vert \bigr). $$

Then we conclude

$$\begin{aligned} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{p_{i}^{+}-p_{i}^{-}} \le C_{2} \bigl( C_{6} A_{0} \bigl( 1 + \vert \Omega \vert \bigr) \bigr)^{p_{i}^{+}-p_{i}^{-}}. \end{aligned}$$

Recalling \(( \vert \Omega \vert +1) < \frac{R_{0}}{R} \le\frac {1}{R} \le\frac{1}{40 r_{y_{i}}}\) and (2.3) yields

$$\begin{aligned} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{p_{i}^{+}-p_{i}^{-}} \le C_{7} A_{0}^{p_{i}^{+}-p_{i}^{-}} \biggl( \frac{1}{40 r_{y_{i}}} \biggr)^{\omega(40r_{y_{i}})} \le C_{8} A_{0}^{p_{i}^{+}-p_{i}^{-}}, \end{aligned}$$

which follows from \(A_{0}\ge1\) that

$$ \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{\frac{p_{i}^{+}-p_{i}^{-}}{p_{i}^{+}}} \le C_{9} A_{0}^{\frac {p_{i}^{+}-p_{i}^{-}}{p_{i}^{+}}} \le C_{9} A_{0}. $$
(4.16)

Using (4.16) and Jensen’s inequality yields

$$\begin{aligned} \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx =& \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{\frac{p_{i}^{+}-p_{i}^{-}}{p_{i}^{+}}} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{\frac{p_{i}^{-}}{p_{i}^{+}}} \\ \le& C_{9} A_{0} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{2}\,dx \biggr)^{\frac{p_{i}^{-}}{p_{i}^{+}}} \\ \le& C_{9} A_{0} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac {2p_{i}^{-}}{p^{-}}}\,dx \biggr)^{\frac{p^{-}}{p_{i}^{+}}} \\ \le& C_{9} A_{0} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx +1 \biggr)^{\frac{p^{-}}{p_{i}^{+}}}. \end{aligned}$$

Since \(\lambda>1\), by (4.13) we get the first desired inequality in (4.14) by taking \(C_{0} = 2 C_{9} A_{0}\).

Likewise, we derive that

$$\begin{aligned} \fint_{Q_{20r_{y_{i}}}(y_{i})} \bigl( \vert \mathbf{f}\vert ^{2} + \vert D\psi \vert ^{2} \bigr)\,dx \le& C_{0} \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \bigl( \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} \bigr)\,dx +1 \biggr)^{\frac {p^{-}}{p_{i}^{+}}} \\ \le& C_{0} \biggl( \biggl( \fint_{Q_{20r_{y_{i}}}(y_{i})} \bigl( \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} \bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} + 1 \biggr)^{\frac{p^{-}}{p_{i}^{+}}} \\ \le& C_{0} ( \delta\lambda+ \delta\lambda_{0} )^{\frac{p^{-}}{p_{i}^{+}}} \le C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \delta^{\frac{\gamma_{1}}{\gamma_{2}}}, \end{aligned}$$

where we also employ (4.13) in the third inequality.

Define

$$\begin{aligned}& \tilde{u}_{i}(x) = \frac{u(5r_{y_{i}}x)}{5r_{y_{i}} \sqrt{C_{0} \lambda ^{\frac{p^{-}}{p_{i}^{+}}}}},\qquad \tilde{\psi}_{i}(x) = \frac{\psi(5r_{y_{i}}x)}{5r_{y_{i}} \sqrt{C_{0} \lambda^{\frac {p^{-}}{p_{i}^{+}}}}},\\& \tilde{\mathbf{f}}_{i}(x) = \frac{\mathbf{f}(5r_{y_{i}}x)}{\sqrt{C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}}}},\qquad \tilde{A}_{i}(x) = A(5r_{y_{i}}x). \end{aligned}$$

By using Lemma 3.6, we get that \(\tilde{u}_{i}(x)\in\tilde {\mathcal{A}}_{i} : = \{\phi_{i} \in W^{1,2}(Q_{4}): \phi_{i} \ge\tilde {\psi}_{i}, \mbox{a.e. in } Q_{4} \}\) is a weak solution of

$$\begin{aligned} \int_{Q_{4}} \tilde{A}_{i}(x) D\tilde{u}_{i} D(\tilde{\phi}_{i}-\tilde{u}_{i})\,dx \ge \int_{Q_{4}} \tilde{\mathbf{f}_{i}} D(\tilde{ \phi}_{i}-\tilde{u}_{i})\,dx \quad \mbox{for all } \tilde{ \phi}_{i}\in\tilde{\mathcal{A}}_{i}. \end{aligned}$$

Moreover, using (4.12) and (4.14), by a straightforward computation, we have

$$\begin{aligned} \fint_{Q_{4}} \bigl\vert A(x)- \bar{A}_{B'_{4}}( x_{1})\bigr\vert ^{2} \le\delta^{2},\qquad \fint_{Q_{4}} \vert D\tilde{u}\vert ^{2}\,dx \le1 \quad \mbox{and}\quad \fint_{Q_{4}} \bigl( \vert \tilde{\mathbf{f}}\vert ^{2} + \vert D\tilde{\psi} \vert ^{2}\bigr)\,dx \le \delta^{\frac{\gamma_{1}}{\gamma_{2}}}. \end{aligned}$$

Thus, by Lemmas 4.3 and 4.4 in [9], we find that for any \(\varepsilon>0 \), there exist a constant \(\delta>0\) and a function \(\tilde{v}_{i}\in W^{1,2}(Q_{2})\) to be a weak solution of

$$\begin{aligned} \operatorname{div}\bigl(\tilde{A}_{iB'_{2}}(x_{1}) D \tilde{v}_{i}\bigr)=0\quad \mbox{in } Q_{2}, \end{aligned}$$

such that

$$\begin{aligned} \fint_{Q_{2}} \bigl\vert D(\tilde{u}_{i}- \tilde{v}_{i})\bigr\vert ^{2}\,dx \le\varepsilon \quad \mbox{and}\quad \Vert D\tilde{v}_{i}\Vert ^{2}_{L^{\infty}(Q_{1})} \le N_{0} \end{aligned}$$

with a constant \(N_{0}\) being independent of i. Scaling back and denoting \(v_{i}\) by the translated function of

$$\begin{aligned} \tilde{v}_{i}(x) = \frac{v_{i}(5r_{y_{i}}x)}{5r_{y_{i}} \sqrt{C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}}}}, \end{aligned}$$

we conclude that

$$\begin{aligned} \fint_{Q_{10r_{y_{i}}}(y_{i})} \bigl\vert D(u- v_{i})\bigr\vert ^{2}\,dx \le C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}}\varepsilon \quad \mbox{and}\quad \Vert Dv_{i}\Vert ^{2}_{L^{\infty}(Q_{5r_{y_{i}}}(y_{i}))} \le N_{1} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \end{aligned}$$
(4.17)

for some constant \(N_{1} = N_{0} C_{0} \ge1\), being independent of i.

We next consider the boundary case that \(\operatorname{dist}\{y_{i}, \partial\Omega\} = \vert y_{i}- y_{0}\vert \le20 r_{y_{i}}\) for \(y_{0}\in\partial \Omega\). Let us recall that \(r_{y_{i}} < (\tau_{2}-\tau_{1})R /124 < R_{0}/ 124\) and the geometry (2.6) of the boundary of Reifenberg flat domain, we have the following property: for any point \(y_{0}\) on the boundary of Ω, there exists a coordinate system \(\{x_{1}, \ldots , x_{d} \}\) with the origin lining somewhere in \(\Omega_{60r_{y_{i}}\delta }(y_{0})\) such that in this new coordinate system one has

$$\begin{aligned} Q^{+}_{60 r_{y_{i}}} \subset\Omega_{60 r_{y_{i}}} \subset Q_{60 r_{y_{i}}} \cap\{x_{1}> - 120 r_{y_{i}} \delta\} \end{aligned}$$

and

$$\begin{aligned} \fint_{Q_{60 r_{y_{i}}}} \bigl\vert A(x)- \bar{A}_{B'_{60r_{y_{i}}}}( x_{1})\bigr\vert ^{2}\,dx \le\delta^{2}. \end{aligned}$$

Let us now select δ so small such that \(0<\delta<\frac{1}{60}\), which yields \(\vert y_{i}\vert < (20+1)r_{y_{i}}= 21 r_{y_{i}}\) and

$$\begin{aligned} \Omega_{5r_{y_{i}}}(y_{i}) \subset \Omega_{26r_{y_{i}}} \subset\Omega_{60{r_{y_{i}}}} \subset \Omega_{96 r_{y_{i}}} (y_{i}). \end{aligned}$$
(4.18)

We write

$$\begin{aligned} p_{i}^{-} = \inf_{x\in\Omega_{96r_{y_{i}}}(y_{i})} p(x) \quad \mbox{and}\quad p_{i}^{+} = \sup_{x\in\Omega_{96r_{y_{i}}}(y_{i})} p(x). \end{aligned}$$

By Lemma 4.1, we derive that

$$\begin{aligned} \fint_{\Omega_{60r_{y_{i}}}} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\, dx \le \frac{\vert \Omega_{96 r_{y_{i}}} (y_{i})\vert }{\vert \Omega _{60{r_{y_{i}}}}\vert } \fint_{\Omega_{96 r_{y_{i}}} (y_{i})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \le C_{10} \lambda \end{aligned}$$

and

$$\begin{aligned}& \biggl( \fint_{\Omega_{60r_{y_{i}}}}\bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} \\& \quad \le\biggl( \frac{\vert \Omega_{96 r_{y_{i}}} (y_{i})\vert }{\vert \Omega_{60{r_{y_{i}}}}\vert } \biggr)^{\frac{1}{\eta}} \biggl( \fint_{\Omega_{96 r_{y_{i}}} (y_{i})}\bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} \le C_{10} \delta\lambda, \end{aligned}$$

where the constant \(C_{10}\) depends only on d. Once we have the above uniform bounds, one can find in the same sprit as in the interior case that

$$\begin{aligned} \fint_{\Omega_{60r_{y_{i}}}} \vert Du\vert ^{2}\,dx \le C_{11} \lambda^{\frac{p^{-}}{p_{i}^{+}}}\quad \mbox{and}\quad \fint_{\Omega_{60r_{y_{i}}}} \bigl( \vert \mathbf{f}\vert ^{2} + \vert D\psi \vert ^{2}\bigr)\,dx \le C_{11} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \delta^{\frac{\gamma_{1}}{\gamma_{2}}} \end{aligned}$$

for some constant \(C_{11} = 2C_{10} A_{0} \ge1\), being independent of i. In a similar way that we have used for the interior case, also see Lemma 4.7 in [9], for any \(\varepsilon\in(0,1)\), there exist a small positive number δ and a function \(v_{i}\in W^{1,2}(Q^{+}_{52 r_{y_{i}}})\) such that

$$\begin{aligned} \fint_{\Omega_{52 r_{y_{i}}}} \bigl\vert D(u - \bar{v}_{i})\bigr\vert ^{2}\,dx \le C_{11} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \varepsilon \quad \mbox{and}\quad \Vert D\bar{v}_{i}\Vert ^{2}_{L^{\infty}(\Omega_{26r_{y_{i}}})} \le N_{2} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \end{aligned}$$
(4.19)

for the constant \(N_{2}\ge 1\) only dependent of \(C_{11}\). Here we have extended \(v_{i}\) by zero from \(Q^{+}_{52 r_{y_{i}}}\) to \(Q_{52 r_{y_{i}}}\) and also denote it by \(\bar{v}_{i}\). Let us write \(N = \max\{N_{1}, N_{2}\}\) being large enough, which is independent of the index i. For convenience, we also write

$$\begin{aligned} A = (4 N)^{\frac{\gamma_{2}}{\gamma_{1}}} > 1,\qquad B = \biggl( \frac{16}{7} \biggr)^{d} \biggl( \frac{248}{\tau_{2}-\tau_{1}} \biggr)^{d}. \end{aligned}$$
(4.20)

Lemma 4.3

Let \(R_{0}>0\). For any fixed \(0< \varepsilon<1\), we can find a small constant \(\delta>0\) such that if \((A(x), \Omega)\) is \((\delta, R_{0})\)-vanishing codimension one and \(u\in\mathcal{A}\) is a weak solution of (1.1), then for any \(1\le\tau_{1} < \tau _{2}\le2 \) we have

$$\begin{aligned} \bigl\vert E(A\lambda)\bigr\vert \le& C \varepsilon\biggl( \bigl\vert \Omega_{\tau_{2}R}(x_{0}) \cap E(\lambda/4)\bigr\vert \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr) \end{aligned}$$

for all \(\lambda> B\lambda_{0}\), \(\varsigma= \delta/6\) and \(C=C(d,\nu ,\Lambda, \omega(\cdot), \gamma_{1}, \gamma_{2}, R_{0})\).

Proof

By Lemma 4.1 and the fact that \(E(A\lambda)\subset E(\lambda)\) for \(A>1\) as mentioned in (4.20), we obtain that \(\{\Omega _{5r_{y_{i}}}(y_{i})\}\) cover almost all \(E(A\lambda)\). Thus,

$$\begin{aligned} \bigl\vert E(A\lambda)\bigr\vert =& \bigl\vert \bigl\{ x\in \Omega_{\tau_{1}R}(x_{0}): \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > A \lambda\bigr\} \bigr\vert \\ \le& \sum_{i=1}^{\infty} \bigl\vert \bigl\{ x\in\Omega_{5r_{y_{i}}}(y_{i}): \vert Du\vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert \\ \le& \sum_{\text{i: interior case} } \bigl\vert \bigl\{ x\in \Omega_{5r_{y_{i}}}(y_{i}): \vert Du\vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert \\ &{} + \sum_{\text{i: boundary case} } \bigl\vert \bigl\{ x\in \Omega_{5r_{y_{i}}}(y_{i}): \vert Du\vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert . \end{aligned}$$
(4.21)

For the interior estimate, using the fact that \(\vert Du\vert ^{2} \le2 \vert D(u-v_{i})\vert ^{2} + 2 \vert Dv_{i}\vert ^{2}\), \(\Omega_{5r_{y_{i}}}(y_{i}) = Q_{5r_{y_{i}}}(y_{i}) \) and Eq. (4.17), we find that

$$\begin{aligned}& \bigl\vert \bigl\{ x\in Q_{5r_{y_{i}}}(y_{i}): \vert Du \vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert \\& \quad \le \bigl\vert \bigl\{ x\in Q_{5r_{y_{i}}}(y_{i}): \bigl\vert D(u-v_{i})\bigr\vert ^{2} > N_{1} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \bigr\} \bigr\vert + \bigl\vert \bigl\{ x\in Q_{5r_{y_{i}}}(y_{i}): \vert Dv_{i}\vert ^{2} > N_{1} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \bigr\} \bigr\vert \\& \quad \le \frac{1}{N_{1} \lambda^{\frac{p^{-}}{p_{i}^{+}}} } \int_{Q_{10r_{y_{i}}}(y_{i})} \bigl\vert D(u-v_{i})\bigr\vert ^{2}\,dx \\& \quad \le \frac{C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}} \varepsilon \vert Q_{10r_{y_{i}}}(y_{i})\vert }{N_{0} C_{0} \lambda^{\frac{p^{-}}{p_{i}^{+}}}} \\& \quad \le C_{1} \varepsilon\bigl\vert Q_{10r_{y_{i}}}(y_{i}) \bigr\vert , \end{aligned}$$

which implies

$$\begin{aligned} \bigl\vert \bigl\{ x\in\Omega_{5r_{y_{i}}}(y_{i}): \vert Du\vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert \le C_{2} \varepsilon\bigl\vert Q_{r_{y_{i}}}(y_{i}) \bigr\vert . \end{aligned}$$
(4.22)

For the boundary case, we carry out the same procedure as in (4.21) with Eq. (4.19) to discover that

$$\begin{aligned} \bigl\vert \bigl\{ x\in\Omega_{26r_{y_{i}}}: \vert Du\vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert \le C_{3} \varepsilon \vert \Omega_{r_{y_{i}}}\vert . \end{aligned}$$

Then, using the measure density condition (2.8) and the geometry of Reifenberg flatness (4.18), we conclude that

$$\begin{aligned} \bigl\vert \bigl\{ x\in\Omega_{5r_{y_{i}}}(y_{i}): \vert Du\vert ^{2} > ( A \lambda)^{\frac{p^{-}}{p(x)}} \bigr\} \bigr\vert \le C_{4} \varepsilon\bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \bigr\vert . \end{aligned}$$
(4.23)

Inserting (4.22) and (4.23) into (4.21), we get

$$\begin{aligned} \bigl\vert E(A\lambda)\bigr\vert \le& C_{5} \varepsilon\sum _{i=1}^{\infty} \bigl\vert \Omega_{r_{y_{i}}}(y_{i})\bigr\vert , \end{aligned}$$

where \(C_{5} = \max\{C_{2}, C_{4}\}\). Furthermore, by using Lemma 4.2, we obtain

$$\begin{aligned} \bigl\vert E(A\lambda)\bigr\vert \le& C_{5} \varepsilon\sum _{i=1}^{\infty} \biggl( \bigl\vert \Omega_{r_{y_{i}}}(y_{i}) \cap E(\lambda/4)\bigr\vert \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{r_{y_{i}}}(y_{i}): \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr) \end{aligned}$$

for all \(\lambda> B\lambda_{0}\) and \(\varsigma= \delta/6\). Note that \(\{\Omega_{r_{y_{i}}}(y_{i})\}\) are non-overlapping in \(\Omega_{\tau _{2}R}(x_{0})\), then the required result follows. □

Proof of Theorem 2.5

We divide it into two steps: we first attain the estimate under the assumption of (4.1); then we prove assumption (4.1).

Step 1. Let us first establish a global estimate to the variational inequalities (1.1) under the a priori assumption (4.1). In the case \(0< q<\infty\), thanks to (3.3) in Proposition 3.1 in hand, we have

$$\begin{aligned} \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert _{L^{(\gamma ,q)}(\Omega_{\tau_{1}R} (x_{0}))}^{q} =& \bigl\Vert \vert Du\vert ^{\frac{2 p(x)}{p^{-}}} \bigr\Vert _{L^{(\frac{\gamma p^{-}}{2}, \frac{q p^{-}}{2})}(\Omega_{\tau_{1}R} (x_{0}))}^{\frac{p^{-}}{2}q} \\ =& \frac{\gamma p^{-}}{2} \int_{0}^{\infty} \bigl( \alpha^{\frac{\gamma p^{-}}{2} } \bigl\vert \bigl\{ x\in\Omega_{\tau_{1}R} (x_{0}): \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \alpha\bigr\} \bigr\vert \bigr)^{\frac {q}{\gamma}} \frac{d \alpha}{\alpha}. \end{aligned}$$

By using the change of variables, a direct calculation shows that

$$\begin{aligned}& \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert _{L^{(\gamma,q)}(\Omega_{\tau_{1}R} (x_{0}))}^{q} \\& \quad = \frac{\gamma p^{-}}{2} A^{\frac{q p^{-}}{2}} \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \bigl\vert \bigl\{ x\in\Omega_{\tau_{1}R}(x_{0}): \vert Du\vert ^{\frac{2 p(x)}{p^{-}}}> A \lambda\bigr\} \bigr\vert ^{\frac{q}{\gamma }} \frac{d\lambda}{\lambda} \\& \quad = \frac{\gamma p^{-}}{2} A^{\frac{q p^{-}}{2}} \int_{0}^{B\lambda_{0}} \lambda^{\frac{q p^{-}}{2}} \bigl\vert E(A\lambda)\bigr\vert ^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} + \frac{\gamma p^{-}}{2} A^{\frac{q p^{-}}{2}} \int_{B\lambda_{0}}^{\infty} \lambda^{\frac{q p^{-}}{2}} \bigl\vert E(A\lambda)\bigr\vert ^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} \\& \quad := I_{1} + I_{2}. \end{aligned}$$
(4.24)

To estimate \(I_{1}\), inserting A and B into (4.20) yields

$$\begin{aligned} I_{1} \le C_{0} \bigl\vert \Omega_{2R}(x_{0}) \bigr\vert ^{\frac{q}{\gamma}} ( AB \lambda_{0} )^{\frac{q p^{-}}{2}} \le C_{1} \frac{\vert \Omega_{2R}(x_{0})\vert ^{\frac{q}{\gamma}} }{(\tau_{2}-\tau_{1})^{\frac{dq \gamma_{2} }{2}}} ( \lambda_{0} )^{\frac {q p^{-}}{2}}. \end{aligned}$$

For the estimate of \(I_{2}\), using Lemma 4.3, for any \(0<\varepsilon<1\) we have

$$\begin{aligned} I_{2} \le& C_{2} \varepsilon^{\frac{q}{\gamma}} \int_{B\lambda_{0}}^{\infty} \lambda^{\frac{q p^{-}}{2}} \biggl( \bigl\vert \Omega_{\tau_{2}R}(x_{0}) \cap E(\lambda/4)\bigr\vert \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \\ &{} + \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr)^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda}. \end{aligned}$$

Note that

$$\begin{aligned} ( A_{1} + A_{2} + A_{3} )^{m} \le \max\bigl\{ 3^{m-1}, 1 \bigr\} \bigl( A_{1}^{m} + A_{2}^{m} + A_{3}^{m} \bigr) \end{aligned}$$

for any \(A_{i}>0\), \(i=1,2,3\), and \(m>0\), therefore we obtain

$$\begin{aligned} I_{2} \le& C_{3} \varepsilon^{\frac{q}{\gamma}} \biggl( \int_{B\lambda_{0}}^{\infty} \lambda^{\frac{q p^{-}}{2}} \bigl\vert \Omega_{\tau_{2}R}(x_{0}) \cap E(\lambda/4)\bigr\vert ^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} \\ &{} + \int_{B\lambda_{0}}^{\infty} \lambda^{\frac{q p^{-}}{2}} \biggl( \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr)^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} \\ &{} + \int_{B\lambda_{0}}^{\infty} \lambda^{\frac{q p^{-}}{2}} \biggl( \frac{1}{(\varsigma\lambda)^{\eta}} \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr)^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} \biggr) \\ :=& C_{3} \varepsilon^{\frac{q}{\gamma}} ( I_{21} + I_{22} + I_{23} ). \end{aligned}$$
(4.25)

To estimate \(I_{21}\), a simple computation yields

$$\begin{aligned} I_{21} \le& \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \bigl\vert \Omega_{\tau_{2}R}(x_{0}) \cap E(\lambda/4)\bigr\vert ^{\frac{q}{\gamma}}\frac{d\lambda}{\lambda} \\ \le& C_{4} \bigl\Vert \vert Du \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega_{\tau_{2}R}(x_{0}))}. \end{aligned}$$

To estimate \(I_{22}\), we examine it in two cases.

Case 1. If \(q\ge\gamma\), by using Hardy’s inequality showed in Lemma 3.2 and the change of variables, we get

$$\begin{aligned} I_{22} \le& C_{5} \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \biggl( \frac{1}{(\varsigma\lambda)^{\eta}} (\varsigma\lambda)^{\eta} \bigl\vert \bigl\{ x\in \Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \varsigma\lambda\bigr\} \bigr\vert \biggr)^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} \\ =& C_{5} \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \varsigma\lambda\bigr\} \bigr\vert ^{\frac {q}{\gamma}} \frac{d\lambda}{\lambda} \\ \le& C_{6} \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))}. \end{aligned}$$

Case 2. \(0< q<\gamma\), we use the reverse Hölder inequality in Lemma 3.3 and get

$$\begin{aligned}& \biggl( \int_{\varsigma\lambda}^{\infty} \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \frac{d\mu}{\mu} \biggr)^{\frac{q}{\gamma}} \\& \quad \le \bigl( (\varsigma\lambda)^{\eta} \bigl\vert \bigl\{ x\in \Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \varsigma\lambda\bigr\} \bigr\vert \bigr)^{\frac{q}{\gamma}} \\& \qquad {} + C_{7} \int_{\varsigma\lambda}^{\infty} \bigl( \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f} \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \bigr)^{\frac {q}{\gamma}} \frac{d\mu}{\mu}, \end{aligned}$$

which yields

$$\begin{aligned} I_{22} \le& \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \biggl( \frac{1}{(\varsigma\lambda)^{\eta}} (\varsigma\lambda) ^{\eta} \bigl\vert \bigl\{ x\in \Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \varsigma\lambda\bigr\} \bigr\vert \biggr)^{\frac{q}{\gamma}} \frac{d\lambda}{\lambda} \\ &{} + C_{7} \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \biggl( \frac{1}{(\varsigma\lambda)^{\eta}} \biggr)^{\frac{q}{\gamma}} \int_{\varsigma\lambda}^{\infty} \bigl( \mu^{\eta} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f} \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \mu\bigr\} \bigr\vert \bigr)^{\frac {q}{\gamma}} \frac{d\mu}{\mu} \frac{d\lambda}{\lambda} \\ \le& C_{8} \int_{0}^{\infty} \lambda^{\frac{q p^{-}}{2}} \bigl\vert \bigl\{ x\in\Omega_{\tau_{2}R}(x_{0}): \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} > \varsigma\lambda\bigr\} \bigr\vert ^{\frac {q}{\gamma}} \frac{d\lambda}{\lambda} \\ \le& C_{9} \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))}, \end{aligned}$$

where we also employ Hardy’s inequality of Lemma 3.2 in the second inequality. For the estimate of \(I_{23}\), using the same way as for the estimate \(I_{22}\) above, we obtain

$$\begin{aligned} I_{23} \le C_{10} \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))}. \end{aligned}$$

Putting \(I_{21}\), \(I_{22}\), \(I_{23}\) into (4.25) implies

$$\begin{aligned} I_{2} \le C_{11} \varepsilon^{\frac{q}{\gamma}} \bigl( \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega_{\tau_{2}R}(x_{0}))} + \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))} \bigr). \end{aligned}$$

Putting the estimates \(I_{1}\) and \(I_{2}\) into (4.24), we deduce that

$$\begin{aligned}& \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert _{L^{(\gamma ,q)}(\Omega_{\tau_{1}R} (x_{0}))}^{q} \\& \quad \le C_{12} \varepsilon^{\frac{q}{\gamma}} \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega_{\tau_{2}R}(x_{0}))} + C_{12} \frac{\vert \Omega_{2R}(x_{0})\vert ^{\frac{q}{\gamma}} }{(\tau _{2}-\tau_{1})^{\frac{dq \gamma_{2} }{2}}} ( \lambda_{0} )^{\frac{q p^{-}}{2}} \\& \qquad {}+ C_{12} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau _{2}R}(x_{0}))} \bigr). \end{aligned}$$

Set \(\Phi(\tau_{i}) = \Vert \vert Du\vert ^{p(x)}\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{i}R}(x_{0}))}\) for \(i=1,2\). Let δ be sufficiently small in Lemma 4.3, and we now select sufficiently small \(\varepsilon>0\) such that

$$\begin{aligned} 0< C_{12} \varepsilon^{\frac{q}{\gamma}} < \frac{1}{2}, \end{aligned}$$

which yields

$$\begin{aligned} \Phi(\tau_{1}) \le& \frac{1}{2} \Phi(\tau_{2}) + C_{12} \frac{\vert \Omega_{2R}(x_{0})\vert ^{\frac{q}{\gamma}} }{(\tau_{2}-\tau_{1})^{\frac{dq \gamma_{2} }{2}}} ( \lambda_{0} )^{\frac {q p^{-}}{2}} \\ &{}+ C_{12} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau_{2}R}(x_{0}))} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{\tau _{2}R}(x_{0}))} \bigr) \end{aligned}$$

for any \(\tau_{1}\), \(\tau_{2}\) with \(1 \le\tau_{1} < \tau_{2} \le2\). We then apply the iterating Lemma 3.4 and derive

$$\begin{aligned}& \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma ,q)}(\Omega_{R}(x_{0}))} \\& \quad \le C_{13} \bigl\vert \Omega_{2R}(x_{0}) \bigr\vert ^{\frac{q}{\gamma}} ( \lambda_{0} )^{\frac{q p^{-}}{2}} \\& \qquad {} + C_{13} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{2R}(x_{0}))} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{2R}(x_{0}))} \bigr). \end{aligned}$$

Now, we recall the definition of \(\lambda_{0}\) in (4.3) and obtain

$$\begin{aligned}& \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{R}(x_{0}))} \\& \quad \le C_{14} \bigl\vert \Omega_{2R}(x_{0})\bigr\vert ^{\frac{q}{\gamma}} \biggl( \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \\& \qquad {}+ \frac{1}{\delta} \biggl( \fint_{\Omega_{2R}(x_{0})} \bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + 1\bigr)^{\eta}\,dx \biggr)^{\frac{1}{\eta}} \biggr)^{\frac{q p^{-}}{2}} \\& \qquad {} + C_{14} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{2R}(x_{0}))} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega _{2R}(x_{0}))} \bigr). \end{aligned}$$
(4.26)

To estimate the first item on the right-hand side of (4.26), notice that

$$\begin{aligned} \frac{2 p^{+}}{p^{-}} =& 2\biggl( 1 + \frac{p^{+}-p^{-}}{p^{-}} \biggr) \\ \le&2 \biggl( 1 + \frac{\omega(2R)}{\gamma_{1}} \biggr) \\ < & 2( 1+ \sigma_{0}) \\ \le&\gamma \gamma_{1} \\ \le&\gamma p^{-}, \end{aligned}$$
(4.27)

where \(\sigma_{0} = \min\{\sigma_{1}, \sigma_{2}\}\) is the same as Lemma 3.7 for \(\gamma\in[1, \infty)\). Then it yields

$$\begin{aligned}& \biggl( \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \biggr)^{\frac{q p^{-}}{2}} \\& \quad \le \biggl( \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p^{+}}{p^{-}}}\, dx +1 \biggr)^{\frac{q p^{-}}{2}} \\& \quad \le C_{15} \biggl( \biggl( \fint_{\Omega_{4R}(x_{0})} \vert Du\vert ^{2}\,dx \biggr)^{\frac{p^{+}}{p^{-}\vphantom{\sum}}} + \fint_{\Omega_{4R}(x_{0})} \bigl( \vert \mathbf{f}\vert ^{2} + \vert D\psi \vert ^{2} \bigr)^{\frac{p^{+}}{p^{-}\vphantom{\sum}}}\,dx +1 \biggr)^{\frac{q p^{-}}{2}}, \end{aligned}$$
(4.28)

where we have employed the reverse Hölder inequality in the last inequality. By using the standard \(L^{2}\) estimate as Lemma 3.5, and the embedding inequality due to \(\frac{\gamma\gamma _{1}}{2} >1\) for \(\gamma\in[1, \infty)\) and \(q\in(0, \infty]\),we have

$$\begin{aligned}& \biggl( \biggl( \fint_{\Omega_{4R}(x_{0})} \vert Du\vert ^{2}\,dx \biggr)^{\frac{p^{+}}{p^{-}\vphantom{\sum}}} \biggr)^{\frac{q p^{-}}{2}} \\& \quad \le \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \biggl( \int_{\Omega} \vert Du\vert ^{2}\,dx \biggr)^{\frac{q p^{+}}{2}} \\& \quad \le C_{16} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \biggl( \int_{\Omega} \vert \mathbf{f}\vert ^{2}\,dx + \int_{\Omega} \vert D\psi \vert ^{2}\,dx \biggr)^{\frac{q p^{+}}{2}} \\& \quad \le C_{17} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \biggl( \int_{\Omega} \vert \mathbf{f}\vert ^{\frac{2p(x)}{\gamma_{1}}}\,dx + \int_{\Omega} \vert D\psi \vert ^{\frac{2p(x)}{\gamma_{1}}}\,dx + \vert \Omega \vert \biggr)^{\frac{q p^{+}}{2}} \\& \quad \le C_{18} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{\frac{2p(x)}{\gamma_{1}}} \bigr\Vert _{L^{(\frac{\gamma\gamma_{1}}{2}, \frac{q \gamma_{1}}{2} )}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{\frac{2p(x)}{\gamma_{1}}} \bigr\Vert _{L^{(\frac{\gamma\gamma_{1}}{2}, \frac{q \gamma_{1}}{2} )}(\Omega)} + 1 \bigr)^{\frac{q p^{+}}{2}} \\& \quad = C_{18} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{\frac{2}{\gamma_{1}}} + \bigl\Vert \vert D\psi \vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{\frac{2}{\gamma_{1}}} + 1 \bigr)^{\frac{q \gamma_{1}}{2} \frac{ p^{+}}{\gamma_{1}}} \\& \quad \le C_{19} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{q} + \bigl\Vert \vert D\psi \vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{q} + 1 \bigr)^{ \frac{\gamma_{2}}{\gamma_{1}}}. \end{aligned}$$
(4.29)

In a similar way as above, we also get the following estimate. In fact, we again use (4.27) for the embedding theory and employ the fact that \(0< R<1\) to obtain

$$\begin{aligned}& \biggl( \fint_{\Omega_{4R}(x_{0})} \bigl( \vert \mathbf{f}\vert ^{2} + \vert D\psi \vert ^{2} \bigr)^{\frac{p^{+}}{p^{-}\vphantom{\sum}}}\,dx \biggr)^{\frac{q p^{-}}{2}} \\& \quad \le C_{20} \biggl( \fint_{\Omega_{4R}(x_{0})} \bigl( \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} \bigr)^{\frac{p^{+}}{p^{-}\vphantom{\sum}}}\, dx + 1 \biggr)^{\frac{q p^{-}}{2}} \\& \quad \le C_{21} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{-}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr\Vert _{L^{\frac{p^{+}}{p^{-}\vphantom{\sum}}}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr\Vert _{L^{\frac{p^{+}}{p^{-}\vphantom{\sum}}}(\Omega)} + 1 \bigr)^{\frac{p^{+}}{p^{-}\vphantom{\sum}} \frac{q p^{-}}{2}} \\& \quad \le C_{22} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr\Vert _{L^{( \frac{\gamma p^{-}}{2} , \frac{q p^{-}}{2})}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\bigr\Vert _{L^{( \frac{\gamma p^{-}}{2} , \frac{q p^{-}}{2})}(\Omega)} + 1 \bigr)^{\frac{q p^{+}}{2}} \\& \quad \le C_{23} \biggl( \frac{1}{\vert \Omega_{4R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{q} + \bigl\Vert \vert D\psi \vert ^{p(x)} \bigr\Vert _{L^{(\gamma, q)}(\Omega)}^{q} + 1 \bigr)^{ \frac{\gamma_{2}}{\gamma_{1}}}. \end{aligned}$$
(4.30)

Putting (4.29) and (4.30) into (4.28) deduces

$$\begin{aligned}& \biggl( \fint_{\Omega_{2R}(x_{0})} \vert Du\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}}\,dx \biggr)^{\frac{q p^{-}}{2}} \\& \quad \le C_{24} \biggl( \frac{1}{\vert \Omega _{4R}(x_{0})\vert } \biggr)^{\frac{qp^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega)} + \bigl\Vert \vert D \psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega)} + 1 \bigr)^{ \frac{\gamma_{2}}{\gamma_{1}}}. \end{aligned}$$
(4.31)

Now we are in a position to estimate the second item on the right-hand side of (4.26). Since \(\eta= 1+ \epsilon\) for sufficiently small \(\epsilon>0\) as the limit of (4.7), we have \(2\eta< \gamma p^{-}\). Then, for any \(\gamma\in[1, \infty)\), by the embedding inequality it follows that

$$\begin{aligned}& \biggl( \fint_{\Omega_{2R}(x_{0})} \bigl(\vert \mathbf{f}\vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + \vert D\psi \vert ^{\frac{2p(x)}{p^{-}\vphantom{\sum}}} + 1\bigr)^{\eta}\,dx \biggr)^{\frac{q p^{-}}{2\eta}} \\& \quad \le C_{25} \biggl( \frac{1}{\vert \Omega_{2R}(x_{0})\vert } \biggr)^{\frac{q p^{-}}{2\eta}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert _{L^{\frac{2\eta}{p^{-}}} (\Omega_{2R}(x_{0}))} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert _{L^{\frac{2\eta}{p^{-}}} (\Omega_{2R}(x_{0}))} + 1 \bigr)^{q} \\& \quad \le C_{25} \biggl( \frac{1}{\vert \Omega_{2R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert _{L^{\frac{2\eta}{p^{-}}} (\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert _{L^{\frac{2\eta}{p^{-}}} (\Omega)} + 1 \bigr)^{q} \\& \quad \le C_{26} \biggl( \frac{1}{\vert \Omega_{2R}(x_{0})\vert } \biggr)^{\frac{q p^{+}}{2}} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega)} + 1 \bigr). \end{aligned}$$
(4.32)

Putting (4.31) and (4.32) into (4.26), we have

$$\begin{aligned}& \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega_{R}(x_{0}))} \\& \quad \le C_{27} \bigl( \bigl\vert \Omega_{R}(x_{0}) \bigr\vert ^{\frac{1}{\gamma}-\frac{\gamma_{2}}{2}} \bigr)^{q} \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma ,q)}(\Omega)} + 1 \bigr)^{\frac{\gamma_{2}}{\gamma_{1}}}. \end{aligned}$$
(4.33)

The rest of Step 1 is to use the standard finite covering argument to obtain the global estimate. In fact, since Ω̅ is compact in \(\mathbb{R}^{d}\), there exist finitely many points \(x_{0}^{k} \in\overline{\Omega}\), \(k=1,2, \ldots, N\) and the corresponding \(R_{k}\) such that \(\Omega= \bigcup_{k=1}^{N}\Omega _{R_{k}}(x^{k}_{0})\). Therefore,

$$\begin{aligned} \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega)} \le\sum_{k=1}^{N} \bigl\Vert \vert Du \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega_{R_{k}}(x^{k}_{0}))}. \end{aligned}$$

Now, thanks to estimate (4.33), it yields

$$\begin{aligned}& \bigl\Vert \vert Du\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma, q)}(\Omega)}\\& \quad \le C_{27} \sum_{k=1}^{N} \bigl( \bigl\vert \Omega_{R_{k}}\bigl(x^{k}_{0} \bigr)\bigr\vert ^{\frac{1}{\gamma}-\frac{\gamma_{2}}{2}} \bigr)^{q} \bigl(\bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma ,q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega)} + 1 \bigr)^{\frac{\gamma_{2}}{\gamma_{1}}} \\& \quad \le C_{28} \bigl(\bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert ^{q}_{L^{(\gamma,q)}(\Omega)} + 1 \bigr)^{\frac{\gamma_{2}}{\gamma_{1}}}, \end{aligned}$$

where \(C_{28}\) is a constant depending only on d, ν, Λ, \(\omega (\cdot)\), γ, q, δ, \(R_{0}\) and \(\vert \Omega \vert \). The proof of \(q=\infty\) is even simpler. Here for briefness we omit it, the reader may also refer to Section 5.4 in [13] for the case of \(q=\infty\).

Step 2. The remainder of our proof for Theorem 2.5 is to remove the assumption \(\vert Du\vert ^{p(x)}\in L^{(\gamma, q)}(\Omega)\) via an approximation procedure. To do this, let \(\{\vert \mathbf{f}_{k}\vert ^{p(x)}\}_{k=1}^{\infty}\) and \(\{\vert D\psi _{k}\vert ^{p(x)}\}_{k=1}^{\infty}\) be two sequences in \(C_{0}^{\infty }(\Omega)\) converging to \(\vert \mathbf{f}\vert ^{p(x)}\) and \(\vert D\psi \vert ^{p(x)}\) in \(L^{(\gamma,q)}(\Omega)\). It is clear that \(\vert \mathbf{f}_{k}\vert \) and \(\vert D\psi_{k}\vert \in L^{(\gamma\gamma_{2},q \gamma_{2})}(\Omega)\). According to the earlier work [10] and the facts that Lorentz space is an interpolation space of Lebesgue spaces, and the obstacle problems under consideration are linear, the unique weak solution

$$\begin{aligned} u_{k} \in\mathcal{A}_{k} = \bigl\{ \phi_{k} \in W^{1,2}_{0}(\Omega): \phi_{k} \ge \psi_{k} \mbox{ a.e. in } \Omega\bigr\} \end{aligned}$$

of the following variational inequalities

$$\begin{aligned} \int_{\Omega} A(x) Du_{k} D( \phi_{k} - u_{k} )\,dx \ge \int_{\Omega} \mathbf{f}_{k} D( \phi_{k} - u_{k})\,dx \quad \mbox{for all } \phi_{k} \in\mathcal{A} \end{aligned}$$

satisfies a global gradient estimate in \(L^{(\gamma\gamma_{2},q \gamma _{2})}(\Omega)\) under the assumption that \((A(x), \Omega)\) is \((\delta, R_{0})\)-vanishing of codimension one. Thus, we have

$$\begin{aligned} \vert Du_{k}\vert \in L^{(\gamma\gamma_{2},q \gamma_{2})}(\Omega) \quad \Longrightarrow\quad \vert Du_{k}\vert ^{p(x)} \in L^{(\gamma, q)}(\Omega) \end{aligned}$$

due to (3.3). As a consequence of the interpolation space, we have

$$\begin{aligned} \bigl\Vert \vert Du_{k}\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} \le& C \bigl( \bigl\Vert \vert \mathbf{f}_{k} \vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + \bigl\Vert \vert D \psi_{k}\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + 1 \bigr)^{\frac{\gamma_{2}}{\gamma_{1}}} \\ \le& C \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + 1 \bigr)^{\frac{\gamma_{2}}{\gamma_{1}}}, \end{aligned}$$

where C is independent of k. From this estimate we observe that there exists ū with \(\vert D\bar{u}\vert ^{p(x)}\in L^{(\gamma,q)}(\Omega)\) which is the weak limit of \(\{u_{k}\} _{k=1}^{\infty}\) in \(\mathcal{A}_{k}\) such that

$$\begin{aligned} \bigl\Vert \vert D\bar{u}\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} \le& C \bigl( \bigl\Vert \vert \mathbf{f}\vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + \bigl\Vert \vert D\psi \vert ^{p(x)}\bigr\Vert _{L^{(\gamma, q)}(\Omega)} + 1 \bigr)^{\frac{\gamma_{2}}{\gamma_{1}}}. \end{aligned}$$

Then it is easy to check that this ū is the weak solution of the original problem (1.1). So, by the uniqueness, we conclude that \(u=\bar{u}\) almost everywhere in Ω. This completes the approximation procedure. □

5 Conclusions

This paper extends the classical Calderón-Zygmund theory to the refined estimates in the Lorentz spaces for a variable exponent power of the gradient of weak solutions for elliptic obstacle problems. We would like to remark that the usual harmonic analyses, like the Calderón-Zygmund operator, the maximal function operator and the sharp maximal function operator, are not suitable for our estimates due to \(p(x)\) being a variable function. Instead, our argument is motivated by the so-called maximal function-free technique. Two things are deserved to be mentioned. One is our minimal regular assumptions which are concerned with elliptic obstacle problems (1.1) with partially BMO coefficients over the bounded nonsmooth domain. Another is our refined conclusion where we show a regularity in Lorentz spaces for the variable exponent powers of the gradients of its weak solution. To the best knowledge of the authors of this paper, this is the first time in the category of the Lorentz spaces to consider the regularity of variable exponent powers of the gradient of weak solution for variational inequalities under the weakest conditions on coefficients and boundaries. We would also like to point out that there are a few of difficulties in dealing with regularity of the gradient in Lorentz spaces with variable exponents to weak solutions of variational inequalities (1.1). We believe that our work here has independent interests.