1 Introduction

The study of variable exponent Lebesgue and Sobolev spaces have deserved a great deal of attention in the last few years due to many interesting new applications including the mathematical modeling of electrorheological fluids (see [21]) and image processing (see [3]). We refer to Sect. 2 below for a brief account of the main results needed here and to the book [4] for a complete account on these spaces.

One fundamental point in the study of these spaces is the generalization of the well-known Sobolev immersion Theorems. That is, if \(\Omega \subset \mathbb{R }^N\) is a bounded domain and \(p:\Omega \rightarrow [1,\infty )\) is a finite exponent such that \(\sup _\Omega p<N\) the following immersions hold

$$\begin{aligned} W^{1,p(x)}_0(\Omega )\hookrightarrow L^{q(x)}(\Omega )\quad \text{ and }\quad W^{1,p(x)}(\Omega )\hookrightarrow L^{r(x)}(\partial \Omega ), \end{aligned}$$

if the exponents \(q:\Omega \rightarrow [1,\infty )\) and \(r:\partial \Omega \rightarrow [1,\infty )\) verify the bounds

$$\begin{aligned} q(x)\le p^*(x) := \frac{Np(x)}{N-p(x)}\quad \text{ and }\quad r(x)\le p_*(x):= \frac{(N-1)p(x)}{N-p(x)}. \end{aligned}$$

These exponents \(p^*(x)\) and \(p_*(x)\) are called the critical Sobolev exponent and the critical Sobolev trace exponent, respectively. (Some mild regularity assumptions on the exponents are needed in order for the immersions to hold, see [4] and Sect. 2). These immersions can be restated as

$$\begin{aligned} 0<S(p(\cdot ),q(\cdot ),\Omega )&:= \inf _{v\in W^{1,p(x)}_0(\Omega )}\frac{\Vert \nabla v\Vert _{L^{p(x)}(\Omega )}}{\Vert v\Vert _{L^{q(x)}(\Omega )}}, \quad \text{ and }\\ 0<T(p(\cdot ),r(\cdot ),\Omega )&:= \inf _{v\in W^{1,p(x)}(\Omega )}\frac{\Vert v\Vert _{W^{1,p(x)}(\Omega )}}{\Vert v\Vert _{L^{r(x)}(\Omega )}}. \end{aligned}$$

Here, the norms that are considered are the Luxemburg norms. We refer to Sect. 2 for the precise definitions.

An important and interesting problem is the study of the existence of extremals for these immersions, i.e., functions realizing the infimum in the definition of \(S(p(\cdot ),q(\cdot ),\Omega )\) and \(T(p(\cdot ),r(\cdot ),\Omega )\). When the exponents are uniformly subcritical, i.e.,

$$\begin{aligned} \inf _{\Omega }(p^*-q)>0 \quad \text{ and }\quad \inf _{\partial \Omega }(p_*-r)>0, \end{aligned}$$

the immersions are compact, and so the existence of extremals follows by a direct minimization procedure. The situation when the subcriticality is violated is much more complicated.

In contrast with the constant critical exponent case which has deserved a lot of attention since Aubin’ seminal work [2], the critical immersion for variable exponent has only been considered recently. In [18], the authors study some cases where even if the subcriticality is violated, the immersion \(W^{1,p(x)}_0(\Omega )\hookrightarrow L^{q(x)}(\Omega )\) remains compact. This result requires for very restrictive hypotheses on the exponents \(p\) and \(q\), so a more general result is desirable. In this direction, in [10], applying an extension of the P.L. Lions’ Concentration–Compactness Principle for the variable exponent case (see [12, 13]), the authors proved that

$$\begin{aligned} S(p(\cdot ),q(\cdot ),\Omega ) \quad \le \quad \sup _{\varepsilon >0}\inf _{x\in \mathcal{A }} S(p(\cdot ),q(\cdot ), B_{\varepsilon }(x)), \end{aligned}$$

where \(\mathcal{A }=\{x\in \Omega :q(x) = p^*(x)\}\) is the critical set, and \(B_{\varepsilon }(x)\) is the ball centered at \(x\) of radius \(\varepsilon \). Moreover, in that paper, it is shown that if the strict inequality holds, namely

$$\begin{aligned} S(p(\cdot ),q(\cdot ),\Omega ) \quad <\quad \sup _{\varepsilon >0}\inf _{x\in \mathcal{A }} S(p(\cdot ),q(\cdot ), B_{\varepsilon }(x)), \end{aligned}$$

then there exists an extremal for \(S(p(\cdot ),q(\cdot ),\Omega )\). Some conditions on \(p,\, q\), and \(\Omega \) are also given in order for this strict inequality to hold. We also refer to [9] where this result is applied to obtain the existence of a solution to a critical equation involving the \(p(x)\)-Laplacian.

The purpose of this article is to extend the above-mentioned results to the trace problem. That is, we assume hereafter that the subcriticality for the trace exponent fails in the sense that

$$\begin{aligned} \mathcal{A }_T :=\{x\in \partial \Omega :r(x) = p_*(x)\}\ne \emptyset , \end{aligned}$$

and find conditions on the exponents \(p,\, r\) and on the domain \(\Omega \) in order to ensure the existence of an extremal for \(T(p(\cdot ),r(\cdot ),\Omega )\). Up to our knowledge, this is the first paper where the critical trace inequality, in the context of variable exponent Sobolev spaces, is addressed.

Concerning the constant exponent case, it is known, see [7], that

$$\begin{aligned} T(p,p_*,\Omega )\le \bar{K}(N,p)^{-1} = \inf _{v\in \bar{D}^{1,p}(\mathbb{R }^N_+)} \frac{\Vert \nabla v\Vert _{L^p(\mathbb{R }^N_+)}}{\Vert v\Vert _{L^{p_*}(\mathbb{R }^{N-1})}}, \end{aligned}$$

where \(\bar{D}^{1,p}(\mathbb{R }^N_+)\) is the set of measurable functions \(f(y,t)\) such that \(\partial _i f\in L^p(\mathbb{R }^N_+),\quad i=1,\ldots ,N\), and \(f(\cdot , 0) \in L^{p_*}(\mathbb{R }^{N-1})\). Moreover, in [7], it is shown that if

$$\begin{aligned} T(p,p_*,\Omega )<\bar{K}(N,p)^{-1}, \end{aligned}$$
(1.1)

then there exists an extremal for the trace inequality. Notice that one trivial global condition on \(\Omega \) that implies (1.1) is

$$\begin{aligned} \frac{|\Omega |^{\frac{1}{p}}}{\mathcal{H }^{N-1}(\partial \Omega )^{\frac{1}{p_*}}} < \bar{K}(N,p)^{-1}, \end{aligned}$$
(1.2)

where \(\mathcal{H }^d\) denotes the \(d\)-dimensional Hausdorff measure. Observe that the family of sets verifying (1.2) is large. Indeed, for any fixed set \(\Omega ,\,\Omega _t:=t\cdot \Omega \) verifies (1.2) for any \(t>0\) small.

A more interesting and difficult task is to find local conditions on \(\Omega \) ensuring (1.1). For \(p=2\), this was done by Adimurthy and Yadava in [1] (see also Escobar [5] for a closely related problem) by using the fact that the extremals for \(\bar{K}(N,2)^{-1}\) were explicitly known since the work of Escobar [5]. In fact, in [1], the authors proved that if the boundary of \(\Omega \) contains a point with positive mean curvature, then (1.1) holds true. Recently, Nazaret [19] found the extremals for \(\bar{K}(N,p)^{-1}\) by means of mass transportation methods. These extremals are of the form

$$\begin{aligned} V_{\lambda , y_0}(y,t) = \lambda ^{-\frac{N-p}{p-1}} V \left( \tfrac{y-y_0}{\lambda },\tfrac{t}{\lambda }\right) ,\quad y\in \mathbb{R }^{N-1},\ t>0, \end{aligned}$$

with

$$\begin{aligned} V(y,t) = r^{-\frac{N-p}{p-1}},\quad r=\sqrt{(1+t)^2 + |y|^2}. \end{aligned}$$
(1.3)

From the explicit knowledge of the extremals, one can compute the value of the constant \(\bar{K}(N,p)\) (see, for example, [8]). It holds

$$\begin{aligned} \bar{K}(N,p) = \pi ^{\frac{1-p}{2}} \left( \frac{p-1}{N-p}\right) ^{p-1} \left( \frac{\Gamma \left( \frac{p(N-1)}{2(p-1)}\right) }{\Gamma \left( \frac{N-1}{2(p-1)}\right) } \right) ^{\frac{p-1}{N-1}}, \end{aligned}$$

where \(\Gamma (x) = \int \nolimits _0^\infty t^{x-1}e^{-t}\, \mathrm{d}t\) is the Gamma function. Using these extremals, Fernández Bonder and Saintier in [8] extended [1] by proving that (1.1) holds true if \(\partial \Omega \) contains a point of positive mean curvature for \(1<p<(N+1)/2\). See also [20] for a related result. We also refer to [22] where this question has been addressed in the case \(p=1\).

A slightly more general problem can be treated. Namely, consider \(\Gamma \subset \partial \Omega ,\,\Gamma \ne \partial \Omega \) a (possibly empty) closed set, and define

$$\begin{aligned} W^{1,p(x)}_\Gamma = \overline{\{\phi \in C^\infty (\bar{\Omega }):\phi \quad \text{ vanishes } \text{ in } \text{ a } \text{ neighborhood } \text{ of } \Gamma \}}, \end{aligned}$$

where the closure is taken in \(\Vert \cdot \Vert _{W^{1,p(x)}(\Omega )}\)-norm. This is the subspace of functions vanishing on \(\Gamma \). Obviously, \(W^{1,p(x)}_{\emptyset }(\Omega ) = W^{1,p(x)}(\Omega )\). In general, \(W^{1,p(x)}_{\Gamma }(\Omega ) = W^{1,p(x)}(\Omega )\) if and only if the \(p(x)\)-capacity of \(\Gamma \) is 0, see [15]. The main concern of this paper is the study of the existence problem of extremals for the best constant \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\) defined by

$$\begin{aligned} 0<T(p(\cdot ), r(\cdot ), \Omega , \Gamma ) := \inf _{v\in W^{1,p(x)}_\Gamma (\Omega )} \frac{\Vert v\Vert _{W^{1,p(x)}(\Omega )}}{\Vert v\Vert _{L^{r(x)}(\partial \Omega )}}. \end{aligned}$$
(1.4)

First, employing the same ideas as in [18], we obtain some restricted conditions on the exponents \(p\) and \(r\) guarantying that the immersion \(W^{1,p(x)}(\Omega )\hookrightarrow L^{r(x)}(\partial \Omega )\) remains compact and so the existence of an extremal for \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\) holds true. As in the Sobolev immersion Theorem, more general conditions for the existence of extremals are needed, and these are the contents of our main results.

In order to state our main results, we first need to introduce some notation. The localized Sobolev trace constant \(\bar{T}_{x}\) is defined, for \(x\in \mathcal{A }_T\), as

$$\begin{aligned} \bar{T}_{x} = \sup _{\varepsilon >0} T(p(\cdot ), r(\cdot ), \Omega _{\varepsilon }, \Gamma _{\varepsilon }) = \lim _{\varepsilon \rightarrow 0} T(p(\cdot ), r(\cdot ), \Omega _{\varepsilon }, \Gamma _{\varepsilon }), \end{aligned}$$
(1.5)

where \(\Omega _{\varepsilon } = \Omega \cap B_{\varepsilon }(x)\) and \(\Gamma _{\varepsilon } = \partial B_{\varepsilon }(x) \cap \bar{\Omega }\). The smallest localized Sobolev trace constant is denoted by

$$\begin{aligned} \bar{T} := \inf _{x\in \mathcal{A }_T} \bar{T}_{x}. \end{aligned}$$
(1.6)

With these notations, our main results states that, under certain mild regularity assumptions on \(p\) and \(r\), the following inequalities hold true

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\le \bar{T} \le \inf _{x\in \mathcal{A }_T} \bar{K}(N,p(x))^{-1}. \end{aligned}$$

Moreover, if the following strict inequality holds

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega , \Gamma ) < \bar{T}, \end{aligned}$$
(1.7)

then there exists an extremal for (1.4).

So a natural main concern is to provide with conditions in order for (1.7) to hold. We obtain, as in the constant exponent case, two types of conditions: local and global.

Global conditions are easier to obtain. In fact, it is fairly easy to see that if \(\Omega \) is contracted enough, then (1.7) holds.

In order to find local conditions for (1.7) to hold, a more refined analysis has to be made. The idea is to find a precise test function in order to estimate \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\). This test function is constructed by properly scaling and truncating the extremal for \(\bar{K}(N,p(x))^{-1}\) around some point \(x\in \mathcal{A }_T\). This estimate will give local conditions ensuring that \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma ) < \bar{K}(N,p(x))^{-1}\). The analysis is then completed by providing with conditions that ensure \(\bar{T}_x = \bar{K}(N,p(x))^{-1}\) and requiring that \(\bar{T} = \bar{T}_x\) for some \(x\in \mathcal{A }_T\).

Organization of the paper

The rest of the paper is organized as follows. In Sect. 2, we collect some preliminaries on variable exponent spaces that will be used throughout the paper. In Sect. 3, by applying the method developed in [18], we find conditions than ensure that the trace immersion remains compact although \(\mathcal{A }_T\ne \emptyset \). As we mentioned in the introduction, these conditions are not satisfactory, so in the remaining of the paper we look for a general result that guaranty the existence of extremals. In Sect. 4, we revisit the proof of the Concentration–Compactness Theorem as stated in [12] to perform the corresponding adaptation for the trace inequality. In Sect. 5, we prove our main results, Theorems 5.4 and 5.6 that provide with general conditions for the existence of extremals. Finally, in Sect. 6, we provide both local and global conditions for the validity of \(T(p(\cdot ),r(\cdot ),\Omega )<\bar{T}\).

2 Preliminaries on variable exponent Sobolev spaces

In this section, we review some preliminary results regarding Lebesgue and Sobolev spaces with variable exponent. All of these results and a comprehensive study of these spaces can be found in [4].

The variable exponent Lebesgue space \(L^{p(x)}(\Omega )\) is defined by

$$\begin{aligned} L^{p(x)}(\Omega ) = \left\{ u\in L^1_{\text{ loc }}(\Omega ) :\int \limits _\Omega |u(x)|^{p(x)} \mathrm{d}x<\infty \right\} . \end{aligned}$$

This space is endowed with the norm

$$\begin{aligned} \Vert u\Vert _{L^{p(x)}(\Omega )} = \Vert u\Vert _{p(x)} :=\inf \left\{ \lambda >0:\int \limits _\Omega \Big |\frac{u(x)}{\lambda } \Big |^{p(x)} \mathrm{d}x\le 1\right\} \end{aligned}$$

We can define the variable exponent Sobolev space \(W^{1,p(x)}(\Omega )\) by

$$\begin{aligned} W^{1,p(x)}(\Omega ) = \{u\in L^{p(x)}(\Omega ) :\partial _i u\in L^{p(x)}(\Omega ) \text{ for } i=1,\ldots ,N\}, \end{aligned}$$

where \(\partial _i u = \frac{\partial u}{\partial x_i}\) is the \(i\)th-distributional partial derivative of \(u\). This space has a corresponding modular given by

$$\begin{aligned} \rho _{1,p(x)}(u) := \int \limits _\Omega |u|^{p(x)} + |\nabla u|^{p(x)} \mathrm{d}x \end{aligned}$$

which yields the norm

$$\begin{aligned} \Vert u\Vert _{W^{1,p(x)}(\Omega )} = \Vert u\Vert _{1,p(x)} : = \inf \Big \{\lambda >0:\rho _{1, p(x)}\left( \frac{u}{\lambda }\right) \le 1\Big \}. \end{aligned}$$

Another possible choice of norm in \(W^{1,p(x)}(\Omega )\) is \(\Vert u\Vert _{p(x)} + \Vert \nabla u \Vert _{p(x)}\). Both norms turn out to be equivalent but we use the first one for convenience.

The following result is proved in [6, 16] (see also [4], pp. 79, Lemma 3.2.20 (3.2.23)).

Proposition 2.1

(Hölder-type inequality) Let \(f\in L^{p(x)}(\Omega )\) and \(g\in L^{q(x)}(\Omega )\). Then, the following inequality holds

$$\begin{aligned} \Vert f(x)g(x) \Vert _{L^{s(x)}(\Omega )}\le \Big ( \Big (\frac{s}{p}\Big )^+ + \Big (\frac{s}{q}\Big )^+\Big ) \Vert f\Vert _{L^{p(x)}(\Omega )}\Vert g\Vert _{L^{q(x)}(\Omega )}, \end{aligned}$$

where

$$\begin{aligned} \frac{1}{s(x)} = \frac{1}{p(x)} + \frac{1}{q(x)}. \end{aligned}$$

From now on, we define the classes of exponents that we deal with. Let \(\mathcal P (\Omega )\) be the set of Lebesgue measurable functions \(p:\Omega \rightarrow [1,\infty )\) and let \(\mathcal P (\partial \Omega )\) be the set of \(\mathcal{H }^{N-1}\)-measurable functions \(r:\partial \Omega \rightarrow [1,\infty )\).

In order to state the trace Theorem, we need to define the Lebesgue spaces on \(\partial \Omega \). We assume that \(\Omega \) is \(C^1\) so \(\partial \Omega \) is a \((N-1)\)-dimensional \(C^1\) immersed manifold on \(\mathbb{R }^N\) (less regularity on \(\partial \Omega \) is enough for the trace Theorem to hold, but the \(C^1\) regularity is enough for our purposes). Therefore, the boundary measure agrees with the \((N-1)\)-Hausdorff measure restricted to \(\partial \Omega \). We denote this measure by d\(S\). Then, the Lebesgue spaces on \(\partial \Omega \) are defined as

$$\begin{aligned} L^{r(x)}(\partial \Omega ):= \left\{ u\in L^1_{\text{ loc }}(\partial \Omega , \mathrm{d}S):\int \limits _{\partial \Omega } |u(x)|^{r(x)} \mathrm{d}S<\infty \right\} \end{aligned}$$

and the corresponding (Luxemburg) norm is given by

$$\begin{aligned} \Vert u\Vert _{L^{r(x)}(\partial \Omega )} = \Vert u\Vert _{r(x), \partial \Omega } := \inf \left\{ \lambda >0:\int \limits _{\partial \Omega } \Big |\frac{u(x)}{\lambda }\Big |^{r(x)} \mathrm{d}S\le 1\right\} . \end{aligned}$$

Throughout this paper, the following notation will be used: For a \(\mu \)-measurable function \(f\), we denote \(f^+ := \sup f\) and \(f^- := \inf f\), where by \(\sup \) and \(\inf \) we denote the essential supremum and essential infimum, respectively, with respect to the measure \(\mu \).

The Sobolev trace Theorem is proved in [6]. When the exponent is critical, it requires more regularity on the exponent \(p(x)\) (Lipschitz regularity is enough). This regularity can be relaxed when the exponent is strictly subcritical. It holds,

Theorem 2.2

Let \(\Omega \subseteq \mathbb{R }^N\) be an open bounded domain with Lipschitz boundary and let \(p\in \mathcal P (\Omega )\) be such that \(p\in W^{1,\gamma }(\Omega )\) with \(1\le p_{-}\le p^{+}<N<\gamma \). Then, there is a continuous boundary trace embedding \(W^{1,p(x)}(\Omega )\subset L^{p_*(x)}(\partial \Omega )\).

Theorem 2.3

Let \(\Omega \subset \mathbb{R }^N\) be an open bounded domain with Lipschitz boundary. Suppose that \(p\in C^0(\bar{\Omega })\) and \(1<p^-\le p^+<N\). If \(r\in \mathcal P (\partial \Omega )\) is uniformly subcritical, then the boundary trace embedding \(W^{1,p(x)}(\Omega )\rightarrow L^{r(x)}(\partial \Omega )\) is compact.

Corollary 2.4

Let \(\Omega \subset \mathbb{R }^N\) be an open bounded domain with Lipschitz boundary. Suppose that \(p\in C^0(\bar{\Omega })\) and \(1<p_{-}\le p_{+}<N\). If \(r\in C^0(\partial \Omega )\) satisfies the condition

$$\begin{aligned} 1\le r(x)<p_*(x)\quad x\in \partial \Omega \end{aligned}$$

then there is a compact boundary trace embedding \(W^{1,p(x)}(\Omega )\rightarrow L^{r(x)}(\partial \Omega )\).

The following proposition, also proved in [16], will be most useful (see also [4], Chapter 2, Section 1).

Proposition 2.5

Set \(\rho (u):=\int \nolimits _\Omega |u(x)|^{p(x)} \mathrm{d}x\). For \(u\in L^{p(x)}(\Omega )\) and \(\{u_k\}_{k\in \mathbb{N }}\subset L^{p(x)}(\Omega )\), we have

$$\begin{aligned}&u\ne 0 \Rightarrow \Big (\Vert u\Vert _{L^{p(x)}(\Omega )} = \lambda \Leftrightarrow \rho (\frac{u}{\lambda })=1\Big ).\end{aligned}$$
(2.1)
$$\begin{aligned}&\Vert u\Vert _{L^{p(x)}(\Omega )}<1 (=1; >1) \Leftrightarrow \rho (u)<1(=1;>1).\end{aligned}$$
(2.2)
$$\begin{aligned}&\Vert u\Vert _{L^{p(x)}(\Omega )}>1 \Rightarrow \Vert u\Vert ^{p^-}_{L^{p(x)}(\Omega )} \le \rho (u) \le \Vert u\Vert ^{p^+}_{L^{p(x)}(\Omega )}.\end{aligned}$$
(2.3)
$$\begin{aligned}&\Vert u\Vert _{L^{p(x)}(\Omega )}<1 \Rightarrow \Vert u\Vert ^{p^+}_{L^{p(x)}(\Omega )} \le \rho (u) \le \Vert u\Vert ^{p^-}_{L^{p(x)}(\Omega )}.\end{aligned}$$
(2.4)
$$\begin{aligned}&\lim _{k\rightarrow \infty }\Vert u_k\Vert _{L^{p(x)}(\Omega )} = 0 \Leftrightarrow \lim _{k\rightarrow \infty }\rho (u_k)=0.\end{aligned}$$
(2.5)
$$\begin{aligned}&\lim _{k\rightarrow \infty }\Vert u_k\Vert _{L^{p(x)}(\Omega )} = \infty \Leftrightarrow \lim _{k\rightarrow \infty }\rho (u_k) = \infty . \end{aligned}$$
(2.6)

For much more on these spaces, we refer to [4].

3 Compact case

In this section, we find conditions on the exponents \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) that imply that the immersion \(W^{1,p(x)}(\Omega )\hookrightarrow L^{r(x)}(\partial \Omega )\) remains compact. Therefore, in this case, the existence of extremals follows directly by minimization.

Roughly speaking, these conditions require the critical set to be small and also a strict control on how the exponent \(r\) reaches the critical one when one is approaching the critical set \(\mathcal{A }_T\). For the Sobolev immersion \(W^{1,p(x)}_0(\Omega )\hookrightarrow L^{q(x)}(\Omega )\), this result was obtained in [18]. Following the same ideas, we can prove a similar result for the trace immersion.

First, we define the upper Minkowsky content for sets contained in \(\partial \Omega \). We say that a compact set \(K\subset \partial \Omega \) has finite \((N-1-s)\)-boundary dimensional upper Minkowsky content if there exists a constant \(C>0\) such that

$$\begin{aligned} \mathcal{H }^{N-1}(K(r)\cap \partial \Omega ) \le Cr^s, \quad \text{ for } \text{ all } r>0, \end{aligned}$$

where \(K(r)=\{x\in \mathbb{R }^N:\mathrm{dist}(x,K)<r\}\). The result is the following:

Theorem 3.1

Let \(\varphi :[r_0^{-1},\infty )\rightarrow (0,\infty )\) be a continuous function such that: \(\varphi (r)/\ln r\) is non-increasing in \([r_0^{-1},\infty )\) for some \(r_0\in (0,e^{-1})\) and \(\varphi (r)\rightarrow \infty \) as \(r\rightarrow \infty \). Let \(K\subset \partial \Omega \) be a compact set whose \((N-1-s)\)-boundary dimensional upper Minkowski content is finite for some \(s\) with \(0<s\le N-1\).

Let \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) be such that \(p^+<N\) and \(r(x)\le p_*(x)\). Assume that \(r(x)\) is subcritical outside a neighborhood of \(K\), i.e., \(\inf _{\partial \Omega \setminus K(r_0)} (p_*(x)-r(x))>0\). Moreover, assume that \(r(x)\) reaches \(p_*(x)\) in \(K\) at the following rate

$$\begin{aligned} r(x)\le p_*(x)-\frac{\varphi \left( \frac{1}{\mathrm{dist}(x,K)}\right) }{\ln \left( \frac{1}{\mathrm{dist}(x,K)}\right) } \quad \text{ for } \text{ almost } \text{ every } x\in K(r_0)\cap \partial \Omega . \end{aligned}$$

Then, the embedding \(W^{1,p(x)}(\Omega )\hookrightarrow L^{r(x)}(\partial \Omega )\) is compact.

Proof

Let us prove that

$$\begin{aligned} \lim _{\varepsilon \rightarrow 0^+}\sup \left\{ \int \limits _{K(\varepsilon )\cap \partial \Omega } |v(x)|^{r(x)} \mathrm{d}S :v\in W^{1,p(x)}(\Omega )\; \text{ and } \;\Vert v\Vert _{W^{1,p(x)}(\Omega )}\le 1 \right\} =0.\qquad \end{aligned}$$
(3.1)

First, we take \(\beta \) such that \(0<\beta < s/p^+_*\) and \(\varepsilon >0\) such that \(\varepsilon ^{-1}>r_0^{-1}\) and \(\varphi (\frac{1}{\varepsilon })\ge 1\). For each \(n\in \mathbb{N }\), we consider \(\eta _n=\varepsilon ^{-\beta n}\). We choose \(x\in (K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega \), then, we have

$$\begin{aligned} \eta _n^{r(x)-p_*(x)} \le \eta _n^{-\frac{\varphi \left( \frac{1}{\mathrm{dist}(x,K)}\right) }{\ln \left( \frac{1}{\mathrm{dist}(x,K)}\right) }} \le \eta _n^{-\frac{\varphi \left( \frac{1}{\varepsilon ^{n+1}}\right) }{\ln \left( \frac{1}{\varepsilon ^{n+1}}\right) }} = \varepsilon ^{-\frac{\beta n}{n+1}\varphi \left( \frac{1}{\varepsilon ^{n+1}}\right) } = A_n. \end{aligned}$$

On the other hand, we know that \(\mathcal{H }(K(r)\cap \partial \Omega )\le C r^s\) and we can estimate the following term

$$\begin{aligned} \int \limits _{(K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega } \eta _n^{r(x)} \mathrm{d}S\le \eta _n^{p^+_*}\int \limits _{K(\varepsilon ^n)\cap \partial \Omega } \mathrm{d}S\le C\varepsilon ^{n(s-\beta p^+_*)} \end{aligned}$$

Now, we have

$$\begin{aligned}&\int \limits _{(K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega }|v(x)|^{r(x)} \mathrm{d}S\\&\quad \le \int \limits _{(K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega }|v(x)|^{r(x)}\left( \frac{|v(x)|}{\eta _n}\right) ^{p_*(x)-r(x)} \mathrm{d}S+ \int \limits _{(K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega } \eta _n^{r(x)} \mathrm{d}S\\&\quad \le A_n \int \limits _{(K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega }|v(x)|^{p_*(x)} \mathrm{d}S+C\varepsilon ^{n(s-\beta p^+_*)} \end{aligned}$$

for each \(n_0\in \mathbb{N }\), we obtain

$$\begin{aligned} \int \limits _{K(\varepsilon ^{n_0})\cap \partial \Omega }|v(x)|^{r(x)} \mathrm{d}S&= \sum ^\infty _{n=n_0}\int \limits _{(K(\varepsilon ^n)\setminus K(\varepsilon ^{n+1}))\cap \partial \Omega }|v(x)|^{r(x)} \mathrm{d}S\\&\le (\sup _ {n\ge n_0} A_n) \int \limits _{K(\varepsilon ^{n_0})\cap \partial \Omega } |v(x)|^{p_*(x)} \mathrm{d}S+C\sum ^\infty _{n=n_0}\varepsilon ^{n(s-\beta p^+_*)} \end{aligned}$$

Using that \(\Vert v\Vert _{p_*,\partial \Omega }\le C\Vert v\Vert _{1,p}\) and that \((s-\beta p^+_*)>0\), we can conclude (3.1).

Finally, let \(\{v_n\}_{n\in \mathbb{N }}\subset W^{1,p(x)}(\Omega )\) and \(v\in W^{1,p(x)}(\Omega )\) be such that

$$\begin{aligned} v_n\rightharpoonup v \quad \text{ weakly } \text{ in } \; W^{1,p(x)}(\Omega ). \end{aligned}$$

Then,

$$\begin{aligned}&v_n\rightharpoonup v \quad \text{ weakly } \text{ in } \; L^{r(x)}(\partial \Omega ),\\&v_n\rightarrow v \quad \text{ strongly } \text{ in } L^{s(x)}(\partial \Omega ) \text{ for } \text{ every } \;s\; \text{ such } \text{ that } \inf _{\partial \Omega }(p_*(x)-s(x)) >0, \end{aligned}$$

therefore \(v_n\rightarrow v\) in \(L^{r(x)}(\partial \Omega \setminus K(\varepsilon ))\) for each \(\varepsilon >0\) small. Hence,

$$\begin{aligned} \limsup _{n\rightarrow \infty }\int \limits _{\partial \Omega }|v_{n}(x)-v(x)|^{r(x)} \mathrm{d}S&= \limsup _{n\rightarrow \infty }\Big (\int \limits _{K(\varepsilon )\cap \partial \Omega } |v_{n}(x)-v(x)|^{r(x)}\mathrm{d}S\\&+\int \limits _{\partial \Omega \setminus K(\varepsilon )}|v_{n}(x)-v(x)|^{r(x)} \mathrm{d}S\Big )\\&\le \sup _{n\in \mathbb{N }} \int \limits _{K(\varepsilon )\cap \partial \Omega }|v_{n}(x)-v(x)|^{r(x)} \mathrm{d}S \end{aligned}$$

So, by (3.1), we conclude the desired result. \(\square \)

Now it is straightforward to derive, analogous to Corollary 3.5 in [18],

Corollary 3.2

Let \(p\in \mathcal P (\Omega )\) be such that \(p^+<N\) and let \(r\in \mathcal P (\partial \Omega )\). Suppose that there exist \(x_0\in \Omega ,\,C>0,\,n\in \mathbb{N },\,r_0>0\) such that \(\inf _{\partial \Omega \setminus B_{r_0}(x_0)}(p_*(x)-r(x))>0\) and \(r(x)\le p_*(x)-c\frac{\ln ^n(\frac{1}{|x-x_0|})}{\ln (\frac{1}{|x-x_0|})}\) for almost every \(x\in \partial \Omega \cap B_{r_0}(x_0)\). Then, the embedding \(W^{1,p(x)}(\Omega )\hookrightarrow L^{r(x)}(\partial \Omega )\) is compact.

4 The concentration–compactness principle for the Sobolev trace immersion

This section is devoted to the extension of the CCP to the trace immersion.

Let \(r\in \mathcal P (\partial \Omega )\) be a continuous critical exponent in the sense that

$$\begin{aligned} \mathcal{A }_T:=\{x\in \partial \Omega :r(x)=p_*(x)\}\ne \emptyset . \end{aligned}$$

We define the Sobolev trace constant in \(W^{1,p(x)}_{\Gamma }(\Omega )\) as

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega , \Gamma ) := \inf _{v\in W^{1,p(x)}_{\Gamma }(\Omega ) } \frac{\Vert v\Vert _{1,p(x)}}{\Vert v\Vert _{r(x), \partial \Omega }} = \inf _{v\in W^{1,p(x)}_{\Gamma }(\Omega ) } \frac{\Vert v\Vert _{1,p(x)}}{\Vert v\Vert _{r(x), \partial \Omega \setminus \Gamma }} \end{aligned}$$

More precisely, we prove

Theorem 4.1

Let \(\{u_n\}_{n\in \mathbb{N }}\subset W^{1,p(x)}(\Omega )\) be a sequence such that \(u_n\rightharpoonup u\) weakly in \(W^{1,p(x)}(\Omega )\). Then, there exists a countable set \(I\), positive numbers \(\{\mu _i\}_{i\in I}\) and \(\{\nu _i\}_{i\in I}\) and points \(\{x_i\}_{i\in I}\subset \mathcal{A }_T\subset \partial \Omega \) such that

$$\begin{aligned}&|u_n|^{r(x)} \mathrm{d}S \rightharpoonup \nu = |u|^{r(x)} \mathrm{d}S + \sum _{i\in I} \nu _i \delta _{x_i} \quad \text{ weakly-* } \text{ in } \text{ the } \text{ sense } \text{ of } \text{ measures, }\end{aligned}$$
(4.1)
$$\begin{aligned}&|\nabla u_n|^{p(x)} \mathrm{d}x \rightharpoonup \mu \ge |\nabla u|^{p(x)} \mathrm{d}x + \sum _{i\in I} \mu _i \delta _{x_i} \quad \text{ weakly-* } \text{ in } \text{ the } \text{ sense } \text{ of } \text{ measures, }\end{aligned}$$
(4.2)
$$\begin{aligned}&\bar{T}_{x_i} \nu _i^{\frac{1}{r(x_i)}}\le \mu _i^{\frac{1}{p(x_i)}}, \end{aligned}$$
(4.3)

where \(\bar{T}_{x_i} = \sup _{\varepsilon >0} T(p(\cdot ), q(\cdot ), \Omega _{\varepsilon , i}, \Gamma _{\varepsilon , i})\) is the localized Sobolev trace constant where

$$\begin{aligned} \Omega _{\varepsilon , i} = \Omega \cap B_{\varepsilon }(x_i) \quad \text{ and }\quad \Gamma _{\varepsilon , i} := \partial B_{\varepsilon }(x_i)\cap \Omega . \end{aligned}$$

Proof

The proof is very similar to the one for the Sobolev immersion Theorem, see [10], so we only make a sketch stressing the differences between the two cases.

As in [12, Theorem 1.1], it is enough to consider the case where \(u_n\rightharpoonup 0\) weakly in \(W^{1,p(x)}(\Omega )\).

Take \(\phi \in C^\infty (\bar{\Omega })\). According to Theorem 2.2, we have

$$\begin{aligned} T(p(\cdot ),q(\cdot ),\Omega ) \Vert \phi u_j\Vert _{r(x)} \le \Vert \phi u_j\Vert _{1,p(x)}. \end{aligned}$$
(4.4)

We have that

$$\begin{aligned} \Vert \phi u_j\Vert _{1,p(x)}\le C(\Vert \nabla (\phi u_j)\Vert _{p(x)}+\Vert \phi u_j\Vert _{p(x)}) \end{aligned}$$

On the other hand,

$$\begin{aligned} |\ \Vert \nabla (\phi u_j)\Vert _{p(x)} - \Vert \phi \nabla u_j\Vert _{p(x)} |\le \Vert u_j \nabla \phi \Vert _{p(x)}. \end{aligned}$$

Then, as \(u_n\rightharpoonup 0\), we observe that the right hand side of the inequality converges to 0. In fact, we can assume that \(\rho _{p(x)}(u)< 1\), then

$$\begin{aligned} \Vert u_j \nabla \phi \Vert _{p(x)}&\le (\Vert \nabla \phi \Vert _{\infty }+1)^{p^+} \Vert u_j \Vert _{p(x)}\\&\le (\Vert \nabla \phi \Vert _{\infty }+1)^{p^+} \rho _{p(x)}(u_j)^{1/p_-}\rightarrow 0 \end{aligned}$$

We the same argument, we obtain that

$$\begin{aligned} \Vert \phi u_j\Vert _{p(x)}\rightarrow 0 \end{aligned}$$

Finally, if we take the limit for \(j\rightarrow \infty \) in (4.4), we arrive at

$$\begin{aligned} T(p(\cdot ),r(\cdot ),\Omega ) \Vert \phi \Vert _{L_\nu ^{r(x)}(\partial \Omega )} \le \Vert \phi \Vert _{L_\mu ^{p(x)}(\Omega )}, \end{aligned}$$
(4.5)

for every \(\phi \in C^\infty (\bar{\Omega })\). Observe that if \(\phi \in C^\infty _c(\mathbb{R }^N)\) and \(U\subset \mathbb{R }^N\) is any open set containing the support of \(\phi \), the constant in (4.5) can be replaced by \(T(p(\cdot ),q(\cdot ),\Omega \cap U, \partial U\cap \Omega )\).

Now, the exact same proof of [12, Theorem 1.1] implies that the points \(\{x_i\}_{i\in I}\) must belong to the critical set \(\mathcal{A }_T\).

Let \(\phi \in C^\infty _c(\mathbb{R }^N)\) be such that \(0\le \phi \le 1,\,\phi (0)=1\) and supp\((\phi )\subset B_1(0)\). Now, for each \(i\in I\) and \(\varepsilon >0\), we denote \(\phi _{\varepsilon ,i}(x):= \phi ((x-x_i)/\varepsilon )\).

From (4.5) and the subsequent remark we obtain

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega _{\varepsilon ,i}, \Gamma _{\varepsilon , i}) \Vert \phi _{\varepsilon ,i}\Vert _{L^{r(x)}_\nu (\partial \Omega \cap B_\varepsilon (x_i))} \le \Vert \phi _{\varepsilon ,i}\Vert _{L^{p(x)}_\mu (\Omega \cap B_\varepsilon (x_i))}. \end{aligned}$$

As in [12], we have

$$\begin{aligned} \rho _\nu (\phi _{i_0,\varepsilon })&:= \int \limits _{\partial \Omega \cap B_\varepsilon (x_{i_0})}|\phi _{i_0,\varepsilon }|^{r(x)} d\nu \\&= \int \limits _{\partial \Omega \cap B_\varepsilon (x_{i_0})} |\phi _{i_0,\varepsilon }|^{r(x)}|u|^{r(x)} \mathrm{d}S + \sum _{i\in I} \nu _i\phi _{i_0,\varepsilon }(x_i)^{r(x_i)}\\&\ge \nu _{i_0}. \end{aligned}$$

From now on, we will denote

$$\begin{aligned} r^+_{i,\varepsilon }:=\sup _{\partial \Omega \cap B_\varepsilon (x_i)}r(x),\quad r^-_{i,\varepsilon }:=\inf _{\partial \Omega \cap B_\varepsilon (x_i)}r(x),\\ p^+_{i,\varepsilon }:=\sup _{\Omega \cap B_\varepsilon (x_i)}p(x),\quad p^-_{i,\varepsilon }:=\inf _{\Omega \cap B_\varepsilon (x_i)}p(x). \end{aligned}$$

If \(\rho _\nu (\phi _{i_0,\varepsilon })<1\), then

$$\begin{aligned} \Vert \phi _{i_0,\varepsilon }\Vert _{L^{r(x)}_\nu (\partial \Omega \cap B_\varepsilon (x_{i_0}))} \ge \rho _\nu (\phi _{i_0,\varepsilon })^{1/r^-_{i,\varepsilon }} \ge \nu _{i_0}^{1/r^-_{i,\varepsilon }}. \end{aligned}$$

Analogously, if \(\rho _\nu (\phi _{i_0,\varepsilon })>1\), then

$$\begin{aligned} \Vert \phi _{i_0,\varepsilon }\Vert _{L^{r(x)}_\nu (\partial \Omega \cap B_\varepsilon (x_{i_0}))} \ge \nu _{i_0}^{1/r^+_{i,\varepsilon }}. \end{aligned}$$

Therefore,

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega _{\varepsilon ,i}, \Gamma _{\varepsilon , i}) \min \left\{ \nu _i^\frac{1}{r^+_{i,\varepsilon }}, \nu _i^\frac{1}{r^-_{i,\varepsilon }}\right\} \le \Vert \phi _{i,\varepsilon }\Vert _{L^{p(x)}_\mu (\Omega \cap B_\varepsilon (x_i))}. \end{aligned}$$

On the other hand,

$$\begin{aligned} \int \limits _{\Omega \cap B_\varepsilon (x_i)} |\phi _{i,\varepsilon }|^{p(x)} \mathrm{d}\mu \le \mu (\Omega \cap B_{\varepsilon }(x_i)) \end{aligned}$$

hence

$$\begin{aligned} \Vert \phi _{i,\varepsilon }\Vert _{L^{p(x)}(\Omega \cap B_\varepsilon (x_i))}&\le \max \Big \{ \rho _\mu (\phi _{i,\varepsilon })^\frac{1}{p^+_{i,\varepsilon }}, \rho _\mu (\phi _{i,\varepsilon })^\frac{1}{p^-_{i,\varepsilon }}\Big \}\\&\le \max \Big \{ \mu (\Omega \cap B_\varepsilon (x_i))^\frac{1}{p^+_{i,\varepsilon }}, \mu (\Omega \cap B_\varepsilon (x_i))^\frac{1}{p^-_{i,\varepsilon }}\Big \}, \end{aligned}$$

so we obtain,

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega _{\varepsilon ,i}, \Gamma _{\varepsilon , i}) \min \Big \{ \nu _i^\frac{1}{r^+_{i,\varepsilon }}, \nu _i^\frac{1}{r^-_{i,\varepsilon }}\Big \} \le \max \Big \{ \mu (\Omega \cap B_\varepsilon (x_i))^\frac{1}{p^+_{i,\varepsilon }}, \mu (\Omega \cap B_\varepsilon (x_i))^\frac{1}{p^-_{i,\varepsilon }}\Big \}. \end{aligned}$$

As \(p\) and \(r\) are continuous functions and as \(r(x_i) = p_*(x_i)\), letting \(\varepsilon \rightarrow 0\), we get

$$\begin{aligned} \bar{T}_{x_i} \nu _i^{1/p_*(x_i)} \le \mu _i^{1/p(x_i)}, \end{aligned}$$

where \(\mu _i := \lim _{\varepsilon \rightarrow 0}\mu (\Omega \cap B_\varepsilon (x_i))\).

The proof is now complete. \(\square \)

5 Non-compact case

In this section, we parallel the results for the Sobolev immersion Theorem obtained in [10] to the Sobolev trace Theorem.

In that spirit, the result we obtain states that if the Sobolev trace constant is strictly smaller than the smallest localized Sobolev trace constant in the critical set \(\mathcal{A }_T\), then there exists an extremal for the trace inequality.

Then, the objective will be to find conditions on \(p(x), r(x)\), and \(\Omega \) in order to ensure that strict inequality. We find global and local conditions.

As in [10], global conditions are easily obtained and they say that if the surface measure of the boundary is larger than the volume of the domain, then the strict inequality holds and therefore an extremal for the trace inequality exists.

Once again, local conditions are more difficult to find. In this case, the geometry of the domain comes into play.

We begin with a lemma that gives a bound for the constant \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\).

Lemma 5.1

Assume that the exponents \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) are continuous functions with modulus of continuity \(\rho \) such that

$$\begin{aligned} \ln (\lambda ) \rho (\lambda )\rightarrow 0\quad \text{ as } \lambda \rightarrow 0+. \end{aligned}$$

Then, it holds that

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\le \inf _{x\in \mathcal{A }_T}\bar{K}(N,p(x))^{-1}. \end{aligned}$$

Proof

The proof uses the same rescaling argument as in [10] but we have to be more careful with the boundary term.

Let \( x_0\in \mathcal{A }_T\). Without loss of generality, we can assume that \(x_0=0\) and that there exists \(r>0\) such that

$$\begin{aligned} \Omega _r := B_r\cap \Omega =\{x \in B_r:x_N>\psi (x^{\prime })\}, \quad B_r\cap \partial \Omega =\{x\in B_r:x_N=\psi (x^{\prime })\}, \end{aligned}$$

where \(x=(x^{\prime },x_N),\,x^{\prime }\in \mathbb{R }^{N-1},\,x_N\in \mathbb{R },\,B_r\) is the ball centered at the origin of radius \(r\) and \(\psi :\mathbb{R }^{N-1}\rightarrow \mathbb{R }\) is of class \(C^2\) with \(\psi (0)=0\) and \(\nabla \psi (0)=0\).

First, we observe that our regularity assumptions on \(p\) and \(r\) imply that

$$\begin{aligned}&r(\lambda x) = r(0) + \rho _1(\lambda , x) = p_*(0) + \rho _1(\lambda , x),\\&p(\lambda x) = p(0) + \rho _2(\lambda , x), \end{aligned}$$

with \(\lim _{\lambda \rightarrow 0+}\lambda ^{\rho _k(\lambda , x)} = 1\) uniformly in \(\bar{\Omega }_r\). From now on, for simplicity, we write \(p=p(0)\) and \(p_*=p_*(0)=r(0)\).

Now, let \(\phi \in C^\infty _c(\mathbb{R }^N)\) and define \(\phi _\lambda \) to be the rescaled function around \(0\in \mathcal{A }_T\) as \(\phi _\lambda =\lambda ^\frac{-(N-1)}{p_*}\phi (\frac{x}{\lambda })\) and observe that, since \(\Gamma \) is closed and \(0\not \in \Gamma ,\,\phi _\lambda \in W^{1,p(x)}_\Gamma (\Omega )\) for \(\lambda \) small. Then, we have

$$\begin{aligned} \int \limits _{\partial \Omega } \phi _\lambda (x)^{r(x)} \mathrm{d}S&=\int \limits _{\partial \Omega _\lambda } \lambda ^{\frac{-(N-1)\rho _1(\lambda ,y)}{p_*}} \phi (y)^{p_* + \rho _1(\lambda , y)} \mathrm{d}S\\&=\int \limits _{\mathbb{R }^{N-1}}\lambda ^{\frac{-(N-1)\rho _1(\lambda ,y)}{p_*}} \phi (y^{\prime },\psi _\lambda (y^{\prime }))^{p_*+\rho _1(\lambda , y^{\prime })}\sqrt{1+|\nabla \psi _\lambda (y^{\prime })|^2} \mathrm{d}y^{\prime }, \end{aligned}$$

where \(\Omega _\lambda =\frac{1}{\lambda }\cdot \Omega \) and \(\psi _\lambda (y^{\prime }) = \tfrac{1}{\lambda }\psi (\lambda y^{\prime })\).

Since \(\psi (0)=0\) and \(\nabla \psi (0)=0\) we have that \(\psi _\lambda (y^{\prime }) = O(\lambda )\) and \(|\nabla \psi _\lambda (y^{\prime })| = O(\lambda )\) uniformly in \(y^{\prime }\) for \(y^{\prime }\in \text{ supp }(\phi )\) which is compact. Moreover, our assumption on \(\rho _1\) imply that

$$\begin{aligned} \lambda ^{\frac{-(N-1) \rho _1(\lambda , y)}{p_*}}\phi (y)^{\rho _1(\lambda , y)}\rightarrow 1\; \text{ when } \;\lambda \rightarrow 0+ \end{aligned}$$

uniformly in \(y\).

Therefore, we get

$$\begin{aligned} \rho _{r(x),\partial \Omega }(\phi _\lambda ) = \int \limits _{\partial \Omega } \phi _\lambda (x)^{r(x)} \mathrm{d}S \rightarrow \int \limits _{\mathbb{R }^{N-1}}|\phi (y^{\prime },0)|^{p_*} \mathrm{d}y^{\prime }, \quad \text{ as }\; \lambda \rightarrow 0+. \end{aligned}$$
(5.1)

In particular, (5.1) imply that \(\Vert \phi _\lambda \Vert _{r(x), \partial \Omega }\) is bounded away from 0 and \(\infty \). Moreover, arguing as before, we find

$$\begin{aligned} 1&= \int \limits _{\partial \Omega } \left( \frac{\phi _\lambda (x)}{\Vert \phi _\lambda \Vert _{r(x), \partial \Omega }}\right) ^{r(x)} \mathrm{d}S\\&=\int \limits _{\mathbb{R }^{N-1}}\lambda ^{\frac{-(N-1)\rho _1(\lambda ,y)}{p_*}} \left( \frac{\phi (y^{\prime },\psi _\lambda (y^{\prime }))}{\Vert \phi _\lambda \Vert _{r(x), \partial \Omega }}\right) ^{p_*+\rho _1(\lambda , y^{\prime })}\sqrt{1+|\nabla \psi _\lambda (y^{\prime })|^2} \mathrm{d}y^{\prime }, \end{aligned}$$

so

$$\begin{aligned} \lim _{\lambda \rightarrow 0+}\Vert \phi _\lambda \Vert _{r(x), \partial \Omega } = \Vert \phi \Vert _{p_*, \partial \mathbb{R }^N_+}. \end{aligned}$$

For the gradient term, we have

$$\begin{aligned} \int \limits _{\Omega } |\nabla \phi _\lambda |^{p(x)} \mathrm{d}x&= \int \limits _{\Omega } \lambda ^{-\frac{N}{p}p(x)} |\nabla \phi (\tfrac{x}{\lambda })|^{p(x)} \mathrm{d}x\\&= \int \limits _{\Omega _\lambda } \lambda ^{-\frac{N}{p}\rho _2(\lambda , y)} |\nabla \phi (y)|^{p + \rho _2(\lambda , y)} \mathrm{d}y. \end{aligned}$$

Now, observing that \(\Omega _\lambda \rightarrow \mathbb{R }^N_+\) and from our hypothesis on \(\rho _2\), we arrive at

$$\begin{aligned} \rho _{p(x), \Omega }(\phi _\lambda ) = \int \limits _{\Omega } |\nabla \phi _\lambda (x)|^{p(x)} \mathrm{d}x \rightarrow \int \limits _{\mathbb{R }^N_+} |\nabla \phi (y)|^p \mathrm{d}y\quad \text{ as } \;\lambda \rightarrow 0+. \end{aligned}$$

Similar computations show that

$$\begin{aligned} \rho _{p(x), \Omega }(\phi _\lambda ) = \int \limits _{\Omega } |\phi _\lambda (x)|^{p(x)} \mathrm{d}x = O(\lambda ^p), \end{aligned}$$

so

$$\begin{aligned} \rho _{1,p(x), \Omega }(\phi _\lambda ) = \int \limits _\Omega |\nabla \phi _\lambda (x)|^{p(x)} + | \phi _\lambda (x)|^{p(x)} \mathrm{d}x \rightarrow \int \limits _{\mathbb{R }^N_+} |\nabla \phi (y)|^p \mathrm{d}y\quad \text{ as } \;\lambda \rightarrow 0+. \end{aligned}$$

Arguing as in the boundary term, we conclude that

$$\begin{aligned} \lim _{\lambda \rightarrow 0+}\Vert \phi _\lambda \Vert _{1,p(x), \Omega } = \Vert \nabla \phi \Vert _{p, \mathbb{R }^N_+}. \end{aligned}$$

Now, by the definition of \(T(p(\cdot ),r(\cdot ),\Omega ,\Gamma )\), it follows that

$$\begin{aligned} T(p(\cdot ),r(\cdot ),\Omega ,\Gamma )\le \frac{\Vert \phi _\lambda \Vert _{1,p(x)}}{\Vert \phi _\lambda \Vert _{r(x), \partial \Omega }} \end{aligned}$$

and taking the limit \(\lambda \rightarrow 0+\), we obtain

$$\begin{aligned} T(p(\cdot ),q(\cdot ),\Omega ,\Gamma )\le \frac{\Vert \nabla \phi \Vert _{p, \mathbb{R }^N_+ }}{\Vert \phi \Vert _{p_*, \partial \mathbb{R }^N_+}} \end{aligned}$$

for every \(\phi \in C^\infty _c(\mathbb{R }^N)\). Then,

$$\begin{aligned} T(p(\cdot ),q(\cdot ),\Omega ,\Gamma )\le \bar{K}(N,p)^{-1} \end{aligned}$$

and so, since \(x_0=0\) is arbitrary,

$$\begin{aligned} T(p(\cdot ),q(\cdot ),\Omega ,\Gamma )\le \inf _{x\in \mathcal{A }_T} \bar{K}(N,p(x))^{-1}, \end{aligned}$$

as we wanted to show. \(\square \)

Now we prove a Lemma that gives us some monotonicity of the constants \(T(p(\cdot ),q(\cdot ), \Omega ,\Gamma )\) with respect to \(\Omega \) and \(\Gamma \subset \partial \Omega \).

Lemma 5.2

Let \(\Omega _1, \Omega _2 \subset \mathbb{R }^N\) be two \(C^2\) domains, and let \(\Gamma _i\subset \partial \Omega _i,\,i=1,2\) be closed.

If \(\Omega _2\subset \Omega _1,\,(\partial \Omega _2\cap \Omega _1)\subset \Gamma _2\) and \((\Gamma _1\cap \partial \Omega _2)\subset \Gamma _2\), then

$$\begin{aligned} T(p(\cdot ),q(\cdot ),\Omega _1,\Gamma _1) \le T(p(\cdot ),q(\cdot ),\Omega _2, \Gamma _2). \end{aligned}$$

Proof

The proof is a simple consequence that if \(v\in W^{1,p(x)}_{\Gamma _2}(\Omega _2)\), then extending \(v\) by \(0\) to \(\Omega _1\setminus \Omega _2\) gives that \(v\in W^{1,p(x)}_{\Gamma _1}(\Omega _1)\). \(\square \)

Remark 5.3

Lemma 5.2 will be used in the following situation: For \(\Omega \subset \mathbb{R }^N\) and \(\Gamma \subset \partial \Omega \) closed, we take \(x_0\in \partial \Omega \setminus \Gamma \) and \(r>0\) such that \((B_r(x_0)\cap \partial \Omega )\cap \Gamma = \emptyset \).

Then, if we call \(\Omega _r := \Omega \cap B_r(x_0),\,\Gamma _r = \partial B_r(x_0)\cap \bar{\Omega }\), we obtain

$$\begin{aligned} T(p(\cdot ),q(\cdot ),\Omega ,\Gamma ) \le T(p(\cdot ),q(\cdot ),\Omega _r, \Gamma _r). \end{aligned}$$

As a consequence of Lemma 5.1 and Lemma 5.2, we easily obtain the following Theorem.

Theorem 5.4

Let \(\Omega \subset \mathbb{R }^N\) be a bounded \(C^2\) domain and \(\Gamma \subset \partial \Omega \) be closed. Let \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) be continuous functions with modulus of continuity \(\rho \) such that

$$\begin{aligned} \ln (\lambda )\rho (\lambda )\rightarrow 0 \quad \text{ as } \lambda \rightarrow 0+. \end{aligned}$$

Then, it holds that

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\le \bar{T} \le \inf _{x\in \mathcal{A }_T} \bar{K}(N,p(x))^{-1}. \end{aligned}$$

Now, in the spirit of [10], we use the convexity method of [17] to prove that a minimizing sequence either is strongly convergent or concentrates around a single point.

Theorem 5.5

Assume that \(r^->p^+\). Let \(\{u_n\}_{n\in \mathbb{N }}\subset W^{1,p(x)}_\Gamma (\Omega )\) be a minimizing sequence for \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\). Then, the following alternative holds:

  • \(\{u_n\}_{n\in \mathbb{N }}\) has a strongly convergence subsequence in \(L^{r(x)}(\partial \Omega )\) or

  • \(\{u_n\}_{n\in \mathbb{N }}\) has a subsequence such that \(|u_n|^{r(x)}\, \mathrm{d}S\rightharpoonup \delta _{x_0}\) weakly in the sense of measures and \(|\nabla u_n|^{p(x)}\, \mathrm{d}x\rightharpoonup \bar{T}_{x_0}^{p(x_0)}\delta _{x_0}\) weakly in the sense of measures, for some \(x_0\in \mathcal{A }_T\) and \(u_n\rightarrow 0\) strongly in \(L^{p(x)}(\Omega )\).

Proof

Let \(\{u_n\}_{n\in \mathbb{N }}\subset W^{1,p(x)}_\Gamma (\Omega )\) be a normalized minimizing sequence for \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\), i.e.

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega , \Gamma ) = \lim _{n\rightarrow \infty } \Vert u_n\Vert _{1,p(x)}\quad \text{ and }\quad \Vert u_n\Vert _{r(x), \partial \Omega } = 1. \end{aligned}$$

For simplicity, we denote by \(T=T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\). The concentration compactness principle for the trace immersion, Theorem 4.1, together with the estimate given in Theorem 5.4 gives

$$\begin{aligned} 1&=\lim _{n\rightarrow \infty }\int \limits _{\Omega }\frac{|\nabla u_n|^{p(x)}+ |u_n|^{p(x)}}{\Vert u_n\Vert _{1, p(x)}^{p(x)}} \mathrm{d}x\\&\ge \int \limits _{\Omega }\frac{|\nabla u|^{p(x)} + |u|^{p(x)}}{T^{p(x)}} \mathrm{d}x+\sum _{i\in I} T^{-p(x_i)}\mu _{i}\\&\ge \min \{(T^{-1}\Vert u\Vert _{1,p(x)})^{p^+},{(T^{-1}\Vert u\Vert _{1,p(x)})^{p^-}}\} + \sum _{i\in I} \bar{T}_{x_i}^{-p(x_i)}\mu _{i}\\&\ge \min \{\Vert u\Vert _{r(x), \partial \Omega }^{p^+},\Vert u\Vert _{r(x), \partial \Omega }^{p^-}\}+\sum _{i\in I}\nu _i^{\frac{p(x_i)}{p_*(x_i)}}\\&\ge \Vert u\Vert _{r(x), \partial \Omega }^{p^+} + \sum _{i\in I} \nu _i^{\frac{p(x_i)}{p_*(x_i)}}\\&\ge \rho _{r(x), \partial \Omega }(u)^{\frac{p^+}{r^-}} + \sum _{i\in I} \nu _i^{\frac{p(x_i)}{p_*(x_i)}}. \end{aligned}$$

On the other hand, since \(\{u_n\}_{n\in \mathbb{N }}\) is normalized in \(L^{r(x)}(\partial \Omega )\), we get

$$\begin{aligned} 1=\int \limits _{\partial \Omega }|u|^{r(x)} \mathrm{d}S + \sum _{i\in I} \nu _i \end{aligned}$$

So, since \(p^+<r^-\), we can conclude that either \(u\) is a minimizer of the corresponding problem and the set \(I\) is empty, or \(v=0\) and the set \(I\) contains a single point.

If the second case occur, it is easily seen that the second alternative holds. \(\square \)

With the aid of Theorem 5.5, we can now prove the main result of the section.

Theorem 5.6

Let \(\Omega \) be a bounded domain in \(\mathbb{R }^N\) with \(\partial \Omega \in C^1\). Let \(\Gamma \subset \partial \Omega \) be closed. Let \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) be exponents that satisfy the regularity assumptions of Theorem 5.4. Assume, moreover, that \(p^+<r^-\).

Then, if the following strict inequality holds \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma ) < \bar{T},\) the infimum (1.4) is attained.

Proof

Let \(\{u_n\}_{n\in \mathbb{N }}\subset W^{1,p(x)}_{\Gamma }(\Omega )\) be a minimizing sequence for (1.4) normalized in \(L^{r(x)}(\partial \Omega )\).

If \(\{u_n\}_{n\in \mathbb{N }}\) has a strongly convergence subsequence in \(L^{r(x)}(\partial \Omega )\), then the result holds.

Assume that this is not the case. Then, by Theorem 5.5, there exists \(x_0\in \mathcal{A }_T\) such that \(|u_n|^{r(x)}\, \mathrm{d}S\rightharpoonup \delta _{x_0}\) and \(|\nabla u_n|^{p(x)}\, \mathrm{d}x \rightharpoonup \bar{T}_{x_0}^{p(x_0)}\delta _{x_0}\) weakly in the sense of measures.

So for \(\varepsilon >0\), we have,

$$\begin{aligned} \int \limits _\Omega \frac{|\nabla u_n|^{p(x)} + |u_n|^{p(x)}}{(\bar{T}_{x_0}-\varepsilon )^{p(x)}} \mathrm{d}x \rightarrow \frac{\bar{T}_{x_0}^{p(x_0)}}{(\bar{T}_{x_0}-\varepsilon )^{p(x_0)}}>1. \end{aligned}$$

Then, there exists \(n_0\) such that for all \(n\ge n_0\), we know that

$$\begin{aligned} \Vert u_n\Vert _{1,p(x)} > \bar{T}_{x_0}-\varepsilon . \end{aligned}$$

Taking limit, we obtain

$$\begin{aligned} T(p(\cdot ), r(\cdot ),\Omega ,\Gamma ) \ge \bar{T}_{x_0}-\varepsilon . \end{aligned}$$

As \(\varepsilon >0\) is arbitrary, the result follows. \(\square \)

6 Conditions for the validity of \(T(p(\cdot ), r(\cdot ),\Omega ) < \bar{T}\)

In this section, we investigate under what conditions the strict inequality (1.7) holds. We provide two types of conditions. First, by some simple rough estimates we give global conditions, that is, a condition that involves some quantities measured in the whole domain \(\Omega \). This condition resembles the one found in [7]. Then, we devote ourselves to the more delicate problem of finding local conditions, that is, conditions that involves some quantities computed at a single point of \(\partial \Omega \). These types of conditions are in the spirit of [1, 8, 9].

6.1 Global conditions

Now, we want to show an example of when the condition (1.7) is guaranteed. We assume that \(\Gamma =\emptyset \), and using \(v=1\) as a test function, we can estimate

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega ) \le \frac{\Vert 1\Vert _{1,p(x)}}{\Vert 1\Vert _{r(x),\partial \Omega }}. \end{aligned}$$

It is easy to see that

$$\begin{aligned} \Vert 1\Vert _{1,p(x)} = \Vert 1\Vert _{p(x)} \le \max \left\{ |\Omega |^\frac{1}{p^+},|\Omega |^\frac{1}{p^-}\right\} \end{aligned}$$

and

$$\begin{aligned} \Vert 1\Vert _{r(x), \partial \Omega } \ge \min \{|\partial \Omega |^\frac{1}{r^+},|\partial \Omega |^\frac{1}{r^-}\}. \end{aligned}$$

So, if \(\Omega \) satisfies

$$\begin{aligned} \frac{\max \left\{ |\Omega |^\frac{1}{p^+},|\Omega |^\frac{1}{p^-}\right\} }{\min \{|\partial \Omega |^\frac{1}{r^+},|\partial \Omega |^\frac{1}{r^-}\}}< \bar{T}, \end{aligned}$$
(6.1)

then by Theorem 5.6 there exists an extremal for \(T(p(\cdot ), r(\cdot ), \Omega )\).

Observe that the family of sets that verify (6.1) is large. In fact, for any open set \(\Omega \) with \(C^1\) boundary, if we denote \(\Omega _t = t\cdot \Omega \) we have

$$\begin{aligned} \frac{\max \left\{ |\Omega _t|^\frac{1}{p^+},|\Omega _t |^\frac{1}{p^-}\right\} }{\min \{|\partial \Omega _t |^\frac{1}{r^+},|\partial \Omega _t|^\frac{1}{r^-}\}}&\le \frac{t^\frac{N}{p^+}|\Omega |^\frac{1}{p^+}}{t^\frac{N-1}{r^-}|\partial \Omega |^\frac{1}{r^-}} \quad \text{ for } t<1. \end{aligned}$$

Now, the hypothesis \(\frac{p^+}{r^-}<1\) imply that \(\frac{N}{p^+}-\frac{N-1}{r^-}\ge \frac{1}{p^+}>0\), so we can conclude that:

$$\begin{aligned} T(p(\cdot ), r(\cdot ), \Omega _t) < \bar{T}, \end{aligned}$$

if \(t>0\) is small enough.

6.2 Local conditions

As we mentioned in the introduction, the strategy to find local conditions for (1.7) to hold is to construct a test function to estimate \(T(p(\cdot ), r(\cdot ), \Omega , \Gamma )\) by scaling and truncating an extremal for \(\bar{K}(N,p(x))^{-1}\) with \(x\in \mathcal{A }_T\). In order for this argument to work, a result stating the equality \(\bar{T}_x = \bar{K}(N,p(x))^{-1}\) is needed. This is the content of our next result.

We begin with a Lemma that is a refinement of the asymptotic expansions found in the proof of Lemma 5.1 since we obtain uniform convergence for bounded sets of \(W^{1,p(x)}(\Omega )\). Though this lemma can be proved for variable exponents, we choose to prove it in the constant exponent case since this will be enough for our purposes and simplifies the arguments.

In order to prove the Lemma, we use the so-called Fermi coordinates in a neighborhood of some point \(x_0\in \partial \Omega \). Roughly speaking, the Fermi coordinates around \(x_0\in \partial \Omega \) describe \(x\in \Omega \) by \((y,t)\) where \(y\in \mathbb{R }^{N-1}\) are the coordinates in a local chart of \(\partial \Omega \) at \(x_0\), and \(t>0\) is the distance to the boundary along the inward unit normal vector.

Definition 6.1

(Fermi coordinates) We consider the following change of variables around a point \(x_0\in \partial \Omega \).

We assume that \(x_0=0\) and that \(\partial \Omega \) has the following representation in a neighborhood of \(0\):

$$\begin{aligned} \partial \Omega \cap V&= \{ x\in V:x_n = \psi (x^{\prime }),\ x^{\prime }\in U\subset \mathbb{R }^{N-1}\},\\ \Omega \cap V&= \{ x\in V:x_n > \psi (x^{\prime }),\ x^{\prime }\in U\subset \mathbb{R }^{N-1}\}. \end{aligned}$$

The function \(\psi :U\subset \mathbb{R }^{N-1}\rightarrow \mathbb{R }\) is assume to be at least of class \(C^2\) and that \(\psi (0)=0,\,\nabla \psi (0)=0\).

The change of variables is then defined as \(\Phi :U\times (0,\delta )\rightarrow \Omega \cap V\)

$$\begin{aligned} \Phi (y,t) = (y,\psi (y)) + t\nu (y), \end{aligned}$$

where \(\nu (y)\) is the unit inward normal vector, i.e.

$$\begin{aligned} \nu (y) = \frac{(-\nabla \psi (y), 1)}{\sqrt{1+|\nabla \psi (y)|^2}}. \end{aligned}$$

It is well known that \(\Phi \) defines a smooth diffeomorphism for \(\delta >0\) small enough.

Moreover, in [5] it is proved the following asymptotic expansions.

Lemma 6.2

With the notation introduced in Definition 6.1, the following asymptotic expansions hold

$$\begin{aligned} J\Phi (y,t) = 1- Ht + O(t^2 + |y|^2), \end{aligned}$$

where \(J\Phi \) is the Jacobian, and \(H\) is the mean curvature of \(\partial \Omega \).

Also, if we denote \(v(y,t) = u(\Phi (y,t))\) the function \(u\) read in Fermi coordinates, we have

$$\begin{aligned} |\nabla u(x)|^2 = (\partial _t v)^2+\sum _{i,j=1}^N\left( \delta ^{ij}+2h^{ij}t+O(t^2+|y|^2)\right) \partial _{y_i}v \partial _{y_j}v, \end{aligned}$$

where \(h^{ij}\) is the second fundamental form of \(\partial \Omega \).

For a general construction of the Fermi coordinates in differentiable manifolds, we refer to the book [14].

Lemma 6.3

Let \(1<p<N\) be a constant exponent and let \(u\) be a smooth function on \(\bar{\Omega }\). Then, there holds

$$\begin{aligned} \Vert u\Vert _{p_*, B_{\varepsilon }(x_0)\cap \partial \Omega }&= {\varepsilon }^\frac{N-1}{p_*}(1+o(1)) \Vert \tilde{u}_{\varepsilon }\Vert _{p_*, V\cap \partial \mathbb{R }^N_+},\\ \Vert u\Vert _{p, B_{\varepsilon }(x_0)\cap \Omega }&= {\varepsilon }^\frac{N}{p}(1+o(1))\Vert \tilde{u}_{\varepsilon }\Vert _{p, V\cap \mathbb{R }^N_+},\\ \Vert \nabla u\Vert _{p, B_{\varepsilon }(x_0)\cap \Omega }&= {\varepsilon }^{\frac{N-p}{p}}(1+o(1))\Vert \nabla \tilde{u}_{\varepsilon }\Vert _{p, V\cap \mathbb{R }^N_+}, \end{aligned}$$

where \(V\) is the unit ball transformed under the Fermi coordinates, \(o(1)\) is uniform in \(u\) for \(u\) in a bounded subset of \(W^{1,p}(\Omega ),\,\tilde{u}_{\varepsilon }(y) = \tilde{u}(\varepsilon y)\), and \(\tilde{u} \) is \(u\) read in Fermi coordinates.

Proof

If we denote by \(\Phi (y,t)\) the change of variables from Fermi coordinates to Euclidian coordinates, then, from Lemma 6.2 we have

$$\begin{aligned} J\Phi = 1 + O(\varepsilon )\quad \text{ in } B_{\varepsilon }(x_0)\cap \Omega , \end{aligned}$$

where \(J\Phi \) is the Jacobian of \(\Phi \),

$$\begin{aligned} J_{\partial \Omega }\Phi = 1 + O(\varepsilon ) \quad \text{ in } B_{\varepsilon }(x_0)\cap \partial \Omega , \end{aligned}$$

where \(J_{\partial \Omega }\Phi \) is the tangential Jacobian of \(\Phi \) and

$$\begin{aligned} |\nabla \tilde{u}_{\varepsilon }| = (1+O(\varepsilon )) |\nabla u| \end{aligned}$$

with \(O(\varepsilon )\) uniform in \(u\).

For a more comprehensive study of the Fermi coordinates see [5] and the book [14].

Now, we simply compute

$$\begin{aligned} \int \limits _{B_{\varepsilon }(x_0)\cap \partial \Omega } |u|^{p_*} \mathrm{d}S&= \int \limits _{({\varepsilon }\cdot V)\cap \partial \mathbb{R }^N_+} |\tilde{u}(y,0)|^{p_*}(1+O({\varepsilon })) \mathrm{d}y \\&= {\varepsilon }^{N-1}(1+O({\varepsilon })) \int \limits _{V\cap \partial \mathbb{R }^N_+} |\tilde{u}_{\varepsilon }(y,0)|^{p_*} \mathrm{d}y. \end{aligned}$$

In the same way,

$$\begin{aligned} \int \limits _{B_{\varepsilon }(x_0)\cap \partial \Omega } |\nabla u|^{p} \mathrm{d}x&= \int \limits _{({\varepsilon }\cdot V)\cap \partial \mathbb{R }^N_+} |\nabla \tilde{u}(y)|^{p} (1+O({\varepsilon })) \mathrm{d}y \\&= {\varepsilon }^{N-p}(1+O(\varepsilon )) \int \limits _{V\cap \partial \mathbb{R }^N_+} |\nabla \tilde{u}_{\varepsilon }(y))|^{p} \mathrm{d}y \end{aligned}$$

and

$$\begin{aligned} \int \limits _{B_{\varepsilon }(x_0)\cap \partial \Omega } |u|^{p} \mathrm{d}x&= \int \limits _{({\varepsilon }\cdot V)\cap \partial \mathbb{R }^N_+} |\tilde{u}(y)|^{p} (1+O({\varepsilon })) \mathrm{d}y \\&= {\varepsilon }^{N}(1+O(\varepsilon )) \int \limits _{V\cap \partial \mathbb{R }^N_+} |\tilde{u}_{\varepsilon }(y))|^{p} \mathrm{d}y. \end{aligned}$$

This completes the proof. \(\square \)

Now we can prove

Theorem 6.4

Let \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) be as in Theorem 5.4. Assume that \(x_0\in \mathcal{A }_T\) is a local minimum of \(p(x)\) and a local maximum of \(r(x)\). Then,

$$\begin{aligned} \bar{T}_{x_0} = \bar{K}(N,p(x_0))^{-1}. \end{aligned}$$

Proof

From the proof of Theorem 5.4, it follows that \(\bar{T}_{x_0} \le \bar{K}(N,p(x_0))^{-1}\).

Let us see that if \(x_0\) is a local minimum of \(p(x)\) and a local maximum of \(r(x)\) then the reverse inequality holds. Let us call \(p=p(x_0)\) and then \(p_*=p(x_0)_*=r(x_0)\).

Since \(p(x)\ge p\), by Young’s inequality with \(\frac{1}{p}=\frac{1}{p(x)}+\frac{1}{s(x)}\) we obtain

$$\begin{aligned} \int \limits _{\Omega _{\varepsilon }} |u|^p + |\nabla u|^p \mathrm{d}x \le \frac{p}{p^-_{\varepsilon }}\int \limits _{\Omega _{\varepsilon }} |u|^{p(x)} + |\nabla u|^{p(x)} \mathrm{d}x + 2\frac{p}{s^-_{\varepsilon }} |B_{\varepsilon }| \end{aligned}$$

where \(p^-_{\varepsilon } = \sup _{\Omega _{\varepsilon }} p(x)\).

It then follows that for any \(\lambda >0\),

$$\begin{aligned} \Vert \lambda ^{-1}u\Vert ^p_{1,p,\Omega _{\varepsilon }} \le (1+o(1)) \rho _{1,p(x),\Omega _{\varepsilon }}(\lambda ^{-1}u) + O(\varepsilon ^n). \end{aligned}$$

So, for any \(\delta >0\), taking \(\lambda = \Vert u\Vert _{1,p(x),\Omega _{\varepsilon }}+\delta \) we obtain

$$\begin{aligned} \Vert u\Vert _{1,p,\Omega _{\varepsilon }} \le \Vert u\Vert _{1,p(x),\Omega _{\varepsilon }}+\delta , \end{aligned}$$
(6.2)

if \(\varepsilon \) is small, depending only on \(\delta \).

Arguing in much the same way, we obtain

$$\begin{aligned} \Vert u\Vert _{r(x),\partial \Omega _{\varepsilon }} \le \Vert u\Vert _{p_*,\partial \Omega _{\varepsilon }}+\delta , \end{aligned}$$
(6.3)

for \(\varepsilon \) is small, depending only on \(\delta \).

Now, by (6.2) and (6.3) it follows that

$$\begin{aligned} \bar{Q}(p(\cdot ),r(\cdot ),\Omega _{\varepsilon })(u) = \frac{\Vert u\Vert _{1,p(x),\Omega _{\varepsilon }}}{\Vert u\Vert _{r(x),\partial \Omega _{\varepsilon }}}\ge \frac{\Vert u\Vert _{1,p,\Omega _{\varepsilon }}}{\Vert u\Vert _{p_*,\partial \Omega _{\varepsilon }}} + O(\delta ). \end{aligned}$$

Finally, by Lemma 6.3, we get

$$\begin{aligned} \bar{Q}(p(\cdot ),r(\cdot ),\Omega _{\varepsilon })(u) \ge \frac{\Vert \nabla \tilde{u}_{\varepsilon }\Vert _{p, V\cap \mathbb{R }^N_+}}{\Vert \tilde{u}_{\varepsilon }\Vert _{p_*, V\cap \partial \mathbb{R }^N_+}} + o(1) + O(\delta )\ge \bar{K}(N,p)^{-1} + o(1) + O(\delta ). \end{aligned}$$

So, taking infimum in \(u\in W^{1,p(x)}_{\Gamma _{\varepsilon }}(\Omega _{\varepsilon }),\,\varepsilon \rightarrow 0\) and \(\delta \rightarrow 0\) we obtain the desired result. \(\square \)

With the aid of Theorem 6.4 we are now in position to find local conditions to ensure the validity of \(T(p(\cdot ), r(\cdot ),\Omega , \Gamma ) < \bar{T}\), and so the existence of an extremal for \(T(p(\cdot ), r(\cdot ),\Omega , \Gamma )\).

We assume, to begin with, that there exists a point \(x_0\in \mathcal{A }_T\) such that \(\bar{T} = \bar{T}_{x_0}\). Moreover, this critical point \(x_0\) is assume to be a local minimum of \(p(x)\) and a local maximum of \(q(x)\). In view of Theorem 6.4, it follows that \(\bar{T} = \bar{T}_{x_0} = \bar{K}(N,p(x_0))^{-1}\).

The idea, then, is similar to the one used in [10]. We estimate \(T(p(\cdot ), r(\cdot ),\Omega , \Gamma )\) evaluating the corresponding Rayleigh quotient \(\bar{Q}(p(\cdot ), q(\cdot ), \Omega )\) in a properly rescaled function of the extremal for \(\bar{K}(N,p(x_0))^{-1}\). A fine asymptotic analysis of the Rayleigh quotient with respect to the scaling parameter will yield the desired result.

Hence, the main result of the section reads

Theorem 6.5

Let \(p\in \mathcal P (\Omega )\) and \(r\in \mathcal P (\partial \Omega )\) be \(C^2\) and that \(p^+<r^-\). Assume that there exists \(x_0\in \mathcal{A }_T\) such that \(\bar{T} =\bar{T}_{x_0}\) and that \(x_0\) is a local minimum of \(p(x)\) and a local maximum of \(r(x)\). Moreover, assume that either \(\partial _t p(x_0)>0\) or \(H(x_0)>0\).

Then, the strict inequality holds

$$\begin{aligned} T(p(\cdot ), q(\cdot ), \Omega ,\Gamma ) < \bar{T} \end{aligned}$$

and therefore, there exists an extremal for \(T(p(\cdot ), q(\cdot ), \Omega ,\Gamma )\).

We now construct the test functions needed in order to estimate the Sobolev trace constant. Assume that \(0\in \partial \Omega \). We consider the test function

$$\begin{aligned} v_{\varepsilon }(x)=\eta (y,t)V_{{\varepsilon }, 0}(y,t), \quad \text{ with } x=\Phi (y,t), \end{aligned}$$

where \(V\) is the extremal for \(\bar{K}(N, p(0))^{-1}\) given by (1.3), and \(\eta \in C^\infty _c(B_{2\delta }\times [0,2\delta ),[0,1])\) is a smooth cutoff function.

From now on, we assume that \(p(x)\in \mathcal P (\Omega ),\,r(x)\in \mathcal P (\partial \Omega )\) are of class \(C^2,\,0\in \partial \Omega \) and we denote \(p=p(0)\) and \(r=r(0)\).

The key technical tools needed in the proof of Theorem 6.5 are the following three Lemmas that are proved in [11].

Lemma 6.6

There holds

$$\begin{aligned} \int \limits _{\Omega } f(x) |v_{\varepsilon }|^{p(x)} \mathrm{d}x = \bar{C}_0{\varepsilon }^p+o({\varepsilon }^p) \quad \text{ with } \quad \bar{C}_0 = f(0)\int \limits _{\mathbb{R }^N_+} V^p \mathrm{d}x. \end{aligned}$$
(6.4)

Lemma 6.7

If \(p<\frac{N-1}{2}\),

$$\begin{aligned} \int \limits _{\partial \Omega } f(x) |v_{\varepsilon }|^{r(x)} \mathrm{d}S_x = \bar{A}_0 + \bar{A}_1 {\varepsilon }^2 \ln {\varepsilon }+ o({\varepsilon }^2 \ln {\varepsilon }) \end{aligned}$$
(6.5)

with

$$\begin{aligned} \bar{A}_0=f(0)\int \limits _{\mathbb{R }^{N-1}}V(y,0)^{p_*} \mathrm{d}y, \end{aligned}$$

and

$$\begin{aligned} \bar{A}_1 = -\dfrac{1}{2p_*}f(0)\Delta r(0) \int \limits _{\mathbb{R }^{N-1}} |y|^2 V(y,0)^{p_*} \mathrm{d}y, \end{aligned}$$

where \(\Delta r(0)=\sum \nolimits _{i=1}^{N-1}\partial _{ii}(r\circ \Phi (\cdot ,0))(0)\) (equivalently, as \(0\) is a critical point of \(r,\,\Delta r(0)\) is also the Laplacian of \(r\) with respect to the induced metric of \(\partial \Omega \)).

Lemma 6.8

Assume that \(p<N^2/(3N-2)\). Then,

$$\begin{aligned} \int \limits _{\Omega } f(x)|\nabla v_{\varepsilon }(x)|^{p(x)} \mathrm{d}x = \bar{D}_0 + \bar{D}_1{\varepsilon }\ln {\varepsilon }+ \bar{D}_2{\varepsilon }+ \bar{D}_3({\varepsilon }\ln {\varepsilon })^2 + \bar{D}_4{\varepsilon }^2\ln {\varepsilon }+ O({\varepsilon }^2), \end{aligned}$$

with

$$\begin{aligned} \bar{D}_0 = f(0)\int \limits _{\mathbb{R }^N_+} |\nabla V|^p \mathrm{d}y\mathrm{d}t, \quad \bar{D}_1 = -\frac{N}{p}f(0)\partial _tp(0)\int \limits _{\mathbb{R }^N_+} t|\nabla V|^p \mathrm{d}y\mathrm{d}t, \end{aligned}$$

and, assuming that \(\partial _tp(0)=0\),

$$\begin{aligned} \bar{D}_2&= (\partial _tf(0)-Hf(0))\int \limits _{\mathbb{R }^N_+}t|\nabla V|^p \mathrm{d}y\mathrm{d}t + p\bar{h} f(0) \int \limits _{\mathbb{R }^N_+}\frac{t|y|^2}{(1+t)^2+|y|^2}|\nabla V|^p \mathrm{d}y\mathrm{d}t, \\ \bar{D}_3&= 0, \\ \bar{D}_4&= -\frac{N}{2p}f(0)\partial _{tt}p(0)\int \limits _{\mathbb{R }^N_+}t^2|\nabla V|^p \mathrm{d}y\mathrm{d}t - \frac{N}{2(N-1)p}f(0)\Delta _yp(0)\int \limits _{\mathbb{R }^N_+}|y|^2|\nabla V|^p \mathrm{d}y\mathrm{d}t, \end{aligned}$$

where \(\bar{h}=\frac{1}{N-1}\sum \nolimits _{i=1}^{N-1}h^{ii}(0)\) and \(\Delta _yp(0)=\sum \nolimits _{i=1}^{N-1}\partial _{ii}(p\circ \Phi (\cdot ,0))(0)\) (which can also be seen as the Laplacian of \(p|_{\partial \Omega }\) at 0 for the indiced metric of \(\partial \Omega \) since the all the first derivatives of \(p\) at 0 vanishes by hypothesis).

As an immediate consequence of these Lemmas, we get

Corollary 6.9

Under the same hypotheses and notations as in Lemmas 6.6, 6.7 and 6.8 we have

  • If \(\partial _t p(0)>0\),

    $$\begin{aligned}&\Vert u_{\varepsilon }\Vert _{1,p(x)} = \bar{D}_0^{\frac{1}{p}}\left( 1+\frac{\bar{D}_1}{p\bar{D}_0}{\varepsilon }\ln {\varepsilon }+ o({\varepsilon }\ln {\varepsilon })\right) \\&\Vert u_{\varepsilon }\Vert _{r(x),\partial \Omega } = \bar{A}_0^\frac{1}{p_*}\left( 1 + \frac{\bar{A}_1}{p_*\bar{A}_0}{\varepsilon }^2\ln {\varepsilon }+ o({\varepsilon }^2\ln {\varepsilon })\right) \end{aligned}$$
  • If \(\partial _t p(0)=0\) and \(H(0)>0\),

    $$\begin{aligned}&\Vert u_{\varepsilon }\Vert _{1,p(x)} = \bar{D}_0^{\frac{1}{p}}\left( 1+\frac{\bar{D}_2}{p\bar{D}_0}{\varepsilon }+ o({\varepsilon })\right) \\&\Vert u_{\varepsilon }\Vert _{r(x),\partial \Omega } = \bar{A}_0^\frac{1}{p_*}\left( 1 + \frac{\bar{A}_1}{p_*\bar{A}_0}{\varepsilon }^2\ln {\varepsilon }+ o({\varepsilon }^2\ln {\varepsilon })\right) \end{aligned}$$

Now we are in position to prove Theorem 6.5.

Proof of Theorem 6.5

The proof is an immediate consequence of Propositions 6.6, 6.7 and 6.8. In fact, without loss of generality we can assume that \(x_0=0\), and let \(p=p(0)\). Assume first that \(\partial _t p(0)>0\). Then,

$$\begin{aligned} T(p(\cdot ), q(\cdot ), \Omega ,\Gamma )&\le \bar{Q}(p(\cdot ), q(\cdot ), \Omega )(u_{\varepsilon }) = \frac{\bar{D}_0^{\frac{1}{p}}\left( 1+\frac{\bar{D}_1}{p\bar{D}_0}{\varepsilon }\ln {\varepsilon }+ o({\varepsilon }\ln {\varepsilon })\right) }{\bar{A}_0^\frac{1}{p_*}\left( 1 + \frac{\bar{A}_1}{p_*\bar{A}_0}{\varepsilon }^2\ln {\varepsilon }+ o({\varepsilon }^2\ln {\varepsilon })\right) }\\&=\bar{K}(N,p)^{-1} \frac{1+\frac{\bar{D}_1}{p\bar{D}_0}{\varepsilon }\ln {\varepsilon }+ o({\varepsilon }\ln {\varepsilon })}{1 + \frac{\bar{A}_1}{p_* \bar{A}_0}{\varepsilon }^2\ln {\varepsilon }+ o({\varepsilon }^2\ln {\varepsilon })}. \end{aligned}$$

The proof will be finished if we show that

$$\begin{aligned} \frac{1+\frac{\bar{D}_1}{p\bar{D}_0}{\varepsilon }\ln {\varepsilon }+ o({\varepsilon }\ln {\varepsilon })}{1 + \frac{\bar{A}_1}{p_* \bar{A}_0}{\varepsilon }^2\ln {\varepsilon }+ o({\varepsilon }^2\ln {\varepsilon })}<1, \end{aligned}$$

or, equivalently,

$$\begin{aligned} \frac{\bar{D}_1}{p\bar{D}_0} + o(1) < \frac{\bar{A}_1}{p_* \bar{A}_0}{\varepsilon }+ o(\varepsilon ). \end{aligned}$$

But this former inequality holds, since \(\bar{D}_1<0\) and \(\bar{D}_0>0\).

The case where \(\partial _t p(0)=0\) and \(H(0)>0\) is analogous. \(\square \)