1 Introduction

Let \({\mathbb {G}}\) be a stratified Lie group (or a homogeneous Carnot group), with dilation structure \(\delta _{\lambda }\) and Jacobian generators \(X_{1},\ldots ,X_{N}\), so that N is the dimension of the first stratum of \({\mathbb {G}}\). We refer to [10], or to the recent books [4] or [9] for extensive discussions of stratified Lie groups and their properties. Let Q be the homogeneous dimension of \(\mathbb {G}\). The sub-Laplacian on \({\mathbb {G}}\) is given by

$$\begin{aligned} {\mathcal {L}}=\sum _{k=1}^{N}X_{k}^{2}. \end{aligned}$$
(1.1)

It was shown by Folland [10] that the sub-Laplacian has a unique fundamental solution \(\varepsilon \),

$$\begin{aligned} {\mathcal {L}} \varepsilon = \delta , \end{aligned}$$

where \(\delta \) denotes the Dirac distribution with singularity at the neutral element 0 of \(\mathbb {G}\). The fundamental solution \(\varepsilon (x,y)=\varepsilon (y^{-1}x)\) is homogeneous of degree \(-Q+2\) and can be written in the form

$$\begin{aligned} \varepsilon (x,y) = [d(y^{-1}x)]^{2-Q}, \end{aligned}$$
(1.2)

for some homogeneous d which is called the \({\mathcal {L}}\)-gauge. Thus, the \({\mathcal {L}}\)-gauge is a symmetric homogeneous (quasi-) norm on the stratified group \(\mathbb {G}= ({\mathbb {R}}^n,\circ ,\delta _{\lambda })\), that is,

  • \(d(x) >0\) if and only if \(x \ne 0\),

  • \(d(\delta _{\lambda }(x))=\lambda d(x)\) for all \(\lambda >0\) and \(x \in \mathbb {G}\),

  • \(d(x^{-1})=d(x)\) for all \(x \in \mathbb {G}\).

We also recall that the standard Lebesque measure dx on \({\mathbb {R}}^{n}\) is the Haar measure for \({\mathbb {G}}\) (see, e.g. [9, Proposition 1.6.6]). The left invariant vector field \(X_{j}\) has an explicit form and satisfies the divergence theorem, see e.g. [9] for the derivation of the exact formula: more precisely, we can write

$$\begin{aligned} X_{k}=\frac{\partial }{\partial x'_{k}}+ \sum _{l=2}^{r}\sum _{m=1}^{N_{l}}a_{k,m}^{(l)}(x',\ldots ,x^{(l-1)}) \frac{\partial }{\partial x_{m}^{(l)}}, \end{aligned}$$
(1.3)

with \(x=(x',x^{(2)},\ldots ,x^{(r)})\), where r is the step of \(\mathbb {G}\) and \(x^{(l)}=(x^{(l)}_1,\ldots ,x^{(l)}_{N_l})\) are the variables in the \(l^{th}\) stratum, see also [9, Section 3.1.5] for a general presentation. The horizontal gradient is given by

$$\begin{aligned} \nabla _{\mathbb {G}}:=(X_{1},\ldots , X_{N}), \end{aligned}$$

and the horizontal divergence is defined by

$$\begin{aligned} \mathrm{div}_{\mathbb {G}} v:=\nabla _{\mathbb {G}}\cdot v. \end{aligned}$$

The horizontal p-sub-Laplacian is defined by

$$\begin{aligned} {\mathcal {L}}_{p}f:=\mathrm{div}_{\mathbb {G}}(|\nabla _{\mathbb {G}}f|^{p-2}\nabla _{\mathbb {G}}f),\quad 1<p<\infty , \end{aligned}$$
(1.4)

and we will write

$$\begin{aligned} |x'|=\sqrt{x'^{2}_{1}+\ldots +x'^{2}_{N}} \end{aligned}$$

for the Euclidean norm on \({\mathbb {R}}^{N}.\)

Throughout this paper \(\Omega \subset {\mathbb {G}}\) will be an admissible domain, that is, an open set \(\Omega \subset {\mathbb {G}}\) is called an admissible domain if it is bounded and if its boundary \(\partial \Omega \) is piecewise smooth and simple i.e., it has no self-intersections. The condition for the boundary to be simple amounts to \(\partial \Omega \) being orientable.

We now recall the divergence formula in the form of [19, Proposition 3.1]. Let \(f_{k}\in C^{1}(\Omega )\bigcap C({\overline{\Omega }}),\,k=1,\ldots ,N\). Then for each \(k=1,\ldots ,N,\) we have

$$\begin{aligned} \int _{\Omega }X_{k}f_{k}dz= \int _{\partial \Omega }f_{k} \langle X_{k},dz\rangle . \end{aligned}$$
(1.5)

Consequently, we also have

$$\begin{aligned} \int _{\Omega }\sum _{k=1}^{N}X_{k}f_{k}dz= \int _{\partial \Omega } \sum _{k=1}^{N} f_{k}\langle X_{k},dz\rangle . \end{aligned}$$
(1.6)

Using the divergence formula analogues of Green’s formulae were obtained in [19] for general Carnot groups and in [20] for more abstract settings (without the group structure), for another formulation see also [11].

The analogue of Green’s first formula for the sub-Laplacian was given in [19] in the following form: if \( v \in C^1(\Omega )\cap C({\overline{\Omega }})\) and \(u \in C^2(\Omega )\cap C^1({\overline{\Omega }})\), then

$$\begin{aligned} \int _{\Omega }\left( (\mathcal {{\widetilde{\nabla }}}v) u +v{\mathcal {L}}u\right) dz=\int _{\partial \Omega }v\langle \mathcal {{\widetilde{\nabla }} }u,dz\rangle , \end{aligned}$$
(1.7)

where

$$\begin{aligned} {\widetilde{\nabla }} u = \sum _{k=1}^{N} (X_k u)X_k, \end{aligned}$$

and

$$\begin{aligned} \int _{\partial \Omega } \sum _{k=1}^{N} \langle v X_k u X_k,dz \rangle = \int _{\partial \Omega } v \langle {\widetilde{\nabla }} u, dz \rangle . \end{aligned}$$

Rewriting (1.7) we have

$$\begin{aligned} \int _{\Omega }\left( (\mathcal {{\widetilde{\nabla }} }u) v+u{\mathcal {L}}v\right) dz= & {} \int _{\partial \Omega }u\langle \mathcal {{\widetilde{\nabla }} }v,dz\rangle ,\\ \int _{\Omega }\left( (\mathcal {{\widetilde{\nabla }} }v) u+v{\mathcal {L}}u\right) dz= & {} \int _{\partial \Omega }v\langle \mathcal {{\widetilde{\nabla }} }u,dz\rangle . \end{aligned}$$

By using \((\mathcal {{\widetilde{\nabla }} }u) v=(\mathcal {{\widetilde{\nabla }} }v) u\) and subtracting one identity for the other we get Green’s second formula for the sub-Laplacian:

$$\begin{aligned} \int _{\Omega }(u{\mathcal {L}}v-v{\mathcal {L}}u)dz =\int _{\partial \Omega }(u\langle {\widetilde{\nabla }} v,dz\rangle -v\langle {\widetilde{\nabla }} u,dz\rangle ). \end{aligned}$$
(1.8)

It is important to note that the above Green’s formulae also hold for the fundamental solution of the sub-Laplacian as in the case of the fundamental solution of the (Euclidean) Laplacian since both have the same behaviour near the singularity \(z=0\) (see [1, Proposition 4.3]).

Weighted Hardy and Rellich inequalities in different related contexts have been recently considered in [15] and [13]. For the general importance of such inequalities we can refer to [2]. Some boundary terms have appeared in [24]. For these inequalities in the setting of general homogeneous groups we refer to [22].

The main aim of this paper is to give the generalised weighted \(L^p\)-Hardy and \(L^p\)-Rellich type inequalities on stratified groups. In Sect. 2, we present a weighted \(L^p\)-Caffarelli–Kohn–Nirenberg type inequality with boundary term on stratified group \(\mathbb {G}\), which implies, in particular, the weighted \(L^p\)-Hardy type inequality. As consequences of those inequalities, we recover most of the known Hardy type inequalities and Heisenberg–Pauli–Weyl type uncertainty principles on stratified group \(\mathbb {G}\) (see [21] for discussions in this direction). In Sect. 3, a weighted \(L^p\)-Rellich type inequality is investigated. Moreover, a weighted \(L^2\)-Rellich type inequality with the boundary term is obtained together with its consequences.

Usually, unless we state explicitly otherwise, the functions u entering all the inequalities are complex-valued.

2 Weighted \(L^p\)-Hardy type inequalities with boundary terms and their consequences

In this section we derive several versions of the \(L^p\) weighted Hardy inequalities.

2.1 Weighted \(L^p\)-Cafferelli-Kohn-Nirenberg type inequalities with boundary terms

We first present the following weighted \(L^p\)-Cafferelli–Kohn–Nirenberg type inequalities with boundary terms on the stratified Lie group \(\mathbb {G}\) and then discuss their consequences. The proof of Theorem 2.1 is analogous to the proof of Davies and Hinz [8], but is now carried out in the case of the stratified Lie group \(\mathbb {G}\). The boundary terms also give new addition to the Euclidean results in [8]. The classical Caffarelli–Kohn–Nirenberg inequalities in the Euclidean setting were obtained in [6].

Let \(\mathbb {G}\) be a stratified group with N being the dimension of the first stratum, and let V be a real-valued function in \(L_{loc}^1(\Omega )\) with partial derivatives of order up to 2 in \(L_{loc}^1(\Omega )\), and such that \({\mathcal {L}} V\) is of one sign. Then we have:

Theorem 2.1

Let \(\Omega \) be an admissible domain in the stratified group \({\mathbb {G}}\), and let V be a real-valued function such that \({\mathcal {L}} V<0\) holds a.e. in \(\Omega \). Then for any complex-valued \(u \in C^2(\Omega )\cap C^1({\overline{\Omega }})\), and all \(1<p<\infty \), we have the inequality

$$\begin{aligned} \left\| |{\mathcal {L}} V|^{\frac{1}{p}} u\right\| _{L^p(\Omega )}^p \le p \left\| \frac{|\nabla _{\mathbb {G}} V|}{|{\mathcal {L}} V|^{\frac{p-1}{p}}}|\nabla _{\mathbb {G}} u| \right\| _{L^p(\Omega )} \left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )}^{p-1} -\int _{\partial \Omega } |u|^p\langle {\widetilde{\nabla }} V,dx\rangle . \end{aligned}$$
(2.1)

Note that if u vanishes on the boundary \(\partial \Omega \), then (2.1) extends the Davies and Hinz result [8] to the weighted \(L^p\)-Hardy type inequality on stratified groups:

$$\begin{aligned} \left\| |{\mathcal {L}} V|^{\frac{1}{p}} u\right\| _{L^p(\Omega )} \le p \left\| \frac{|\nabla _{\mathbb {G}} V|}{|{\mathcal {L}} V|^{\frac{p-1}{p}}}|\nabla _{\mathbb {G}} u| \right\| _{L^p(\Omega )}, \quad 1<p<\infty . \end{aligned}$$
(2.2)

Proof of Theorem 2.1

Let \(\upsilon _{\epsilon }:=(|u|^2 + \epsilon ^2)^{\frac{1}{2}}-\epsilon \). Then \(\upsilon _{\epsilon }^p \in C^2({\Omega }) \cap C^1({{\overline{\Omega }}})\) and using Green’s first formula (1.7) and the fact that \({\mathcal {L}} V < 0\) we get

$$\begin{aligned} \int _{\Omega }|{\mathcal {L}} V|\upsilon _{\epsilon }^p dx&= - \int _{\Omega } {\mathcal {L}} V \upsilon _{\epsilon }^p dx \\&= \int _{\Omega } ({\widetilde{\nabla }}V) \upsilon _{\epsilon }^p dx - \int _{\partial \Omega }\upsilon _{\epsilon }^p \langle {\widetilde{\nabla }} V,dx\rangle \\&= \int _{\Omega } \nabla _{\mathbb {G}} V \cdot \nabla _{\mathbb {G}} \upsilon _{\epsilon }^p dx - \int _{\partial \Omega }\upsilon _{\epsilon }^p \langle {\widetilde{\nabla }} V,dx\rangle \\&\le \int _{\Omega } |\nabla _{\mathbb {G}} V| |\nabla _{\mathbb {G}} \upsilon _{\epsilon }^p| dx - \int _{\partial \Omega }\upsilon _{\epsilon }^p \langle {\widetilde{\nabla }} V,dx\rangle \\&= p \int _{\Omega } \left( \frac{|\nabla _{\mathbb {G}} V|}{|{\mathcal {L}} V|^{\frac{p-1}{p}}}\right) |{\mathcal {L}} V|^{\frac{p-1}{p}} \upsilon _{\epsilon }^{p-1}|\nabla _{\mathbb {G}} \upsilon _{\epsilon }|dx- \int _{\partial \Omega }\upsilon _{\epsilon }^p \langle {\widetilde{\nabla }} V,dx\rangle , \end{aligned}$$

where \(({\widetilde{\nabla }}u)v = \nabla _{\mathbb {G}} u\cdot \nabla _{\mathbb {G}} v\). We have

$$\begin{aligned} \nabla _{\mathbb {G}} \upsilon _{\epsilon } = (|u|^2 +\epsilon ^2)^{-\frac{1}{2}} |u|\nabla _{\mathbb {G}} |u|, \end{aligned}$$

since \(0 \le \upsilon _{\epsilon } \le |u|\). Thus,

$$\begin{aligned} \upsilon _{\epsilon }^{p-1} |\nabla _{\mathbb {G}} \upsilon _{\epsilon }| \le |u|^{p-1}|\nabla _{\mathbb {G}}|u||. \end{aligned}$$

On the other hand, let \(u(x)=R(x)+iI(x)\), where R(x) and I(x) denote the real and imaginary parts of u. We can restrict to the set where \(u\ne 0\). Then we have

$$\begin{aligned} (\nabla _{\mathbb {G}} |u|)(x) = \frac{1}{|u|} (R(x)\nabla _{\mathbb {G}} R(x) + I(x)\nabla _{\mathbb {G}} I(x)) \quad \text {if} \quad u \ne 0. \end{aligned}$$
(2.3)

Since

$$\begin{aligned} \left| \frac{1}{|u|} (R\nabla _{\mathbb {G}} R+I \nabla _{\mathbb {G}} I)\right| ^2 \le |\nabla _{\mathbb {G}} R|^2 + |\nabla _{\mathbb {G}} I|^2, \end{aligned}$$
(2.4)

we get that \(|\nabla _{\mathbb {G}} |u||\le |\nabla _{\mathbb {G}} u|\) a.e. in \(\Omega \). Therefore,

$$\begin{aligned} \int _{\Omega }|{\mathcal {L}} V|\upsilon _{\epsilon }^p dx\le & {} p \int _{\Omega } \left( \frac{|\nabla _{\mathbb {G}} V|}{|{\mathcal {L}} V|^{\frac{p-1}{p}}} |\nabla _{\mathbb {G}} u|\right) |{\mathcal {L}} V|^{\frac{p-1}{p}}|u|^{p-1} dx- \int _{\partial \Omega }\upsilon _{\epsilon }^p \langle {\widetilde{\nabla }} V,dx\rangle \\\le & {} p \left( \int _{\Omega } \left( \frac{|\nabla _{\mathbb {G}} V|^p}{|{\mathcal {L}} V|^{(p-1)}} |\nabla _{\mathbb {G}} u|^p\right) dx \right) ^{\frac{1}{p}} \left( \int _{\Omega }|{\mathcal {L}} V||u|^p dx\right) ^{\frac{p-1}{p}}\\&- \int _{\partial \Omega }\upsilon _{\epsilon }^p \langle {\widetilde{\nabla }} V,dx\rangle , \end{aligned}$$

where we have used Hölder’s inequality in the last line. Thus, when \(\epsilon \rightarrow 0\), we obtain (2.1). \(\square \)

2.2 Consequences of theorem 2.1

As consequences of Theorem 2.1, we can derive the horizontal \(L^p\)-Caffarelli–Kohn–Nirenberg type inequality with the boundary term on the stratified group \(\mathbb {G}\) which also gives another proof of \(L^p\)-Hardy type inequality, and also yet another proof of the Badiale-Tarantello conjecture [3] (for another proof see e.g. [18] and references therein).

2.2.1 Horizontal \(L^p\)-Caffarelli–Kohn–Nirenberg inequalities with the boundary term

Corollary 2.2

Let \(\Omega \) be an admissible domain in a stratified group \(\mathbb {G}\) with \(N\ge 3\) being dimension of the first stratum, and let \(\alpha , \beta \in {\mathbb {R}}\). Then for all \(u \in C^2(\Omega \backslash \{x'=0\})\cap C^1({\overline{\Omega }} \backslash \{x'=0\})\), and any \(1<p<\infty \), we have

$$\begin{aligned}&\frac{|N-\gamma |}{p} \left\| \frac{u}{|x'|^{\frac{\gamma }{p}}}\right\| ^p_{L^p(\Omega )} \le \left\| \frac{\nabla _{\mathbb {G}} u}{|x'|^{\alpha }} \right\| _{L^p(\Omega )} \left\| \frac{u}{|x'|^{\frac{\beta }{p-1}}} \right\| ^{p-1}_{L^p(\Omega )} \nonumber \\&\quad -\frac{1}{p} \int _{\partial \Omega } |u|^p\langle {\widetilde{\nabla }} |x'|^{2-\gamma },dx\rangle , \end{aligned}$$
(2.5)

for \(2<\gamma <N\) with \(\gamma = \alpha +\beta +1, \) and where \(|\cdot |\) is the Euclidean norm on \({\mathbb {R}}^{N}\). In particular, if u vanishes on the boundary \(\partial \Omega \), we have

$$\begin{aligned} \frac{|N-\gamma |}{p} \left\| \frac{u}{|x'|^{\frac{\gamma }{p}}}\right\| ^p_{L^p(\Omega )} \le \left\| \frac{\nabla _{\mathbb {G}} u}{|x'|^{\alpha }} \right\| _{L^p(\Omega )} \left\| \frac{u}{|x'|^{\frac{\beta }{p-1}}} \right\| ^{p-1}_{L^p(\Omega )}. \end{aligned}$$
(2.6)

Proof of Corollary 2.2

To obtain (2.5) from (2.1) , we take \(V= |x'|^{2-\gamma }\). Then

$$\begin{aligned} |\nabla _{\mathbb {G}} V| = |2-\gamma ||x'|^{1-\gamma },\qquad |{\mathcal {L}} V| =|(2-\gamma )(N-\gamma )| |x'|^{-\gamma }, \end{aligned}$$

and observe that \({\mathcal {L}} V = (2-\gamma )(N-\gamma ) |x'|^{-\gamma }<0.\) To use (2.1) we calculate

$$\begin{aligned} \left\| |{\mathcal {L}} V|^{\frac{1}{p}} u\right\| _{L^p(\Omega )}^p= & {} |(2-\gamma )(N-\gamma )|\left\| \frac{u}{|x'|^{\frac{\gamma }{p}}} \right\| _{L^p(\Omega )}^p,\\ \left\| \frac{|\nabla _{\mathbb {G}} V|}{|{\mathcal {L}} V|^{\frac{p-1}{p}}} \nabla _{\mathbb {G}} u \right\| _{L^p(\Omega )}= & {} \frac{|2-\gamma |}{|(2-\gamma )(N-\gamma )|^{\frac{p-1}{p}}} \left\| \frac{|\nabla _{\mathbb {G}} u|}{|x'|^{\frac{\gamma -p}{p}}} \right\| _{L^p(\Omega )},\\ \left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )}^{p-1}= & {} |(2-\gamma )(N-\gamma )|^{\frac{p-1}{p}}\left\| \frac{u}{|x'|^{\frac{\gamma }{p}}}\right\| _{L^p(\Omega )}^{p-1}. \end{aligned}$$

Thus, (2.1) implies

$$\begin{aligned} \frac{|N-\gamma |}{p}\left\| \frac{u}{|x'|^{\frac{\gamma }{p}}} \right\| _{L^p(\Omega )}^p \le \left\| \frac{\nabla _{\mathbb {G}} u}{|x'|^{\frac{\gamma -p}{p}}} \right\| _{L^p(\Omega )}\left\| \frac{u}{|x'|^{\frac{\gamma }{p}}}\right\| _{L^p(\Omega )}^{p-1} - \frac{1}{p}\int _{\partial \Omega } |u|^p\langle {\widetilde{\nabla }} |x'|^{2-\gamma },dx\rangle . \end{aligned}$$

If we denote \(\alpha = \frac{\gamma -p}{p}\) and \(\frac{\beta }{p-1}=\frac{\gamma }{p}\), we get (2.5). \(\square \)

2.2.2 Badiale–Tarantello conjecture

Theorem 2.1 also gives a new proof of the generalised Badiale-Tarantello conjecture [3] (see, also [18]) on the optimal constant in Hardy inequalities in \({\mathbb {R}}^n\) with weights taken with respect to a subspace.

Proposition 2.3

Let \(x=(x',x'') \in {\mathbb {R}}^N \times {\mathbb {R}}^{n-N}\), \(1\le N \le n\), \(2<\gamma <N\) and \(\alpha , \beta \in {\mathbb {R}}\). Then for any \(u \in C_0^{\infty }({\mathbb {R}}^n \backslash \{x'=0\} )\) and all \(1<p<\infty \), we have

$$\begin{aligned} \frac{|N-\gamma |}{p} \left\| \frac{u}{|x'|^{\frac{\gamma }{p}}}\right\| ^p_{L^p({\mathbb {R}}^n)} \le \left\| \frac{\nabla u}{|x'|^{\alpha }} \right\| _{L^p({\mathbb {R}}^n)} \left\| \frac{u}{|x'|^{\frac{\beta }{p-1}}} \right\| ^{p-1}_{L^p({\mathbb {R}}^n)}, \end{aligned}$$
(2.7)

where \(\gamma = \alpha +\beta +1\) and \(|x'|\) is the Euclidean norm \({\mathbb {R}}^N\). If \(\gamma \ne N\) then the constant \( \frac{|N-\gamma |}{p}\) is sharp.

The proof of Proposition 2.3 is similar to Corollary 2.2, so we sketch it only very briefly.

Proof of Proposition 2.3

Let us take \(V= |x'|^{2-\gamma }\). We observe that \( \Delta V = (2-\gamma )(N-\gamma ) |x'|^{-\gamma }<0, \) as well as \(|\nabla V| = |2-\gamma ||x'|^{(1-\gamma )}\) and \(|\Delta V| = |(2-\gamma )(N-\gamma )| |x'|^{-\gamma }\). Then (2.1) with

$$\begin{aligned} \left\| |\Delta V|^{\frac{1}{p}} u\right\| _{L^p({\mathbb {R}}^n)}^p= & {} |(2-\gamma )(N-\gamma )|\left\| \frac{u}{|x'|^{\frac{\gamma }{p}}} \right\| _{L^p({\mathbb {R}}^n)}^p,\\ \left\| \frac{|\nabla V|}{|\Delta V|^{\frac{p-1}{p}}} \nabla u \right\| _{L^p({\mathbb {R}}^n)}= & {} \frac{|2-\gamma |}{|(2-\gamma )(N-\gamma )|^{\frac{p-1}{p}}} \left\| \frac{\nabla u}{|x'|^{\frac{\gamma -p}{p}}} \right\| _{L^p({\mathbb {R}}^n)},\\ \left\| |\Delta V|^{\frac{1}{p}} u \right\| _{L^p({\mathbb {R}}^n)}^{p-1}= & {} |(2-\gamma )(N-\gamma )|^{\frac{p-1}{p}}\left\| \frac{u}{|x'|^{\frac{\gamma }{p}}}\right\| _{L^p({\mathbb {R}}^n)}^{p-1}, \end{aligned}$$

and denoting \(\alpha = \frac{\gamma -p}{p}\) and \(\frac{\beta }{p-1}=\frac{\gamma }{p}\), implies (2.7). \(\square \)

In particular, if we take \(\beta =(\alpha +1)(p-1)\) and \(\gamma =p(\alpha +1)\), then (2.7) implies

$$\begin{aligned} \frac{|N-p(\alpha +1) |}{p} \left\| \frac{u}{|x'|^{\alpha +1}}\right\| _{L^p({\mathbb {R}}^n)} \le \left\| \frac{\nabla u}{|x'|^{\alpha }} \right\| _{L^p({\mathbb {R}}^n)}, \end{aligned}$$
(2.8)

where \(1<p< \infty \), for all \(u \in C_0^{\infty }({\mathbb {R}}^n \backslash \{x'=0\})\), \(\alpha \in {\mathbb {R}}\), with sharp constant. When \(\alpha =0\), \(1<p<N\) and \(2\le N\le n\), the inequality (2.8) implies that

$$\begin{aligned} \left\| \frac{u}{|x'|} \right\| _{L^p({\mathbb {R}}^n)} \le \frac{p}{N-p} \left\| \nabla u \right\| _{L^p({\mathbb {R}}^n)}, \end{aligned}$$
(2.9)

which given another proof of the Badiale-Tarantello conjecture from [3, Remark 2.3].

2.2.3 The local Hardy type inequality on \(\mathbb {G}\).

As another consequence of Theorem 2.1 we obtain the local Hardy type inequality with the boundary term, with d being the \({\mathcal {L}}\)-gauge as in (1.2).

Corollary 2.4

Let \(\Omega \subset \mathbb {G}\) with \(0 \notin \partial \Omega \) be an admissible domain in a stratified group \(\mathbb {G}\) of homogeneous dimension \(Q\ge 3.\) Let \(0>\alpha > 2-Q\). Let \(u \in C^{1}(\Omega \backslash \{0\})\cap C({\overline{\Omega }}\backslash \{0\})\). Then we have

$$\begin{aligned} \frac{|Q+\alpha -2|}{p} \left\| d^{\frac{\alpha -2}{p}} |\nabla _{\mathbb {G}} d|^{\frac{2}{p}} u \right\| _{L^p(\Omega )}\le & {} \left\| d^{\frac{p+\alpha -2}{p}} |\nabla _{\mathbb {G}}d|^{\frac{2-p}{p}} |\nabla _{\mathbb {G}}u| \right\| _{L^p(\Omega )} \nonumber \\&\quad -\,\frac{1}{p}\left\| d^{\frac{\alpha -2}{p}} |\nabla _{\mathbb {G}} d|^{\frac{2}{p}} u\right\| ^{1-p}_{L^p(\Omega )} \nonumber \\&\quad \times \,\int _{\partial \Omega } d^{\alpha -1} |u|^p \langle {\widetilde{\nabla }} d,dx\rangle . \end{aligned}$$
(2.10)

This extends the local Hardy type inequality that was obtained in [19] for \(p=2\):

$$\begin{aligned} \frac{|Q+\alpha -2|}{2} \left\| d^{\frac{\alpha -2}{2}} |\nabla _{\mathbb {G}} d| u \right\| _{L^2(\Omega )}\le & {} \left\| d^{\frac{\alpha }{2}} |\nabla _{\mathbb {G}}u| \right\| _{L^2(\Omega )} \nonumber \\&\quad -\,\frac{1}{2} \left\| d^{\frac{\alpha -2}{2}} |\nabla _{\mathbb {G}} d| u\right\| _{L^2(\Omega )}^{-1}\nonumber \\&\quad \times \,\int _{\partial \Omega } d^{\alpha -1} |u|^2 \langle {\widetilde{\nabla }} d,dx\rangle . \end{aligned}$$
(2.11)

Proof of Corollary 2.4

First, we can multiply both sides of the inequality (2.1) by \(\left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )}^{1-p}\), so that we have

$$\begin{aligned} \left\| |{\mathcal {L}}V|^{\frac{1}{p}}u \right\| _{L^p(\Omega )} \le p \left\| \frac{|\nabla _{\mathbb {G}}V|}{|{\mathcal {L}}V|^{\frac{p-1}{p}}}|\nabla _{\mathbb {G}} u|\right\| _{L^p(\Omega )} - \left\| |{\mathcal {L}} V|^{\frac{1}{p}} u\right\| _{L^p(\Omega )}^{1-p} \int _{\partial \Omega }|u|^p \langle {\widetilde{\nabla }}V,dx\rangle .\nonumber \\ \end{aligned}$$
(2.12)

Now, let us take \(V=d^{\alpha }\). We have

$$\begin{aligned} {\mathcal {L}} d^{\alpha } = \nabla _{\mathbb {G}}(\nabla _{\mathbb {G}} \varepsilon ^{\frac{\alpha }{2-Q}})= & {} \nabla _{\mathbb {G}}\left( \frac{\alpha }{2-Q}\varepsilon ^{\frac{\alpha +Q-2}{2-Q}}\nabla _{\mathbb {G}}\varepsilon \right) \\= & {} \frac{\alpha (\alpha +Q-2)}{(2-Q)^2} \varepsilon ^{\frac{\alpha -4+2Q}{2-Q}}|\nabla _{\mathbb {G}} \varepsilon |^2 + \frac{\alpha }{2-Q}\varepsilon ^{\frac{\alpha +Q-2}{2-Q}} {\mathcal {L}} \varepsilon . \end{aligned}$$

Since \(\varepsilon \) is the fundamental solution of \({\mathcal {L}}\), we have

$$\begin{aligned} {\mathcal {L}} d^{\alpha } = \frac{\alpha (\alpha +Q-2)}{(2-Q)^2} \varepsilon ^{\frac{\alpha -4+2Q}{2-Q}}|\nabla _{\mathbb {G}} \varepsilon |^2= \alpha (\alpha +Q-2)d^{\alpha -2}|\nabla _{\mathbb {G}}d|^2. \end{aligned}$$

We can observe that \({\mathcal {L}}d^{\alpha } <0\), and also the identities

$$\begin{aligned}&\left\| |{\mathcal {L}}d^{\alpha }|^{\frac{1}{p}} u \right\| _{L^p(\Omega )} = \alpha ^{\frac{1}{p}} |Q+\alpha -2|^{\frac{1}{p}} \left\| d^{\frac{\alpha -2}{p}} |\nabla _{\mathbb {G}}d|^{\frac{2}{p}} u \right\| _{L^p(\Omega )},\\&\left\| \frac{|\nabla _{\mathbb {G}}d^{\alpha }|}{|{\mathcal {L}}d^{\alpha }|^{\frac{p-1}{p}}} |\nabla _{\mathbb {G}} u| \right\| _{L^p(\Omega )} = \alpha ^{\frac{1}{p}}|Q+\alpha -2|^{\frac{1-p}{p}} \left\| d^{\frac{\alpha -2+p}{p}} |\nabla _{\mathbb {G}}d|^{\frac{2-p}{p}} |\nabla _{\mathbb {G}}u| \right\| _{L^p(\Omega )},\\&\left\| |{\mathcal {L}}d^{\alpha }|^{\frac{1}{p}} u \right\| ^{1-p}_{L^p(\Omega )} \int _{\partial \Omega } |u|^p\langle {\widetilde{\nabla }} d^{\alpha },dx\rangle = \alpha ^{\frac{1}{p}} |Q+\alpha -2|^{\frac{1-p}{p}} \left\| d^{\frac{\alpha -2}{p}} |\nabla _{\mathbb {G}}d|^{\frac{2}{p}} u \right\| ^{1-p}_{L^p(\Omega )}\\&\quad \int _{\partial \Omega } d^{\alpha -1}|u|^p\langle {\widetilde{\nabla }} d,dx\rangle . \end{aligned}$$

Using (2.12) we arrive at

$$\begin{aligned}&\frac{|Q+\alpha -2|}{p} \left\| d^{\frac{\alpha -2}{p}} |\nabla _{\mathbb {G}} d|^{\frac{2}{p}} u \right\| _{L^p(\Omega )} \le \left\| d^{\frac{p+\alpha -2}{p}} |\nabla _{\mathbb {G}}d|^{\frac{2-p}{p}} |\nabla _{\mathbb {G}}u| \right\| _{L^p{\Omega }} \\&\quad -\frac{1}{p} \left\| d^{\frac{\alpha -2}{p}} |\nabla _{\mathbb {G}} d|^{\frac{2}{p}} u\right\| ^{1-p}_{L^p(\Omega )} \int _{\partial \Omega } d^{\alpha -1} |u|^p \langle {\widetilde{\nabla }} d,dx\rangle , \end{aligned}$$

which implies (2.10). \(\square \)

2.3 Uncertainty type principles

The inequality (2.12) implies the following Heisenberg-Pauli-Weyl type uncertainty principle on stratified groups.

Corollary 2.5

Let \(\Omega \subset \mathbb {G}\) be admissible domain in a stratified group \(\mathbb {G}\) and let \(V \in C^2(\Omega )\) be real-valued. Then for any complex-valued function \(u \in C^2(\Omega )\cap C^1({\overline{\Omega }})\) we have

$$\begin{aligned}&\left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| \frac{|\nabla _{\mathbb {G}}V|}{|{\mathcal {L}}V|^{\frac{p-1}{p}}} |\nabla _{\mathbb {G}} u| \right\| _{L^p(\Omega )} \nonumber \\&\ge \frac{1}{p} \left\| u \right\| ^2_{L^p(\Omega )} + \frac{1}{p}\left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| ^{1-p}_{L^p(\Omega )}\int _{\partial \Omega } |u|^p \langle {\widetilde{\nabla }} V,dx\rangle .\nonumber \\ \end{aligned}$$
(2.13)

In particular, if u vanishes on the boundary \(\partial \Omega \), then we have

$$\begin{aligned} \left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| \frac{|\nabla _{\mathbb {G}}V|}{|{\mathcal {L}}V|^{\frac{p-1}{p}}} |\nabla _{\mathbb {G}} u| \right\| _{L^p(\Omega )} \ge \frac{1}{p} \left\| u \right\| ^2_{L^p(\Omega )}. \end{aligned}$$
(2.14)

Proof of Corollary 2.5

By using the extended Hölder inequality and (2.12) we have

$$\begin{aligned}&\left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| \frac{|\nabla _{\mathbb {G}}V|}{|{\mathcal {L}}V|^{\frac{p-1}{p}}} |\nabla _{\mathbb {G}} u| \right\| _{L^p(\Omega )} \\&\quad \ge \frac{1}{p} \left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )} \left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )} \\&\qquad +\,\frac{1}{p} \left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| ^{1-p}_{L^p(\Omega )}\int _{\partial \Omega } |u|^p \langle {\widetilde{\nabla }} V,dx\rangle ,\\&\quad \ge \frac{1}{p} \left\| |u|^2 \right\| _{L^{\frac{p}{2}}(\Omega )} + \frac{1}{p}\left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| ^{1-p}_{L^p(\Omega )}\int _{\partial \Omega } |u|^p \langle {\widetilde{\nabla }} V,dx\rangle .\\&\quad = \frac{1}{p} \left\| u \right\| ^2_{L^p(\Omega )} + \frac{1}{p}\left\| |{\mathcal {L}}V|^{-\frac{1}{p}} u \right\| _{L^p(\Omega )}\left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| ^{1-p}_{L^p(\Omega )}\int _{\partial \Omega } |u|^p \langle {\widetilde{\nabla }} V,dx\rangle , \end{aligned}$$

proving (2.13). \(\square \)

By setting \(V =|x'|^{\alpha }\) in the inequality (2.14), we recover the Heisenberg–Pauli–Weyl type uncertainty principle on stratified groups as in [17] and [20]:

$$\begin{aligned} \left( \int _{\Omega } |x'|^{2-\alpha } |u|^p dx \right) \left( \int _{\Omega } |x'|^{\alpha +p-2} |\nabla _{\mathbb {G}} u|^p dx \right) \ge \left( \frac{N+\alpha -2}{p} \right) ^p \left( \int _{\Omega } |u|^p dx \right) ^2. \end{aligned}$$

In the abelian case \(\mathbb {G}=({\mathbb {R}}^n,+)\), taking \(N=n\ge 3\), for \(\alpha =0\) and \(p=2\) this implies the classical Heisenberg–Pauli–Weyl uncertainty principle for all \(u \in C^{\infty }_0({\mathbb {R}}^n \backslash \{0\})\):

$$\begin{aligned} \left( \int _{{\mathbb {R}}^n} |x|^2 |u(x)|^2 dx\right) \left( \int _{{\mathbb {R}}^n} |\nabla u(x)|^2 dx \right) \ge \left( \frac{n-2}{2} \right) ^2 \left( \int _{{\mathbb {R}}^n} |u(x)|^2 dx \right) ^2. \end{aligned}$$

By setting \(V =d^{\alpha }\) in the inequality (2.14), we obtain another uncertainty type principle:

$$\begin{aligned}&\left( \int _{\Omega } \frac{|u|^p}{d^{\alpha -2}|\nabla _{\mathbb {G}}d|^2} dx \right) \left( \int _{\Omega } d^{\alpha +p-2}|\nabla _{\mathbb {G}}d|^{2-p}|\nabla _{\mathbb {G}}u|^p dx\right) \\&\quad \ge \left( \frac{Q+\alpha -2}{p} \right) ^p \left( \int _{\Omega } |u|^p dx\right) ^2; \end{aligned}$$

taking \(p=2\) and \(\alpha =0\) this yields

$$\begin{aligned} \left( \int _{\Omega } \frac{d^{2}}{|\nabla _{\mathbb {G}}d|^2}|u|^2 dx \right) \left( \int _{\Omega } |\nabla _{\mathbb {G}}u|^2 dx\right) \ge \left( \frac{Q-2}{2} \right) ^2 \left( \int _{\Omega } |u|^2 dx\right) ^2. \end{aligned}$$

3 Weighted \(L^p\)-Rellich type inequalities

In this section we establish weighted Rellich inequalities with boundary terms. We consider first the \(L^2\) and then the \(L^p\) cases. The analogous \(L^2\)-Rellich inequality on \({\mathbb {R}}^n\) was proved by Schmincke [23] (and generalised by Bennett [5]).

Theorem 3.1

Let \(\Omega \) be an admissible domain in a stratified group \(\mathbb {G}\) with \(N \ge 2\) being the dimension of the first stratum. If a real-valued function \(V\in C^2(\Omega )\) satisfies \({\mathcal {L}} V(x) < 0\) for all \(x \in \Omega \), then for every \(\epsilon >0\) we have

$$\begin{aligned} \left\| \frac{|V|}{|{\mathcal {L}} V|^{\frac{1}{2}}} {\mathcal {L}} u \right\| ^2_{L^2(\Omega )}&\ge 2\epsilon \left\| V^{\frac{1}{2}} |\nabla _{\mathbb {G}} u| \right\| ^2_{L^2(\Omega )} + \epsilon (1-\epsilon ) \left\| |{\mathcal {L}}V|^{\frac{1}{2}} u\right\| ^2_{L^2(\Omega )}\nonumber \\&\quad - \epsilon \int _{\partial \Omega } (|u|^2\langle {\widetilde{\nabla }}V,dx\rangle - V\langle {\widetilde{\nabla }} |u|^2,dx\rangle ), \end{aligned}$$
(3.1)

for all complex-valued functions \(u \in C^2(\Omega )\cap C^1({\overline{\Omega }})\). In particular, if u vanishes on the boundary \(\partial \Omega \), we have

$$\begin{aligned} \left\| \frac{|V|}{|{\mathcal {L}} V|^{\frac{1}{2}}} {\mathcal {L}} u \right\| ^2_{L^2(\Omega )} \ge 2\epsilon \left\| V^{\frac{1}{2}} |\nabla _{\mathbb {G}} u| \right\| ^2_{L^2(\Omega )} + \epsilon (1-\epsilon ) \left\| |{\mathcal {L}}V|^{\frac{1}{2}} u\right\| ^2_{L^2(\Omega )}. \end{aligned}$$

Proof of Theorem 3.1

Using Green’s second identity (1.8) and that \({\mathcal {L}} V(x) <0\) in \(\Omega \), we obtain

$$\begin{aligned} \int _{\Omega } |{\mathcal {L}} V||u|^2dx&= -\int _{\Omega }V{\mathcal {L}}|u|^2 dx - \int _{\partial \Omega } (|u|^2\langle {\widetilde{\nabla }}V,dx\rangle - V\langle {\widetilde{\nabla }} |u|^2,dx\rangle ) \\&=-\,2\int _{\Omega }V\left( \mathrm{Re}({\overline{u}}{\mathcal {L}} u)+|\nabla _{\mathbb {G}} u|^2\right) dx \\&\quad -\,\int _{\partial \Omega } (|u|^2\langle {\widetilde{\nabla }}V,dx\rangle - V\langle {\widetilde{\nabla }} |u|^2,dx\rangle ). \end{aligned}$$

Using the Cauchy–Schwartz inequality we get

$$\begin{aligned} \int _{\Omega } |{\mathcal {L}} V||u|^2 dx&\le 2\left( \frac{1}{\epsilon } \int _{\Omega } \frac{|V|^2}{|{\mathcal {L}} V|}|{\mathcal {L}} u|^2 dx\right) ^{\frac{1}{2}} \left( \epsilon \int _{\Omega }|{\mathcal {L}} V||u|^2 dx\right) ^{\frac{1}{2}}\\&\quad -\,2 \int _{\Omega }V|\nabla _{\mathbb {G}} u|^2 dx - \int _{\partial \Omega } (|u|^2\langle {\widetilde{\nabla }}V,dx\rangle - V\langle {\widetilde{\nabla }} |u|^2,dx\rangle ) \\&\le \frac{1}{\epsilon } \int _{\Omega } \frac{|V|^2}{|{\mathcal {L}} V|} |{\mathcal {L}} u|^2 dx + \epsilon \int _{\Omega }|{\mathcal {L}} V||u|^2dx \\&\quad - 2\int _{\Omega } V |\nabla _{\mathbb {G}} u|^2 dx- \int _{\partial \Omega } (|u|^2\langle {\widetilde{\nabla }}V,dx\rangle - V\langle {\widetilde{\nabla }} |u|^2,dx\rangle ), \end{aligned}$$

yielding (3.1). \(\square \)

Corollary 3.2

Let \( \mathbb {G}\) be a stratified group with N being the dimension of the first stratum. If \(\alpha >-2\) and \(N>\alpha +4\) then for all \(u \in C_0^{\infty }(\mathbb {G}\backslash \{x'=0\})\) we have

$$\begin{aligned} \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|{\mathcal {L}} u|^2}{|x'|^{\alpha }} dx \ge \frac{(N+\alpha )^2(N-\alpha -4)^2}{16} \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|u|^2}{|x'|^{\alpha +4}}dx. \end{aligned}$$
(3.2)

Proof of Corollary 3.2

Let us take \(V(x)=|x'|^{-(\alpha +2)}\) in Theorem 3.1, which can be applied since \(x'=0\) is not in the support of u. Then we have

$$\begin{aligned} \nabla _{\mathbb {G}} V = -(\alpha +2)|x'|^{-\alpha -4}x',\qquad {\mathcal {L}} V = - (\alpha +2)(N-\alpha -4)|x'|^{-(\alpha +4)}. \end{aligned}$$

Let us set \(C_{N,\alpha }:=(\alpha +2)(N-\alpha -4)\). Observing that

$$\begin{aligned} {\mathcal {L}}V = -C_{N,\alpha }|x'|^{-(\alpha +4)}<0 , \end{aligned}$$

for \(|x'| \ne 0\), it follows from (3.1) that

$$\begin{aligned} \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|{\mathcal {L}} u|^2}{|x'|^{\alpha }} dx&\ge 2 C_{N,\alpha } \epsilon \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|\nabla _{\mathbb {G}} u|^2}{|x'|^{\alpha +2}}dx \nonumber \\&\quad +C_{N,\alpha }^2 \epsilon (1-\epsilon ) \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|u|^2}{|x'|^{\alpha +4}}dx. \end{aligned}$$
(3.3)

To obtain (3.2), let us apply the \(L^p\)-Hardy type inequality (2.2) by taking \(V(x)=|x'|^{\alpha +2}\) for \(\alpha \in (-2,N-4)\), so that

$$\begin{aligned} \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|\nabla _{\mathbb {G}} u|^2}{|x'|^{\alpha +2}} dx \ge \frac{(N-\alpha -4)^2}{4} \int _{\mathbb {G}\backslash \{x'=0\}} \frac{|u|^2}{|x'|^{\alpha +4}}dx, \end{aligned}$$

and then choosing \(\epsilon =(N+\alpha )/4(\alpha +2)\) for (3.3), which is the choice of \(\epsilon \) that gives the maximum right-hand side. \(\square \)

We can now formulate the \(L^p\)-version of weighted \(L^p\)-Rellich type inequalities.

Theorem 3.3

Let \(\Omega \) be an admissible domain in a stratified group \(\mathbb {G}\). If \(0<V \in C(\Omega )\), \({\mathcal {L}} V <0\), and \({\mathcal {L}}(V^{\sigma })\le 0\) on \(\Omega \) for some \(\sigma >1\), then for all \(u \in C_0^{\infty }(\Omega )\) we have

$$\begin{aligned} \left\| |{\mathcal {L}} V|^{\frac{1}{p}}u \right\| _{L^p(\Omega )} \le \frac{p^2}{(p-1)\sigma +1} \left\| \frac{V}{|{\mathcal {L}}V|^{\frac{p-1}{p}}}{\mathcal {L}}u \right\| _{L^p(\Omega )}, \quad 1\le p < \infty . \end{aligned}$$
(3.4)

Theorem 3.3 will follow by Lemma 3.5, by putting \(C =\frac{(p-1)(\sigma -1)}{p}\) in Lemma 3.4.

Lemma 3.4

Let \(\Omega \) an admissible domain in a stratified group \(\mathbb {G}\). If \(V \ge 0\), \({\mathcal {L}} V <0\), and there exists a constant \(C\ge 0\) such that

$$\begin{aligned} C \left\| |{\mathcal {L}} V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )}^p \le p(p-1) \left\| V^{\frac{1}{p}} |u|^{\frac{p-2}{p}}|\nabla _{\mathbb {G}} u|^{\frac{2}{p}}\right\| _{L^p(\Omega )}^p, \quad 1<p<\infty , \end{aligned}$$
(3.5)

for all \(u \in C_0^{\infty }(\Omega )\), then we have

$$\begin{aligned} (1+C)\left\| |{\mathcal {L}} V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )} \le p \left\| \frac{V}{|{\mathcal {L}}V|^{\frac{p-1}{p}}} {\mathcal {L}} u \right\| _{L^p(\Omega )}, \end{aligned}$$
(3.6)

for all \(u \in C_0^{\infty }(\Omega )\). If \(p=1\) then the statement holds for \(C=0\).

Proof of Lemma 3.4

We can assume that u is real-valued by using the following identity (see [7, p. 176]):

$$\begin{aligned} \forall z \in {\mathbb {C}}: |z|^p= \left( \int _{-\pi }^{\pi } |\cos {\vartheta }|^p d\vartheta \right) ^{-1} \int _{\pi }^{-\pi } |\mathrm{Re}(z)\cos {\vartheta }+\mathrm{Im}(z)\sin {\vartheta }|^{p} d \vartheta , \end{aligned}$$

which can be proved by writing \(z=r(\cos {\phi }+i\sin {\phi })\) and simplifying.

Let \(\epsilon >0\) and set \(u_{\epsilon }:=(|u|^2+\epsilon ^2)^{p/2}-\epsilon ^p\). Then \(0\le u_{\epsilon } \in C_0^{\infty }\) and

$$\begin{aligned} \int _{\Omega }|{\mathcal {L}}V|u_{\epsilon } dx = - \int _{\Omega } ({\mathcal {L}}V)u_{\epsilon } dx = - \int _{\Omega }V {\mathcal {L}}u_{\epsilon } dx, \end{aligned}$$

where

$$\begin{aligned} {\mathcal {L}}u_{\epsilon }&= {\mathcal {L}} \left( (|u|^2+\epsilon ^2)^{\frac{p}{2}}-\epsilon ^p \right) = \nabla _{\mathbb {G}} \cdot (\nabla _{\mathbb {G}}((|u|^2+\epsilon ^2)^{\frac{p}{2}}-\epsilon ^p))\\&= \nabla _{\mathbb {G}}(p(|u|^2+\epsilon ^2)^{\frac{p-2}{2}} u \nabla _{\mathbb {G}}u)\\&= p(p-2)(|u|^2+\epsilon ^2)^{\frac{p-4}{2}}u^2|\nabla _{\mathbb {G}}u|^2 +\,p(|u|^2+\epsilon ^2)^{\frac{p-2}{2}}|\nabla _{\mathbb {G}}u|^2 \\&\quad +\, p(|u|^2+\epsilon ^2)^{\frac{p-2}{2}}u{\mathcal {L}}u. \end{aligned}$$

Then

$$\begin{aligned} \int _{\Omega }|{\mathcal {L}}V|u_{\epsilon } dx&= -\,\int _{\Omega }\left( p(p-2)u^2(u^2+\epsilon ^2)^{\frac{p-4}{2}}+p(u^2+\epsilon ^2)^{\frac{p-2}{2}}\right) V|\nabla _{\mathbb {G}}u|^2dx \\&\quad - p\int _{\Omega } V u(u^2+\epsilon ^2)^{\frac{p-2}{2}}{\mathcal {L}}udx. \end{aligned}$$

Hence

$$\begin{aligned}&\int _{\Omega } |{\mathcal {L}}V|u_{\epsilon } + \left( p(p-2)u^2(u^2+\epsilon ^2)^{\frac{p-4}{2}}+p(u^2+\epsilon ^2)^{\frac{p-2}{2}}\right) V|\nabla _{\mathbb {G}}u|^2 dx \\&\quad \le p\int _{\Omega } V|u|(u^2+\epsilon ^2)^{\frac{p-2}{2}}|{\mathcal {L}}u|dx. \end{aligned}$$

When \(\epsilon \rightarrow 0\), the integrand on the right is bounded by \(V(\max |u|^2+1)^{(p-1)/2}\max |{\mathcal {L}}u|\) and it is integrable because \(u \in C_0^{\infty }(\Omega )\), and so the integral tends to \(\int _{\Omega }V|u|^{p-1}|{\mathcal {L}}u|dx\) by the dominated convergence theorem. The integrand on the left is non-negative and tends to \( |{\mathcal {L}} V||u|^p + p(p-1)V|u|^{p-2}|\nabla _{\mathbb {G}}u|^2 \) pointwise, only for \(u \ne 0\) when \(p<2\), otherwise for any x. It then follows by Fatou’s lemma that

$$\begin{aligned} \left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )}^p + p(p-1)\left\| V^{\frac{1}{p}}|u|^{\frac{p-2}{p}}|\nabla _{\mathbb {G}}u|^{\frac{2}{p}} \right\| _{L^p(\Omega )}^p \le p \left\| V^{\frac{1}{p}} |u|^{\frac{p-1}{p}} |{\mathcal {L}}u|^{\frac{1}{p}}\right\| _{L^p(\Omega )}^p. \end{aligned}$$

By using (3.5), followed by the Hölder inequality, we obtain

$$\begin{aligned} (1+C)\left\| |{\mathcal {L}}V|^{\frac{1}{p}} u\right\| _{L^p(\Omega )}^p&\le p \left\| |{\mathcal {L}}V|^{(p-1)}V^{\frac{1}{p}}|u|^{\frac{p-1}{p}}|{\mathcal {L}}V|^{-(p-1)} |{\mathcal {L}} u|^{\frac{1}{p}} \right\| ^p \\&\le p \left\| |{\mathcal {L}}V|^{\frac{1}{p}} u \right\| _{L^p(\Omega )}^{p-1} \left\| \frac{|V|}{|{\mathcal {L}}V|^{\frac{p-1}{p}}} {\mathcal {L}} u \right\| _{L^p(\Omega )}. \end{aligned}$$

This implies (3.6). \(\square \)

Lemma 3.5

Let \(\Omega \) be an admissible domain in a stratified group \(\mathbb {G}\). If \(0<V\in C(\Omega )\), \({\mathcal {L}} V <0\), and \({\mathcal {L}}V^{\sigma } \le 0\) on \(\Omega \) for some \(\sigma >1\), then we have

$$\begin{aligned} (\sigma -1) \int _{\Omega } |{\mathcal {L}}V||u|^p dx \le p^2 \int _{\{x\in \Omega , u(x) \ne 0\}} V|u|^{p-2}|\nabla _{\mathbb {G}} u|^2 dx< \infty , \quad 1<p<\infty , \end{aligned}$$
(3.7)

for all \(u \in C_0^{\infty }(\Omega )\).

Proof of Lemma 3.5

We shall use that

$$\begin{aligned} 0 \ge {\mathcal {L}}(V^{\sigma }) = \sigma V^{\sigma -2}\left( (\sigma -1)|\nabla _{\mathbb {G}} V|^2+V{\mathcal {L}}V\right) , \end{aligned}$$
(3.8)

and hence

$$\begin{aligned} (\sigma -1)|\nabla _{\mathbb {G}}V|^2 \le V |{\mathcal {L}}V|. \end{aligned}$$

Now we use the inequality (2.2) for \(p=2\) to get

$$\begin{aligned} (\sigma -1)\int _{\Omega } |{\mathcal {L}} V||u|^2 dx&\le 4(\sigma -1)\int _{\Omega } \frac{|\nabla _{\mathbb {G}} V|^2}{|{\mathcal {L}} V|} |\nabla _{\mathbb {G}}u|^2 dx \nonumber \\&\le 4 \int _{\Omega } V |\nabla _{\mathbb {G}}u|^2 dx = 4 \int _{\{x\in \Omega ; u(x)\ne 0, |\nabla _{\mathbb {G}}u|\ne 0 \}} V |\nabla _{\mathbb {G}} u|^2 dx, \end{aligned}$$
(3.9)

the last equality valid since \(|\{x \in \Omega ; u(x)=0, |\nabla _{\mathbb {G}} u| \ne 0 \}|=0\). This proves Lemma 3.5 for \(p=2\).

For \(p \ne 2\), put \(v_{\epsilon }=(u^2 +\epsilon ^2)^{p/4}-\epsilon ^{p/2}\), and let \(\epsilon \rightarrow 0\). Since \(0\le v_{\epsilon }\le |u|^{\frac{p}{2}}\), the left-hand side of (3.9), with u replaced by \(v_{\epsilon }\), tends to \((\sigma -1)\int _{\Omega }|{\mathcal {L}}V||u|^pdx\) by the dominated convergence theorem. If \(u \ne 0\), then

$$\begin{aligned} |\nabla _{\mathbb {G}}v_{\epsilon }|^2 V =\left| \frac{p}{2}u(u^2+\epsilon ^2)^{\frac{p-4}{4}}\nabla _{\mathbb {G}}u\right| ^2 V. \end{aligned}$$

For \(\epsilon \rightarrow 0\) we obtain

$$\begin{aligned} |\nabla _{\mathbb {G}}u|^p V = \frac{p^2}{4} |u|^{p-2}|\nabla _{\mathbb {G}}u|^2 V. \end{aligned}$$

It follows as in the proof of Lemma 3.4, by using Fatou’s lemma, that the right-hand side of (3.9) tends to

$$\begin{aligned} p^2\int _{\{x\in \Omega ; u(x) \ne 0,|\nabla _{\mathbb {G}}u|\ne 0\}} V |u|^{p-2}|\nabla _{\mathbb {G}}u|^2dx, \end{aligned}$$

and this completes the proof. \(\square \)

Corollary 3.6

Let \(\mathbb {G}\) be a stratified group with N being the dimension of the first stratum. Then for any \(2<\alpha <N\) and all \(u \in C_0^{\infty }(\mathbb {G}\backslash \{x'=0\})\) we have the inequality

$$\begin{aligned} \int _{\mathbb {G}} \frac{|u|^p}{|x'|^{\alpha }} dx \le C^p_{(N,p,\alpha )} \int _{\mathbb {G}} \frac{|{\mathcal {L}}u|^p}{|x'|^{\alpha -2p}}dx, \end{aligned}$$
(3.10)

where

$$\begin{aligned} C_{(N,p,\alpha )} = \frac{p^2}{(N-\alpha )\left( (p-1)N+\alpha -2p\right) }. \end{aligned}$$
(3.11)

Proof of Corollary 3.6

Let us choose \(V=|x'|^{-(\alpha -2)}\) in Theorem 3.3, so that

$$\begin{aligned} {\mathcal {L}} V = -(\alpha -2)(N-\alpha )|x'|^{-\alpha }, \end{aligned}$$

and we note that when \(2<\alpha <N\), we have \( {\mathcal {L}} V < 0 \) for \(|x'|\ne 0\). Now it follows from (3.4) that

$$\begin{aligned} (\alpha -2)^p(N-\alpha )^p \int _{\mathbb {G}} \frac{|u|^p}{|x'|^{\alpha }} dx \le \frac{p^{2p}}{[(p-1)\sigma +1]^p} \int _{\mathbb {G}} \frac{|{\mathcal {L}}u|^p}{|x'|^{\alpha -2p}}dx. \end{aligned}$$
(3.12)

By taking \(\sigma =(N-2)/(\alpha -2)\), we arrive at

$$\begin{aligned} \int _{\mathbb {G}} \frac{|u|^p}{|x'|^{\alpha }} dx \le \frac{p^{2p}}{(N-\alpha )^p\left( (p-1)N+\alpha -2p\right) ^p} \int _{\mathbb {G}} \frac{|{\mathcal {L}}u|^p}{|x'|^{\alpha -2p}}dx, \end{aligned}$$

which proves (3.10)–(3.11). \(\square \)

Corollary 3.7

Let \(\mathbb {G}\) be a stratified Lie group and let \(d=\varepsilon ^{\frac{1}{2-Q}}\), where \(\varepsilon \) is the fundamental solution of the sub-Laplacian \({\mathcal {L}}\). Assume that \(Q\ge 3\), \(\alpha <2\), and \(Q+\alpha -4>0\). Then for all \(u \in C_0^{\infty }(\mathbb {G}\backslash \{0\})\) we have

$$\begin{aligned} \frac{(Q+\alpha -4)^2(Q-\alpha )^2}{16} \int _{\mathbb {G}} d^{\alpha -4} |\nabla _{\mathbb {G}} d|^2 |u|^2 dx \le \int _{\mathbb {G}} \frac{d^{\alpha }}{|\nabla _{\mathbb {G}}d|^2} |{\mathcal {L}} u|^2 dx. \end{aligned}$$
(3.13)

The inequality (3.13) was obtained by Kombe [14], but now we get it as an immediate consequence of Theorem 3.3.

Proof of Corollary 3.7

Let us choose \(V=d^{\alpha -2}\) in Theorem 3.3. Then

$$\begin{aligned} {\mathcal {L}} V = (\alpha -2)(Q+\alpha -4)d^{\alpha -4}|\nabla _{\mathbb {G}}d|^2. \end{aligned}$$

Note that for \(Q+\alpha -4>0\) and \(\alpha <2\), we have \( {\mathcal {L}}V<0\) for all \(x\ne 0. \) If \(p=2\) then from (3.4) it follows that

$$\begin{aligned} (\alpha -2)^2(Q+\alpha -4)^2\int _{\mathbb {G}} d^{\alpha -4}|\nabla _{\mathbb {G}} d|^2 |u|^2 dx \le \frac{16}{(\sigma +1)^2}\int _{\mathbb {G}} \frac{d^{\alpha }}{|\nabla _{\mathbb {G}}d|^2} |{\mathcal {L}}u|^2 dx. \end{aligned}$$

By taking \(\sigma =(Q-2\alpha +2)/(\alpha -2)\) we get

$$\begin{aligned} \frac{(Q+\alpha -4)^2(Q-\alpha )^2}{16} \int _{\mathbb {G}} d^{\alpha -4} |\nabla _{\mathbb {G}} d|^2 |u|^2 dx \le \int _{\mathbb {G}} \frac{d^{\alpha }}{|\nabla _{\mathbb {G}}d|^2} |{\mathcal {L}} u|^2 dx, \end{aligned}$$

proving inequality (3.13). \(\square \)

Remark 3.8

In the abelian case, when \(\mathbb {G}\equiv ({\mathbb {R}}^n,+)\) with \(d =|x|\) being the Euclidean norm, and \(\alpha =0\) in inequality (3.13), we recover the classical Rellich inequality [16].