1 Introduction and Statement of Main Results

In this paper, we are concerned with the following equation

$$\begin{aligned}&\big ( \mathcal {P} \big ) -\text {div}\big ( |\nabla u |^{p(x)-2} \nabla u\big ) + |u|^{p(x)-2} u + \sum _{j=1}^{N} u.\frac{\partial u}{\partial x_j } \bigg ( \sum _{i\ne j}^{} |u|^{\alpha (x_i)-2} \bigg ) \\&\qquad = \lambda f(x,u) + h(x) \ \ \text {in } \mathbb {R}^N, \end{aligned}$$

\(N\ge 3,\) where p is some Lipschitz continuous function such that

$$\begin{aligned} 2<p^{-}= \inf _{x \in \mathbb {R}^N} p(x)\le p^{+}= \sup _{x \in \mathbb {R}^N}p(x)<N. \end{aligned}$$

Clearly, the Lipschitz-continuity of the function p implies

$$\begin{aligned} |p(x)-p(y)| \le \frac{C}{-\log |x-y|}, \ \forall \ |x-y|\le \frac{1}{2}. \end{aligned}$$

where C is some positive constant. That last property guarantees the density of \( C_0^{\infty }( \mathbb {R}^N) \) in \( W^{1,p(x)}( \mathbb {R}^N). \)

The problem \(\big ( \mathcal {P} \big )\) is taken under the following assumptions:

\((H_1)\):

\(\alpha \in \mathcal {C}(\mathbb {R})\cap L^\infty (\mathbb {R})\) is such that

$$\begin{aligned} p^+ -1 \le \alpha ^-= \inf _{x \in \mathbb {R}} \alpha (x) \le \alpha ^+ = \sup _{x \in \mathbb {R}} \alpha (x) \le \frac{N(p^--1)}{N-p^+}. \end{aligned}$$
\((H_2)\):

\(f: \mathbb {R}^N \times \mathbb {R}\longrightarrow \mathbb {R}\) is a measurable function such that there exist \(g \in L^{\infty }(\mathbb {R}^N), \ g(x) \ge 0 \) a.e. \( x \in \mathbb {R}^N\) and \(\beta \in \mathcal {C}(\mathbb {R}^N)\cap L^{\infty }(\mathbb {R}^N)\), \( \beta (x) \le p^*(x) = \frac{N p(x)}{N- p(x)} \) satisfying

$$\begin{aligned} |f(x,s) | \le g(x) |s|^{\beta (x)-1} \text {a.e. } x \in \mathbb {R}^N,\ \forall \ s \in \mathbb {R}. \end{aligned}$$

We also assume that \(f(x, s) = 0, \) a.e. \( x \in \mathbb {R}^N,\ \forall \ s \le 0,\) and \( f(x,s) \ge 0, \) a.e. \( x \in \mathbb {R}^N,\ \forall \ s \ge 0. \)

\((H_3 )\):

There exist two open nonempty sets \(\Omega _1\) and \(\Omega _2\) of \( \mathbb {R}^N \) such that

$$\begin{aligned} \displaystyle \inf _{x \in \overline{\Omega _1}} \bigg ( \frac{p(x)}{\beta (x)} \bigg )>1, \ \inf _{x \in \overline{\Omega _2}} \bigg ( \frac{\beta (x)}{p(x)} \bigg ) >1, \text { and } g(x)=0 \text { a.e. } x \in \big ( \Omega _1 \cup \Omega _2\big )^c . \end{aligned}$$
\((H_4)\):

\(h \in \big (W^{1, p(x)} (\mathbb {R}^N)\big )^*\setminus \{0\}, \ h \ge 0 \ ( \text { i.e. } \langle h ,u\rangle \ge 0, \ \forall u \in W^{1, p(x)} (\mathbb {R}^N),\ u \ge 0).\)

\((H_5)\):

\( \displaystyle \int _{\Omega _1}^{} \big ( g(x)\big ) ^{\frac{p(x)}{p(x) - \beta (x)}} \mathrm{d}x< + \infty , \) \(\Omega _2\) is bounded.

Nowadays, the importance of the study of quasilinear problems with variable exponents is becoming a confirmed fact. The same can be said about the motivation of this attention in such types of problems which mainly relies on their various applications in many challenging mathematical problems. One of the most studied models leading to problems of this type is the model of the motion of electrorheological fluids, which are distinguished by their capacity to drastically alteration of the mechanical properties under the influence of an exterior electromagnetic field (see [20, 24]). Starting with the period of the study of the topological and geometrical properties of the Lebesgue and Sobolev spaces with variable exponents and passing by the intensive period of extension of all the results of existence, multiplicity and regularity which are known for the case of constant exponents to the case of variable exponents, the mathematical literature concerning this topic of research is becoming more and more huge. One of the main aspect of novelty in the present work is the division of \(\mathbb {R}^N\) into three sets \(\Omega _1 , \ \Omega _2 \) and \((\Omega _1 \cup \Omega _2)^c\) given by \((H_3).\) Plainly, this situation is new and very related to the presence of variable exponents since we cannot meet such a phenomenon in the constant exponent case.

Another significant point of interest in our work is the possibility of the nonlinear term to be merely measurable and not continuous. Thus, we can deal with the discontinuity of some terms in the equation. However, this situation is not new and it has been treated in some previous works. We can, for instance, cite [3, 4, 19, 21] for some works where the variable exponents case was considered. In those works and others, the authors used the nonsmooth critical point theory for locally Lipschitz functionals. In our work, assuming that the nonlinear term is nondecreasing, we will proceed differently.

Obviously, the problem \( (\mathcal {P}) \) has a similarity with the well-known Navier–Stokes equations arising in the fluid mechanics because of their role to modelize the motion of a compressible or incompressible viscous fluid. More precisely, in the evolutive case, this equation has the following parabolic form

$$\begin{aligned} \begin{array}{ccc} \frac{\partial u}{\partial t} - \nu \Delta u + \sum \limits _{i=1}^N u_i D_iu &{} = &{} f - \nabla p, \\ \text{ div }\ u &{} = &{} 0, \end{array} \end{aligned}$$
(1.1)

defined in some domain of \( \mathbb {R}^N,\ u = (u_1,\ldots , u_N) \) is the velocity (which is a vectorial quantity) of the fluid, \( \frac{\partial u}{\partial t} = \left( \frac{\partial u_1}{\partial t},\ldots , \frac{\partial u_N}{\partial t}\right) ,\ \Delta u = \left( \Delta u_1,\ldots , \Delta u_N\right) , \) and \( D_iu = \left( \frac{\partial u_1}{\partial x_i},\ldots , \frac{\partial u_N}{\partial x_i}\right) ,\ 1 \le i \le N, \) the constant \( \nu \) stands for the viscosity of the fluid, p its pressure (which is a scalar quantity) and f represents the exterior forces. The additional condition \( \text{ div }\ u = 0 \) describes the incompressibility of the fluid. In the stationary case, i.e when u does not depend on the time, Eq. (1.1) takes the new form

$$\begin{aligned} \begin{array}{ccc} - \nu \Delta u + \sum \limits _{i=1}^N u_i D_iu &{} = &{} f - \nabla p, \\ \text{ div }\ u &{} = &{} 0. \end{array} \end{aligned}$$
(1.2)

In [16], Lions proved some existence results for (1.1) as well as (1.2) using a Galerkin approximative scheme. This technique has been used later by Le Dret in [14] to study a much more simplified form of (1.2). In fact, in [14] the author assumed that u is no longer a vectorial function but a scalar one and he established the existence of at least one nontrivial solution to the equation

$$\begin{aligned} \left\{ \begin{array}{lll} - \Delta u + u \frac{\partial u}{\partial x_1} = f,\ \text{ in }\ \Omega ,\\ u = 0,\ \text{ on }\ \partial \Omega , \end{array} \right. \end{aligned}$$
(1.3)

where \( \Omega \) is some bounded domain of \( \mathbb {R}^N,\ N \ge 3. \)

In the present work, we continue to assume that u is a scalar function but we consider a quasilinear equation involving the p(x)-Laplacian operator in the whole Euclidean space \( \mathbb {R}^N,\ N \ge 3 \) and our problem \( (\mathcal {P}) \) seems to be a natural extension of (1.3) to the case of variable exponents.

This paper is divided into five sections. In the second section, we introduce some basic properties of the generalized Lebesgue and Sobolev spaces and several important properties which will be used in the proof of our main results. In the third section, we prove the existence and the uniqueness of a weak nontrivial and nonnegative solution of the problem \(\big ( \mathcal {P} \big )\) when the nonlinear term does not depend on the unknown function. That result has been reached using the theory of pseudomonotone operators. In the next section, we make use of the degree theory of operator of \((S_+)\) type to prove the existence of at least one nontrivial solution when f is a Carathéodory function, i.e. for a.e. \( x \in \mathbb {R}^N, \) the function \( s \longmapsto f(x,s) \) is continuous on \( \mathbb {R}. \) Moreover, f satisfies a subcritical growth condition. In the final section, assuming that f is nondecreasing but is not necessarily a Carathéodory function and using a new approach based on some fixed point theorem for Banach semilattice developed by Heikkilä in [12], we show that \(\big ( \mathcal {P} \big )\) has at least one nontrivial and nonnegative weak solution. Here, we have to mention that this last approach has been successfully used in many previous works (see, for instance, [1, 2, 5,6,7, 15]).

Definition 1.1

A function \(u \in W^{1, p(x)} (\mathbb {R}^N)\) is said to be a weak solution of the problem \(\big ( \mathcal {P} \big )\) if it satisfies

$$\begin{aligned} \int _{\mathbb {R}^N}^{}&\big ( |\nabla u |^{p(x)-2} \nabla u \nabla v + | u |^{p(x)-2} u v \big ) \mathrm{d}x + \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}uv \frac{\partial u}{\partial x_j} \sum _{i\ne j}^{} |u|^{\alpha (x_i)-2} \mathrm{d}x \\&= \int _{\mathbb {R}^N}^{}f(x,u) v \mathrm{d}x + \langle h,v \rangle , \ \forall v \in W^{1, p(x)} (\mathbb {R}^N). \end{aligned}$$

Observe that this definition makes sense (see (3.3) below). Denote by \(\Vert h\Vert _*\) the norm of h in \(\big (W^{1, p(x)} (\mathbb {R}^N)\big )^*\). The main results of the present work are given by the following two theorems.

Theorem 1.1

Assume that \((H_1)-(H_5)\) hold and \( f=0\). Then, the problem \(\big ( \mathcal {P} \big )\) admits a unique nontrivial and nonnegative weak solution.

Theorem 1.2

Assume that \((H_1)-(H_5)\) hold. We also assume that one of the following hypotheses hold:

  1. 1.

    f is of Carathéodory, that is for a.e. \(x\in \mathbb {R}^N,\) the function \(s\mapsto f(x,s)\) is continuous .

  2. 2.

    For a.e. \(x \in \mathbb {R}^N\), the function \(s\mapsto f(x,s)\) is nondecreasing .

Then, there exist \(\lambda _0 >0\) and \(h_0 >0\) such that for \(0< \lambda < \lambda _0\) and \(\Vert h\Vert _*< h_0,\) the problem \(\big ( \mathcal {P} \big )\) admits at least one nontrivial and nonnegative weak solution.

2 Preliminaries

First, we give some background facts from the variable exponent Lebesgue and Sobolev spaces. For details, we refer to the books [8, 18] and the papers [9, 11, 13]. Assume \(\Omega \subset \mathbb {R}^N\) is an open domain (bounded or unbounded).

Set \(C_+ (\overline{\Omega }) = \big \{ h \in \mathcal {C}(\overline{\Omega })\cap L^\infty (\Omega );\displaystyle \inf \nolimits _{x \in \Omega } h(x) > 1\big \}\). For any \(p \in C_+ (\overline{\Omega })\) , we define

$$\begin{aligned} p^+ = \displaystyle \sup _{x \in \Omega } p(x), \ \ p^- = \displaystyle \inf _{x \in \Omega } p(x). \end{aligned}$$

For each \(p \in C_+ (\overline{\Omega })\), we define the variable exponent Lebesgue space

$$\begin{aligned} L^{p(x)}(\Omega )= \bigg \{ u | u: \Omega \rightarrow \mathbb {R}\text { is measurable, } \int _{\Omega }^{}|u|^{p(x)}\mathrm{d}x <\infty \bigg \}. \end{aligned}$$

We define a norm, the so-called Luxemburg norm, on this space by the formula

$$\begin{aligned} |u|_{p(x)}= \inf \bigg \{ \eta >0, \ \int _{\Omega }^{}\big |\frac{u}{\eta } \big |^{p(x)}\mathrm{d}x \le 1 \bigg \}. \end{aligned}$$

Moreover, \( L^{p(x)}(\Omega ) \) is a reflexive space provided that \( 1< p^- \le p^+ < \infty .\) We denote by \(L^{q(x)}(\Omega ) \) the conjugate space of \(W^{1,p(x)}(\Omega )\), where \(\frac{1}{p(x)}+ \frac{1}{q(x)} =1\). For any \(u \in L^{p(x)}(\Omega )\) and \(v \in L^{q(x)}(\Omega ) ,\) the Hölder type inequality

$$\begin{aligned} \bigg | \int _{\Omega }^{} uv \mathrm{d}x \bigg | \le \left( \frac{1}{p^-} +\frac{1}{q^-} \right) \big | u \big |_{p(x)}\big | v \big |_{q(x)} \end{aligned}$$
(2.1)

holds true. An important role in manipulating the generalized Lebesgue and Sobolev spaces is played by the Modular of the \(L^{p(x)}(\Omega )\) space, which is the mapping \(\varrho _p(.): L^{p(x)}(\Omega ) \rightarrow \mathbb {R}\) defined by

$$\begin{aligned} \varrho _p(u)= \int _{\Omega }^{} \big | u \big |^{p(x)} \mathrm{d}x , \ \ u \in L^{p(x)}(\Omega ) . \end{aligned}$$

If \((u_n)_n, \ u \in L^{p(x)}(\Omega ) \) and \(p^+ <\infty ,\) then the following relations hold true

$$\begin{aligned}&|u|_{p(x)}< 1 \Rightarrow |u|_{p(x)}^{p^+} \le \varrho _p(u)\le |u|_{p(x)}^{p^-} \end{aligned}$$
(2.2)
$$\begin{aligned}&|u|_{p(x)}> 1 \Rightarrow |u|_{p(x)}^{p^-} \le \varrho _p(u)\le |u|_{p(x)}^{p^+} \end{aligned}$$
(2.3)
$$\begin{aligned}&|u_n - u| _{p(x)}\rightarrow 0 \Leftrightarrow \varrho _p (u_n-u) \rightarrow 0 \end{aligned}$$
(2.4)
$$\begin{aligned}&|u|_{p(x)}<1\ (=1; \>1) \Leftrightarrow \varrho _p(u)<1\ (=1; \ >1). \end{aligned}$$
(2.5)

Next, we define \(W^{1,p(x)}(\Omega )\) as the space

$$\begin{aligned} W^{1,p(x)}(\Omega ) = \bigg \{ u \in L^{p(x)}(\Omega ) ; \ |\nabla u| \in L^{p(x)}(\Omega ) \bigg \} \end{aligned}$$

and it can be equipped with the norm: \( ||u|| = |u|_{p(x)}+ |\nabla u|_{p(x)}.\) The space \(W^{1,p(x)}(\Omega )\) is a Banach space which is reflexive under the condition: \(1< p^- \le p^+ < + \infty .\)

If \((u_n)_n \in W^{1,p(x)}(\Omega ) \), \(u \in W^{1,p(x)}(\Omega )\), then the following hold

$$\begin{aligned}&\Vert u\Vert <1 \Rightarrow \Vert u\Vert ^{p^+} \le \int _{\Omega } \big ( |\nabla u|^{p(x)} + |u|^{p(x)} \big ) \mathrm{d}x \le ||u||^{p^-}, \end{aligned}$$
(2.6)
$$\begin{aligned}&\Vert u\Vert >1 \Rightarrow \Vert u\Vert ^{p^-} \le \int _{\Omega } \big ( |\nabla u|^{p(x)} + |u|^{p(x)} \big ) \mathrm{d}x \le ||u||^{p^+}. \end{aligned}$$
(2.7)

Let \(p,\ q \in C_+ (\overline{\Omega }).\) If we have \(p(x) \le q(x) \le p^*(x)\) (\( p^*(x)=\frac{Np(x)}{N-p(x)}\) if \(p(x)<N \) and \(\infty \) if \(p(x) \ge N\)) \( \forall x \in \overline{\Omega }\), then there is a continuous embedding \(W^{1,p(x)}(\Omega ) \hookrightarrow L^{q(x)}(\Omega )\). This last embedding is compact provided that \(\Omega \) is bounded in \(\mathbb {R}^N\) and that \(q(x) < p^*(x), \ \forall x \in \Omega .\) In the present work, we take \(\Omega = \mathbb {R}^N\) and we look for solutions in \( W^{1,p(x)}(\mathbb {R}^N ).\)

3 Proof of Theorem 1.1

First, observe that, for all \( 1 \le j \le N,\) it yields

$$\begin{aligned} \int _{\mathbb {R}^N}^{} \frac{\partial \varphi }{\partial x_j} \bigg ( \sum _{i \ne j}^{} |\varphi |^{\alpha (x_i)} \bigg )\mathrm{d}x = \sum _{i \ne j}^{} \int _{\mathbb {R}^N}^{} \frac{\partial }{\partial x_j}\bigg ( \frac{ |\varphi |^{\alpha (x_i)} \varphi }{\alpha (x_i)+1} \bigg )\mathrm{d}x=0, \ \forall \varphi \in \mathcal {C}^{\infty }_{0}(\mathbb {R}^N) . \end{aligned}$$

Let \(u \in W^{1, p(x)} (\mathbb {R}^N)\). Since \(\mathcal {C}^{\infty }_{0}(\mathbb {R}^N) \) is dense in \(W^{1, p(x)} (\mathbb {R}^N)\), then there exists a sequence \((u_n)_n \subset \mathcal {C}^{\infty }_{0}(\mathbb {R}^N) \) such that \(u_n \rightarrow u\) strongly in \(W^{1, p(x)} (\mathbb {R}^N)\). For \(1\le j \le N\) and \(i \ne j\), we have

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{} \big ||u_n| ^{\alpha (x_i)}\frac{\partial u_n}{\partial x_j}-|u| ^{\alpha (x_i)}\frac{\partial u}{\partial x_j}\big |\mathrm{d}x&\le \int _{\mathbb {R}^N}^{} \big |(|u_n| ^{\alpha (x_i)}-|u| ^{\alpha (x_i)})\frac{\partial u_n}{\partial x_j} \big |\mathrm{d}x\\&\quad +\int _{\mathbb {R}^N}^{} |u| ^{\alpha (x_i)} \big |\frac{\partial u_n}{\partial x_j}-\frac{\partial u}{\partial x_j}\big |\mathrm{d}x\\&\le \bigg ||u_n| ^{\alpha (x_i)}-|u| ^{\alpha (x_i)}\bigg |_{p'(x)}\bigg |\frac{\partial u}{\partial x_j}\bigg |_{p(x)}\\&\quad +\bigg ||u| ^{\alpha (x_i)}\bigg |_{p'(x)} \bigg |\frac{\partial u_n}{\partial x_j}-\frac{\partial u}{\partial x_j}\bigg |_{p(x)}. \end{aligned} \end{aligned}$$
(3.1)

If we denote \(\alpha _i(x)= \alpha (x_i), \ x =(x_1,\ldots ,x_N),\) then by \((H_1)\),

$$\begin{aligned} p(x) \le \alpha _i (x) p'(x) \le p^*(x), \ \forall x \in \mathbb {R}^N, \end{aligned}$$

and by consequence

$$\begin{aligned} W^{1, p(x)} (\mathbb {R}^N)\hookrightarrow L^{\alpha _i(x)p'(x)}(\mathbb {R}^N). \end{aligned}$$
(3.2)

By passage to the limit as n tends to \(+\infty \) in (3.1), it follows

$$\begin{aligned} \int _{\mathbb {R}^N}^{} |u|^{\alpha (x_i)} \frac{\partial u}{\partial x_j}\mathrm{d}x =0. \end{aligned}$$

We define the operator \(L_0: W^{1, p(x)} (\mathbb {R}^N)\longrightarrow \big (W^{1, p(x)} (\mathbb {R}^N)\big )^*\) by

$$\begin{aligned}&\langle L_0u, v \rangle = \int _{\mathbb {R}^N}^{}|\nabla u |^{p(x)-2} \nabla u \nabla v \mathrm{d}x + \int _{\mathbb {R}^N}^{}| u |^{p(x)-2} u v \mathrm{d}x \\&\quad + \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}uv.\frac{\partial u}{\partial x_j } \bigg ( \sum _{i\ne j}^{} |u|^{\alpha (x_i)-2} \bigg )\mathrm{d}x. \end{aligned}$$

Observe that, for all \( 1 \le j \le N \) and \( i \ne j, \) we have

$$\begin{aligned} \frac{1}{p(x)} + \frac{\alpha _i(x) -1}{\alpha _i(x) p'(x)} + \frac{1}{\alpha _i(x) p'(x)} = 1,\ \forall \ x \in \mathbb {R}^N. \end{aligned}$$

Hence, for \( u,v \in W^{1,p(x)}( \mathbb {R}^N), \) it yields

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N} \left| uv \frac{\partial u}{\partial x_j} \left| u\right| ^{\alpha (x_i) -2}\right| \mathrm{d}x&= \int _{\mathbb {R}^N} \left| v \frac{\partial u}{\partial x_j}\right| \ \cdot \ \left| u\right| ^{\alpha _i(x) -1} \mathrm{d}x \\&\le \left| v\right| _{\alpha _i(x) p'(x)} \left| \frac{\partial u}{\partial x_j}\right| _{p(x)} \left| \left| u\right| ^{\alpha _i(x) -1}\right| _{\frac{\alpha _i(x) p'(x)}{\alpha _i(x) -1}}. \end{aligned} \end{aligned}$$
(3.3)

Using the continuous embedding (3.2), it follows that for \( u \in W^{1,p(x)}( \mathbb {R}^N) \) fixed, the function

$$\begin{aligned} v \longmapsto \int _{\mathbb {R}^N} uv \frac{\partial u}{\partial x_j} \left| u\right| ^{\alpha (x_i) -2} \mathrm{d}x \end{aligned}$$

belongs to \( (W^{1,p(x)}( \mathbb {R}^N))^*. \) Consequently, the operator \( L_0 \) is well defined. We claim that \(L_0\) is of \((S_+)\) type. For that aim, we take \((u_n)_n \subset W^{1, p(x)} (\mathbb {R}^N)\) and \(u \in W^{1, p(x)} (\mathbb {R}^N)\) such that \(u_n \rightharpoonup u \) weakly in \(W^{1, p(x)} (\mathbb {R}^N)\) and \(\displaystyle \limsup \nolimits _{n \rightarrow +\infty } \langle L_0 u_n , u_n -u\rangle =0.\)

Knowing that the operator \(\big ( \text{ div } \left( |\nabla u |^{p(x)-2} \nabla u\right) + |u|^{p(x)-2} u \big )\) is of type \((S_+)\) (see [10]), it suffices to prove that

$$\begin{aligned} \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}u_n\frac{\partial u_n}{\partial x_j } (u_n -u) \left( \sum _{i\ne j}^{} |u_n|^{\alpha (x_i)-2} \right) \mathrm{d}x \rightarrow 0, \text { as } n \rightarrow +\infty . \end{aligned}$$

We know that

$$\begin{aligned} \int _{\mathbb {R}^N}^{} |u_n|^{\alpha (x_i)} \frac{\partial u_n}{\partial x_j}\mathrm{d}x =0, \ \forall 1\le j\le N,\ i \ne j. \end{aligned}$$

Then, \(\displaystyle \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}|u_n|^{\alpha (x_i)} \frac{\partial u_n}{\partial x_j }\mathrm{d}x=0, \ \forall 1\le j \le N,\ i \ne j, \) and

$$\begin{aligned} \sum _{j=1}^{N} \sum _{i\ne j}^{} \int _{\mathbb {R}^N}^{}|u_n|^{\alpha (x_i)} \frac{\partial u_n}{\partial x_j }\mathrm{d}x=0. \end{aligned}$$

Hence,

$$\begin{aligned} \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}u_n\frac{\partial u_n}{\partial x_j } (u_n -u) \left( \sum _{i\ne j}^{} |u_n|^{\alpha (x_i)-2} \right) \mathrm{d}x = - \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}u_n u\frac{\partial u_n}{\partial x_j } \left( \sum _{i\ne j}^{} |u_n|^{\alpha (x_i)-2} \right) \mathrm{d}x. \end{aligned}$$

Clearly, \(W^{1, p(x)} (\mathbb {R}^N)\) is compactly embedded in \(L_{\text {loc}}^{\alpha _i (x) p'(x)} (\mathbb {R}^N)\) (where always \(\alpha _i(x)=\alpha (x_i), \ x=(x_1,\ldots ,x_n)).\) Then, for all \(\phi \in \mathcal {C}^{\infty }_{0}(\mathbb {R}^N) , \ |u_n|^{\alpha _i (x)-2}u_n \phi \longrightarrow |u|^{\alpha _i (x)-2}u \phi \) strongly in \(L^{p'(x)}(\mathbb {R}^N).\)

Taking into account that \(\frac{\partial u_n}{\partial x_j }\rightharpoonup \frac{\partial u}{\partial x_j }\) weakly in \(L^{p(x)}(\mathbb {R}^N)\), we obtain

$$\begin{aligned} \int _{\mathbb {R}^N}^{}|u_n|^{\alpha (x_i)-2}u_n \phi \frac{\partial u_n}{\partial x_j } \mathrm{d}x\longrightarrow \int _{\mathbb {R}^N}^{}|u|^{\alpha (x_i)-2}u \phi \frac{\partial u}{\partial x_j } \mathrm{d}x, \ \forall \phi \in \mathcal {C}^{\infty }_{0}(\mathbb {R}^N) ,\ \forall 1\le j\le N, \ i \ne j. \end{aligned}$$

By the density of \(\mathcal {C}^{\infty }_{0}(\mathbb {R}^N) \) in \( W^{1, p(x)} (\mathbb {R}^N)\), we deduce that

$$\begin{aligned} \int _{\mathbb {R}^N}^{}|u_n|^{\alpha (x_i)-2}u_n u\frac{\partial u_n}{\partial x_j } \mathrm{d}x\longrightarrow \int _{\mathbb {R}^N}^{}|u|^{\alpha _i (x)}\frac{\partial u}{\partial x_j } \mathrm{d}x=0. \end{aligned}$$

We infer,

$$\begin{aligned} \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}u_n\frac{\partial u_n}{\partial x_j } (u_n -u) \bigg ( \sum _{i\ne j}^{} |u_n|^{\alpha (x_i)-2} \bigg ) \mathrm{d}x=o(1). \end{aligned}$$

On the other hand, we have

$$\begin{aligned} \langle L_0u,u \rangle = \int _{\mathbb {R}^N}^{}|\nabla u|^{p(x)} \mathrm{d}x+ \int _{\mathbb {R}^N}^{}|u|^{p(x)} \mathrm{d}x \ge \min \big ( \Vert u\Vert ^{p^+}, \Vert u\Vert ^{p^-} \big ). \end{aligned}$$

Since \(\min (p^+, p^-) >1,\) then \(\dfrac{\langle L_0u,u \rangle }{\Vert u\Vert }\longrightarrow +\infty , \ \Vert u\Vert \longrightarrow +\infty ,\) which means that \(L_0\) is coercive.

Plainly, if \((u_n)_n \subset W^{1, p(x)} (\mathbb {R}^N)\) and \(u \in W^{1, p(x)} (\mathbb {R}^N)\) are such that \(u_n \longrightarrow u\) strongly in \(W^{1, p(x)} (\mathbb {R}^N)\), then

$$\begin{aligned} \langle L_0u_n,v \rangle \longrightarrow \langle L_0u,v \rangle , \ \forall v \in W^{1, p(x)} (\mathbb {R}^N), \end{aligned}$$

in view of the reflexivity of \(W^{1, p(x)} (\mathbb {R}^N)\), we deduce that \(L_0u_n \rightharpoonup L_0u \) weakly in \(\left( W^{1, p(x)} (\mathbb {R}^N)\right) ^*.\) Consequently, L is demicontinuous. By the virtue of [23, Theorem 27.A], the operator \(L_0\) is surjective.

Therefore, there exists \( u\in W^{1, p(x)} (\mathbb {R}^N)\) such that \(L_0u = h \) in \(\big ( W^{1, p(x)} (\mathbb {R}^N)\big )^*\) which means that u is a weak solution of \(\big ( \mathcal {P} \big )\) (when \(f=0\)). Since \(h\ne 0\), then \(u \ne 0\). Now, we show that \(u\ge 0.\) Take \(u^- = \min (u,0)\) as test function, we get

$$\begin{aligned}&\int _{\mathbb {R}^N}^{}|\nabla u^-|^{p(x)} \mathrm{d}x+ \int _{\mathbb {R}^N}^{}|u^-|^{p(x)} \mathrm{d}x \nonumber \\&\quad +\sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}uu^-\frac{\partial u}{\partial x_j } \bigg ( \sum _{i\ne j}^{} |u|^{\alpha (x_i)-2} \bigg )\mathrm{d}x = \langle h,u^- \rangle \le 0 \end{aligned}$$
(3.4)

Observe that \(|u|^{\alpha (x_i)-2}uu^- \frac{\partial u}{\partial x_j} = |u^-|^{\alpha (x_i)} \frac{\partial u^-}{\partial x_j}\). Then,

$$\begin{aligned} \int _{\mathbb {R}^N}^{}|u|^{\alpha (x_i)-2}uu^- \frac{\partial u}{\partial x_j}\mathrm{d}x=0, \ \forall 1 \le j\le N, \ i\ne j. \end{aligned}$$

Putting that identity in (3.4), we obtain

$$\begin{aligned} \int _{\mathbb {R}^N}^{}|\nabla u^- | ^{p(x)} \mathrm{d}x + \int _{\mathbb {R}^N}^{}|u^-|^{p(x)}\mathrm{d}x =0, \text { which implies that } u^-= 0. \end{aligned}$$

Finally, we claim that u is unique. Assume that there exists another weak nonnegative solution \(v \in W^{1, p(x)} (\mathbb {R}^N)\) of \(\big ( \mathcal {P} \big )\) (when \(f=0\)). Consider the continuous approximation of the sign function, that is

$$\begin{aligned} \Sigma _m (t)=\ {\left\{ \begin{array}{ll} -1, &{} \text{ if } t \le -\frac{1}{m} \\ mt, &{} \text{ if } |t| \le \frac{1}{m} \\ 1, &{} \text{ if } t \ge \frac{1}{m}, \end{array}\right. }, \end{aligned}$$

\( m \in \mathbb {N}^*.\) Set \(w=u-v\). Taking \(\Sigma _m(w) \in W^{1, p(x)} (\mathbb {R}^N)\) as test function, it yields

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&\big ( |\nabla u|^{p(x)-2} \nabla u - |\nabla v|^{p(x)-2} \nabla v \big ) \nabla \Sigma _m(w) \mathrm{d}x +\int _{\mathbb {R}^N}^{}\big ( u^{p(x)-1} - v^{p(x)-1} \big ) \Sigma _m(w) \mathrm{d}x \\&=- \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}\bigg ( \frac{\partial u}{\partial x_j} \sum _{i\ne j}^{} u^{\alpha (x_i)-1} - \frac{\partial v}{\partial x_j} \sum _{i\ne j}^{} v^{\alpha (x_i)-1} \bigg ) \Sigma _m(w) \mathrm{d}x. \end{aligned} \end{aligned}$$
(3.5)

We have

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&\left( |\nabla u|^{p(x)-2} \nabla u - |\nabla v|^{p(x)-2} \nabla v \right) \nabla \Sigma _m(w) \mathrm{d}x \\&= m\int _{\{ x \in \mathbb {R}^N, \ |w(x)| \le \frac{1}{m}\}}^{} \big ( |\nabla u|^{p(x)-2} \nabla u - |\nabla v|^{p(x)-2} \nabla v \big ) \nabla (u-v) \mathrm{d}x \\&\ge 2^{-p^+}m \int _{\{ x \in \mathbb {R}^N, \ |w(x)| \le \frac{1}{m}\}}^{} |\nabla w |^{p(x)}\mathrm{d}x \\&\ge 2^{-p^+} m^{-p^++1} \int _{\mathbb {R}^N}^{}| \nabla \Sigma _m(w) |^{p(x)} \mathrm{d}x. \end{aligned} \end{aligned}$$
(3.6)

Now, we claim that, for \(1 \le j \le N, \ i \ne j\) and \( m\in \mathbb {N} ^*\), we have

$$\begin{aligned}&\int _{\mathbb {R}^N}^{}\bigg ( u ^{\alpha (x_i)-1} \frac{\partial u}{\partial x_j}-v ^{\alpha (x_i)-1} \frac{\partial v}{\partial x_j} \bigg ) \Sigma _m(w)\mathrm{d}x \nonumber \\&\quad = - \int _{\mathbb {R}^N}^{}\frac{\big (u ^{\alpha (x_i)}-v ^{\alpha (x_i)}\big )}{\alpha (x_i)} \frac{\partial \Sigma _m(w)}{\partial x_j} \mathrm{d}x. \end{aligned}$$
(3.7)

In other words, we want to justify the operation of integration by parts. First, observe that, for all \(\varphi , \ \psi \in \mathcal {C}^{\infty }_{0}(\mathbb {R}^N) ,\) we have

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&\bigg ( |\varphi | ^{\alpha (x_i)-2}\varphi \frac{\partial \varphi }{\partial x_j}-|\psi | ^{\alpha (x_i)-2}\psi \frac{\partial \psi }{\partial x_j} \bigg ) \Sigma _m(\varphi -\psi )\mathrm{d}x \\&=- \int _{\mathbb {R}^N}^{}\frac{ \left( |\varphi | ^{\alpha (x_i)}-|\psi | ^{\alpha (x_i)} \right) }{\alpha (x_i)} \frac{\partial \Sigma _m(\varphi -\psi )}{\partial x_j} \mathrm{d}x. \end{aligned} \end{aligned}$$
(3.8)

Now, let \((u_n)_n, \ (v_n)_n \subset \mathcal {C}^{\infty }_{0}(\mathbb {R}^N) \) be such that \(u_n\rightarrow u\) and \(v_n \rightarrow v \) strongly in \(W^{1, p(x)} (\mathbb {R}^N)\) as \(n\rightarrow +\infty .\) Since \((u_n -v_n) \rightarrow w \) strongly in \(L^{\alpha _i(x)p'(x)}(\mathbb {R}^N)\) and \(\Sigma _m\) is Lipschitzian, then \(\Sigma _m(u-v) \rightarrow \Sigma _m(w)\) in \(L^{\alpha _i(x)p'(x)}(\mathbb {R}^N)\). Taking into account that \(\big ( |u_n|^{\alpha (x_i)-2}u_n \big )\) (resp. \(\big ( |v_n|^{\alpha (x_i)-2}v_n \big )\)) converges strongly to \(u^{\alpha (x_i)-1}\) (resp. \(v^{\alpha (x_i)-1}\) ) in \( L^{\frac{\alpha _i(x)p'(x)}{\alpha _i(x)-1}} (\mathbb {R}^N)\), and \(\big ( \frac{\partial u_n}{\partial x_j}\big )\) (resp. \(\big ( \frac{\partial v_n}{\partial x_j}\big )\)) converges strongly to \(\big ( \frac{\partial u}{\partial x_j}\big )\) (resp. \(\big ( \frac{\partial v}{\partial x_j}\big )\)) in \(L^{p(x)}(\mathbb {R}^N)\), we can conclude that

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&\bigg ( |u_n| ^{\alpha (x_i)-2}u_n \frac{\partial u_n}{\partial x_j}-|v_n| ^{\alpha (x_i)-2}v_n \frac{\partial v_n}{\partial x_j} \bigg ) \Sigma _m(u_n-v_n)\mathrm{d}x \\&\longrightarrow \int _{\mathbb {R}^N}^{}\bigg ( |u| ^{\alpha (x_i)-1} \frac{\partial u}{\partial x_j}-|v| ^{\alpha (x_i)-1} \frac{\partial v}{\partial x_j} \bigg ) \Sigma _m(u-v)\mathrm{d}x \end{aligned} \end{aligned}$$
(3.9)

Since \(\alpha _i(x) p'(x) \ge p(x)\), then \((|u_n| ^{\alpha (x_i)}-|v_n| ^{\alpha (x_i)})\longrightarrow |u| ^{\alpha (x_i)}-|v| ^{\alpha (x_i)}\) in \(L^{p'(x)}(\mathbb {R}^N)\). On the other hand,

$$\begin{aligned} \begin{aligned}&\frac{\partial \Sigma _m(u_n-v_n)}{\partial x_j}= m \mathbf {1}_{\{ |u_n-v_n|\le \frac{1}{m}\}}\frac{\partial (u_n-v_n)}{\partial x_j} \\&\longrightarrow m \mathbf {1}_{\{ |u-v|\le \frac{1}{m}\}}\frac{\partial (u-v)}{\partial x_j}= \frac{\partial \Sigma _m(u-v)}{\partial x_j} \text { in } L^{p(x)}(\mathbb {R}^N). \end{aligned} \end{aligned}$$

It follows,

$$\begin{aligned}&- \int _{\mathbb {R}^N}^{}\frac{(|u_n| ^{\alpha (x_i)}-|v_n| ^{\alpha (x_i)})}{\alpha (x_i)}\frac{\partial \Sigma _m(u_n-v_n)}{\partial x_j} \mathrm{d}x\rightarrow \nonumber \\&\quad - \int _{\mathbb {R}^N}^{}\frac{(|u| ^{\alpha (x_i)}-|v| ^{\alpha (x_i)})}{\alpha (x_i)}\frac{\partial \Sigma _m(u-v)}{\partial x_j} \mathrm{d}x \end{aligned}$$
(3.10)

Identity (3.7) can be reached by combining (3.10) and (3.9) with (3.8). By (3.7), Hölder’s inequality and (3.1), we infer

$$\begin{aligned} \begin{aligned} - \int _{\mathbb {R}^N}^{}&\bigg ( \frac{\partial u}{\partial x_j} u^{\alpha (x_i)-1} - \frac{\partial v}{\partial x_j} v^{\alpha (x_i)-1} \bigg ) \Sigma _m(w) \mathrm{d}x \\&\le \frac{c}{\alpha ^-}\bigg | u^{\alpha (x_i)}-v^{\alpha (x_i)}\bigg |_{L^{p'(x)}(E_m)} \bigg ( \int _{\mathbb {R}^N}^{}\big | \nabla \Sigma _m(w)\big |^{p(x)} \bigg )^{\frac{1}{p^+}}, \end{aligned} \end{aligned}$$
(3.11)

where \(E_m =\{ x \in \mathbb {R}^N, \ 0 < |w(x)| \le \frac{1}{m} \}\). Combining (3.5), (3.6) and (3.11), it follows

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&2^{-p^+} m^{1- p^+} | \nabla \Sigma _m(w) |^{p(x)} \mathrm{d}x + \int _{\mathbb {R}^N}^{}\big ( u ^{p(x)-1} -v ^{p(x)-1}\big ) \Sigma _m(w)\mathrm{d}x\\&\le \frac{N^2c}{\alpha ^-}\bigg | u^{\alpha (x_i)}-v^{\alpha (x_i)}\bigg |_{L^{p'(x)}(E_m)} \bigg ( \int _{\mathbb {R}^N}^{}\big | \nabla \Sigma _m(w)\big |^{p(x)} \mathrm{d}x\bigg )^{\frac{1}{p^+}}. \end{aligned} \end{aligned}$$
(3.12)

Since \( (u ^{p(x)-1} -v ^{p(x)-1} ) \Sigma _m(w) \ge 0, \) by (3.12) we get

$$\begin{aligned} \begin{aligned}&2^{-p^+} m^{1- p^+}\bigg ( \int _{\mathbb {R}^N}^{}\big | \nabla \Sigma _m(w)\big |^{p(x)} \mathrm{d}x\bigg )^{\frac{p^+-1}{p^+}} + \int _{\mathbb {R}^N}^{}\big ( u ^{p(x)-1} -v ^{p(x)-1}\big ) \Sigma _m(w)\mathrm{d}x \\&\le \frac{N^2c }{\alpha ^-}\bigg | u^{\alpha (x_i)}-v^{\alpha (x_i)}\bigg |_{L^{p'(x)}(E_m)}. \end{aligned} \end{aligned}$$
(3.13)

Clearly, \(\mathbf {1}_{E_m}\rightarrow 0, \ m\rightarrow +\infty ,\) a.e. \(x \in \mathbb {R}^N\). Taking into account that \(|u ^{\alpha (x_i)} +v ^{\alpha (x_i)}|^{p'(x)} \in L^1(\mathbb {R}^N),\) by the Lebesgue dominated convergence Theorem, we can easily show that

$$\begin{aligned} \int _{E_m}^{} \big | u^{\alpha (x_i)}-v^{\alpha (x_i)}\big |^{p'(x)} \mathrm{d}x\rightarrow 0, \ \ m \rightarrow +\infty . \end{aligned}$$

That fact together with (3.13) implies that

$$\begin{aligned} \int _{\mathbb {R}^N}^{}\big ( u ^{p(x)-1} -v ^{p(x)-1}\big ) \Sigma _m(w)\mathrm{d}x\rightarrow 0, \ \ m\rightarrow +\infty . \end{aligned}$$

Hence,

$$\begin{aligned} \begin{aligned}&\int _{\{ x \in \mathbb {R}^N, \ |w(x)| \ge \frac{1}{m} \}}^{} \big | u^{p(x)-1}- v^{p(x)-1} \big |\mathrm{d}x \\&\le \int _{\mathbb {R}^N}^{}(u^{p(x)-1}- v^{p(x)-1}) \Sigma _m(w) \mathrm{d}x \rightarrow 0, \ \ m\rightarrow +\infty . \end{aligned} \end{aligned}$$
(3.14)

On the other hand,

$$\begin{aligned} \int _{\{ x \in \mathbb {R}^N, \ |w(x)| \ge \frac{1}{m} \}}^{} \big | u^{p(x)-1}- v^{p(x)-1} \big |\mathrm{d}x\rightarrow \int _{\{ x \in \mathbb {R}^N, \ |w(x)| \ne 0 \}}^{} \big | u^{p(x)-1}- v^{p(x)-1} \big |\mathrm{d}x \end{aligned}$$

Thus, in view of (3.14) we deduce that

$$\begin{aligned} \int _{\{ x \in \mathbb {R}^N, \ |w(x)| \ne 0 \}}^{} \big | u^{p(x)-1}- v^{p(x)-1} \big |\mathrm{d}x=0, \end{aligned}$$

which immediately implies that \(u(x) =v(x),\) a.e. \(x \in \mathbb {R}^N.\)

4 Proof of Theorem 1.2

Case f is a Carathéodory function

For \(u \in W^{1, p(x)} (\mathbb {R}^N)\) such that \(\Vert u\Vert = \frac{1}{2}\), we have

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&|\nabla u| ^{p(x)} \mathrm{d}x + \int _{\mathbb {R}^N}^{}|u|^{p(x)} \mathrm{d}x - \lambda \int _{\mathbb {R}^N}^{}f(x,u)u \mathrm{d}x - \langle h,u \rangle \\&\ge \Vert u\Vert ^{p^+} - \lambda \int _{\mathbb {R}^N}^{}g(x) |u|^{\beta (x)} -\Vert h\Vert _*\Vert u\Vert \\&\ge \big ( \frac{1}{2} \big ) ^{p^+} -\lambda |g|_{L^{\frac{p(x)}{p(x)-\beta (x)}}(\Omega _1)} \big ( |u|^{\beta ^+_{\Omega _1}}_{L^{p(x)}(\Omega _1)} + |u|^{\beta ^-_{\Omega _1}}_{L^{p(x)}(\Omega _1)} \big ) -\lambda |g|_{\infty } |u|^{\beta ^-_{\Omega _2}}_{L^{\beta (x)}(\Omega _2)} -\frac{\Vert h\Vert _*}{2}.\\&\ge \big ( \frac{1}{2} \big ) ^{p^+} - c_1 \lambda \Vert u\Vert ^{\beta ^-_{\Omega _1}}-c_2 \lambda \Vert u\Vert ^{\beta ^-_{\Omega _2}}-\frac{\Vert h\Vert _*}{2}\\&=\big ( \frac{1}{2} \big ) ^{p^+} -\lambda \bigg (c_1 \big ( \frac{1}{2} \big ) ^{\beta ^-_{\Omega _1}} +c_2 \big ( \frac{1}{2} \big ) ^{\beta ^-_{\Omega _2}} \bigg )-\frac{\Vert h\Vert _*}{2}, \end{aligned} \end{aligned}$$

where \(\displaystyle \beta ^+ _{\Omega _1} = \sup \nolimits _{x \in \Omega _1}\beta (x), \ \beta ^-_{\Omega _1} =\inf \nolimits _{x \in \Omega _1} \beta (x).\) For

$$\begin{aligned} 0 \le \lambda < \lambda _0 = \frac{\big ( \frac{1}{2} \big ) ^{p^++1}}{\bigg (c_1 \big ( \frac{1}{2} \big ) ^{\beta ^-_{\Omega _1}} +c_2 \big ( \frac{1}{2} \big ) ^{\beta ^-_{\Omega _2}} \bigg )}, \end{aligned}$$

it yields

$$\begin{aligned}&\int _{\mathbb {R}^N}^{}|\nabla u|^{p(x)} \mathrm{d}x + \int _{\mathbb {R}^N}^{}|u|^{p(x)}\mathrm{d}x -\lambda \int _{\mathbb {R}^N}^{}f(x,u) \mathrm{d}x \\&\quad - \langle h,u \rangle > 0, \ \forall u \in W^{1, p(x)} (\mathbb {R}^N), \ \Vert u\Vert = \frac{1}{2}, \end{aligned}$$

provided that \(\Vert h\Vert _* < \left( \dfrac{1}{2} \right) ^{p^+}.\) Now, observe that, for \( u \in W^{1,p(x)}( \mathbb {R}^N) \) fixed, \( (f(\cdot ,u) + h) \in (W^{1,p(x)}( \mathbb {R}^N))^*. \) Indeed, since \( h \in (W^{1,p(x)}( \mathbb {R}^N))^*, \) it suffices to show that \( f(\cdot , u) \in (W^{1,p(x)}( \mathbb {R}^N))^*. \) For that aim, let \( v \in W^{1,p(x)}( \mathbb {R}^N). \) By \( (H_2) \) and \( (H_3), \) we have

$$\begin{aligned} \begin{aligned} \left| \int _{\mathbb {R}^N} f(x,u) v \mathrm{d}x\right|&\le \int _{\mathbb {R}^N} g(x) \left| u\right| ^{\beta (x) -1} \left| v\right| \mathrm{d}x \\&= \int _{\Omega _1}g(x) \left| u\right| ^{\beta (x) -1} \left| v\right| \mathrm{d}x + \int _{\Omega _2}g(x) \left| u\right| ^{\beta (x) -1} \left| v\right| \mathrm{d}x \\&\le \left| g\right| _{L^{\frac{p(x)}{p(x) - \beta (x)}}( \Omega _1)} \left| \ \left| u\right| ^{\beta (x)-1}\right| _{L^\frac{p(x)}{\beta (x)-1}( \Omega _1)} \left| v\right| _{L^{p(x)}( \Omega _1)} \\&\quad + \left| g\right| _{\infty } \left| \ \left| u\right| ^{\beta (x)-1}\right| _{L^{\frac{\beta (x)}{\beta (x)-1}}( \Omega _2)} \left| v\right| _{L^{\beta (x)}( \Omega _2)}. \end{aligned} \end{aligned}$$
(4.1)

Since \( \beta (x) \le p^*(x),\ \forall \ x \in \mathbb {R}^N \) and having in mind that \( \Omega _2 \) is bounded, then there exist two constants \( \kappa > 0 \) and \( \kappa ' > 0 \) such that

$$\begin{aligned} \left| v\right| _{L^{\beta (x)}( \Omega _2)} \le \kappa \left| v\right| _{L^{p^*(x)}( \Omega _2)} \le \kappa \left| v\right| _{L^{p^*(x)}( \mathbb {R}^N)} \le \kappa ' \left\| v\right\| . \end{aligned}$$

Finally, by \( (H_5), \) we can immediately deduce from (4.1) that \( f(\cdot , u) \in (W^{1,p(x)}( \mathbb {R}^N))^*. \) Therefore, we can define the operator \( L: \overline{\mathcal {B} (0, \frac{1}{2})}\longrightarrow \left( W^{1, p(x)} (\mathbb {R}^N)\right) ^*,\) by

$$\begin{aligned} \langle Lu,v\rangle =\langle L_0u,v\rangle -\lambda \int _{\mathbb {R}^N}^{}f(x,u)v \mathrm{d}x - \langle h,v\rangle , u\in \overline{\mathcal {B} (0, \frac{1}{2})}, \ v \in W^{1, p(x)} (\mathbb {R}^N), \end{aligned}$$

where \(\overline{\mathcal {B} (0, \frac{1}{2})}= \bigg \{ u \in W^{1, p(x)} (\mathbb {R}^N), \Vert u\Vert \le \frac{1}{2} \bigg \}.\)

Define the homotopy \(\psi :[0,1] \times \overline{\mathcal {B} (0, \frac{1}{2})}\longrightarrow \big (W^{1, p(x)} (\mathbb {R}^N)\big )^*\) by \(\psi (t,u) = t Jx + (1-t)Lx,\) where \(J: W^{1, p(x)} (\mathbb {R}^N)\longrightarrow \left( W^{1, p(x)} (\mathbb {R}^N)\right) ^*\) stands for the duality map corresponding to the norm \(\Vert .\Vert ,\) i.e. for all \(u\in W^{1, p(x)} (\mathbb {R}^N),\) Ju is the unique element of \(\left( W^{1, p(x)} (\mathbb {R}^N)\right) ^*\) such that \(\Vert Ju\Vert _*= \Vert u\Vert \) and \(\langle Ju,u\rangle = \Vert u\Vert ^2.\) For \(0< \lambda < \lambda _0,\) and \( \Vert h\Vert _*< ( \frac{1}{2})^{p^+}, \ 0 \notin \psi (t, S(0, \frac{1}{2})), \ \forall 0\le t \le 1 \) with \( S(0, \frac{1}{2}) = \partial \mathcal {B}(0 , \frac{1}{2}).\) By the properties of the degree of mapping of type \((S_+)\), denoted by \(d_{(S_+)}\), (see [17, 22]), we know that \(d_{(S_+)}\) is invariant under the homotopy \(\psi \). Thus, \(d_{(S_+)}( \psi (1,.), \mathcal {B}(0 , \frac{1}{2}) , 0)= d_{(S_+)}( \psi (0,.), \mathcal {B}(0 , \frac{1}{2}) , 0).\) But, by the normalization property, one has

$$\begin{aligned} d_{(S_+)}( \psi (1,.), \mathcal {B}(0 , \frac{1}{2}) , 0)= d_{(S_+)}( J, \mathcal {B}\left( 0 , \frac{1}{2}) , 0\right) =1. \end{aligned}$$

Consequently, \(d_{(S_+)}( \psi (0,.), \mathcal {B}(0 , \frac{1}{2}) , 0) =d_{(S_+)}( L, \mathcal {B}(0 , \frac{1}{2}) , 0)=1\ne 0.\) Therefore, there exists \(u\in \mathcal {B}(0 , \frac{1}{2}) \) such that \(Lu=0.\) Let \((u_n)_n \subset \mathcal {B}(0 , \frac{1}{2}) \) and \(u \in W^{1, p(x)} (\mathbb {R}^N)\) be such that \( u_n \rightharpoonup u \) weakly in \(W^{1, p(x)} (\mathbb {R}^N)\) and \(u_n(x) \rightarrow u(x),\) a.e. \(x \in \mathbb {R}^N\). We claim that, up to a subsequence,

$$\begin{aligned} \int _{\mathbb {R}^N}^{}f(x, u_n ) (u_n -u)\mathrm{d}x \rightarrow 0, \ n \rightarrow +\infty . \end{aligned}$$
(4.2)

First, observe that by the weak convergence and the boundedness of \(\Omega _2\) we immediately get

$$\begin{aligned} \int _{\Omega _2}^{} f(x, u_n ) (u_n -u)\mathrm{d}x \rightarrow 0, \ n \rightarrow +\infty . \end{aligned}$$

Now, by \((H_2)\) we have

$$\begin{aligned} \int _{\Omega _1}^{} |f(x, u_n ) (u_n -u)|\mathrm{d}x \le \int _{\Omega _1}^{} g(x) |u_n|^{\beta (x)-1} |u_n-u |\mathrm{d}x. \end{aligned}$$

We denote by \(v_n = |u_n|^{\beta (.)-1} |u_n-u |.\) The sequence \( (v_n)\) is bounded in \(L^{\frac{p(x)}{\beta (x)}}(\Omega _1)\), and having in mind that \( u_n \rightarrow u \) a.e. \(x \in \Omega _1\), then \(v_n\rightharpoonup 0\) weakly in \(L^{\frac{p(x)}{\beta (x)}}(\Omega _1)\). By \( (H_5), \) we deduce

$$\begin{aligned} \int _{\Omega _1}^{} f(x, u_n ) (u_n -u)\mathrm{d}x \rightarrow 0, \ n \rightarrow +\infty . \end{aligned}$$

Finally, we conclude that our claim (4.2) holds.

Case f nondecreasing

In this case, since f is not necessarily a Carathéodory function, then the previous arguments are useless. Here, we will try to use some fixed point theorem in reflexive Banach semilattice. For that aim, we recall the following notions. Let X be a real Banach space. A nonempty set \(X_+ \ne \{0\}\) of X is called an order cone if the following are true:

  1. 1.

    \(X_+\) is closed and convex;

  2. 2.

    If \(u \in X_+\) and \(\alpha \ge 0,\) then \(\alpha u \in X_+ \);

  3. 3.

    If \(u \in X_+\) and \((-u) \in X_+,\) then \(u=0.\)

We observe that an order cone \(X_+\) induces, in a natural way, a partial order in X as follows: \(x \prec y\) if and only if \(y -x \in X_+\), and \((X,\prec )\) is called an ordered Banach space. If in addition, \(\inf \{x, y\}\) and \(\sup \{x, y\}\) exist for all \(x, y \in X\) with respect to \(\prec ,\) then we say that \((X, \Vert .\Vert )\) is a lattice. Furthermore, if \(\Vert x^{\pm }\Vert \le \Vert x\Vert \) for all \(x \in X\), with \(x^+ = \sup \{0, x\}\) and \( x^- = \inf \{0, x\},\) then \((X, \Vert . \Vert )\) is called a Banach semilattice. Let now \((X, \prec )\) and \((Y, \lhd )\) be two ordered Banach spaces. We say that an operator \(G : X \rightarrow Y\) is increasing iff for all \(x, y \in X,\ x \prec y\) implies \(G(x)\lhd G(y).\) A subset B of X is said to have the fixed point property if every increasing operator \(\Lambda : B \rightarrow B\) has a fixed point.

Now, we present a version of the fixed point result due to S. Carl and S. Heikkilä (see Corollary 2.2 in [5]) which we use to prove Theorem 1.2.

Lemma 1

Let X be a Banach semilattice which is reflexive. Then, any closed ball of X has the fixed point property.

Now, for \( u \in W^{1, p(x)} (\mathbb {R}^N)\), since \((f(\cdot ,u) +h ) \in \left( W^{1, p(x)} (\mathbb {R}^N)\right) ^*,\) then, by the virtue of Theorem 1.1, there exists a unique element \(Tu \in W^{1, p(x)} (\mathbb {R}^N)\) such that

$$\begin{aligned} \begin{aligned} \int _{\mathbb {R}^N}^{}&|\nabla Tu|^{p(x)-2} \nabla Tu \nabla v \mathrm{d}x + \int _{\mathbb {R}^N}^{}|Tu|^{p(x)-2} Tu v \mathrm{d}x \\&+ \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}Tu \frac{\partial Tu }{\partial x_j } \left( \sum _{i \ne j}^{} |Tu |^{\alpha (x_i)-2} \right) v \mathrm{d}x \\&= \int _{\mathbb {R}^N}^{}f(x,u) v \mathrm{d}x + \langle h, v \rangle , \ \forall \, v \in W^{1, p(x)} (\mathbb {R}^N). \end{aligned}\end{aligned}$$
(4.3)

Moreover, since \( f(\cdot ,u) + h \ge 0\) in \( \left( W^{1, p(x)} (\mathbb {R}^N)\right) ^*\), we deduce that \(Tu (x) \ge 0\) a.e. \(x \in \mathbb {R}^N.\)

In order to apply Lemma 1, we need to prove that there exist \(\lambda _0>0 \) and \( h_0 >0\) such that, for \( \Vert h\Vert _*< h_0 \) and \( \lambda < \lambda _0, \)

$$\begin{aligned} T \left( \displaystyle \overline{\mathcal {B} (0, \frac{1}{2})}\right) \subset \overline{\mathcal {B} (0, \frac{1}{2})}. \end{aligned}$$

Let \( u \in W^{1, p(x)} (\mathbb {R}^N)\) such that \(\Vert u\Vert \le \frac{1}{2}\). By \((H_4)\), \((H_5)\) and using the generalized Hölder inequality, we have

$$\begin{aligned} \begin{aligned} \lambda \int _{\mathbb {R}^N}^{}f(x,u) (Tu) \mathrm{d}x + \langle h, Tu \rangle \le \&\ \lambda |g|_{L^{\frac{p(x)}{p(x)-\beta (x)}}(\Omega _1)} \left( |u|^{\beta ^+_{\Omega _1}-1}_{L^{p(x)}(\Omega _1)} + |u|^{\beta ^-_{\Omega _1}-1}_{L^{p(x)}(\Omega _1)} \right) |Tu|_{L^{p(x)}(\Omega _1)} \\&+\lambda |g|_{\infty } |u|^{\beta ^-_{\Omega _2}-1}_{L^{\beta (x)}(\Omega _2)} |Tu|_{L^{p(x)}(\Omega _2)} + \Vert h\Vert _*\Vert Tu\Vert \\ \ \le \&\left( \lambda \left( c_3 \left( \frac{1}{2}\right) ^{\beta _{\Omega _1} ^--1} + c_4 \left( \frac{1}{2}\right) ^{\beta _{\Omega _2} ^--1}\right) + \Vert h\Vert _*\right) \Vert Tu\Vert , \end{aligned} \end{aligned}$$
(4.4)

\(\forall \, u \in W^{1, p(x)} (\mathbb {R}^N)\) with \( \Vert u \Vert \le \frac{1}{2}.\) Taking \( v = Tu \) in (4.3), and using (4.4), we obtain

$$\begin{aligned} \max \big ( \Vert Tu\Vert ^{p^+-1}, \Vert Tu \Vert ^{p^--1} \big ) \le \lambda ( c_3 ( \frac{1}{2})^{\beta _{\Omega _1} ^--1} + c_4 \left( \frac{1}{2}\right) ^{\beta _{\Omega _2} ^--1}) + \Vert h\Vert _*\end{aligned}$$

Choosing \( \lambda _0 = \frac{\left( \frac{1}{2}\right) ^{p^+-1}}{2\left( c_3 \left( \frac{1}{2}\right) ^{\beta _{\Omega _1} ^--1} + c_4 \left( \frac{1}{2}\right) ^{\beta _{\Omega _2} ^--1}\right) }\), then we have

$$\begin{aligned} \max \big ( \Vert Tu\Vert ^{p^+-1}, \Vert Tu \Vert ^{p^--1} \big ) \le \frac{\left( \frac{1}{2}\right) ^{p^+-1}}{2} + \Vert h\Vert _*. \end{aligned}$$

For \( \Vert h\Vert _*\le \frac{\left( \frac{1}{2}\right) ^{p^+-1}}{2}\), then

$$\begin{aligned} \max \big ( \Vert Tu\Vert ^{p^+-1}, \Vert Tu \Vert ^{p^--1} \big ) \le \left( \frac{1}{2}\right) ^{p^+-1}\le \frac{1}{2}. \end{aligned}$$

Having in mind that \(\inf (p^+, p^-) \ge 2,\) then we can easily see that

$$\begin{aligned} \Vert Tu\Vert \le \frac{1}{2}, \ \forall \, u \in W^{1, p(x)} (\mathbb {R}^N), \ \Vert u\Vert \le \frac{1}{2}. \end{aligned}$$

At this point, we are ready to prove our main result. Now, we consider the following partial order in \(W^{1, p(x)} (\mathbb {R}^N)\):

$$\begin{aligned} u_1, \ u_2 \in W^{1, p(x)} (\mathbb {R}^N), \ u_1 \prec u_2 \Leftrightarrow u_1(x) \le u_2(x) \text { a.e. } x \in \mathbb {R}^N. \end{aligned}$$
(4.5)

It is clear that \((W^{1, p(x)} (\mathbb {R}^N), \prec )\) is an ordered Banach space and for all \(u, v \in W^{1, p(x)} (\mathbb {R}^N)\), there exist \(\sup \{u, v\}\) and \(\inf \{u, v\}\) with respect to the order. Moreover, \(u^+ = \sup \{u, 0\} = \max (u,0),\) that is the positive part of the function u,  and \( u^-=\inf \{u, 0\} = \min (u,0),\) that is the negative part of u. Since \(|u^\pm (x)| \le |u(x)|\) and \(|u^{\pm }(x) - u^\pm (y)| \le |u(x) - u(y)|\) almost everywhere in \(\mathbb {R}^N,\) we see that \(\Vert u^\pm \Vert \le \Vert u\Vert .\) Hence, \((W^{1, p(x)} (\mathbb {R}^N), \prec )\) is a Banach semilattice which is reflexive.

In order to complete the proof, we claim that T is an increasing operator. Indeed, let \(u_1, \ u_2 \in W^{1, p(x)} (\mathbb {R}^N)\) be such that \( u_1 \prec u_2\). Since f is nondecreasing, then

$$\begin{aligned} f(x, u_1(x)) \le f(x, u_2(x)), \ \text {a.e. } x \in \mathbb {R}^N. \end{aligned}$$

Now, using the same function \(\Sigma _m\), as in the proof of Theorem 1.1, we take \(\Sigma _m\big ( (Tu_1 -Tu_2)^+ \big )\) as test function, it yields

$$\begin{aligned} \int _{\mathbb {R}^N}^{}&\big ( |\nabla Tu_1|^{p(x)-2 }Tu_1 - |\nabla Tu_2|^{p(x)-2 }Tu_2 \big ) \nabla \Sigma _m\big ( (Tu_1-Tu_2)^+ \big )\mathrm{d}x\\&+ \int _{\mathbb {R}^N}^{}\left( ( Tu_1)^{p(x)-1 } - ( Tu_2)^{p(x)-1 } \right) \Sigma _m\left( (Tu_1-Tu_2)^+ \right) \mathrm{d}x \\&+ \sum _{j=1}^{N} \int _{\mathbb {R}^N}^{}\big ( \frac{ \partial Tu_1}{\partial x_j} \sum _{i \ne j}^{} (Tu_1)^{\alpha (x_i)-1} -\frac{ \partial Tu_2}{\partial x_j} \sum _{i \ne j}^{} (Tu_2)^{\alpha (x_i)-1} \big ) \Sigma _m\big ( (Tu_1-Tu_2)^+ \big )\mathrm{d}x \\&= \int _{\mathbb {R}^N}^{}(f(x, u_1)-f(x, u_2))\Sigma _m\big ( (Tu_1-Tu_2)^+ \big )\mathrm{d}x \le 0. \end{aligned}$$

Taking into account that \(\big ( ( Tu_1)^{p(x)-1 } - ( Tu_2)^{p(x)-1 } \big ) \Sigma _m\big ( (Tu_1-Tu_2)^+ \big ) \ge 0\), then one can easily establish an inequality similar to (3.13), that is

$$\begin{aligned} \begin{aligned}&2^{-p^+} m^{1-p^+}\bigg (\int _{\mathbb {R}^N}^{}\big |\nabla \Sigma _m\big ( (Tu_1-Tu_2)^+\big |^{p(x)} \mathrm{d}x \bigg )^{\frac{p^+-1}{p^+}} \\&+ \int _{\mathbb {R}^N}^{}\big ( ( Tu_1)^{p(x)-1 } - ( Tu_2)^{p(x)-1 } \big ) \Sigma _m\big ( (Tu_1-Tu_2)^+ \big )\mathrm{d}x \\&\le \bigg ( \frac{N^2 c}{\alpha ^-} \bigg ) \bigg | Tu_1^{\alpha (x_i)}-Tu_2^{\alpha (x_i)}\bigg |_{L^{p'(x)} (D_m)}, \end{aligned} \end{aligned}$$

with \( D_m = \big \{ x \in \mathbb {R}^N, \ 0 < Tu_1(x) -Tu_2 (x) \le \frac{1}{m}\big \}.\) Using the same arguments as in the proof of Theorem 1.1, we infer

$$\begin{aligned}&\int _{\{ x \in \mathbb {R}^N , Tu_1(x) -Tu_2 (x) > 0 \}}^{} \bigg | ( Tu_1)^{p(x)-1 } - ( Tu_2)^{p(x)-1 } \bigg | \mathrm{d}x \\&= \lim _{m \rightarrow + \infty } \int _{\big \{ x \in \mathbb {R}^N, \ Tu_1(x) -Tu_2 (x) \ge \frac{1}{m}\big \}}^{}\bigg | ( Tu_1)^{p(x)-1 } - ( Tu_2)^{p(x)-1 } \bigg | \mathrm{d}x \\&=0 \end{aligned}$$

Hence, \(Tu_1 (x) \le Tu_2(x), \) a.e. \(x \in \mathbb {R}^N\), i.e. \( Tu_1\prec Tu_2\) and by consequence, the operator

$$\begin{aligned} T: \big ( W^{1, p(x)} (\mathbb {R}^N), \prec \big )\rightarrow \big ( W^{1, p(x)} (\mathbb {R}^N), \prec \big ) \end{aligned}$$

is increasing. Therefore, the proof of Theorem 1.2 can be concluded by applying Lemma 1.