1 Introduction

We study the obstacle problem related to the Dirichlet energy integral over a bounded domain \(\Omega \subset {\mathbb {R}}^n\) with boundary values in the Sobolev sense

$$\begin{aligned} \inf \int _{\Omega } \varphi (x, |\nabla u|) \, dx, \end{aligned}$$

where the infimum is taken over functions \(u \in W^{1,\varphi (\cdot )}(\Omega )\) such that, given functions \(\psi , f :\Omega \rightarrow {\mathbb {R}}\), we have \(u \geqslant \psi \) almost everywhere and \(u-f \in W^{1,\varphi (\cdot )}_0(\Omega )\). In this paper we assume that \(\varphi \) satisfies generalized Orlicz growth conditions (see Sect. 2). This class of growth conditions generalize several interesting special cases such as the standard polynomial growth \(t \mapsto t^p\), Orlicz growth \(t \mapsto \varphi (t)\), see for example [4], variable exponent growth \(t \mapsto t^{p(x)}\), see for example [8, 26] and double phase case \(t \mapsto t^{p} + a(x) t^q\), see for example [1, 6, 7]. Additionally, the problem is motivated by the study of partial differential equations, see for example [11, 12].

In this paper we prove two main results of which the first concerns the boundary continuity of a minimizer of the obstacle problem. For definitions and assumptions, see Sects. 2 and 4. To best of our knowledge, the result is new even in the special cases of Orlicz and double phase growth.

Theorem 1.1

Let \(\varphi \in \Phi _c({\mathbb {R}}^n)\) be strictly convex and satisfy (A0), (A1), (A1-n), (aInc)\(_p\) and (aDec)\(_q\). Let \(\psi \in C(\Omega )\) and \(f \in C({\overline{\Omega }})\cap W^{1,\varphi (\cdot )}(\Omega )\) be such that \({\mathcal {K}}_{\psi }^{f}(\Omega ) \not = \emptyset \) and let u be the continuous minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem from Theorem 5.8. If \(x_0 \in \partial \Omega \) satisfies the capacity fatness condition (2.8), then

$$\begin{aligned} \lim _{x \rightarrow x_0} u(x) = f(x_0). \end{aligned}$$

A similar result in the generalized Orlicz setting without the obstacle has been proven in [13].

The proof for interior continuity follows outlines given in the book of Björns’ [3]. The proof of the main theorem and few intermediate results are analogous to [22], since scaling of the minimizer does not preserve minimality in the generalized Orlicz case. We also study the relationship of the measure density condition and \(\varphi \)-fatness: the former implies the latter when \(q<n\) (Lemma 6.4). For further information about capacities in this context, see for example [2, 13, 24] in \({\mathbb {R}}^n\) and [25] in metric measure spaces.

The second main result is global higher integrability of the gradient:

Theorem 1.2

(Global higher integrability of the gradient) Suppose that \(\varphi \in \Phi _w({\mathbb {R}}^n)\) satisfies conditions (A0), (A1), (aInc)\(_p\) and (aDec)\(_q\). Additionally suppose that the measure density condition (2.7) is fulfilled at every point \(x_0 \in \partial \Omega \) with a constant \(c_*\), and let u be the minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem, where \(\psi , f \in W^{1,\varphi (\cdot )}(\Omega )\) and \(\varphi (\cdot , |\nabla \psi |), \varphi (x, |\nabla f|) \in L^{1+\delta }(\Omega )\) for some \(\delta > 0\) and \({\mathcal {K}}^{f}_{\psi }(\Omega ) \not = \emptyset \). Then there exist \(\varepsilon > 0\) and a constant \(C=C(n,\varphi ,c_*)\) such that \(\varphi (x, |\nabla u|) \in L^{1+\varepsilon }(\Omega )\) and

$$\begin{aligned} \int _{\Omega } \varphi (x, |\nabla u|)^{1+\varepsilon } \, dx&\leqslant C \bigg [ \left( \int _{\Omega } \varphi (x, |\nabla u|) \, dx\right) ^{1+\varepsilon } \nonumber \\&\quad + \int _{\Omega } \varphi (x, |\nabla \psi |)^{1+ \varepsilon } \, dx + \int _{\Omega } \varphi (x, |\nabla f|)^{1+\varepsilon } \, dx + 1 \bigg ]. \end{aligned}$$
(1.3)

This result continues the recently published article [17], where the authors proved local higher integrability of the gradient of the quasiminimizer. Now the result is improved to a global result and the problem is generalized with an obstacle \(\psi \). These results are steps towards higher regularity results of the minimizer such as Hölder continuity for every exponent \(\beta \in (0,1)\) and Hölder continuity of the gradient. For example in [21] local higher integrability of the gradient is used several times in the proof. Again, to best of our knowledge, produces new results in special cases of Orlicz and double phase growth. For variable exponent analogue, see [9].

The strategy of the proof is to combine two Caccioppoli inequalities with the previously proven Sobolev–Poincaré inequality to lay ground for Gehring’s lemma. The first Caccioppoli inequality handles the interior case with the obstacle and the second inequality handles balls nearly overlapping with the boundary of \(\Omega \). To achieve global results in general we assume that the measure density condition (2.7) is fulfilled at every boundary point.

2 Properties of generalized \(\Phi \)-functions

By \(\Omega \subset {\mathbb {R}}^n\) we denote a bounded domain, i.e. a bounded, open and connected set. When A and B are open sets and \({\overline{A}}\) is compact, by \(A \Subset B\) we mean that \({\overline{A}} \subset B\). The measure of a set A is denoted by |A|. By c or C we denote a generic constant whose value may change between appearances. A function f is almost increasing if there exists a constant \(L \geqslant 1\) such that \(f(s) \leqslant L f(t)\) for all \(s \leqslant t\) (more precisely, L-almost increasing). Almost decreasing is defined analogously. A function f is called convex if \(f(tx + (1-t)y) \leqslant tf(x) + (1-t)f(y)\) for every \(t \in (0,1)\). Strict convexity assumes that the previous inequality is strict.

Definition 2.1

We say that \(\varphi : \Omega \times [0, \infty ) \rightarrow [0, \infty ]\) is a weak \(\Phi \)-function, and write \(\varphi \in \Phi _w(\Omega )\), if

  • For every \(t \in [0, \infty )\) the function \(x \mapsto \varphi (x, t)\) is measurable and for every \(x \in \Omega \) the function \(t \mapsto \varphi (x, t)\) is increasing.

  • \( \varphi (x, 0) = \lim _{t \rightarrow 0^+} \varphi (x,t) =0\) and \( \lim _{t \rightarrow \infty }\varphi (x,t)=\infty \) for every \(x\in \Omega \).

  • The function \(t \mapsto \frac{\varphi (x, t)}{t}\) is L-almost increasing for \(t>0\) and every \(x\in \Omega \).

  • The function \(t \mapsto \varphi (x,t)\) is left-continuous for \(t >0\) and every \(x \in \Omega \).

If, additionally, \(t \mapsto \varphi (x,t)\) is convex, we denote \(\varphi \in \Phi _c(\Omega )\) and say that \(\varphi \) is a convex \(\Phi \)-function.

By \(\varphi ^{-1}\) we mean the left inverse of \(\varphi \), defined as

$$\begin{aligned} \varphi ^{-1}(\tau ):= \inf \{t \geqslant 0 \, : \, \varphi (t)\geqslant \tau \}. \end{aligned}$$

Let us write \(\varphi ^+_B (t) := \sup _{x \in B\cap \Omega } \varphi (x, t)\) and \(\varphi ^-_B (t) := \inf _{x \in B\cap \Omega } \varphi (x, t)\); and abbreviate \(\varphi ^\pm := \varphi ^\pm _\Omega \). Throughout the paper we need one or multiple of the following assumptions.

(A0):

There exists \(\beta \in (0,1)\) such that \(\varphi ^+(\beta ) \leqslant 1 \leqslant \varphi ^-(1/\beta )\).

(A1):

There exists \(\beta \in (0,1)\) such that, for every ball \(B \cap \Omega \not = \emptyset \),

$$\begin{aligned} \varphi ^{+}_B (\beta t) \leqslant \varphi ^-_B (t) \quad \text {when } t \in \left[ 1, (\varphi _B^-)^{-1}\left( \frac{1}{|B|} \right) \right] \end{aligned}$$
(A1-n):

There exists \(\beta \in (0,1)\) such that, for every ball \(B \cap \Omega \not = \emptyset \),

$$\begin{aligned} \varphi ^{+}_{B}(\beta t) \leqslant \varphi _{B}^{-}(t) \quad \text {when } t \in \left[ 1, \frac{1}{{\mathrm{diam}}(B)}\right] . \end{aligned}$$

We also introduce the following assumptions, which are of different nature. They are related to the \(\Delta _2\) and \(\nabla _2\) conditions from Orlicz space theory.

(aInc)\(_p\):

There exists \(p >1\) and \(L\geqslant 1\) such that \(t \mapsto \frac{\varphi (x,t)}{t^{p}} \) is L-almost increasing in \((0,\infty )\).

(aDec)\(_q\):

There exists \(q >1\) and \(L\geqslant 1\) such that \(t \mapsto \frac{\varphi (x,t)}{t^{q}} \) is L-almost decreasing in \((0,\infty )\).

For brevity, we may write for example that a constant \(C = C(n, \varphi )\), in which case C depends on the dimension and some or all of the parameters listed in the previous assumptions related to \(\varphi \).

Despite the technical formulation of the assumptions, each of them has an intuitive interpretation. (A0) declares the space to be unweighed, (A1) is a continuity assumption with respect to the space variable, while (A1-n) takes account of the dimension also. These are generalizations of the \(\log \)-Hölder continuity of the variable exponent spaces and the assumption \(\frac{q}{p} \leqslant 1+ \frac{\alpha }{n}\) of the double phase case. Lastly, (aInc)\(_p\) and (aDec)\(_q\) state that globally \(\varphi (x,t)\) grows faster than \(t^p\) and slower than \(t^q\).

We say that \(\varphi \) is doubling if there exists a constant \(L\geqslant 1\) such that \(\varphi (x, 2t) \leqslant L \varphi (x, t)\) for every \(x \in \Omega \) and every \(t \geqslant 0\). If \(\varphi \) is doubling with constant L, then by iteration

$$\begin{aligned} \varphi (x,t) \leqslant L^2 \Big ( \frac{t}{s}\Big )^{Q} \varphi (x,s) \end{aligned}$$
(2.2)

for every \(x \in \Omega \) and every \(0<s<t\), where \(Q= \log _2(L)\). For the proof see for example [3, Lemma 3.3, p. 66]. Note that doubling also yields that

$$\begin{aligned} \varphi (x, t+s)\leqslant L \varphi (x, t) + L \varphi (x, s). \end{aligned}$$
(2.3)

Since (aDec)\(_q\) is equivalent to doubling [18, Lemma 2.6], inequality (2.3) holds for \(\varphi \) satisfying (aDec)\(_q\). In the proofs we often use the phrase like ”using (aDec)\(_q\)” and mean doubling or its consequence (2.3).

Generalized Orlicz and Orlicz–Sobolev spaces have been studied with our assumptions for example in [13,14,15,16,17,18]. We recall some definitions. We denote by \(L^0(\Omega )\) the set of measurable functions in \(\Omega \) and the integral average of a function f over a set A is denoted by . Additionally, we denote the positive and negative part of a function as \(f_+ = \max \{f,0\}\) and \(f_- = \max \{-f,0\}\).

Definition 2.4

Let \(\varphi \in \Phi _w(\Omega )\) and define the modular \(\varrho _{\varphi }\) for \(f \in L^0(\Omega )\) by

$$\begin{aligned} \varrho _{\varphi } (f):=\int _\Omega \varphi (x,|f(x)|) \, dx. \end{aligned}$$

The generalized Orlicz space, also called Musielak–Orlicz space, is defined as the set

$$\begin{aligned} L^{\varphi (\cdot )}(\Omega ) := \left\{ f \in L^0(\Omega ): \, \varrho _{\varphi }(\lambda f) <\infty \text { for some } \lambda >0 \right\} \end{aligned}$$

equipped with the (Luxemburg) norm

$$\begin{aligned} \Vert f\Vert _{L^{\varphi (\cdot )}(\Omega )} := \inf \left\{ \lambda >0: \, \varrho _{\varphi } \left( \frac{f}{\lambda } \right) \leqslant 1 \right\} {.} \end{aligned}$$

If the set is clear from the context we abbreviate \(\Vert f\Vert _{L^{\varphi (\cdot )}(\Omega )}\) by \(\Vert f\Vert _{\varphi }\). A function f belongs to local generalized Orlicz space \(L^{\varphi (\cdot )}_{\mathrm{loc}}(\Omega )\) if \(\Vert f\Vert _{L^{\varphi (\cdot )}(K)} < \infty \) for every compact set \(K \Subset \Omega \).

A function \(u \in L^{\varphi (\cdot )}(\Omega )\) belongs to the generalized Orlicz–Sobolev space \(W^{1,\varphi (\cdot )}(\Omega )\) if its weak partial derivatives \(\partial _1 u, \dots , \partial _n u\) exist and belong to \(L^{\varphi (\cdot )}(\Omega )\). The norm of Orlicz–Sobolev space is defined as \(\Vert f\Vert _{W^{1,\varphi (\cdot )}(\Omega )} := \Vert f\Vert _{L^{\varphi (\cdot )}(\Omega )} + \Vert \nabla f\Vert _{L^{\varphi (\cdot )}(\Omega )}\), where \(\nabla f\) is the weak gradient of f. Additionally we define \(W^{1,\varphi (\cdot )}_0(\Omega )\) as the closure of the space \(C_0^{\infty }(\Omega )\) with respect to the norm of Orlicz–Sobolev space.

The definition of \(W^{1,\varphi (\cdot )}_0(\Omega )\) is reasonable, as \(C_0^\infty (\Omega )\) is dense in \(W^{1,\varphi (\cdot )}_0(\Omega )\) if \(\varphi \) satisfies (A0), (A1) and (aDec)\(_q\) and \(\Omega \) is bounded [15, Theorem 6.4.6] [boundedness of \(\Omega \) frees us of the assumption (A2)].

The modular \(\varrho _\varphi \) and the norm have the following useful property, called the unit ball property [15, Lemma 3.2.5]. However, in our case we need only the following implication which follows from the definition of the norm

$$\begin{aligned} \varrho _{\varphi }(f)\leqslant 1 \quad \Rightarrow \quad \Vert f\Vert _{\varphi } \leqslant 1. \end{aligned}$$
(2.5)

Next we recall the definition of relative Sobolev capacity of a set as a another way to measure the size of a set. Basic properties of this capacity have been studied in [2].

Definition 2.6

Let \(\varphi \in \Phi _w(\Omega )\) and \(E \Subset \Omega \). Then relative Sobolev capacity of E is defined as

$$\begin{aligned} C_{\varphi }(E, \Omega ) = \inf _{u \in S_{\varphi }(E,\Omega )} \int _{\Omega } \varphi (x, |\nabla u|) \, dx, \end{aligned}$$

where the infimum is taken over the set \(S_{\varphi }(E,\Omega )\) of all functions \(u \in W^{1,\varphi (\cdot )}_0(\Omega )\) with \(u \geqslant 1\) in an open set containing E.

In order to attain global results, some regularity of the boundary has to be assumed. In this paper we use the measure density and capacity fatness conditions

$$\begin{aligned}&|B(x_0,r) \setminus \Omega | \geqslant c_*|B(x_0,r)| \end{aligned}$$
(2.7)
$$\begin{aligned}&C_\varphi (B(x_0,r) \setminus \Omega , B(x_0, 2r)) \geqslant c_*\, C_\varphi (B(x_0,r), B(x_0, 2r)), \end{aligned}$$
(2.8)

where \(B(x_0,r)\) is a ball centred at a point \(x_0 \in \partial \Omega \) and \(r \leqslant R\) for some \(R>0\) and \(c_*\in (0,1)\). The measure density condition is often sufficiently general as for example all domains with Lipschitz boundary satisfy it and therefore it is commonly used in regularity theory. However the capacity fatness condition was used in [13] so we get the more general result with ease in the case of boundary continuity.

Even though we consider minimizing problem in \(\Omega \) we assume that \(\varphi \) is defined in the whole \({\mathbb {R}}^n\) since later we need to consider the complement of \(\Omega \) due to previous boundary conditions.

3 Auxiliary results

Let us first collect some general lemmas, which are not related to the obstacle problem directly. First, we state the following lemma [13, Lemma 2.11], to which we refer to throughout the paper.

Lemma 3.1

Let \(\Omega \subset {\mathbb {R}}^n\) be bounded. Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1) and (aDec)\(_q\). If \(v \in W^{1,\varphi (\cdot )}(\Omega )\) is non-negative and \(u \in W^{1,\varphi (\cdot )}_0(\Omega )\), then \(\min \{u,v\} \in W^{1,\varphi (\cdot )}_0(\Omega )\).

The next lemma is intuitively clear, and follows easily from the previous lemma.

Lemma 3.2

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1) and (aDec)\(_q\). Let \(u \in W^{1,\varphi (\cdot )}(\Omega )\) and \(v,w \in W^{1,\varphi (\cdot )}_0(\Omega )\). If \(v \leqslant u \leqslant w\) almost everywhere in \(\Omega \), then \(u \in W^{1,\varphi (\cdot )}_0(\Omega )\).

Proof

If we subtract v from all the terms in the inequality and notice that \(u-v \in W^{1,\varphi (\cdot )}_0(\Omega )\) if and only if \(u \in W^{1,\varphi (\cdot )}_0(\Omega )\), we can assume that \(v=0\) almost everywhere in \(\Omega \). Now since u is non-negative and \(w \in W^{1,\varphi (\cdot )}_0(\Omega )\), Lemma 3.1 implies that \(u= \min \{u,w\} \in W^{1,\varphi (\cdot )}_0(\Omega )\). \(\square \)

Lastly, we prove a lemma regarding sequences of maxima and minima which is important when we are comparing functions pointwise or handling just the positive part of a function. The restriction to subsequences is not severe since later on we need the existence of a sequence rather than convergence of a specific sequence.

Lemma 3.3

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), and (aDec)\(_q\). If \(u_j, v_j \in W^{1,\varphi (\cdot )}(\Omega )\) converge to u and v respectively in \(W^{1,\varphi (\cdot )}(\Omega )\), then there are subsequences such that \(\min \{u_{j_k},v_{j_k}\} \rightarrow \min \{u,v\}\) and \(\max \{u_{j_k},v_{j_k}\} \rightarrow \max \{u,v\}\) in \(W^{1,\varphi (\cdot )}(\Omega )\).

Proof

Because, for example, \(\min \{f,g\} = g + \min \{f-g,0\}\), it suffices to show that if \(u_j\) converges to u in \(W^{1,\varphi (\cdot )}(\Omega )\), then \(\left( (u_{j_k})_+\right) \) converges to \(u_+\), where \((u_{j_k})\) is the pointwise converging subsequence. This subsequence exists because assumption (A0) and (aInc)\(_1\) imply that \(W^{1,\varphi (\cdot )}(\Omega ) \subset W^{1,1}(\Omega )\) [16, Lemma 4.4]. Since \(|(u_{j_k})_+ -u_+| \leqslant |u_{j_k}-u|\), \(t \mapsto \varphi (\cdot , t)\) is increasing and norm convergence is equivalent to modular convergence when \(\varphi \) satisfies (aDec)\(_q\) [15, Corollary 3.3.4], we get

$$\begin{aligned} \int _{\Omega } \varphi (x,|(u_{j_k})_+ - u_+|) \, dx \leqslant \int _{\Omega } \varphi (x,|u_{j_k}-u|) \, dx \rightarrow 0 \end{aligned}$$

as \(j_k \rightarrow \infty \).

As for the gradients, using (2.3)

$$\begin{aligned}&\int _{\Omega } \varphi (x, |\nabla (u_{j_k})_{+} - \nabla u_+|)\, dx \\&\quad = \int _{\Omega } \varphi (x, |\chi _{(0,\infty )}(u_{j_k}) \nabla u_{j_k} - \chi _{(0, \infty )}(u) \nabla u|) \, dx \\&\quad \leqslant \int _{\Omega } \varphi (x, |\chi _{(0,\infty )}(u_{j_k}) \nabla u_{j_k} - \chi _{(0, \infty )}(u) \nabla u + \chi _{(0,\infty )}(u_{j_k})\nabla u - \chi _{(0,\infty )}(u_{j_k})\nabla u|) \, dx \\&\quad \leqslant L \int _{\Omega } \varphi (x, |\nabla u| |\chi _{(0,\infty )} (u_{j_k}) -\chi _{(0,\infty )}(u)|) \, dx\\&\qquad + L \int _{\Omega } \varphi (x, \chi _{(0,\infty )}(u_{j_k}) |\nabla u_{j_k} - \nabla u|) \, dx \\&\quad \leqslant L \int _{\Omega } \varphi (x, |\nabla u| |\chi _{(0,\infty )} (u_{j_k}) -\chi _{(0,\infty )}(u)|) \, dx + L \int _{\Omega } \varphi (x,|\nabla u_{j_k} - \nabla u|) \, dx \\&\qquad \rightarrow 0, \end{aligned}$$

as the first integral converges by dominated convergence [16, Theorem 4.1] [(aDec)\(_q\) takes care of extra assumption that \(\varrho _\varphi (\lambda g) < \infty \) for the dominating function \(g=|\nabla u|\) and if \(u\equiv 0\) in some subset of \(\Omega \), then so is \(|\nabla u|\)] and the second integral convergences by assumption. \(\square \)

The proof of the following Jensen type inequality can be found for example in [17, 19, 20]. Here we have chosen \(p = 1\) and simplified the assumptions on f as we do not need the sharp result. Note that if \(\varphi \) satisfies (aDec)\(_q\), then the constant \(\beta _0\) can be transferred to the right-hand side as a constant C.

Lemma 3.4

Let \(\varphi \in \Phi _w(B)\) satisfy assumptions (A0) and (A1). There exists \(\beta _0 >0\) such that

for every ball B and \(f \in L^{\varphi (\cdot )}(B)\) with \(\Vert f\Vert _{L^{\varphi (\cdot )}(B)}\leqslant 1\).

The proof of next proposition can be found in [15, Proposition 6.3.13] and is the local version of the Sobolev–Poincaré inequality. One of the main ingredients in proving Theorem 1.1 is to use this inequality also with balls that overlap the complement of \(\Omega \). As with the Jensen’s inequality, the constant \(\beta _1\) can be transferred to the right-hand side as C with (aDec)\(_q\).

Proposition 3.5

(Sobolev–Poincaré inequality) Let \(\varphi ^{1/s} \in \Phi _w(B)\) satisfy assumptions (A0) and (A1) and let \(s \in \left[ 1, \tfrac{n}{n-1}\right) \). Then there exists a constant \(\beta _1=\beta _1(n,s,\varphi )\) such that

for every \(v\in W^{1,1}(B)\) with \(\Vert \nabla v\Vert _{\varphi ^{1/s}} \leqslant 1\).

The following is a classical iteration lemma. For the proof, see for example [18, Lemma 4.2].

Lemma 3.6

Let Z be a bounded non-negative function in the interval \([r, R] \subset {\mathbb {R}}\) and let \(X: [0, \infty ) \rightarrow {\mathbb {R}}\) be an increasing function which is doubling. Assume that there exists \(\theta \in [0,1)\) such that

$$\begin{aligned} Z(s) \leqslant X(\tfrac{1}{t-s}) + \theta Z(t) \end{aligned}$$

for all \(r \leqslant s < t \leqslant R\). Then

$$\begin{aligned} Z(r) \lesssim X(\tfrac{1}{R-r}), \end{aligned}$$

where the implicit constant depends only on the doubling constant and \(\theta \).

The following form of Gehring’s lemma can be found from [10, Theorem 6.6 and Corollary 6.1].

Lemma 3.7

(Gehring’s lemma) Let \(f \in L^1(B)\) be non-negative. Assume that \(g\in L^q(4B)\) for some \(q>1\) and that there exists \(s \in (0, 1)\) such that

for every ball B. Then there exists \(t>1\) such that

4 Properties of local minimizers and local superminimizers

In this paper we do not only cover (local) minimizers but also the minimizer of the so called obstacle problem. Since minimizers of obstacle problems and local superminimizers are closely related, we collect basic results regarding local superminimizers also.

Definition 4.1

Let \(\psi : \Omega \rightarrow [-\infty , \infty )\) be a function, called obstacle, and let \(f \in W^{1,\varphi (\cdot )}(\Omega )\) be a function, which assigns the boundary values. We define admissible functions for the obstacle problem as a set

$$\begin{aligned} {\mathcal {K}}^{f}_{\psi }(\Omega ) := \{ u \in W^{1,\varphi (\cdot )}(\Omega ) : u \geqslant \psi \text { a.e. in } \Omega , u-f \in W^{1,\varphi (\cdot )}_0(\Omega ) \}. \end{aligned}$$

Additionally, we say that a function \(u \in {\mathcal {K}}^{f}_{\psi }(\Omega )\) is a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem if

$$\begin{aligned} \int _{\Omega } \varphi (x,|\nabla u|) \, dx \leqslant \int _{\Omega } \varphi (x,|\nabla v|) \, dx \end{aligned}$$

for all \(v \in K^{f}_\psi (\Omega )\).

If u is a minimizer of the \({\mathcal {K}}^{f}_{-\infty }(\Omega )\)-obstacle solution, we call it a minimizer in \(\Omega \).

Definition 4.2

Let \(\varphi \in \Phi _w(\Omega )\). A function \(u \in W^{1,\varphi (\cdot )}_\mathrm{loc}(\Omega )\) is a local minimizer of the \(\varphi \)-energy in \(\Omega \) if

$$\begin{aligned} \int _{\{v \not = 0\}} \varphi (x, |\nabla u|) \, dx \leqslant \int _{\{v \not = 0\}} \varphi (x, |\nabla (u+v)|) \, dx \end{aligned}$$

for all \(v \in W^{1,\varphi (\cdot )}(\Omega )\) with \(\mathrm{spt}v \subset \Omega \), where \(\mathrm{spt}v\) is the smallest closed set such that v is non-zero almost everywhere in that set.

If the inequality is assumed only for all nonnegative or nonpositive v, then u is called a local superminimizer or local subminimizer, respectively.

The next lemma shows that we can often assume the test function v to be pointwise bounded.

Lemma 4.3

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (aDec)\(_q\). If \(u \in W^{1,\varphi (\cdot )}_{\mathrm{loc}}(\Omega )\) satisfies

$$\begin{aligned} \int _{\{v \not =0\}} \varphi (x, |\nabla u|) \, dx \leqslant \int _{\{v \not =0\}} \varphi (x,|\nabla (u+v)|) \, dx \end{aligned}$$

for all bounded \(v \in W^{1,\varphi (\cdot )}(\Omega )\) with \(\mathrm{spt}v \subset \Omega \), then u is a local minimizer of the \(\varphi \)-energy in \(\Omega \).

Proof

Since \(\varphi \) satisfies (aDec)\(_q\), bounded Sobolev functions are dense in \(W^{1,\varphi (\cdot )}(\Omega )\) [15, Lemma 6.4.2]. From the proof we see that if \(v \in W^{1,\varphi (\cdot )}(\Omega )\), then truncations of v at level k, \(v_k = \max \{ \min \{v(x), k\}, -k\}\), converge to v in \(W^{1,\varphi (\cdot )}(\Omega )\). Additionally, \(\mathrm{spt}v_k = \mathrm{spt}v\). Therefore, let v be as in Definition 4.2 and \(v_k\) be its truncations. Then, as u is assumed to be a local minimizer when tested with bounded Sobolev functions with compact support and convergence in modular and norm are equivalent as \(\varphi \) satisfies (aDec)\(_q\), we get

$$\begin{aligned} \int _{\{v \not =0\}}\varphi (x, |\nabla u|) \, dx = \int _{\{v_k \not =0\}} \varphi (x, |\nabla u|) \, dx&\leqslant \int _{\{v_k \not =0\}} \varphi (x, |\nabla (u+v_k)|) \, dx \\&= \int _{\{v \not =0\}} \varphi (x, |\nabla (u+v_k)|) \, dx. \end{aligned}$$

Next, as \(v_k\) is a truncation, we split the integration domain accordingly

$$\begin{aligned} \int _{\{v \not =0\}} \varphi (x, |\nabla (u+v_k)|) \, dx =&\int _{\{v \not =0\}} \chi _{\{|v| \leqslant k\} }\varphi (x, |\nabla (u+v)|) \, dx \\&+ \int _{\{v \not =0\}} \chi _{\{|v|> k\}}\varphi (x, |\nabla (u+k)|) \, dx \\ =&\int _{\{v \not =0\}} \chi _{\{|v| \leqslant k\} }\varphi (x, |\nabla (u+v)|) \, dx \\&+ \int _{\{v \not =0\}} \chi _{\{|v| > k\}} \varphi (x, |\nabla u|) \, dx \\ \rightarrow&\int _{\{v\not =0\}} \varphi (x, |\nabla (u+v)|) \, dx \end{aligned}$$

by Lebesgue’s monotone converge theorem for increasing and decreasing sequences and the fact that every integral is finite. Thus combining two previous displays, we see that u is a local minimizer of the \(\varphi \)-energy in \(\Omega \). \(\square \)

Next we give a suitably general condition for non-emptiness of \({\mathcal {K}}^{f}_{\psi }(\Omega )\) and flexibility for the boundary function f. We then show that being a minimizer of the obstacle problem is a local property with suitable boundary values. For the rest of the paper we implicitly assume that \({\mathcal {K}}^{f}_{\psi }(\Omega )\) is non-empty.

Proposition 4.4

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1) and (aDec)\(_q\) and let \(f, \psi \in W^{1,\varphi (\cdot )}(\Omega )\). Then \({\mathcal {K}}_{\psi }^{f}(\Omega ) \not = \emptyset \) if and only if \((\psi -f)_{+} \in W^{1,\varphi (\cdot )}_0(\Omega )\).

Proof

Suppose first that \(u \in {\mathcal {K}}_{\psi }^{f}(\Omega )\). Then by Lemma 3.1 we see that

$$\begin{aligned} 0 \leqslant (\psi -f)_{+} \leqslant (u-f)_+ = - \min \{-(u-f),0\} \in W^{1,\varphi (\cdot )}_0(\Omega ). \end{aligned}$$
(4.5)

Now the conclusion follows from Lemma 3.2.

Suppose then that \((\psi -f)_{+}\in W^{1,\varphi (\cdot )}_0(\Omega )\) and define \(u:=\max \{\psi , f\} \in W^{1,\varphi (\cdot )}(\Omega )\). Now

$$\begin{aligned} u-f = \max \{\psi -f, 0\} = (\psi -f)_{+} \in W^{1,\varphi (\cdot )}_0(\Omega ) \quad \text {and} \quad u\geqslant \psi \quad \text {in } \Omega . \end{aligned}$$

Therefore \(u \in {\mathcal {K}}^{f}_{\psi }(\Omega )\). \(\square \)

As f matters essentially only in the boundary, it can be modified inside \(\Omega \). This is useful, as for technical reasons we would like f to be above the obstacle in \(\Omega \).

Lemma 4.6

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0) and (A1) and suppose that \(u \in {\mathcal {K}}_{\psi }^{f}(\Omega )\). Then \(u \in {\mathcal {K}}_{\psi }^{{\tilde{f}}}(\Omega )\), where \({\tilde{f}} \geqslant \psi \) almost everywhere in \(\Omega \).

Proof

Define \({\tilde{f}} := \max \{f, \psi \}\). First, we notice that \(\tilde{f} =(\psi -f)_+ + f\). Second, from Lemma 3.1 we deduce as in (4.5) that Lemma 3.2 implies \((\psi -f)_+ \in W^{1,\varphi (\cdot )}_0(\Omega )\) and it is clear that \(u-{\tilde{f}} \in W^{1,\varphi (\cdot )}_0(\Omega )\). Thus we can use \({\tilde{f}}\) instead of f as the function assigning boundary values. \(\square \)

Lemma 4.7

Let \(\varphi \in \Phi _w(\Omega )\). Then a function \(u \in W^{1,\varphi (\cdot )}(\Omega )\) is a minimizer of the \({\mathcal {K}}^{u}_{\psi }(\Omega )\)-obstacle problem if and only if u is a minimizer of the \({\mathcal {K}}^{u}_{\psi }(D)\)-obstacle problem for every open \(D \subset \Omega \).

Proof

Let us first suppose that u is a minimizer of the \({\mathcal {K}}^{u}_{\psi }(\Omega )\)-obstacle problem. Let \(v \in {\mathcal {K}}^{u}_{\psi }(D)\). Since \(u-v \in W^{1,\varphi (\cdot )}_0(D)\), there exist functions \(\eta _j \in C^{\infty }_0(D)\) such that \(\eta _j \rightarrow u-v \in W^{1,\varphi (\cdot )}_0(D)\). By a zero extension we see that \(\eta _j \in C^{\infty }_0(\Omega )\) for every j, which implies that \(u-v\) has a zero extension to \(W^{1,\varphi (\cdot )}_0(\Omega )\), denoted by h. Now we can define

$$\begin{aligned} \tilde{u}(x) := \left\{ \begin{array}{ll} u(x) \quad \text { if } x \in \Omega \setminus D \\ v(x) \quad \text { if } x \in D \\ \end{array} \right. \end{aligned}$$

which belongs to \({\mathcal {K}}^{u}_{\psi }(\Omega )\) as \({\tilde{u}} = u-h \in W^{1,\varphi (\cdot )}(\Omega )\) and it has the correct boundary values in the Sobolev sense. Now, because u is a minimizer of the \({\mathcal {K}}^{u}_{\psi }(\Omega )\)-obstacle problem, we get

$$\begin{aligned} \int _{\Omega } \varphi (x, |\nabla u|) \, dx \leqslant \int _{\Omega } \varphi (x, |\nabla {\tilde{u}}|) \, dx {=} \int _{D} \varphi (x, |\nabla v|) \, dx {+} \int _{\Omega \setminus D} \varphi (x, |\nabla u|) \, dx. \end{aligned}$$

After subtracting \(\int _{\Omega \setminus D}\varphi (x, |\nabla u|) \, dx\) from both sides we see that u is also a minimizer of the \({\mathcal {K}}^{u}_{\psi }(D)\)-obstacle problem.

The other direction follows immediately by choosing \(D=\Omega \). \(\square \)

We recall that a solution of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem is a local superminimizer [3, Proposition 7.16] and an opposite relation also holds.

Proposition 4.8

Let \(\varphi \in \Phi _w(\Omega )\). Then a function u is a local superminimizer in \(\Omega \) if and only if u is a minimizer of \({\mathcal {K}}^{u}_{u}(\Omega ')\)-obstacle problem for every open \(\Omega ' \Subset \Omega \).

Proof

Suppose first that u is a local superminimizer in \(\Omega \). Since \(\Omega ' \Subset \Omega \) we have \(u \in W^{1,\varphi (\cdot )}(\Omega ')\) and therefore \(u \in {\mathcal {K}}^{u}_{u}(\Omega ')\). Now, let \(v \in {\mathcal {K}}^{u}_{u}(\Omega ')\) be arbitrary and denote \(w:= \max \{u,v\}\). Clearly \(w=v\) almost everywhere in \(\Omega '\) and thus \(\eta := w-u \in W^{1,\varphi (\cdot )}_0(\Omega ')\) is nonnegative. Now, we use the local superminimality of u in the set \(\{\eta \not =0\}\) and the fact that \(\nabla \eta =0\) almost everywhere in the set \(\{\eta =0\}\) to get

$$\begin{aligned} \int _{\Omega '} \varphi (x, |\nabla u|) \, dx&= \int _{\{\eta =0\}} \varphi (x, |\nabla u|) \, dx +\int _{\{\eta \not =0\}} \varphi (x, |\nabla u|) \, dx \\&\leqslant \int _{\{\eta =0\}} \varphi (x, |\nabla (u+\eta )|) \, dx +\int _{\{\eta \not =0\}} \varphi (x, |\nabla (u+\eta )|) \, dx \\&=\int _{\Omega '} \varphi (x, |\nabla w|) \, dx =\int _{\Omega '} \varphi (x, |\nabla v|) \, dx. \end{aligned}$$

So u is a minimizer of a \({\mathcal {K}}^{u}_{u}(\Omega ')\)-obstacle problem.

Now suppose that u is a minimizer of a \({\mathcal {K}}^{u}_{u}(\Omega ')\)-obstacle problem for every \(\Omega ' \Subset \Omega \). Let \(v \in W^{1,\varphi (\cdot )}(\Omega )\) be nonnegative such that \(\{v >0 \} \Subset \Omega \) and let \(\Omega '\) be an open set such that \(\{v >0\} \subset \Omega ' \Subset \Omega \). Therefore v is an admissible test function for local superminimizers. As u is a minimizer of the \({\mathcal {K}}^{u}_{u}(\Omega ')\)-obstacle problem and \(u+v \in {\mathcal {K}}^{u}_{u}(\Omega ')\), we have

$$\begin{aligned} \int _{\Omega '} \varphi (x, |\nabla u|) \, dx \leqslant \int _{\Omega '} \varphi (x, |\nabla (u+v)|) \, dx \end{aligned}$$

and therefore u is a local superminimizer in \(\Omega \). \(\square \)

Remark 4.9

From the previous proof we get also the following result: If a local superminimizer u in \(\Omega \) belongs to \(W^{1,\varphi (\cdot )}(\Omega )\), it is a minimizer of the \({\mathcal {K}}^{u}_{u}(\Omega )\)-obstacle problem.

Next we prove a comparison principle for the obstacle problem. Strong assumptions are needed to guarantee uniqueness of the minimizer. Note that comparison principle also implies uniqueness of the minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem.

Proposition 4.10

(Comparison principle) Let \(\varphi \in \Phi _c(\Omega )\) be strictly convex and satisfy (A0), (A1) and (aDec)\(_q\). Let \(\psi _1, \psi _2 : \Omega \rightarrow [-\infty , \infty )\), \(f_1, f_2 \in W^{1,\varphi (\cdot )}(\Omega )\) and let \(u_1\) and \(u_2\) be solutions to the \({\mathcal {K}}^{f_1}_{\psi _1}(\Omega )\) and \({\mathcal {K}}^{f_2}_{\psi _2}(\Omega )\)-obstacle problems, respectively. If \(\psi _1 \leqslant \psi _2\) almost everywhere in \(\Omega \) and \((f_1-f_2)_+ \in W^{1,\varphi (\cdot )}_0(\Omega )\), then \(u_1 \leqslant u_2\) almost everywhere in \(\Omega \).

Proof

Let \(u:=\min \{u_1, u_2\}\) and \(h := u_1 -f_1 - (u_2 -f_2) \in W^{1,\varphi (\cdot )}_0(\Omega )\). Note that \(h_- \in W^{1,\varphi (\cdot )}_0(\Omega )\) by Lemma 3.1 since both h and the constant function 0 belong to \(W^{1,\varphi (\cdot )}_0(\Omega )\) and \(\varphi \) satisfies (A0), (A1) and (aDec)\(_q\) . Now

$$\begin{aligned} h \geqslant \min \{f_2-f_1,h\}&= -\max \{f_1-f_2,-h\} \\&\geqslant -\big ( \max \{f_1-f_2,0\} + \max \{-h,0\} \big ) \\&= -(f_1-f_2)_+ -h_-. \end{aligned}$$

Therefore, as \(-(f_1-f_2)_+- h_-\) and h belong to \(W^{1,\varphi (\cdot )}_0(\Omega )\) and \(\varphi \) satisfies the assumptions in Lemma 3.2, we get that \(\min \{f_2-f_1, h\} \in W^{1,\varphi (\cdot )}_0(\Omega )\). This in turn implies that

$$\begin{aligned} u-f_1 = \min \{u_2-f_1, u_1-f_1\} = u_2-f_2 + \min \{f_2-f_1,h\} \in W^{1,\varphi (\cdot )}_0(\Omega ). \end{aligned}$$

Because \(u \geqslant \psi _1\) almost everywhere in \(\Omega \), we see that \(u \in {\mathcal {K}}^{f_1}_{\psi _1}(\Omega )\).

Now let \(v:=\max \{u_1,u_2\}\) and \({\tilde{h}} :=u_2-f_2 -(u_1-f_1) \in W^{1,\varphi (\cdot )}_0(\Omega )\). As before, we get

$$\begin{aligned} {\tilde{h}} \leqslant \max \{f_1-f_2,{\tilde{h}}\} \leqslant \max \{f_1-f_2,0\} + \max \{{\tilde{h}},0\} = (f_1-f_2)_+ + {\tilde{h}}_+. \end{aligned}$$

By assumptions and Lemma 3.1, the functions \((f_1-f_2)_+\), \({\tilde{h}}\) and \({\tilde{h}}_+ = -\min \{- {\tilde{h}},0\}\) belong to \(W^{1,\varphi (\cdot )}_0(\Omega )\), so from Lemma 3.2 we deduce that \(\max \{f_1-f_2, \tilde{h}\} \in W^{1,\varphi (\cdot )}_0(\Omega )\). Again,

$$\begin{aligned} v-f_2 = \max \{u_1-f_2, u_2-f_2\} = u_1-f_1 + \max \{f_1-f_2, \tilde{h}\} \in W^{1,\varphi (\cdot )}_0(\Omega ). \end{aligned}$$

Finally, since \(v \geqslant \psi _2\) almost everywhere in \(\Omega \), we see that \(v \in {\mathcal {K}}^{f_2}_{\psi _2}(\Omega )\).

Let \(A:=\{u_1 > u_2\}\). Since \(u_2\) is a minimizer of the \({\mathcal {K}}^{f_2}_{\psi _2}(\Omega )\)-obstacle problem, we find

$$\begin{aligned} \int _{\Omega } \varphi (x, |\nabla u_2|) \, dx&\leqslant \int _{\Omega } \varphi (x, |\nabla v|)\, dx\\&= \int _{A} \varphi (x, |\nabla u_1|) \, dx + \int _{\Omega \setminus A} \varphi (x, |\nabla u_2|) \, dx. \end{aligned}$$

Now it follows that

$$\begin{aligned} \int _{A} \varphi (x, |\nabla u_2|) \, dx \leqslant \int _{A} \varphi (x, |\nabla u_1|) \, dx \end{aligned}$$

and therefore

$$\begin{aligned} \int _{\Omega }\varphi (x, |\nabla u|) \,dx&= \int _{A} \varphi (x, |\nabla u_2|) \, dx + \int _{\Omega \setminus A} \varphi (x, |\nabla u_1|) \, dx\\&\leqslant \int _{\Omega } \varphi (x, |\nabla u_1|) \, dx. \end{aligned}$$

Now since \(u_1\) is a minimizer of the \({\mathcal {K}}^{f_1}_{\psi _1}\)-obstacle problem, so is u. But because \(\varphi \) is strictly convex and satisfies (A0), the minimizer of the obstacle problem has to be unique [16, Theorem 7.5]. Therefore \(u_1=u=\min \{u_1, u_2\}\) almost everywhere in \(\Omega \) and thus \(u_1 \leqslant u_2\) almost everywhere in \(\Omega \). \(\square \)

The following result is not needed in the rest of the paper, but as it follows quickly from the Comparison principle, we present it for the interested reader.

Proposition 4.11

Let \(\varphi \in \Phi _c(\Omega )\) satisfy (A0), (A1), (aDec)\(_q\) and be strictly convex. Let u be a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem and \(v \in {\mathcal {K}}^{f}_{\psi }(\Omega )\) be a local superminimizer. Then \(u \leqslant v\) almost everywhere in \(\Omega \).

Proof

Since \(v \in {\mathcal {K}}^{f}_{\psi }(\Omega )\), we have that \(v \in W^{1,\varphi (\cdot )}(\Omega )\) and by Proposition 4.8v is the minimizer of the \({\mathcal {K}}^{v}_{v}(\Omega )\)-obstacle problem. Since u and v have the same boundary values in Sobolev sense and \(v \geqslant \psi \) we have from the comparison principle (Proposition 4.10) that \(u \leqslant v\) almost everywhere in \(\Omega \). \(\square \)

5 Continuity in the interior

Later in Sect. 6 we prove boundary continuity results relating to the solution of the obstacle problem. The proofs rely heavily to similar results inside a domain and the main strategy is to prove irrelevance of the obstacle in most of the points in \(\Omega \). At first in this section we collect the relevant results from [13] and formulate them for the obstacle problem and for balls instead of cubes. The original reason for cubes has been to employ Krylov–Safanov covering theorem.

The first lemma corresponds to [13, Lemma 3.2], where instead of minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem there is a local quasisubminimizer. All we need to note is that in the proof instead of \(-w\eta \) being negative, we have that \(v\geqslant \psi \) if \(k \geqslant \psi \). We also define \(A(k,r):= B \cap \{u > k\}\) for any \(B \Subset \Omega \) with radius r. If \(\psi (y) = \infty \) for some \(y \in B(x,R)\), we have \(A(k,R)=\emptyset \) and the estimate is trivial.

Lemma 5.1

(Caccioppoli inequality) Let \(\varphi \in \Phi _w(\Omega )\) satisfy (aDec)\(_q\). Let u be a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem. Then for all \(k \geqslant \sup _{B(x,R)} \psi \) in B(xR) we have

$$\begin{aligned} \int _{A(k,r)} \varphi (x,|\nabla (u-k)_+ |) \, dx \leqslant C \int _{A(k,R)} \varphi \left( x, \dfrac{u-k}{R-r} \right) \, dx \end{aligned}$$
(5.2)

where the constant C depends only on the (aDec)\(_q\) constants of \(\varphi \).

Now since u satisfies the previous Caccioppoli inequality, we have the following boundedness result [13, Proposition 3.3].

Proposition 5.3

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1), (aInc)\(_p\) and (aDec)\(_q\). Suppose that \(u \in W^{1,\varphi (\cdot )}(\Omega )\) satisfies the Caccioppoli inequality (5.2). Then there exists \(R_0 \in (0, 1)\) such that

$$\begin{aligned} \mathop {\mathrm{ess}\, \mathrm{sup}}\limits _{{\frac{1}{2}B}} u \leqslant k_0 + 1 + cR^{-\tfrac{q}{\alpha p}} \left( \int _{2B} \varphi (x, (u-k_0)_+ ) \, dx \right) ^{\tfrac{1}{p}}, \end{aligned}$$

for every \(k_0 \geqslant \sup _{2B} \psi \) in 2B, where \(B:= B(y,R)\), when \(R \in (0, R_0]\) such that \(B(y,6R_0) \subset \Omega \). Here \(R_0\) is such that \(R_0 \leqslant c(n)\) and \(\varrho _{L^{\varphi (\cdot )}(B_{6R_0})}(\nabla u) \leqslant 1\), \(\alpha \) is a constant that depends on np and q, and the constant c depends only on the parameters in assumptions and the dimension n.

By assuming (A1-n) and boundedness of the minimizer instead of assuming (A1) we have the following result [13, Corollary 3.6].

Proposition 5.4

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1-n) and (aDec)\(_q\) and suppose that u is locally bounded and satisfies the Caccioppoli inequality (5.2). Then

$$\begin{aligned} \mathop {\mathrm{ess}\,\mathrm{sup}}\limits _{\frac{1}{2}B} u - k \leqslant C \left[ \left( \int _{2B} (u-k)_+^{q} \, dx \right) ^{\tfrac{1}{q}} + R\right] \end{aligned}$$

when \(B:=B(y,R)\) with \(R \in (0, R_0]\) such that \(B(y,6R_0)\subset \Omega \) and \(k\geqslant \psi (x)\) almost everywhere in 2B and \(q \in (0,\infty )\). The constant C depends only on the parameters in assumptions (A0), (A1-n) and (aDec)\(_q\), n, \(R_0\), \(\Vert u\Vert _{L^{\infty }(B)}\) and q. Especially the constant is independent of R.

Next we use the fact that u is also a local superminimizer (Proposition 4.8) to get an infimum estimate from below [13, Theorem 4.3]. Since we are aiming for the weak Harnack inequality we need to assume also nonnegativity of the minimizer u.

Proposition 5.5

(The weak Harnack inequality) Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1-n), (aInc)\(_p\) and (aDec)\(_q\). Let \(u \in W^{1, {\varphi (\cdot )}}_{\mathrm{loc}}(\Omega )\) be locally bounded nonnegative local (quasi)superminimizer or a locally bounded minimizer of an obstacle problem in \(\Omega \). Then there exists an exponent \(h>0\) such that

for every \(R \leqslant c(n)\) with \(B(y,6R) \Subset \Omega \) and \(\int _{B(y,6R)} \varphi (x, |\nabla u|) \, dx \leqslant 1\). The constant C depends only on the parameters in the assumptions and n.

The final result we borrow from non-obstacle case is [13, Theorem 4.4]. It follows directly to our case since a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem is also a local superminimizer (Proposition 4.8).

Proposition 5.6

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1-n), (aInc)\(_p\) and (aDec)\(_q\). Let u be a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem which is bounded from below and set

$$\begin{aligned} u^{*}(x) := {\mathrm{ess}}\,\mathop {\mathrm{lim}}\limits _{y \rightarrow x}\, {\mathrm{inf}}\, u(y) := \mathop {\mathrm{lim}}\limits _{r\rightarrow 0} \mathop {{\mathrm{ess}}\, {\mathrm{inf}}}\limits _{B(x,r)} u. \end{aligned}$$

Then \(u^{*}\) is lower semicontinuous and \(u = u^{*}\) almost everywhere.

The next scheme is to use lower semicontinuous representatives to prove continuity of u. The first lemma shows that u can be defined pointwise everywhere.

Lemma 5.7

Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1-n), (aInc)\(_p\) and (aDec)\(_q\). Assume that u is a locally bounded local superminimizer in \(\Omega \). Then

for all \(x \in \Omega \).

Proof

Fix \(x \in \Omega \) and denote \(m_r := \mathop {\mathrm{ess}\, \mathrm{inf}}\nolimits _{B(x,r)} u\) when r is small enough to guarantee that \(B(x,6r) \Subset \Omega \). As u is assumed to be locally bounded we may assume that \(m_r \leqslant M < \infty \). Note that \(m_r\) is a constant when x and r are fixed. Therefore the function \(u-m_{4r}\) is a local superminimizer in the set B(xr) when x and r are fixed. The weak Harnack inequality (Proposition 5.5) implies

Note that by Hölder’s inequality we can choose \(h\in (0,1]\) in Proposition 5.5. Since u is bounded, the right-hand side converges to 0 as \(r \rightarrow 0\). Therefore we get

Combining this with the fact that u is locally bounded (Proposition 5.4) we find that

In conclusion

Since \(u^*\) is the lower semicontinuous representative, the previous limit implies

for all \(x \in \Omega \). \(\square \)

Finally we can prove the continuity of the minimizer of a \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem in \(\Omega \). This proof is a modification of [3, Theorem 8.29]. By lower semicontinuously regularized we mean that \(u(x)=\mathrm{ess} \,\mathrm{lim}\, \mathrm{inf}_{y\rightarrow x} u(y)\), that is \(u=u^{*}\).

Theorem 5.8

Assume that \(\psi : \Omega \rightarrow [-\infty , \infty )\) is continuous and \(f \in W^{1,\varphi (\cdot )}(\Omega )\). Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1), (A1-n), (aInc)\(_p\) and (aDec)\(_q\). Let u be a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem. Then the lower semicontinuously regularized representative of a minimizer is continuous.

Moreover, if \(\varphi \) is convex, then u is a local minimizer (and therefore locally Hölder continuous) in the open set \(A=\{x \in \Omega : u(x) > \psi (x)\}\) with boundary values u.

Proof

Let us denote the lower semicontinuous representative of u still by u. To show that u is continuous, we need to prove that

$$\begin{aligned} \limsup _{y\rightarrow x} u(y)\leqslant u(x) \end{aligned}$$

for all \(x \in \Omega \). By local boundedness (Proposition 5.3) and lower semicontinuity this implies that u is real valued and continuous.

Let \(x \in \Omega \) and \(\varepsilon \) be positive. By continuity of \(\psi \) we can pick a radius r such that \(B := B(x,r)\Subset 2B \Subset \Omega \) and \(\sup _{2B} \psi \leqslant \psi (x) + \varepsilon \). Also, the ball B can be chosen to satisfy

$$\begin{aligned} \mathop {\mathrm{ess}\,\mathrm{inf}}\limits _{B} u > u(x) - \varepsilon , \end{aligned}$$
(5.9)

as u is finite by the Proposition 5.4 and it is lower semicontinuous. Now lower semicontinuity of u and continuity of \(\psi \) imply that

$$\begin{aligned} u(x) = \mathrm{ess}\,\mathop {\mathrm{lim}}\limits _{y \rightarrow x}\, \mathrm{inf}\, u(y) \geqslant \mathrm{ess}\,\mathop {\mathrm{lim}}\limits _{y \rightarrow x}\, \mathrm{inf}\, \psi (y) = \psi (x) \geqslant \sup _{2B} \psi -\varepsilon . \end{aligned}$$

Now from Proposition 5.4 and (5.9) we have for \(k = u(x) + \varepsilon \), \(q=1\) and \(B' := B(x, r'), 0< r' < r\),

From Lemma 5.7 we have

Therefore

$$\begin{aligned} \mathrm{ess} \,\mathop {\mathrm{lim}}\limits _{y \rightarrow x}\, \mathrm{sup}\, u(y) - u(x) - \varepsilon \leqslant C\varepsilon . \end{aligned}$$

Thus the claim follows by letting \(\varepsilon \rightarrow 0^+\).

Next we prove the second claim. We see that A is open by the continuity of u and \(\psi \). Since \(\varphi \) satisfies (aDec)\(_q\), by Lemma 4.3 it is enough to test the local minimizer with bounded and compactly supported Sobolev functions. Therefore, let \(v \in W^{1,\varphi (\cdot )}(A)\) be bounded and compactly supported. Since u and \(\psi \) are continuous and \(u>\psi \) in A, there exists \(\varepsilon >0\) such that \(u \geqslant \psi + \varepsilon \) in the compact set \(\mathrm{spt}v \subset A\). By boundedness of v, we can choose \(t \in (0,1)\) such that

$$\begin{aligned} w:=(1-t)u + t(u+v) = u + tv \geqslant \psi \end{aligned}$$

in A. Therefore \(w \in {\mathcal {K}}^{u}_{\psi }(A)\). Now, since u is a minimizer of the \({\mathcal {K}}^{u}_{\psi }(A)\)-obstacle problem (Lemma 4.7) and \(\varphi \) is convex, we see that

$$\begin{aligned} \int _{A} \varphi (x, |\nabla u|) \, dx&\leqslant \int _{A} \varphi (x, |\nabla w|) \, dx \leqslant \int _{A} \varphi (x, (1-t)|\nabla u| + t |\nabla (u+v)|) \, dx \\&\leqslant (1-t) \int _{A} \varphi (x, |\nabla u|) \, dx + t \int _{A} \varphi (x, |\nabla (u+v)|) \, dx. \end{aligned}$$

Next we subtract the first term on the right-hand side and divide by t to obtain

$$\begin{aligned} \int _{A} \varphi (x, |\nabla u|) \, dx \leqslant \int _{A} \varphi (x, |\nabla (u+v)|) \, dx. \end{aligned}$$

Now, since \(|\nabla v| =0\) almost everywhere in the set \(\{v =0\}\), we get

$$\begin{aligned}&\int _{\{v \not =0\}} \varphi (x, |\nabla u|) \, dx + \int _{\{v=0\}}\varphi (x,|\nabla u|) \, dx \\&\quad = \int _{A} \varphi (x, |\nabla u|) \, dx \leqslant \int _{A} \varphi (x, |\nabla (u+v)|) \, dx \\&\quad = \int _{\{v \not =0\}} \varphi (x, |\nabla (u+v)|) \, dx + \int _{\{v=0\}}\varphi (x,|\nabla u|) \, dx. \end{aligned}$$

Subtracting the last term on the right-hand side from both sides, we get

$$\begin{aligned} \int _{\{v \not =0\}} \varphi (x, |\nabla u|) \, dx \leqslant \int _{\{v \not =0\}} \varphi (x, |\nabla (u+v)|) \, dx. \end{aligned}$$

By Lemma 4.3, u is a local minimizer in A and from [18, Corollary 1.5] we obtain local Hölder continuity of u in A. \(\square \)

6 Continuity up to the boundary

In order to prove the first main theorem, we need to define regular boundary points of a set \(\Omega \). In [13, Theorem 1.1] it was proven that a point is regular if the so called \(\varphi \)-fatness condition is satisfied at \(x_0\) and if \(\varphi \) is regular enough. In Proposition 6.4 we prove that the measure density condition (2.7) implies \(\varphi \)-fatness when \(q<n\).

First we give notation for minimizers for given boundary values. Note that continuous functions can be approximated by Lipschitz functions.

Definition 6.1

Let H(f) denote the minimizer of the Dirichlet energy

$$\begin{aligned} \int _{\Omega } \varphi (x, |\nabla v|) \, dx \end{aligned}$$

with boundary values \(f \in W^{1,\varphi (\cdot )}(\Omega )\). If \(g \in C(\partial \Omega )\), then

$$\begin{aligned} H_g(x) := \sup _{\begin{array}{c} f\leqslant g \\ f \text { is Lipschitz} \end{array}} H(f)(x). \end{aligned}$$

Let \(\Omega \subset {\mathbb {R}}^n\). A point \(x \in \partial \Omega \) is called regular if

$$\begin{aligned} \lim _{\begin{array}{c} y \rightarrow x \\ y \in \Omega \end{array}} H_f(y) = f(x) \end{aligned}$$

for all \(f \in C(\partial \Omega )\).

The next theorem is the main result of [13].

Theorem 6.2

Let \(\Omega \subset {\mathbb {R}}^n\) be bounded and \(x_0 \in \partial \Omega \). Let \(\varphi \in \Phi _c({\mathbb {R}}^n)\) be strictly convex and satisfy (A0), (A1), (A1-n), (aInc)\(_p\) and (aDec)\(_q\). If the complement of \(\Omega \) is locally \(\varphi \)-fat at \(x_0\) in the sense of (2.8), then \(x_0\) is a regular boundary point.

Most often capacity of balls is somewhat straightforward to compute. This is the case also with \(\varphi \)-capacity, if we assume (aDec)\(_q\), as we have the estimate [13, Lemma 2.8]

$$\begin{aligned} c |B|\varphi ^{-}_{2B}\left( \tfrac{1}{r}\right) \leqslant C_{\varphi }(B,2B) \leqslant c |B|\varphi ^{+}_{2B}\left( \tfrac{1}{r}\right) . \end{aligned}$$
(6.3)

It is also noteworthy to mention that upper and lower bounds are comparable when (A1-n) is in force.

Next we extend the relation between measure density condition and capacity fatness to generalized Orlicz case. Note that the assumption \(q<n\) corresponds to the classical p-fatness situation, where it is commonly assumed that \(p<n\) since otherwise singleton sets have positive capacity.

Lemma 6.4

Let \(\varphi \in \Phi _w({\mathbb {R}}^n)\) satisfy (A0), (A1), (A1-n) and (aDec)\(_q\). If \(q<n\) and the measure density condition (2.7) is satisfied at \(x_0 \in \partial \Omega \), then the complement of \(\Omega \) is locally \(\varphi \)-fat at \(x_0\).

Proof

Denote \(E:=B(x_0,r) \setminus \Omega \) and let v be an admissible test function for \(C_{\varphi }(E, 2B)\).

Now using (aDec)\(_q\) and Poincaré inequality for \(\varphi ^{-}_{2B}\) with a small constant \(\beta \) [15, Corollary 7.4.1] we estimate

$$\begin{aligned} \varphi _{2B}^{-}\left( \tfrac{1}{r} \right) |E|&= \int _{E} \varphi _{2B}^{-}\left( \tfrac{1}{r} \right) \, dx \leqslant \int _{E} \varphi _{2B}^{-}\left( \tfrac{v}{r} \right) \, dx \leqslant L \beta ^{-q} \int _{2B} \varphi ^-_{2B} \left( \dfrac{\beta v}{r} \right) \, dx \\&\leqslant C \int _{2B} \varphi ^-_{2B}(|\nabla v|) \, dx \leqslant C \int _{2B} \varphi (x, |\nabla v|) \, dx. \end{aligned}$$

Taking infimum over admissible functions v we get

$$\begin{aligned} C_{\varphi }(E,2B) \geqslant C |E| \varphi _{2B}^{-}\left( \tfrac{1}{r} \right) . \end{aligned}$$
(6.5)

As (A1-n) implies that \(\varphi ^{+}_{2B}(\tfrac{1}{r})\) and \(\varphi ^{-}_{2B}(\tfrac{1}{r})\) are comparable, from (6.5) and the measure density condition (2.7) we deduce

$$\begin{aligned} C_\varphi (B(x_0,r) \setminus \Omega , 2B)&\geqslant c_*\, |B(x_0,r) \setminus \Omega | \, \varphi _{2B}^{-}\left( \tfrac{1}{r} \right) \\&\geqslant c_*\, |B| \, \varphi _{2B}^{-}\left( \tfrac{1}{r}\right) \\&\geqslant c_*\, |B|\, \varphi ^+_{2B}\left( \tfrac{1}{r} \right) \\&\geqslant c_*\, C_{\varphi }(B(x_0,r), 2B), \end{aligned}$$

where the last inequality follows from (6.3). Thus the capacity fatness condition is satisfied at \(x_0\). \(\square \)

Finally we are ready to prove the continuity of a minimizer up to the boundary.

Proof of Theorem 1.1

By Lemma 4.6 we can assume that \(f \geqslant \psi \). Let us first show that

$$\begin{aligned} \limsup _{x \rightarrow x_0} u(x) \leqslant f(x_0). \end{aligned}$$
(6.6)

Let us denote \(D:=\{x \in \Omega : u(x) > f(x)\}\). If \(D=\emptyset \), then (6.6) holds trivially. Let us then suppose that D is not the empty set. If \(x_0 \not \in \partial \Omega \cap \partial D\), then there would exist an open set \(U \subset \Omega \setminus {\overline{D}}\) containing \(x_0\) and (6.6) would follow again trivially. Therefore let \(x_0 \in \partial \Omega \cap \partial D\). First we need to show that \(u-f \in W^{1,\varphi (\cdot )}_0(D)\).

Since \(\varphi \) satisfies (A0), (A1), (aDec)\(_q\) and D is bounded, \(C^\infty (D)\cap W^{1,\varphi (\cdot )}(D)\) is dense in \(W^{1,\varphi (\cdot )}(D)\) [15, Theorem 6.4.6]. Let us denote \(v_j := \max \{u-f-\tfrac{1}{j}, 0 \}\) and notice by continuity of u and f that it has compact support in D for every j. From [18, Lemma 3.4] we have that compactly supported Sobolev–Orlicz functions belong to \(W^{1,\varphi (\cdot )}_0(D)\), especially \(v_j \in W^{1,\varphi (\cdot )}_0(D)\) for every j. By monotone convergence [16, Theorem 4.1], \(u-f-\tfrac{1}{j}\) converges to \(u-f\) in \(W^{1,\varphi (\cdot )}(D)\) and therefore by Lemma 3.3\((v_j)\) has a subsequence converging to \(\max \{u-f,0\} =u-f\) in \(W^{1,\varphi (\cdot )}(D)\). Since \(W^{1,\varphi (\cdot )}_0(D)\) is closed, we see that \(u-f \in W^{1,\varphi (\cdot )}_0(D)\).

Since by assumption, \(f \geqslant \psi \) in \(\Omega \), by Theorem 5.8u is a local minimizer in D with \(u-f \in W^{1,\varphi (\cdot )}_0(D)\). Since \(D \subset \Omega \), the capacity fatness condition with respect to D is satisfied at \(x_0\):

$$\begin{aligned} C_{\varphi } (B(x_0,r) \setminus D, B(x_0,2r))&\geqslant C_{\varphi } (B(x_0,r) \setminus \Omega , B(x_0,2r))\\&\geqslant c \, C_{\varphi }(B(x_0,r), B(x_0,2r)), \end{aligned}$$

where the first inequality follows from monotonicity of capacity [13, (C2) on p. 6]. Now it follows from Theorem 6.2 that \(x_0 \in \partial \Omega \cap \partial D\) is a regular boundary point, that is

$$\begin{aligned} \lim _{\begin{array}{c} x \rightarrow x_0 \\ x \in D \end{array}} u(x) = f(x_0). \end{aligned}$$

Since \(u \leqslant f\) in \(\Omega \setminus D\) we get (6.6).

It remains to show that

$$\begin{aligned} \liminf _{x \rightarrow x_0} u(x) \geqslant f(x_0). \end{aligned}$$
(6.7)

Let h be the unique minimizer with \(h-f \in W^{1,\varphi (\cdot )}_0(\Omega )\). By the comparison principle (Proposition 4.10) we have that \(h \leqslant u\) in \(\Omega \). Therefore by regularity of \(x_0\) we get

$$\begin{aligned} \liminf _{x \rightarrow x_0} u(x) \geqslant \lim _{x \rightarrow x_0} h(x) = f(x_0). \end{aligned}$$

Combining (6.6) and (6.7) yields

$$\begin{aligned} \limsup _{x \rightarrow x_0} u(x) \leqslant f(x_0) \leqslant \liminf _{x \rightarrow x_0} u(x) \end{aligned}$$

from which we see that

$$\begin{aligned} \lim _{x\rightarrow x_0} u(x) = f(x_0). \end{aligned}$$

Therefore u is continuous at the point \(x_0 \in \partial \Omega \). \(\square \)

7 Higher integrability of the gradient

We start by proving two Caccioppoli inequalities: one inside the domain and one near the boundary. The proofs are quite standard and similar usage of test functions can be found from example in [5]. In the next Caccioppoli inequality assumptions (A0), (A1) and (aInc)\(_p\) are only to use Sobolev–Poincaré inequality for \(\psi \), which combines terms involving \({\psi -\psi _{2B}}\) and \(\nabla \psi \) for simpler result. Assuming only (aDec)\(_q\) would yield the result as in (7.3). Compared to the Caccioppoli inequality previously presented in Lemma 5.1, now we do not limit ourselves to the positive part of the minimizer and the obstacle appears as an energy rather than a bound for the constant k. The second Caccioppoli inequality on the other hand leverages the boundary function rather than the obstacle.

Lemma 7.1

(Interior Caccioppoli inequality) Let \(\varphi \in \Phi _w(\Omega )\) satisfy (A0), (A1), (aInc)\(_p\) and (aDec)\(_q\), and let u be a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem

where \(f, \psi \in W^{1,\varphi (\cdot )}(\Omega )\). Then we have

(7.2)

in the ball B with and \(2B \subset \Omega \), \(\Vert \nabla \psi \Vert _{L^{\varphi (\cdot )}(2B)} < 1\) and a constant \(C=C(n,\varphi )\).

Proof

Choose \(1\leqslant s < t \leqslant 2\). Let \(\eta \in C^{\infty }_0(tB)\) be a cut-off function such that \(\eta =1\) in sB, \(0\leqslant \eta \leqslant 1\), \(\eta =0\) in \(2B\setminus tB\) and \(|\nabla \eta | \leqslant \frac{2}{(t-s)r}\). Let v be the following test function

$$\begin{aligned} v:=u-u_{2B} -\eta (u-u_{2B} -(\psi -\psi _{2B})). \end{aligned}$$

First, it needs to be shown that v is an admissible test function for a suitable obstacle problem. Indeed, \(v \in {\mathcal {K}}^{f-u_{2B}}_{\psi -u_{2B}}(\Omega )\) since \(v-(f- u_{2B}) \in W^{1,\varphi (\cdot )}_0(\Omega )\), because \(\eta \in C_0^{\infty }(2B)\), and

$$\begin{aligned} v&=(1-\eta ) (u-u_{2B}) + \eta (\psi - \psi _{2B})\\&\geqslant (1-\eta ) (\psi -u_{2B}) + \eta (\psi - u_{2B}) = \psi - u_{2B} \end{aligned}$$

almost everywhere in \(\Omega \) because \(u \geqslant \psi \) almost everywhere in \(\Omega \).

A direct calculation yields

$$\begin{aligned} |\nabla v| \leqslant (1-\eta )|\nabla u| + \eta |\nabla \psi | + |u-u_{2B} -(\psi -\psi _{2B})| |\nabla \eta |. \end{aligned}$$

Since u is a minimizer of the obstacle problem \({\mathcal {K}}^{f}_{\psi }(\Omega )\), we deduce that \(u-u_{2B}\) is a minimizer of \({\mathcal {K}}^{f-u_{2B}}_{\psi -u_{2B}}(\Omega )\) for which v is an admissible test function. Therefore, as Lemma 4.7 guarantees that \(u-u_{2B}\) is a minimizer also in tB, it follows that

$$\begin{aligned} \int _{tB} \varphi (x, |\nabla u|) \, dx =&\int _{tB} \varphi (x, |\nabla (u-u_{2B})|) \, dx \leqslant \int _{tB} \varphi (x, |\nabla v|) \, dx\\ \leqslant&\int _{tB} \varphi \big (x, (1-\eta )|\nabla u| + \eta |\nabla \psi | \\&+ (u-u_{2B} -(\psi -\psi _{2B})) |\nabla \eta | \big ) \, dx. \end{aligned}$$

Since \(\varphi \) satisfies (aDec)\(_q\), we can use (2.3) to split the sum inside of \(\varphi \). This together with the fact that \(\eta \leqslant 1\) yields

$$\begin{aligned} \int _{tB} \varphi (x, |\nabla u|) \, dx \leqslant C \int _{tB} \varphi (x, (1-\eta ) |\nabla u|) \, dx + C \int _{tB} \varphi (x, |\nabla \psi |) \, dx \\ + C \int _{tB} \varphi \left( x, \frac{|u-u_{2B} -(\psi -\psi _{2B})|}{(t-s)r} \right) \, dx. \end{aligned}$$

Since \(\eta =1\) in sB, we see that \(\varphi (x,(1-\eta )|\nabla u|) =0\) in sB. Also, by decreasing the set tB on the left-hand side of the inequality and increasing the set tB on the right-hand side, we get

$$\begin{aligned} \int _{sB} \varphi (x, |\nabla u|) \, dx \leqslant C \int _{tB\setminus sB} \varphi (x, |\nabla u|) \, dx + C \int _{2B} \varphi (x, |\nabla \psi |) \, dx\\ + C \int _{2B} \varphi \left( x, \frac{|u-u_{2B} -(\psi -\psi _{2B})|}{(t-s)r} \right) \, dx. \end{aligned}$$

Now we use the hole-filling trick by adding \(C\int _{sB} \varphi (x, |\nabla u|) \, dx\) to both sides of the previous inequality and get \(C+1\) of them in the left-hand side while having just constant C on the right-hand side. Now after dividing the inequality by \(C+1\) we get a constant \(\theta <1\) as the first constant on the right-hand side

$$\begin{aligned} \int _{sB} \varphi (x, |\nabla u|) \, dx \leqslant&\theta \int _{tB} \varphi (x, |\nabla u|) \, dx + C \int _{2B} \varphi (x, |\nabla \psi |) \, dx \\&+ C \int _{2B} \varphi \left( x, \frac{|u-u_{2B} -(\psi -\psi _{2B})|}{(t-s)r} \right) \, dx. \end{aligned}$$

Identifying this inequality with the one in iteration Lemma 3.6, we see after changing to averages that

As before, we can use (aDec)\(_q\) to obtain

(7.3)

Finally using (aDec)\(_q\) and, as \(\varphi \) satisfies (A0), (A1) and (aInc)\(_p\), Sobolev–Poincaré inequality (Proposition 3.5) with \(s=1\) we can estimate the term containing \(\psi \)

Therefore we get as an interior Caccioppoli inequality

Lastly, we use (aDec)\(_q\) to convert from radius to diamater. \(\square \)

Lemma 7.4

(Caccioppoli inequality over the boundary) Let \(\varphi \in \Phi _w(\Omega )\) satisfy (aDec)\(_q\) and let u be a minimizer of the \({\mathcal {K}}^{f}_{\psi }(\Omega )\)-obstacle problem where \(f, \psi \in W^{1,\varphi (\cdot )}(\Omega )\). Assume that there exists a compact set \(K \subset \Omega \) such that \(f \geqslant \psi \) in \(\Omega \setminus K\) or that \(\varphi \) satisfies also (A0) and (A1). Then we have

$$\begin{aligned} \begin{aligned} \dfrac{1}{|B|}\int _{B\cap \Omega } \varphi (x, |\nabla u|) \, dx \leqslant&\dfrac{C}{|2B|} \int _{2B \cap \Omega } \varphi \left( x, \dfrac{|u-f|}{{\mathrm{diam}}(2B)}\right) \, dx \\&+ \dfrac{C}{|2B|} \int _{2B\cap \Omega } \varphi (x, |\nabla f|) \, dx \end{aligned} \end{aligned}$$
(7.5)

in the ball \(B:=B(y,r)\) with \(y \in \Omega \), \(2B\setminus \Omega \not = \emptyset \) and \(r < \frac{r_0}{4}\), where \(r_0 := \mathrm{dist}\{K,\partial \Omega \}\) and constant the C depends only on n and \(\varphi \).

Proof

If \(\varphi \) satisfies (A0) and (A1), Lemma 4.6 allows us to assume that \(f \geqslant \psi \) and therefore we can take the compact set K as \(\emptyset \). As for the Caccioppoli inequality, we choose \(1\leqslant s<t\leqslant 2\) and \(\eta \in C^{\infty }_0(tB)\) to be a cut-off function such that \(\eta =1\) in sB, \(0\leqslant \eta \leqslant 1\), \(\eta =0\) in \(2B\setminus tB\) and \(|\nabla \eta | \leqslant \frac{2}{(t-s)r}\). This time we use \(v:=u-\eta (u-f)\) as a test function. Here we note that \(v \in {\mathcal {K}}^{f}_{\psi }(tB \cap \Omega )\), since \(f \geqslant \psi \) in \(\Omega \setminus K\) and the radius r is small enough. Using similar approach as in proof of interior Caccioppoli inequality, we get

$$\begin{aligned} \int _{tB \cap \Omega } \varphi (x, |\nabla u|) \, dx \leqslant&\int _{tB \cap \Omega } \varphi (x, |\nabla v|) \, dx \\ \leqslant&\int _{tB\cap \Omega } \varphi (x, (1-\eta )|\nabla u| + |u-f||\nabla \eta |+\eta |\nabla f|) \, dx \\ \leqslant&C \int _{tB \cap \Omega } \varphi (x, (1-\eta )|\nabla u|) \, dx \\&+ C \int _{tB \cap \Omega } \varphi (x, |u-f||\nabla \eta |) \, dx \\&+ C \int _{tB \cap \Omega } \varphi (x, |\nabla f|) \, dx. \end{aligned}$$

Again by decreasing and increasing integration domains and noting that \(\eta =1\) in \(sB\cap \Omega \), we continue

$$\begin{aligned} \int _{sB \cap \Omega } \varphi (x, |\nabla u|) \, dx \leqslant&\, C \int _{(tB \setminus sB) \cap \Omega } \varphi (x, |\nabla u|) \, dx \\&+ C \int _{2B \cap \Omega } \varphi \left( x, \frac{|u-f|}{(t-s)r} \right) \, dx \\&+ C \int _{2B \cap \Omega } \varphi (x, |\nabla f|) \, dx. \end{aligned}$$

Repeating the hole-filling trick as in the previous Caccioppoli inequality, we get

$$\begin{aligned} \int _{sB \cap \Omega } \varphi (x, |\nabla u|) \, dx&\leqslant \theta \int _{tB \cap \Omega } \varphi (x, |\nabla u|) \, dx + C \int _{2B \cap \Omega } \varphi \left( x, \frac{|u-f|}{(t-s)r} \right) \, dx \\&\quad + C \int _{2B \cap \Omega } \varphi (x, |\nabla f|) \, dx \end{aligned}$$

and thus repeating the iteration, Lemma 3.6, we end up with

$$\begin{aligned} \int _{B \cap \Omega } \varphi (x, |\nabla u|) \, dx&\leqslant C \int _{2B \cap \Omega } \varphi \left( x, \frac{|u-f|}{r} \right) \, dx + C \int _{2B \cap \Omega } \varphi (x, |\nabla f|) \, dx. \end{aligned}$$

Now we divide by the measure of balls

$$\begin{aligned} \begin{aligned} \dfrac{1}{|B|} \int _{B\cap \Omega } \varphi (x, |\nabla u|) \, dx \leqslant&\dfrac{C}{|2B|} \int _{2B \cap \Omega } \varphi \left( x, \frac{|u-f|}{r} \right) \, dx \\&+ \dfrac{C}{|2B|} \int _{2B \cap \Omega } \varphi (x, |\nabla f|) \, dx. \end{aligned} \end{aligned}$$
(7.6)

Finally we use (aDec)\(_q\) to change from r to diameter and get the desired Caccioppoli inequality. \(\square \)

Next we prove the global higher integrability result.

Proof of Theorem 1.2

Let \(B:=B(y,r)\) be a ball with \(y \in \Omega \) and a radius r satisfying

$$\begin{aligned} \Vert \nabla (u-f)\Vert _{L^{\varphi (\cdot )}(3B)} + |3B|<&\frac{1}{C}, \Vert \nabla (u-f)\Vert _{L^{\varphi ^{1/s}}(3B)} \nonumber \\<&1 \quad \text {and} \quad \Vert \nabla \psi \Vert _{L^{\varphi (\cdot )}(2B)} < 1, \end{aligned}$$
(7.7)

where \(s\leqslant p\) satisfies the assumptions in the Sobolev–Poincaré inequality (Proposition 3.5) and C is the constant of the same inequality. If \(2B \subset \Omega \), from Caccioppoli inequality (Lemma 7.1) we have

For the first term on the right-hand side we can use Sobolev–Poincaré inequality (Proposition 3.5) and introduce a constant \(s>1\) from (7.7) such that

(7.8)

Now if \(2B \setminus \Omega \not = \emptyset \), then we use the Caccioppoli inequality over the boundary (Lemma 7.4)

$$\begin{aligned} \dfrac{1}{|B|}\int _{B\cap \Omega } \varphi (x, |\nabla u|) \, dx \leqslant&\dfrac{C}{|2B|} \int _{2B \cap \Omega } \varphi \left( x, \dfrac{|u-f|}{{\mathrm{diam}}(2B)}\right) \, dx \\ +&\dfrac{C}{|2B|} \int _{2B\cap \Omega } \varphi (x, |\nabla f|) \, dx. \end{aligned}$$

The idea is to use Sobolev–Poincaré inequality also to the term involving \(u-f\), but this needs some preparation, as there is no integral average on the right-hand side. First we notice that since \(u-f \in W^{1,\varphi (\cdot )}_0(\Omega )\), it has a zero extension belonging to \(W^{1,\varphi (\cdot )}({\mathbb {R}}^n)\) as in the proof of Lemma 4.7. This allows us to extend the domain of integration form \(2B \cap \Omega \) to 2B. Second, we note that using (aDec)\(_q\) we can increase the radii of balls

(7.9)

Next we choose a ball \({\tilde{B}} := \tilde{B}(x_0, r)\), where \(x_0 \in 2B \cap \partial \Omega \). It is easily seen that \({\tilde{B}} \subset 3B\). Also by appealing to measure density condition (2.7), we see that there exists a constant \({\tilde{c}} \in (0,1)\) such that

$$\begin{aligned} {|\{x \in 3B : u-f=0\}|} \geqslant |\{x \in {\tilde{B}} : u-f=0\}| \geqslant |\Omega ^c \cap {\tilde{B}}| \geqslant c_*|{\tilde{B}}| \geqslant {\tilde{c}} |3B|. \end{aligned}$$
(7.10)

The second inequality follows since \(u-f\) has been defined as 0 in the complement of \(\Omega \), but could this could happen also inside \(\Omega \). For brevity, let us denote \(v:=u-f\) and \(A:=\{x \in 3B : u-f=0\}\). Let us also recall that

(7.11)

when \(\Omega ' \subset \Omega \) has positive measure [23, Lemma 2.3].

Now by (7.10) the set A has positive measure and therefore it is meaningful to state that \(v_A=0\). With this we can write

After an application of (aDec)\(_q\) in the form of (2.3) we get

(7.12)

The first term on the right-hand side can be estimated with Sobolev–Poincaré inequality (Proposition 3.5) since (7.7) is in force. Let us then use (7.11) to estimate the last term

Now by using (7.10) and (aDec)\(_q\) we get

From (7.7) we especially have that \(\Vert \nabla v\Vert _{L^{\varphi (\cdot )}(3B)} < 1\). Thus by Sobolev–Poincaré inequality (Proposition 3.5) with \(s=1\) and (7.7) we have that

$$\begin{aligned} \int _{3B} \varphi \left( x, \dfrac{|v-v_{3B}|}{{\mathrm{diam}}(3B)} \right) \, dx \leqslant C \left[ \int _{3B} \varphi (x, |\nabla v|) \, dx + |3B| \right] < 1. \end{aligned}$$

By the unit-ball property (2.5), we see that \(\left\| \dfrac{v-v_{3B}}{{\mathrm{diam}}(3B)}\right\| _{L^{\varphi (\cdot )}(3B)} \leqslant 1\), so the assumptions of the Jensen type estimate (Lemma 3.4) are satisfied. Now using it to pull the integral out from the \(\varphi \) and noticing that outer integral average is redundant, we continue

(7.13)

Now the last integral is in a form to which the Sobolev–Poincaré inequality is applicable and we see that (after the backwards substitution \(v = u-f\))

where the equality follows, as \(u-f=0\) outside of \(\Omega \). Now finishing with triangle inequality, (aDec)\(_q\) and Hölder’s inequality we conclude that

(7.14)

Combining the Caccioppoli inequalities (Lemmas 7.1 and 7.4 ), (7.8) and (7.14) we have

$$\begin{aligned} \begin{aligned} \dfrac{1}{|B|} \int _{B \cap \Omega } \varphi (x,|\nabla u|) \,dx \leqslant&C \left( \dfrac{1}{|3B|} \int _{3B \cap \Omega } \varphi \left( x, |\nabla u| \right) ^{1/s} \, dx\right) ^{s} \\&\quad + \dfrac{C}{|3B|} \int _{3B \cap \Omega } \varphi (x, |\nabla \psi |) \, dx\\&\quad + \dfrac{C}{|3B|} \int _{3B\cap \Omega } \varphi (x, |\nabla f|) \, dx + C. \end{aligned} \end{aligned}$$
(7.15)

Now let

$$\begin{aligned} g:= & {} \left\{ \begin{array}{lll} \varphi (x, |\nabla u|), &{}\quad \text {if } x \in \Omega \\ 0 &{}\quad \text {if } x \not \in \Omega \end{array}\right. ,\\ h:= & {} \left\{ \begin{array}{lll} \varphi (x, |\nabla \psi |) + \varphi (x, |\nabla f|), &{}\quad \text {if } x \in \Omega \\ 0 &{}\quad \text {if } x \not \in \Omega . \end{array}\right. \end{aligned}$$

Writing (7.15) with functions g and h we get

where h has higher integrability as \(\varphi (x,|\nabla \psi |), \varphi (x,|\nabla f|) \in L^{1+\delta }(\Omega )\). Now we can use Gehring’s lemma, Lemma 3.7, which yields a number \(\varepsilon >0\) and a constant C such that

The theorem follows after a covering argument since \(\Omega \) is bounded and \({\overline{\Omega }}\) is compact. \(\square \)