1 Introduction and main results

figure a

where Ω, unless otherwise stated, is a bounded domain in \({\mathbb{R}}^{N} (N \geq 3)\) with smooth boundary \(p_{i} \in C(\overline{\Omega }), 2 \leq p_{i}(x) \leq p_{+}(x) < { \overline{p}}^{\star }(x), i=1,\ldots,N, p_{+}(x):= \max \{p_{1} (x),\ldots,p_{N}(x) \}\) for any \(x \in \overline{\Omega } \) with \({\overline{p}}(x):= N / \sum_{i=1}^{N}(1/p_{i} (x))\) and \({\overline{p}}^{*}(x)={N\overline{p}(x)}/{(N-\overline{p}(x))}\) if \(\overline{p}(x)< N\) and \({\overline{p}}(x)=+\infty \) if \(N\geq p(x)\), \(\alpha \in C(\overline{\Omega })\) is a nonnegative function with \(1 \leq \alpha (x)\) for all \(x\in \overline{\Omega }\), \(f: {\Omega } \times [0,+\infty ) \rightarrow \mathbb{R}\) is a continuous function and

(H):

\(a \in L^{\infty }(\Omega )\) with \(a(x) >0\) a.e. in Ω;

(\(f_{1}\)):

There is \(\delta >0\) such that \(f(x,t)\geq (1-t^{\alpha (x)-1})a(x) \) for all \((x,t) \in \Omega \times [0,\delta ] \);

(\(f_{2}\)):

There exists \(r \in C(\overline{\Omega })\) such that \(1 < r(x)\) for any \(x \in \overline{\Omega }\) and \(|f(x,t)|\leq a(x)(1 + |t|^{r(x)-1})\) for all \((x,t) \in \Omega \times [0,+\infty ) \).

We say that \(u \in W^{1,{\overrightarrow{p}(x)}}_{0} (\Omega )\) is a weak solution for \((P)\) if

$$\begin{aligned} \int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i} (x) -2} \frac{\partial u}{\partial x_{i}} \frac{\partial \phi }{\partial x_{i}} = \int _{\Omega } a(x)u^{\alpha (x)-1} \phi + f(x,u) \phi \end{aligned}$$

for all \(\phi \in W^{1,\overrightarrow{p}(x)}_{0} (\Omega )\).

Denoting by \(\| \cdot \|_{\infty }\) the norm in \(L^{\infty }(\Omega )\), we obtain, by means of sub-supersolutions and minimization arguments, the result described below.

Theorem 1.1

Consider that hypotheses \((H), (f_{1})\), and \((f_{2})\) hold. Then problem \((P)\) has a solution for \(\| a\|_{\infty }\) small enough.

Define \(p_{\infty }(x) = \max \{\overline{p}^{\star }(x), p_{+}(x)\}, p_{-}(x) = \min \{p_{1}(x),\ldots,p_{n}(x)\}, x \in \overline{\Omega }\) and denote \(q^{-}:= \operatorname{inf}_{\Omega } q \) and \(q^{+}:= \operatorname{sup}_{\Omega } q \) for a function \(q \in C(\overline{\Omega })\). Considering the Ambrosetti–Rabinowitz type condition:

(\(f_{3}\)):

It holds that \(\alpha ^{-} >1\), \(\alpha ^{+}, r^{+} < p^{-}_{\infty } \) with \(\alpha ^{+} < p^{-}_{-}\) or \(p^{+}_{+} < \alpha ^{-}\), and there are \(t_{0} >0\) and \(\theta > p^{+}_{+}\) such that

$$\begin{aligned} 0< \theta F(x,t)\leq f(x,t)t, \quad\text{a.e. in } \Omega, \text{ for all } t \geq t_{0}, \end{aligned}$$

we have the multiplicity result below.

Theorem 1.2

Consider that hypotheses \((H)\), \((f_{1})\)\((f_{3})\) hold. Then problem \((P)\) has two solutions for \(\| a\|_{\infty }\) small enough.

Consider \(s_{0}>0\). The function

$$\begin{aligned} w(x,t)=\textstyle\begin{cases} a(x)(1-t^{\alpha (x)-1}), & 0\leq t \leq s_{0}, \\ a(x)((1-s^{\alpha (x)-1}_{0}) + (t-s_{0})^{r(x)-1}), & t > s_{0}, \end{cases}\displaystyle \end{aligned}$$

satisfies \((f_{1})\) and \((f_{2})\) for \(\delta \in (0,s_{0}]\) and \(r \in C(\overline{\Omega })\) with \(r_{-}>1 \) for all \(x \in \overline{\Omega }\). Note that \((f_{1})\)\((f_{3})\) hold if \(1 < \alpha ^{+}< p^{-}_{\infty }\) and \(p^{+}_{+} < r^{-}\) with \(\alpha ^{+} < p^{-}_{-}\) or \(p^{+}_{+} < \alpha ^{-}\).

Anisotropic partial differential equations have attracted the attention of several researchers in the last years due to their applicability in several areas of science. For example, in the classical paper [1] the authors considered a model which was applied for both image enhancement and denoising in terms of anisotropic PDEs as well as allowing the preservation of significant image features. In physics, anisotropic problems arise in models that describe the dynamics of fluids with different conductivities in different directions. We also point out that anisotropic equations can be applied in models that describe the spread of epidemic disease in heterogeneous environments. For more details regarding the mentioned applications, see for instance [24].

On the other hand, problems involving variable exponents can be also applied to consider several important models. A classical application is in the study of electrorheological fluids. The study of electrorheological fluids started when fluids that stop spontaneously, which are known in the literature as Bingham fluids, were discovered. We also mention the important work [5] due to W. Winslow, where the first major discovery regarding electrorheological fluids was presented. A notable fact is that under the presence of an eletrical field, parallel and string-like formations arise in this kind of fluid. Such behavior is known as Winslow effect. As mentioned in the interesting paper [6], several experiments with such fluids have been considered in NASA due to their applicability in space technology and robotics.

We also mention that, from the mathematical viewpoint, anisotropic problems and equations with variable exponents are very interesting. For example, in the reference [7], regularity results for a system which arise in the study of electrorheological fluids are proved. In [8], the authors generalize several results of elliptic equations for the variable exponents setting. In the classical manuscript [9] the author considers problems with an anisotropic operator with variable exponents. We also quote the interesting references [1019] and the paper [20] which provides an overview of recent results concerning elliptic variational problems with nonstandard growth conditions and related to different kinds of nonuniformly elliptic operators. For a complete treatment of problems involving variable exponents, see [21, 22].

Problem \((P)\) is motivated by [23], where the authors obtained versions of Theorems 1.1 and 1.2 with \(\alpha \equiv 2\) for an anisotropic operator.

The rest of the manuscript is organized as follows: in Sect. 2 we present some preliminaries regarding spaces with variable exponents; in Sect. 3 we obtain an auxiliary \(L^{\infty }\) estimate which will play an important role in our arguments; in Sects. 5 and 6 the proofs of Theorems 1.1 and 1.2 are provided, respectively.

2 Preliminaries

Let \(\Omega \subset \mathbb{R}^{N} ( N \geq 1)\) be a bounded domain. Given \(p\in C_{+}(\overline{\Omega }):= \{p \in C(\overline{\Omega }); \inf_{ \Omega } p > 1\}\), we define the Lebesgue space

$$\begin{aligned} L^{p(x)}(\Omega )= \biggl\{ u: \Omega \rightarrow \mathbb{R} \text{ measurable}; \int _{\Omega } \bigl\vert u(x) \bigr\vert ^{p(x)}< \infty \biggr\} \end{aligned}$$

with the norm

$$\begin{aligned} \Vert u \Vert _{p(x)}:=\inf \biggl\{ \lambda >0; \int _{\Omega } \biggl\vert \frac{u(x)}{\lambda } \biggr\vert ^{p(x)}\leq 1 \biggr\} . \end{aligned}$$

It holds that \((L^{p(x)}(\Omega ), \|\cdot \|_{{p(x)}})\) is a Banach space.

The results below, which can be found for example in [24], will be often used.

Proposition 2.1

Consider \(p \in C_{+}(\overline{\Omega })\) and define \(\rho (u): =\int _{\Omega }|u|^{p(x)}\,dx\). For \(u, u_{n}\in L^{p(x)}(\Omega ), n \in \mathbb{N}\), the statements below hold.

  1. (i)

    If \(u\neq 0\) in \(L^{p(x)}(\Omega )\), then \(\|u\|_{{p(x)}}=\lambda \Leftrightarrow \rho (\frac{u}{\lambda })=1\);

  2. (ii)

    If \(\|u\|_{{p(x)}}< 1 (= 1; > 1)\), then \(\rho (u) < 1 (= 1; > 1)\);

  3. (iii)

    If \(\|u\|_{{p(x)}}> 1 \), then \(\|u\|_{p(x)}^{p^{-}}\leq \rho (u)\leq \|u\|_{p(x)}^{p^{+}}\);

  4. (iv)

    If \(\|u\|_{{p(x)}}< 1 \), then \(\|u\|_{{p(x)}}^{p^{+}}\leq \rho (u)\leq \|u\|_{{p(x)}}^{p^{-}}\).

Theorem 2.2

Consider \(p,q\in C_{+}(\overline{\Omega })\). The assertions below hold.

  1. (i)

    If \(\frac{1}{q(x)}+\frac{1}{p(x)}=1\) in Ω, then \(\vert \int _{\Omega }uv\,dx \vert \leq (\frac{1}{p^{-}}+ \frac{1}{q^{-}} )\|u\|_{{p(x)}}\|v\|_{{q(x)}} \);

  2. (ii)

    If \(q(x)\leq p(x)\) in Ω and \(|\Omega |<\infty \), then \(L^{p(x)}(\Omega )\hookrightarrow L^{q(x)}(\Omega )\).

In what follows we recall some results on anisotropic variable exponents which can be found for example in [9]. Consider \(p_{i} \in C_{+}(\overline{\Omega }), i=1,\ldots,N\). Denote

$$\begin{aligned} \overrightarrow{p(x)}:= \bigl(p_{1}(x),\ldots,p_{N} (x) \bigr) \in \bigl(C_{ +}( \overline{\Omega }) \bigr)^{N} \end{aligned}$$

and define

$$\begin{aligned} p_{+} (x):= \max \bigl\{ p_{1} (x),\ldots, p_{N} (x) \bigr\} \quad\text{and}\quad p_{-} (x):= \min \bigl\{ p_{1} (x),\ldots, p_{N} (x) \bigr\} ,\quad x \in \overline{\Omega }. \end{aligned}$$
(2.1)

The anisotropic variable exponent Sobolev space given by

$$\begin{aligned} W^{1,\overrightarrow{p(x)}}(\Omega ):= \biggl\{ u \in L^{p_{+}(x)}( \Omega ); \frac{\partial u}{\partial x_{i}} \in L^{p_{i} (x)}(\Omega ), i=1,\ldots,N \biggr\} \end{aligned}$$

is a Banach space with respect to the norm

$$\begin{aligned} \Vert u \Vert _{1,\overrightarrow{p}(x)}:= \Vert u \Vert _{p_{+}(x)} + \sum_{i=1}^{N} \biggl\Vert \frac{\partial u}{\partial x_{i}} \biggr\Vert _{p_{i} (x)}. \end{aligned}$$
(2.2)

If \(p^{-}_{i} >1, i=1,\ldots,N\), then \(W^{1,\overrightarrow{p(x)}}(\Omega )\) is reflexive, see [9, Theorem 2.2].

By \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) we denote the Banach space defined by the closure of \(C_{0}^{\infty }(\Omega )\) in \(W^{1,\overrightarrow{p}}(\Omega )\) with respect to the norm (2.2).

Consider \({\overline{p}}(x):= N / \sum_{i=1}^{N}(1/p_{i} (x))\) and \({\overline{p}}^{*}(x)={N\overline{p}(x)}{(N-\overline{p}(x))}\) if \(\overline{p}(x)< N\) and \({\overline{p}}(x)=+\infty \) if \(N\geq p(x)\). If \(p(x) < {\overline{p}}^{*}(x)\) for all \(x \in \overline{\Omega }\), then the following Poincaré type inequality holds:

$$\begin{aligned} \Vert u \Vert _{p^{+}(x)} \leq C \sum _{i=1}^{N} \biggl\Vert \frac{\partial u }{\partial x_{i}} \biggr\Vert _{p_{i} (x)} \quad\text{for all } u \in W^{1,\overrightarrow{p(x)}}_{0} ( \Omega ), \end{aligned}$$
(2.3)

where C is a positive constant independent of \(u \in W^{1,\overrightarrow{p(x)}}_{0} (\Omega )\). Thus, the norm

$$\begin{aligned} \Vert u \Vert := \sum_{i=1}^{N} \biggl\Vert \frac{\partial u}{\partial x_{i}} \biggr\Vert _{{p_{i} (x)}},\quad u \in W^{1, \overrightarrow{p(x)}}_{0}(\Omega ) \end{aligned}$$

is equivalent to the norm given in (2.2).

If \(q \in C_{+}(\overline{\Omega })\) and \(q(x) < p_{\infty }(x)\) for all \(x \in \overline{\Omega }\), where \(p_{\infty }(x):= \max \{\overline{p}^{\star }(x), p_{+}(x)\}\), then there exists a compact embedding \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega ) \hookrightarrow L^{q(x)}( \Omega )\).

3 Auxiliary results

In what follows we present an existence result for a linear problem and a weak comparison principle which generalize Lemmas 2.1 and 2.2 of [23] respectively.

Lemma 3.1

Consider \(a \in L^{\infty }(\Omega )\). The problem

$$\begin{aligned} \textstyle\begin{cases} - \sum^{N}_{i=1}\frac{\partial }{\partial x_{i}} ( \vert \frac{\partial u}{\partial x_{i}} \vert ^{p_{i} (x)-2} \frac{\partial u}{\partial x_{i}} ) = a & \textit{in } \Omega, \\ u= 0 &\textit{on } \partial \Omega, \end{cases}\displaystyle \end{aligned}$$

has a unique solution in \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\).

Proof

The continuous nonlinear map \(T:W_{0}^{1,\overrightarrow{p(x)}}(\Omega )\rightarrow (W_{0}^{1, \overrightarrow{p(x)}}(\Omega ))'\) is defined by

$$\begin{aligned} \langle Tu,\phi \rangle= \sum^{N}_{i=1} \int _{\Omega } \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i}(x)-2} \frac{\partial u}{\partial x_{i}}\frac{\partial \phi }{\partial x_{i}}. \end{aligned}$$

Since \(p_{i} > 1, i=1,\ldots,N\), we have from the inequality (see for example [25, page 97])

$$\begin{aligned} \bigl\langle \vert x \vert ^{l-2} x - \vert y \vert ^{l-2} y, x- y \bigr\rangle \geq \frac{1}{2^{l-2}} \vert x-y \vert ^{l} \end{aligned}$$
(3.1)

for all \(x, y \in \mathbb{R}^{N}\) and \(l\geq 2\), where \(\langle \cdot, \cdot \rangle \) denotes the usual inner product in \(\mathbb{R}^{N}\), that

$$\begin{aligned} \langle Tu-Tv,u-v \rangle > 0\quad \text{for all } u,v \in W_{0}^{1, \overrightarrow{p(x)}}( \Omega ) \text{ with } u\neq v. \end{aligned}$$

Consider \((u_{n}) \subset W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) a sequence with \(\|u_{n}\|\to +\infty \). As in the proof of [21, Theorem 36], for each \(i\in \{1,\ldots,N\}\) and \(n \in \mathbb{N}\), we define

$$\begin{aligned} \alpha _{i,n}:= \textstyle\begin{cases} p^{+}_{+}& \text{if } \Vert \frac{\partial u_{n}}{\partial x_{i}} \Vert _{p_{i} (x)} \leq 1, \\ p^{-}_{-}& \text{if } \Vert \frac{\partial u_{n}}{\partial x_{i}} \Vert _{p_{i} (x)} > 1. \end{cases}\displaystyle \end{aligned}$$

Since \((a_{1} +\cdots + a_{N})^{\beta } \leq C(a^{\beta }_{1} +\cdots + a^{\beta }_{N})\) for \(\beta \geq 1\) and \(a_{i} \geq 0, i=1,\ldots,N\), for some constant C, we have

$$\begin{aligned} \int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial u_{n}}{\partial x_{i}} \biggr\vert ^{p_{i} (x)} \geq {}&\sum _{i=1}^{N} \biggl\Vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\Vert ^{\alpha _{i,n}}_{p_{i} (x)} \\ \geq{}& C_{1} \biggl( \sum _{\{i; \alpha _{i,n} = p_{+}^{+} \}} \biggl\Vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\Vert _{p_{i} (x)} \biggr)^{p_{+}^{+}} \\ \geq {}&C_{1} \biggl( \sum_{\{i; \alpha _{i,n} = p_{+}^{+} \}} \biggl\Vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\Vert _{p_{i} (x)} \biggr)^{p_{+}^{+}} + C_{2} \biggl( \sum_{\{i; \alpha _{i,n} = p_{-}^{-}\}} \biggl\Vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\Vert _{p_{i} (x)} \biggr)^{p_{-}^{-}} \\ &{}+ C_{2} \biggl( \sum_{\{i; \alpha _{i,n} = p_{+}^{+} \}} \biggl\Vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\Vert _{p_{i} (x)} \biggr)^{p_{-}^{-}} - C_{2} \biggl( \sum_{\{i; \alpha _{i,n} = p_{+}^{+}\}} \biggl\Vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\Vert _{p_{i} (x)} \biggr)^{p_{-}^{-}} \\ \geq{}& C_{3} \Vert u \Vert ^{p_{-}^{-}} - N, \end{aligned}$$
(3.2)

where \(C_{1},C_{2},C_{3} >0\) are constants that do not depend on \(n \in \mathbb{N}\). Therefore

$$\begin{aligned} \lim_{n \rightarrow +\infty } \frac{ \langle Tu_{n},u_{n} \rangle}{ \Vert u_{n} \Vert } = +\infty. \end{aligned}$$

Thus, it follows from the Minty–Browder theorem [26, Theorem 5.16] that there is a unique function \(u \in W_{0}^{1,\overrightarrow{p(x)}}(\Omega )\) such that \(Tu=a\). □

Lemma 3.2

Let \(u,v \in W_{0}^{1,\overrightarrow{p(x)}}(\Omega )\) satisfy

$$\begin{aligned} \textstyle\begin{cases} - \sum^{N}_{i=1}\frac{\partial }{\partial x_{i}} ( \vert \frac{\partial u}{\partial x_{i}} \vert ^{p_{i} (x)-2} \frac{\partial u}{\partial x_{i}} ) \leq - \sum^{N}_{i=1} \frac{\partial }{\partial x_{i}} ( \vert \frac{\partial v}{\partial x_{i}} \vert ^{p_{i} (x)-2} \frac{\partial v}{\partial x_{i}} ) & \textit{in } \Omega, \\ u\leq v& \textit{on } \partial \Omega, \end{cases}\displaystyle \end{aligned}$$

where \(u \leq v\) on Ω means that \((u-v)^{+}:= \max \{0,u-v\} \in W^{1,\overrightarrow{p}(x)}_{0} ( \Omega )\). Then \(u(x)\leq v(x)\) a.e. in Ω.

Proof

Using the test function \(\phi = (u-v)^{+}:=\max \{u-v,0\}\in {W_{0}^{1,\overrightarrow{p}(x)}( \Omega )}\), it follows that

$$\begin{aligned} \int _{\Omega \bigcap [u>v]}\sum^{N}_{i=1} \biggl( \biggl\vert \frac{\partial u }{\partial x_{i}} \biggr\vert ^{p_{i}-2} \frac{\partial u }{\partial x_{i}}- \biggl\vert \frac{\partial v }{\partial x_{i}} \biggr\vert ^{p_{i}-2} \frac{\partial v }{\partial x_{i}} \biggr) \biggl( \frac{\partial u }{\partial x_{i}}-\frac{\partial v }{\partial x_{i}} \biggr) \leq 0 \end{aligned}$$

for \(x, y \in \mathbb{R}^{N}\). Thus, it follows from (3.1) that

$$\begin{aligned} \int _{ \Omega } \biggl\vert \frac{\partial }{\partial x_{i}} (u - v)^{+} \biggr\vert ^{p_{i}(x)}=0 \end{aligned}$$

for \(i=1,\ldots,N\), which allows to conclude that \(\frac{\partial }{\partial x_{i}} (u - v)^{+}(x) =0 \) a.e. in Ω for \(i=1,\ldots,N\). Applying (2.3) we obtain that \((u - v)^{+}(x) =0\) a.e. in Ω, which finishes the proof of the result. □

4 An auxiliary \(L^{\infty }\) estimate

Consider \(\Omega \subset \mathbb{R}^{N} (N \geq 2 )\) to be an admissible and bounded domain, that is, there exists a continuous embedding \(W^{1,1}_{0}(\Omega ) \hookrightarrow L^{\frac{N}{N-1}}(\Omega )\). The best constant of such an embedding will be denoted by \(C_{0}\), which depends on only Ω and N. Then it follows that

$$\begin{aligned} \Vert u \Vert _{W^{1,1}_{0}(\Omega )} \leq C_{0} \Vert u \Vert _{L^{\frac{N}{N-1}}}( \Omega ) \end{aligned}$$
(4.1)

for all \(u \in W^{1,1}_{0}(\Omega )\), where \(\| u\|_{W^{1,1}_{0} (\Omega )}: = \| \!|\nabla u|\!\|_{L^{1}}\). Adapting the ideas of [27, Lemma 4.1], we obtain an \(L^{\infty }\) estimate that will be applied in the construction of appropriate sub-supersolutions, which is provided below.

Lemma 4.1

Consider \(\lambda >0\) and \(u_{\lambda } \in W^{1,\overrightarrow{p(x)}}_{0} (\Omega )\) to be the unique solution of the problem

figure b

Consider \(h:= \frac{p^{-}_{-}}{2 |\Omega |^{\frac{1}{N}}} C_{0} \). If \(\lambda \geq h\), then \(u \in L^{\infty }(\Omega )\) with \(\| u\|_{L^{\infty }(\Omega )} \leq C^{\star } \lambda ^{ \frac{1}{p^{-}_{-}-1}}\) and \(\| u\|_{L^{\infty }(\Omega )} \leq C_{\star } \lambda ^{ \frac{1}{p^{+}_{+} -1}}\) when \(\lambda < h\), where \(C^{\star }\) and \(C_{\star }\) are positive constants which depend only on \(\Omega, N\) and \(p_{i},i=1,\ldots,N\).

Proof

Note that \(u_{\lambda }\) is a nonnegative function with \(u\not \equiv 0 \). Consider \(k \geq 0\) and define the set \(A_{k}:= \{x \in \Omega; u(x)>k\}\). Let \(0<\epsilon <1\). Applying in \((P_{\lambda })\) the test function \((u-k)^{+} \in W^{1,\overrightarrow{p(x)}}_{0} (\Omega )\), we obtain from (4.1) and Young’s inequality that

$$\begin{aligned} &\int _{A_{k}} \sum_{i=1}^{N} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i} (x)} \,dx \\ & \quad= \lambda \int _{A_{k}} (u-k) \,dx \\ &\quad\leq \lambda \vert A_{k} \vert ^{\frac{1}{N}} \bigl\Vert (u-k)^{+} \bigr\Vert _{L^{\frac{N}{N-1}}( \Omega )} \\ &\quad\leq \lambda \vert A_{k} \vert ^{\frac{1}{N}}C_{0} \int _{A_{k}} \vert \nabla u \vert \,dx \\ &\quad\leq \lambda \vert A_{k} \vert ^{\frac{1}{N}} C_{0} \int _{A_{k}} \sum_{i=1}^{N} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert \,dx \\ &\quad\leq \lambda \vert A_{k} \vert ^{\frac{1}{N}} C_{0} \sum_{i=1}^{N} \int _{A_{k}} \frac{ ( \vert \epsilon \frac{\partial u}{\partial x_{i}} \vert )^{p_{i}(x)}}{p_{i}(x)} \,dx + \lambda \vert A_{k} \vert ^{\frac{1}{N}} C_{0} \sum _{i=1}^{N} \int _{A_{k}} \frac{(\epsilon ^{-1})^{(p_{i}(x))^{\prime }}}{{(p_{i}(x))}^{\prime }} \,dx. \end{aligned}$$
(4.2)

We have that

$$\begin{aligned} \lambda \vert A_{k} \vert ^{\frac{1}{N}}C_{0} \sum_{i=1}^{N} \int _{A_{k}} \frac{ ( \epsilon \vert \frac{\partial u }{\partial x_{i}} \vert )^{p_{i}(x)}}{p_{i}(x)}& \leq \frac{\lambda \vert A_{k} \vert ^{\frac{1}{N}}C_{0}}{p^{-}_{-}} \sum _{i=1}^{N} \int _{A_{k}} \epsilon ^{p^{-}_{-}} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i}(x)} \,dx \\ &\leq \frac{\lambda \vert \Omega \vert ^{\frac{1}{N}}C_{0}}{p^{-}_{-}} \sum_{i=1}^{N} \int _{A_{k}} \epsilon ^{p^{-}_{-}} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i}(x)} \,dx, \end{aligned}$$

where \(p_{-} \) was defined in (2.1). Consider \(h:= \frac{p^{-}_{-}}{2|\Omega |^{\frac{1}{N}} C_{0}}\) and suppose that \(\lambda \geq h\). Define

$$\begin{aligned} \epsilon:= \biggl( \frac{p^{-}_{-}}{2 \lambda \vert \Omega \vert ^{\frac{1}{N}} C_{0}} \biggr)^{ \frac{1}{p^{-}_{-}}}. \end{aligned}$$

We have \(\epsilon \leq 1 \) and

$$\begin{aligned} \frac{\lambda \vert \Omega \vert ^{\frac{1}{N}}C_{0}}{p^{-}_{-}} \sum_{i=1}^{N} \int _{A_{k}} \epsilon ^{p^{-}_{-}} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i} (x)} \,dx & \leq \frac{\lambda \vert \Omega \vert ^{\frac{1}{N}}C_{0} \epsilon ^{p^{-}_{-}}}{p^{-}_{-}} \sum_{i=1}^{N} \int _{A_{k}} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i} (x)} \,dx \\ & = \frac{1}{2} \sum_{i=1}^{N} \int _{A_{k}} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i} (x)} \,dx. \end{aligned}$$
(4.3)

Thus it follows from (4.2) and (4.3) that

$$\begin{aligned} \sum_{i=1}^{N} \int _{A_{k}} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i} (x)} \,dx \leq {}& \frac{2\lambda \vert A_{k} \vert ^{\frac{1}{N}}C_{0}}{(p^{+}_{+})^{\prime }}\sum_{i=1}^{N} \int _{A_{k}} \epsilon ^{-(p^{-}_{-} )^{\prime }} \,dx \\ \leq {}& \gamma \vert A_{k} \vert ^{1 +\frac{1}{N}}, \end{aligned}$$

where

$$\begin{aligned} \gamma:= \frac{2 N \epsilon ^{-(p^{-}_{-})^{\prime }}C_{0}}{(p^{+}_{+})^{\prime }}, \end{aligned}$$

which provides that

$$\begin{aligned} \int _{A_{k}} (u-k) \,dx = \frac{1}{\lambda } \sum _{i=1}^{N} \int _{A_{k}} \biggl\vert \frac{\partial u }{\partial x_{i}} \biggr\vert ^{p_{i}} \,dx \leq \gamma \vert A_{k} \vert ^{1 + \frac{1}{N}}. \end{aligned}$$

From the \(L^{\infty }\) estimates in [28, Lemma 5.1-Chap. 2], we obtain that

$$\begin{aligned} \Vert u \Vert _{L^{\infty }(\Omega )} \leq{} & \gamma (N+1) \vert \Omega \vert ^{ \frac{1}{N}} \\ ={}&C^{\star }\lambda ^{\frac{1}{p^{-}_{-} -1}}, \end{aligned}$$

where \(C^{\star }\) is a constant that does not depend on \(u_{\lambda }\). If \(\lambda < h\), then the result follows by applying the previous arguments with

$$\begin{aligned} \epsilon:= \biggl( \frac{p^{-}_{-}}{2 \lambda \vert \Omega \vert ^{\frac{1}{N}} C_{0}} \biggr)^{ \frac{1}{p^{+}_{+}}}. \end{aligned}$$

 □

5 Proof of Theorem 1.1

Below we describe the notion of sub-supersolution that will be considered for \((P)\) and a related result.

It will be considered that \((\underline{u}, \overline{u}) \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega ) \times W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) is a sub-supersolution pair for \((P)\) if \(\underline{u}\) and belong to \(L^{\infty }(\Omega )\), \(0 < \underline{u}(x) \leq \overline{u}(x)\) a.e. in Ω and

$$\begin{aligned} &\int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial \underline{u}}{\partial x_{i}} \biggr\vert ^{p_{i} (x) -2} \frac{\partial \underline{u}}{\partial x_{i}} \frac{\partial \varphi }{\partial x_{i}} \leq \int _{\Omega } a(x){ \underline{u}}^{\alpha (x)-1} \varphi + \int _{\Omega } f(x, \underline{u}) \varphi, \\ &\int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial \overline{u}}{\partial x_{i}} \biggr\vert ^{p_{i} (x) -2} \frac{\partial \overline{u}}{\partial x_{i}} \frac{\partial \varphi }{\partial x_{i}} \geq \int _{\Omega } a(x){ \overline{u}}^{\alpha (x)-1} \varphi + \int _{\Omega } f(x, \overline{u}) \varphi \end{aligned}$$
(5.1)

for all \(\varphi \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) with \(\varphi (x) \geq 0\) a.e. in Ω.

Lemma 5.1

Consider that hypotheses \((H)\) and \((f_{1})\)\((f_{2})\) hold. There is \(\iota >0\) such that if \(\|a\|_{L^{\infty }(\Omega )}< \iota \), then \((P)\) has a sub-supersolution pair \((\underline{u},\overline{u}) \in (W^{1,\overrightarrow{p(x)}}_{0}( \Omega ) \cap L^{\infty }(\Omega )) \times (W^{1,\overrightarrow{p(x)}}_{0}( \Omega ) \cap L^{\infty }(\Omega ))\) with \(\|\underline{u}\|_{\infty }\leq \delta \), where δ is provided in \((f_{1})\).

Proof

From Lemmas 3.1 and 4.1, there are unique nonnegative solutions \(\underline{u}, \overline{u} \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega ) \cap L^{\infty }(\Omega )\), respectively, for

$$\begin{aligned} \begin{aligned} &\textstyle\begin{cases} - \sum^{N}_{i=1}\frac{\partial }{\partial x_{i}} ( \vert \frac{\partial \underline{u}}{\partial x_{i}} \vert ^{p_{i} (x)-2}\frac{\partial \underline{u}}{\partial x_{i}} ) = a(x)& \text{in } \Omega, \\ \underline{u}= 0 &\text{on } \partial \Omega, \end{cases}\displaystyle \\ &\text{and} \\ &\textstyle\begin{cases} - \sum^{N}_{i=1}\frac{\partial }{\partial x_{i}} ( \vert \frac{\partial \overline{u}}{\partial x_{i}} \vert ^{p_{i} (x)-2}\frac{\partial \overline{u}}{\partial x_{i}} ) = 1 +a(x)& \text{in } \Omega, \\ \overline{u}= 0 & \text{on } \partial \Omega, \end{cases}\displaystyle \end{aligned} \end{aligned}$$
(5.2)

such that \(\|\underline{u}\|_{\infty } \leq \max \{C^{\star }\| a\|^{ \frac{1}{p^{-}_{-}-1}}_{\infty },C_{\star }\| a\|^{ \frac{1}{p^{+}_{+}-1}}_{\infty }\}\), where \(C^{\star },C_{\star }>0\) are the constants given in Lemma 4.1. Thus, there is \(\eta >0\), which depends only on \(C^{\star }\) and \(C_{\star }\), such that \(\|\underline{u}\|_{\infty }\leq \delta /2\) for \(\|a\|_{\infty }<\eta \). From Lemma 3.2 we have \(0< \underline{u}(x) \leq \overline{u}(x)\) a.e. in Ω.

Let \(\phi \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) be such that \(\phi (x) \geq 0\) a.e. in Ω. Applying \((f_{1})\) and (5.2) we obtain that

$$\begin{aligned} & \int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial \underline{u}}{\partial x_{i}} \biggr\vert ^{p_{i} (x) -2} \frac{\partial \underline{u}}{\partial x_{i}} \frac{\partial \phi }{\partial x_{i}} - \int _{\Omega } a(x) { \underline{u}}^{\alpha (x)-1} \phi - \int _{\Omega } f( x, \underline{u})\phi \\ &\quad\leq \int _{\Omega } a (x) \phi- \int _{\Omega } a (x) \underline{u}^{\alpha (x)-1} \phi - \int _{ \Omega } \bigl(1-\underline{u}^{\alpha (x)-1} \bigr)a(x)\phi \\ &\quad=0. \end{aligned}$$

From \((f_{2})\) we have

$$\begin{aligned} \int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial \overline{u}}{\partial x_{i}} \biggr\vert ^{p_{i} (x) -2} \frac{\partial \overline{u}}{\partial x_{i}} \frac{\partial \phi }{\partial x_{i}} - \int _{\Omega } a(x) \overline{u}^{\alpha (x)-1} \phi - \int _{\Omega } f( x,\overline{u}) \phi \geq \int _{\Omega } \bigl( 1- K \Vert a \Vert _{\infty } \bigr) \phi, \end{aligned}$$

where \(K:=\max \{ \|\overline{u}\|^{\alpha ^{+}}_{\infty },\|\overline{u}\|^{ \alpha ^{-}}_{\infty }\} +\max \{ \|\overline{u}\|^{r^{+}-1}_{\infty }, \|\overline{u}\|^{r^{-}-1}_{\infty }\}\). Considering, if necessary, \(\iota >0\) smaller such that \(K\|a\|_{\infty }\leq 1\) for \(\|a\|_{\infty }<\iota \), it follows that the right-hand side in the last inequality is nonnegative, which provides the result. □

Proof of Theorem 1.1

Consider the functions \(\underline{u}, \overline{u} \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega )\) defined in Lemma 5.2. Define

$$\begin{aligned} w(x,t)=\textstyle\begin{cases} a(x){\overline{u}}^{\alpha (x)-1} + f(x,\overline{u}(x)), & t> \overline{u}(x), \\ a(x)t^{\alpha (x)-1} + f(x,t), & \underline{u}(x)\leq t\leq \overline{u}(x), \\ a(x){\underline{u}}^{\alpha (x)-1} + f(x,\underline{u}(x)), & t < \underline{u}(x), \end{cases}\displaystyle \end{aligned}$$

for \((x,t) \in \Omega \times \mathbb{R}\) and the problem

$$\begin{aligned} \textstyle\begin{cases} - \sum^{N}_{i=1}\frac{\partial }{\partial x_{i}} ( \vert \frac{\partial u}{\partial x_{i}} \vert ^{p_{i} (x)-2} \frac{\partial u}{\partial x_{i}} ) = w(x,u)& \text{in } \Omega, \\ u = 0 & \text{on } \partial \Omega, \end{cases}\displaystyle \end{aligned}$$

whose solutions are the critical points of the \(C^{1}\) functional defined by

$$\begin{aligned} J(u):= \int _{\Omega } \sum_{i=1}^{N} \frac{1}{p_{i}(x)} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i}(x)} - \int _{ \Omega } W(x,u) \,dx,\quad u \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega ), \end{aligned}$$
(5.3)

where \(W(x,t):= \int _{0}^{t}w(x,s) \,ds\). Note that J is coercive and sequentially weakly lower semicontinuous. We have that \(K:= \{u \in W^{1,\overrightarrow{p(x)}}_{0} (\Omega ); \underline{u} (x) \leq u(x) \leq \overline{u}(x) \text{ a.e. in } \Omega \}\) is closed and convex and hence weakly closed in \(W^{1,\overrightarrow{p(x)}}_{0} (\Omega )\). Thus, it follows that \(J{ |}_{K}\) attains its minimum at some \(u_{0} \in K\). Reasoning as in [29, Theorem 2.4], we get \(J^{\prime }(u_{0})=0\), which provides the result. □

6 Proof of Theorem 1.2

Consider \(\underline{u} \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) given in Lemma 5.1 and the function

$$\begin{aligned} h(x,t)=\textstyle\begin{cases} a(x) t^{\alpha (x)-1} + f(x,t), & t\geq \underline{u}(x), \\ a(x){\underline{u}(x)}^{\alpha (x)-1} + f(x,\underline{u}(x)) & t < \underline{u}(x), \end{cases}\displaystyle \end{aligned}$$

and the auxiliary problem

$$\begin{aligned} \textstyle\begin{cases} - \sum^{N}_{i=1}\frac{\partial }{\partial x_{i}} ( \vert \frac{\partial u}{\partial x_{i}} \vert ^{p_{i} (x)-2} \frac{\partial u}{\partial x_{i}} ) = h(x,u)& \text{in } \Omega, \\ u = 0 &\text{on } \partial \Omega, \end{cases}\displaystyle \end{aligned}$$

whose solutions are given by the critical points of the \(C^{1}\) functional

$$\begin{aligned} S(u):= \int _{\Omega } \sum_{i=1}^{N} \frac{1}{p_{i}(x)} \biggl\vert \frac{\partial u}{\partial x_{i}} \biggr\vert ^{p_{i}(x)} - \int _{\Omega } H(x,u), \quad u \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega ), \end{aligned}$$

where \(H(x,t):= \int _{0}^{t}h(x,s) \,ds\).

Lemma 6.1

The functional S satisfies the Palais–Smale condition.

Proof

Consider \((u_{n}) \subset W^{1,\overrightarrow{p(x)}}_{0}(\Omega ) \) to be a sequence with \(S^{\prime }(u_{n})\rightarrow 0\) and \(S(u_{n})\rightarrow c\) for some \(c \in \mathbb{R}\).

We will start by considering the case \(p^{+}_{+} < \alpha ^{-}\). Note that \((f_{3})\) holds for \(\widetilde{\theta } >0\) such that \(p^{+}_{+} < \widetilde{\theta }<\min \{\alpha ^{-},\theta \}\). Reasoning as in (3.2) and applying \((f_{2})\)\((f_{3})\), the boundedness of \(\underline{u}\), and the continuous embedding \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega ) \hookrightarrow L^{1} ( \Omega )\), we obtain positive constants \(C_{1}, C_{2}, C_{3}>0\) such that

$$\begin{aligned} C_{1} + \Vert u_{n} \Vert &\geq S(u_{n}) - \frac{1}{\widetilde{\theta }} S^{ \prime }(u_{n})u_{n} \\ & \geq C_{2} \Vert u_{n} \Vert ^{p^{-}_{-}} + \int _{\{u_{n} \geq \underline{u}\}} \biggl(\frac{1}{\widetilde{\theta }} - \frac{1}{\alpha (x)} \biggr)a(x) {u_{n}}^{\alpha (x)}-C_{3} \Vert u_{n} \Vert \\ & \geq C_{2} \Vert u_{n} \Vert ^{p^{-}_{-}} -C_{3} \Vert u_{n} \Vert , \end{aligned}$$

which provides the boundedness of \((u_{n})\) in \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\).

In the case \(\alpha ^{+} < p^{-}_{-}\) we can apply \((f_{2})\), \((f_{3})\), Proposition 2.1, the boundedness of \(\underline{u}\), and the continuous embedding \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega ) \hookrightarrow L^{1} ( \Omega ) \) to obtain that

$$\begin{aligned} C_{1} + \Vert u_{n} \Vert & \geq S(u_{n}) - \frac{1}{\theta } S^{\prime }(u_{n})u_{n} \\ &\geq C_{2} \Vert u_{n} \Vert ^{p^{-}_{-}} - C_{4} \int _{\Omega }{ \vert u_{n} \vert }^{ \alpha (x)}-C_{3} \Vert u_{n} \Vert \\ & \geq C_{2} \Vert u_{n} \Vert ^{p^{-}_{-}}- C_{4} \max \bigl\{ \Vert u_{n} \Vert ^{\alpha ^{-}}_{ \alpha (x)}, \Vert u_{n} \Vert ^{\alpha ^{+}}_{\alpha (x)} \bigr\} -C_{3} \Vert u_{n} \Vert , \end{aligned}$$

where \(C_{1},C_{2},C_{3}, C_{4} >0\) are constants. Applying the embedding \(W^{1,p(x)}_{0}(\Omega ) \hookrightarrow L^{\alpha (x)}(\Omega )\), we have

$$\begin{aligned} C_{1} + \Vert u_{n} \Vert +C_{3} \Vert u_{n} \Vert +C_{5} \max \bigl\{ \Vert u_{n} \Vert ^{\alpha ^{+}}, \Vert u_{n} \Vert ^{\alpha ^{-}} \bigr\} \geq C_{2} \Vert u_{n} \Vert ^{p^{-}_{-}}. \end{aligned}$$

Since \(\alpha ^{+} < p^{-}_{-}\), we obtain that \((u_{n})\) is bounded in \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\).

Thus, up to a subsequence, we get

$$\begin{aligned} \textstyle\begin{cases} u_{n} \rightharpoonup u &\text{in } W^{1,\overrightarrow{p(x)}}_{0}( \Omega ), \\ u_{n}(x) \rightarrow u(x) & \text{a.e. in } \Omega, \\ u_{n} \rightarrow u & \text{in } L^{\nu (x)}(\Omega ), \end{cases}\displaystyle \end{aligned}$$
(6.1)

for all \(\nu \in C(\overline{\Omega })\) with \(1 < \nu ^{-}\leq \nu ^{+} < p^{-}_{\infty }\) and some \(u \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\). Combining (6.1) and Lebesgue’s dominated convergence theorem it follows that

$$\begin{aligned} \int _{\Omega } \biggl( \biggl\vert \frac{\partial u_{n} }{\partial x_{i}} \biggr\vert ^{p_{i}-2}\frac{\partial u_{n} }{\partial x_{i}}- \biggl\vert \frac{\partial u }{\partial x_{i}} \biggr\vert ^{p_{i}-2} \frac{\partial u }{\partial x_{i}} \biggr) \biggl( \frac{\partial u_{n} }{\partial x_{i}}- \frac{\partial u }{\partial x_{i}} \biggr) \rightarrow 0, \end{aligned}$$

which provides the result. □

Lemma 6.2

Consider that \((H)\), \((f_{1})\)\((f_{3})\) hold. If \(\|a\|_{L^{\infty }(\Omega )}\) is small enough, then the claims below hold.

  1. (i)

    There are constants \(R, \lambda >0\) with \(R > \|\underline{u}\|\) such that

    $$\begin{aligned} S(\underline{u}) < 0 < \lambda \leq \inf_{u \in \partial B_{R}(0)} S(u). \end{aligned}$$
  2. (ii)

    There is \(e \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega ) \setminus \overline{B_{2R}(0)}\) with \(S(e) < \lambda \).

Proof

From (5.1) and since \(p^{-}_{-}>1\), we have \(S(\underline{u}) <0\). Consider \(u \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) with \(\| u\| \geq 1 \). Arguing as in (3.2), applying Proposition 2.1 and the continuous embedding \(W^{1,\overrightarrow{p(x)}}_{0}(\Omega ) \hookrightarrow L^{\alpha (x)}( \Omega )\), we obtain that

$$\begin{aligned} L(u) \geq K_{1} \Vert u \Vert ^{p^{-}_{-}} - K_{2} \Vert u \Vert - K_{3} \Vert a \Vert _{ \infty } \bigl( \Vert u \Vert ^{\alpha ^{+}} + \Vert u \Vert ^{r^{+}} \bigr) - K_{4} \end{aligned}$$

for positive constants \(K_{1}, K_{2}, K_{3}, K_{4}>0\). If necessary, decrease \(\| a\|_{\infty }\) in such a way that \(\| \underline{u}\|< 1\), which is possible by considering the test functions \(\phi = \underline{u}\) in (5.1) and applying Lemma 4.1. Consider \(\lambda >0\) and fix \(R> 1 \) such that \(K_{1} R^{p^{-}_{-}} - K_{2} R - K_{4} \geq 2\lambda \). Considering \(\|a\|_{\infty }\) small enough satisfying \(K_{3} \|a\|_{\infty } ( R^{\alpha ^{+}} + R^{r^{+}})\leq \lambda \), it follows that \(L(u)\geq \lambda \) for all \(u \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) with \(\| u\|=R\), which finishes the proof of (i).

With respect to (ii), note that \((f_{3})\) implies the existence of constants \(C_{1}, C_{2}, C_{3}, C_{4}>0\) and \(t>0\) such that \(S(t\underline{u}) \leq C_{1} t^{p^{+}_{+}} - C_{2}t^{\alpha ^{-}} - C_{3} t^{\theta } + C_{4} <0\) with \(\| t \underline{u}\| > 2R\). □

Proof of Theorem 1.2

Consider \(\underline{u}, \overline{u} \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega )\) given in Lemma 5.1 and \(u_{1} \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) the solution of \((P)\) obtained in Theorem 1.1, which provides the minimum of \(J\vert _{K}\), where

$$\begin{aligned} K:= \bigl\{ u \in W^{1,\overrightarrow{p(x)}}_{0} (\Omega ); \underline{u} (x) \leq u(x) \leq \overline{u}(x) \text{ a.e. in } \Omega \bigr\} \end{aligned}$$

and J is the functional defined in (5.3). From Lemmas 6.1 and 6.2 we obtain that the hypotheses of the mountain pass theorem [30, Theorem 2.1] are satisfied by S. Therefore

$$\begin{aligned} c:= \inf_{\gamma \in \Gamma } \max_{t \in [0,1]} S \bigl(\gamma (t) \bigr), \quad\text{where } \Gamma:= \bigl\{ \gamma \in C \bigl([0,1], W^{1, \overrightarrow{p(x)}}_{0}(\Omega ) \bigr); \gamma (0)= \underline{u}, \gamma (1)=e \bigr\} , \end{aligned}$$

is a critical value of S, that is, \(S^{\prime }(u_{2} ) = 0\) and \(L(u_{2})=c\) for some \(u_{2} \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\). Note that \(J(u)=S(u)\) for \(u \in \{w \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega ); 0\leq w(x) \leq \overline{u}(x) \text{ a.e. in } \Omega \}\). Thus, \(S(u_{1}) = \inf_{u \in K} J(u)\). If \(u_{2} (x)\geq \underline{u}(x)\) a.e. in Ω, it follows that problem \((P)\) has two weak solutions \(u_{1},u_{2} \in W^{1,\overrightarrow{p(x)}}_{0}(\Omega )\) with \(S(u_{1})\leq S(\underline{u})<0<\lambda \leq c:= S(u_{2})\), where \(\lambda >0\) was provided in Lemma 6.2.

We claim that \(u_{2} (x)\geq \underline{u}(x)\) a.e. in Ω. In fact, by considering the function \((\underline{u} - u_{2})^{+} \in W^{1,\overrightarrow{p(x)}}_{0}( \Omega )\), we get

$$\begin{aligned} \int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial u_{2}}{\partial x_{i}} \biggr\vert ^{p_{i}(x)-2} \frac{\partial u_{2}}{\partial x_{i}} \frac{(\underline{u} - u_{2})^{+}}{\partial x_{i}} & = \int _{\Omega } h(x,u_{2}) ( \underline{u} - u_{2})^{+} \\ &= \int _{\Omega } \bigl(a(x){\underline{u}(x)}^{\alpha (x)-1} + f \bigl(x, \underline{u}(x) \bigr) \bigr) (\underline{u} - u_{2})^{+} \\ & \geq \int _{\Omega } \sum_{i=1}^{N} \biggl\vert \frac{\partial \underline{u}}{\partial x_{i}} \biggr\vert ^{p_{i}(x)-2} \frac{\partial \underline{u}}{\partial x_{i}} \frac{\partial (\underline{u} - u_{2})^{+}}{\partial x_{i}}. \end{aligned}$$

Thus, it follows from (3.1) that

$$\begin{aligned} \int _{ \Omega } \biggl\vert \frac{\partial }{\partial x_{i}} (\underline{u} - u_{2})^{+} \biggr\vert ^{p_{i}(x)}=0 \end{aligned}$$

for \(i=1,\ldots,N\), which implies that \(\frac{\partial }{\partial x_{i}} (\underline{u} - u_{2})^{+}(x) =0 \) a.e. in Ω for \(i=1,\ldots,N\). From Proposition 2.1 and (2.3) we have \((\underline{u} - u_{2})^{+}(x) =0\) a.e. in Ω, which proves the claim. □