1 Introduction

The classical Douglas formula [19] (see also Radó [40, (5.2)] and Chen and Fukushima [11, (5.8.4), (5.8.3)]) relates the energy of the harmonic function u on the unit disk \(B(0,1)\subset \mathbb {R}^2\) to the energy of its boundary values g on the boundary of the disk, identified with the torus \([0,2\pi )\):

$$\begin{aligned} \int \limits _{B(0,1)}|\nabla u(x)|^2\, dx = \frac{1}{8\pi }\int _0^{2\pi }\int _0^{2\pi }\frac{(g(\eta ) - g(\xi ))^2}{\sin ^2((\xi - \eta )/2)}\, d\eta \, d\xi . \end{aligned}$$
(1)

The formula is important in the trace theory for Sobolev spaces, since the left-hand side of (1) is the classical Dirichlet integral and the right-hand side is equivalent to the Gagliardo form in \(H^{1/2}(\partial B(0,1))\), the trace space for \(W^{1,2}(B(0,1))\). The identity inspired important developments in the theory of Dirichlet forms; see [11, 21, 28]. Doob [18, Theorem 9.2] generalized (1) to arbitrary Greenian open sets \(D\subseteq \mathbb {R}^d\) with \(d\ge 2\). In this paper, we propose another extension of (1):

$$\begin{aligned} \begin{aligned}&\int \limits _{B(0,1)} |\nabla u(x)|^2 |u(x)|^{p-2}\,dx\\&\quad =\frac{1}{2 (p-1)} \int _0^{2\pi } \int _0^{2\pi } \frac{(g(\eta )^{\langle p-1 \rangle } - g(\xi )^{\langle p-1 \rangle })(g(\eta ) - g(\xi ))}{4\pi \sin ^2((\xi -\eta )/2)}\,d\eta \, d\xi . \end{aligned} \end{aligned}$$
(2)

Here and below, \(p\in (1,\infty )\) and \(a^{\langle \kappa \rangle } = |a|^{\kappa }{{\,\textrm{sgn}\,}}(a)\) for \(a,\kappa \in \mathbb {R}\), in fact, we prove that for all open bounded \(C^{1,1}\) sets \(D\subseteq \mathbb {R}^d\) with \(d\ge 2\), and harmonic functions u in D with boundary values g,

$$\begin{aligned} \begin{aligned}&\int \limits _D |\nabla u(x)|^2 |u(x)|^{p-2}\, dx\\&\quad =\frac{1}{2(p-1)}\int \limits _{\partial D}\int \limits _{\partial D} (g(z)^{\langle p-1\rangle } - g(w)^{\langle p-1 \rangle })(g(z)-g(w))\, \gamma _D(z,w)\, dz\, dw. \end{aligned} \end{aligned}$$
(3)

Here dz, dw refer to the surface measure on \(\partial D\) and

$$\begin{aligned} \gamma _D(z,w) := \partial _{\textbf{n}}^z P_D(\cdot , w),\end{aligned}$$
(4)

is the inward normal derivative of the Poisson kernel \(P_D\), see Sect. 2.2. A direct calculation shows that the kernel in (2) is indeed the normal derivative of the Poisson kernel of the unit ball; therefore, (3) is an extension of (2). We refer to (3) as p-Douglas identity (Douglas identity for short) and to the sides of (3) as p-forms. We remark that P. Stein [43, (4.3)] obtained an early version of the p-Douglas identity for the unit disk (3) under the assumption that \(u\in C^2(\overline{D})\), but without the explicit form of the right-hand side, which Douglas only gave for \(p=2\). A more general variant of Stein’s identity can be obtained by taking \(p=2\), a power function h, and a harmonic function u in the work of Kałamajska and Choczewski [12, (5.1)]. The non-explicit terms in [12, 43] have the form \(\int _{\partial D} u^{\langle p-1\rangle }\partial _{\textbf{n}} u\), which usually appears in the Green’s formula. One of the main features of the p-Douglas identity is that it presents this integral in a more explicit form, seen on the right-hand side of (3). This contributes to a better understanding of the boundary behavior of functions in Sobolev-type spaces.

The precise statement of identity (3) is given in Theorems 3 and 11. In the first of these results, we assume that g on \(\partial D\) is given with the right-hand side of (3) finite, we define u as its Poisson integral, and we establish that the left-hand side of (3) is, in fact, equal to the right-hand side; in particular, it is finite. Therefore, this result may be thought of as an extension-type theorem. In Theorem 11 we start with a harmonic function u on D with the left-hand side of (3) finite and we obtain the function g on \(\partial D\), of which u is a Poisson integral and for which (3) holds. Therefore, the result may be thought of as a trace-type theorem.

It is worth noting that formally we have

$$\begin{aligned} \int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx = \frac{p^2}{4} \int _D |\nabla u(x)|^2 |u(x)|^{p-2}\, dx. \end{aligned}$$
(5)

The former integral is convenient for studying the trace of (not necessarily harmonic) functions with this energy form finite; see Theorem 9. We stress that equality (5) should not be taken for granted in the case \(1<p<2\); then we only prove it under certain assumptions of regularity of u.

For nice non-harmonic functions v that vanish at the boundary, there is another formula:

$$\begin{aligned} \int _D |\nabla v(x)|^2 |v(x)|^{p-2}\, dx = \frac{1}{1-p}\int _D \Delta v(x) |v(x)|^{p-2} v(x)\, dx. \end{aligned}$$
(6)

Here, again, the case \(1<p<2\) requires special attention; we refer to Metafune and Spina [36] for details. In this connection, we mention the work of Seesanea and Verbitsky [41, Theorem 3.1], who studied (6) in the context of Green potentials of non-negative measures. A variant of the Douglas formula with a remainder term, which we propose in Theorem 15 below, combines [36, 41] and our identity (3) for harmonic functions. However, we adopt the simplifying assumption \(v\in C^2(\overline{D})\), allowing for the use of Green’s identity, which is not easily available in the setting of (3).

One of our main tools is the Hardy–Stein identity of Bogdan, Dyda, and Luks [7], which states that for every harmonic function \(u:D \rightarrow \mathbb {R}\) and \(x\in D\),

$$\begin{aligned} \sup \limits _{U\subset \subset D}\mathbb {E}^x|u(X_{\tau _U})|^p - |u(x)|^p = p(p-1)\int _D G_D(x,y) |u(y)|^{p-2}|\nabla u(y)|^2\, dy.\nonumber \\ \end{aligned}$$
(7)

Here, \(G_D\) is the Green function of D and \(\tau _D\) is the first exit time from D of the Brownian motion \(X_t\) (more detailed definitions can be found in Sect. 2). Note that (7) characterizes harmonic functions u for which the Poisson integrals of \(|u|^p\) are uniformly bounded up to the boundary, i.e., the functions in the Hardy class \(H^p(D)\), see Koosis [31, p. 68]. Our Douglas formula is a similar characterization of harmonic functions in Sobolev-type spaces; see also Bogdan, Grzywny, Pietruska-Pałuba, and Rutkowski [8] for an analogous discussion of nonlocal operators such as the fractional Laplacian.

On a general level, the present paper deals with the classical potential theory in the \(L^p\) setting. This may indicate why the usual harmonic functions have a distinguished role for the considered p-forms. Integral forms similar to (3) have already proved useful for optimal Hardy identities and inequalities in \(L^p\) and the contractivity of operator semigroups acting on \(L^p\), see Bogdan, Jakubowski, Lenczewska, and Pietruska-Pałuba [9, Theorem 1–3] and the discussion in [9, Subsection 1.3]. Moreover, the nonlocal Douglas identity was applied to show bounds for the nonlocal Dirichlet-to-Neumann operator in certain weighted \(L^p\) spaces, see [8, Section 6]. We expect similar results for the classical Dirichlet-to-Neumann operator. Recall that the classical Dirichlet-to-Neumann operator is the integro-differential operator on \(\partial D\) with \(\gamma _D\) as the kernel, see Hsu [26, Section 4], Guillen, Kitagawa, and Schwab [25, Theorem 1.1], and Piiroinen and Simon [38, Theorem 4.6]. The operator is one of the motivations for the present work; however, an extension of [8, Section 6] seems delicate.

We note in passing that for \(d=1\), all harmonic functions on the interval \(D = (a,b)\) are of the form \(u(x) = cx+d\), and then the following identity holds for \(1<p<\infty \) (and is left for the reader to check):

$$\begin{aligned} \int _a^b c^2|u(x)|^{p-2}\,dx = \frac{1}{2(p-1)}(u(b)^{\langle p-1\rangle } - u(a)^{\langle p-1\rangle })(u(b) - u(a))\frac{2}{b-a}.\nonumber \\ \end{aligned}$$
(8)

Since the Green function of \(D = (a,b)\) for \(\Delta \) is given by

$$\begin{aligned} G_{(a,b)}(x,y) = {\left\{ \begin{array}{ll} (b-a)^{-1}(x-a)(b-y), &{}\text { if } a<x<y<b,\\ (b-a)^{-1}(b-x)(y-a), &{}\text { if } a<y\le x<b, \end{array}\right. } \end{aligned}$$

(see [13, (29) in Section 2]), it can be verified that (8) is an analogue of (3). Having discussed the case \(d=1\), for the remainder of this paper we assume that \(d\ge 2\).

The article is organized as follows. In Sect. 2 we introduce the main notions and properties. In Sect. 3 we prove the Douglas identity and extension theorem when the function g on \(\partial D\) is given. In Sect. 4 we prove the Douglas identity and trace theorem when the harmonic function u on D is given. In Sect. 5 we study minimization properties for the p-forms and give a variant of (3) for non-harmonic functions.

2 Preliminaries

All the sets, functions, and measures considered are assumed to be Borel. For functions \(a,b\ge 0\), the inequality \(a > rsim b\) means that there is a number \(c>0\), i.e., constant, such that \(a \ge cb\). We write \(a\approx b\) if \(a > rsim b\) and \(b > rsim a\).

2.1 Geometry

In the remainder of the work we assume that \(p\in (1,\infty )\) and D is a \(C^{1,1}\) domain at scale \(q>0\), that is, for each \(z\in \partial D\) there exist balls \(B_1:= B(c_z, q) \subset D\) and \(B_2:=B(c_z',q)\subset (\overline{D})^c\), mutually tangent at z (that is, \(\overline{B_1}\cap \overline{B_2} = \{z\}\)). For later convenience, we denote

$$\begin{aligned} r_0 = r_0(D):= \sup \{ q>0:~D \text {~is~} C^{1,1} \text {~at scale~} q\}. \end{aligned}$$

It is well-known (see Aikawa et al. [1, Lemma 2.2]) that this definition is equivalent to the one in which the boundary is locally isometric to the graph of a \(C^{1,1}\) function. The inward normal vector at \(w\in \partial D\) will be denoted by \(\textbf{n}_w\) (we write \(\textbf{n}_w = \textbf{n}\) if w is implied from the context). Note that \(w\mapsto \textbf{n}_w\) is a Lipschitz mapping, because in a local coordinate system there is a \(C^{1,1}\) function f such that \(\textbf{n} = (\nabla f,-1)\). If \(u:D\cup \{w\}\rightarrow \mathbb {R}\) for some point \(w\in \partial D\), then the inward normal derivative of u at w is defined as

$$\begin{aligned} \partial _{\textbf{n}}^w u = \lim \limits _{h\rightarrow 0^+}\frac{u(w+h\textbf{n}) - u(w)}{h}. \end{aligned}$$

We also let \(\delta _D(x) = d(x,\partial D)\) for \(x\in \mathbb {R}^d\).

2.2 Potential theory

Let \(G_D\) be the Green function and \(P_D\) be the Poisson kernel of \(\Delta = \sum _{i=1}^d \frac{\partial ^2}{\partial x_i^2}\) for the \(C^{1,1}\) open set D. We have \(G_D(x,y)=0\) if \(x\in D^c\) or \(y\in D^c\) and

$$\begin{aligned} P_D(x,z) = \partial _{\textbf{n}}^zG_D(x,\cdot ), \quad x\in D, ~z\in \partial D. \end{aligned}$$

We also let \(P_D(w,z) = 0\) if \(w\in \partial D\) and \(w\ne z\) and \(P_D(z,z) = \infty \) for \(z\in \partial D\). The kernels satisfy the following sharp estimates:

$$\begin{aligned} G_D(x,y)&\approx \bigg (1\wedge \frac{\delta _D(x)\delta _D(y)}{|x-y|^2}\bigg )|x-y|^{2-d},\quad x,y\in D, \text{ if } d\ge 3, \end{aligned}$$
(9)
$$\begin{aligned} G_D(x,y)&\approx \ln \bigg (1+\frac{\delta _D(x)\delta _D(y)}{|x-y|^2}\bigg ),\quad x,y\in D, \text { if } d=2, \end{aligned}$$
(10)

and

$$\begin{aligned} P_D(x,z) \approx \frac{\delta _D(x)}{|z-x|^d}, \quad x\in \overline{D}, ~z\in \partial D, \quad d\ge 2. \end{aligned}$$
(11)

The formula (9) was given by Zhao [44], (10) comes from Chung and Zhao [13, Theorem 6.23], and the estimate (11) can be found in the book by Krantz [32, Chapter 8.1] or derived from (9) and (10), see also Bogdan [6, (22)].

We slightly abuse the notation by using dx or dy for the Lebesgue measure on \(\mathbb {R}^d\) and dz or dw for the surface measure on \(\partial D\). By the result of Dahlberg [14], \(\omega ^x(dz)\), the harmonic measure of \(\Delta \) for D, is absolutely continuous with respect to the surface measure for all \(x\in D\) and

$$\begin{aligned} \omega ^x(A) = \int _A P_D(x,z)\, dz, \quad x\in D, ~A\subseteq \partial D. \end{aligned}$$

To prove (3) we employ probabilistic potential theory. Let \(X_t\) be the Brownian motion in \(\mathbb {R}^d\) and let

$$\begin{aligned} \tau _D = \inf \{t>0: X_t \notin D\}. \end{aligned}$$

By \(\mathbb {P}^x\) and \(\mathbb {E}^x\) we denote the probability and the expectation for the process \(X_t\) started at x. It is well-known since Kakutani [30] that the harmonic measure is the probability distribution of \(X_{\tau _D}\): \(\omega ^x(A) = \mathbb {P}^x(X_{\tau _D}\in A)\).

As usual, u is harmonic in D if u is \(C^2\) in D and \(\Delta u(x) = 0\) for every \(x\in D\). Harmonic functions are characterized by the mean value property or with respect to the Brownian motion [30]. Namely, u is harmonic in D if and only if for every \(U\subset \subset D\) and \(x\in U\) we have

$$\begin{aligned} u(x) = \mathbb {E}^x u(X_{\tau _U}). \end{aligned}$$

Here and below we write \(U\subset \subset D\) if U is a relatively compact subset of D, that is \(\overline{U}\) is bounded and \(\overline{U}\subset D\). Conversely, the Poisson integral,

$$\begin{aligned} P_D[g](x) = \int _{\partial D} g(z) P_D(x,z)\, dz,\quad x\in D, \end{aligned}$$

is harmonic in D if absolutely convergent at one (therefore every) point \(x\in D\).

2.3 Feller kernel

Recall that the Feller kernel \(\gamma _D\) is defined in (4). The existence of \(\gamma _D\) was studied before, see, e.g., Zhao [44, Lemma 1], or Hsu [26, Section 8], but we give a short proof for completeness of the presentation.

Lemma 1

The kernel \(\gamma _D(z,w)\) exists for all \(z,w\in \partial D\), \(z\ne w\) and

$$\begin{aligned} \gamma _D(z,w) \approx |z-w|^{-d},\quad z\ne w. \end{aligned}$$
(12)

Proof

Let \(z,w\in \partial D\), \(z\ne w\). Since \(P_D(z,w) = 0\), we only need to calculate

$$\begin{aligned} \gamma _D(z,w) = \lim _{h\rightarrow 0^+} \frac{P_D(z+h\textbf{n},w)}{h}, \end{aligned}$$

where \(\textbf{n} = \textbf{n}_z\). Let \(x_0\in D\) and \(h>0\) be small. We have

$$\begin{aligned} \frac{P_D(z+h\textbf{n},w)}{h} = \frac{P_D(z+h\textbf{n},w)}{G_D(x_0, z+h\textbf{n})} \cdot \frac{G_D(x_0, z+h\textbf{n})}{h}, \end{aligned}$$

and

$$\begin{aligned} \lim _{h\rightarrow 0^+} \frac{G_D(x_0, z+h\textbf{n})}{h} = P_D(x_0,z). \end{aligned}$$

The existence of the limit

$$\begin{aligned} \lim _{h\rightarrow 0^+} \frac{P_D(z+h\textbf{n},w)}{G_D(x_0, z+h\textbf{n})}, \end{aligned}$$
(13)

follows from the boundary Harnack principle [29, Theorem 7.9].

The estimates (12) follow directly from (11) and the fact that \(\delta _D(z+h\textbf{n}) = h\) for small h. \(\square \)

2.4 Bregman divergence and its properties

The expression on the right-hand side of the Douglas identity (3) comes from the symmetrization of the so-called Bregman divergence [2]. Namely, for \(p>1\) and \(a,b\in \mathbb {R}\) we define

$$\begin{aligned} F_p(a,b) = |b|^p - |a|^p - pa^{\langle p-1\rangle }(b-a). \end{aligned}$$

Recall that \(a^{\langle k \rangle } = |a|^k {{\,\textrm{sgn}\,}}a\), so \(F_p\) is the second-order Taylor remainder of the convex function \(b\mapsto |b|^p\). Therefore, it is an instance of Bregman divergence [2] and, indeed, we have

$$\begin{aligned} \tfrac{1}{2}(F_p(a,b) + F_p(b,a)) = H_p(a,b):= \tfrac{p}{2} (a^{\langle p-1\rangle } - b^{\langle p-1 \rangle })(a-b). \end{aligned}$$

The following approximations hold true:

$$\begin{aligned} \!\!\!\! H_p(a,b) \approx F_p(a,b) \approx (a-b)^2(|b|\vee |a|)^{p-2}\approx (a^{\langle p/2 \rangle } -b^{\langle p/2 \rangle })^2, \quad a,b\in \mathbb {R}.\nonumber \\\end{aligned}$$
(14)

The second comparison was proved in [39, (2.19)] in a multidimensional setting. The one-dimensional case was rediscovered, e.g., in [7, Lemma 6]. Optimal constants are known for some arguments (in the lower bound for \(F_p\) with \(p\in (1,2)\) and the upper bound for \(p\in (2,\infty )\)), see [10] and [42, Lemma 7.4]. The first comparison in (14) follows from the second one. A historical discussion of the third comparison in (14) is given [9, Subsection 1.3]. Many special cases of (14) can be found in the earlier works [5, 15, 34]; we refer to [8, Section 2.2] for a full proof.

3 The Douglas identity

Recall that \(p\in (1,\infty )\). We define the following forms:

$$\begin{aligned}{} & {} \mathcal {E}_D^p[u] = p(p-1)\int _D |u(x)|^{p-2}|\nabla u(x)|^2\, dx, \\{} & {} \mathcal {H}_{\partial D}^p[g] = \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw. \end{aligned}$$

By symmetrization we get

$$\begin{aligned} \mathcal {H}_{\partial D}^p[g] = \frac{p}{2} \int _{\partial D}\int _{\partial D} (g(z)^{\langle p-1\rangle } - g(w)^{\langle p-1 \rangle })(g(z)-g(w))\gamma _D(z,w)\, dz\, dw. \end{aligned}$$

Since \(F_p\ge 0\), \(\mathcal {H}_{\partial D}^p[g]\) is well-defined (possibly infinite) for all Borel \(g:\partial D\rightarrow \mathbb {R}\).

Lemma 2

If \(\mathcal {H}_{\partial D}^p[g] < \infty \), then \(g\in L^p(\partial D)\) and \(P_D[g](x)\) is finite for all \(x\in D\).

Proof

Assume that \(\mathcal {H}_{\partial D}^p[g] < \infty \), so that

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw < \infty . \end{aligned}$$

We fix \(w\in \partial D\), such that

$$\begin{aligned} \int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz<\infty . \end{aligned}$$

From Lemma 1 it follows that \(\inf \limits _{z\in \partial D,\, z\ne w} \gamma _D(z,w) > 0\), so

$$\begin{aligned} \int _{\partial D} F_p(g(z), g(w))\,dz < \infty . \end{aligned}$$

From (14), for \(|a|\ge 2|b|\) we get

$$\begin{aligned} F_p(a,b) > rsim (|a| - \tfrac{1}{2} |a|)^2(|b|\vee |a|)^{p-2} = \tfrac{1}{4} |a|^p. \end{aligned}$$

It follows that

$$\begin{aligned} \int _{\partial D \cap \{z:~|g(z)|\ge 2|g(w)|\}} |g(z)|^p\,dz \lesssim \int _{\partial D} F_p(g(z), g(w))\,dz<\infty , \end{aligned}$$

therefore,

$$\begin{aligned}&\int _{\partial D} |g(z)|^p\,dz\\&\quad =\int _{\partial D \cap \{z:~|g(z)|< 2|g(w)|\}} |g(z)|^p\,dz + \int _{\partial D \cap \{z:~|g(z)|\ge 2|g(w)|\}} |g(z)|^p\,dz \\&\quad \le \ 2^p |g(w)|^p |\partial D| + \int _{\partial D \cap \{z:~|g(z)|\ge 2|g(w)|\}} |g(z)|^p\,dz < \infty , \end{aligned}$$

so \(g\in L^p(\partial D)\). By Jensen’s inequality and (11), \(P_D[|g|](x) < \infty \) for every \(x\in D\). \(\square \)

We note that the proof of Theorem 3 is mostly self-contained and avoids abstract potential theory, in contrast to the approaches in [18] and [11, Chapter 5.8] for \(p=2\).

Theorem 3

Assume that \(\mathcal {H}_{\partial D}^p[g] < \infty \). Then the Douglas identity (3) holds true:

$$\begin{aligned} \mathcal {H}_{\partial D}^p[g] = \mathcal {E}_D^p[P_D[g]]. \end{aligned}$$

Proof

Let \(u = P_D[g]\). The martingale convergence argument from the proof of [8, Proposition 3.4] applies, and we get

$$\begin{aligned} \sup \limits _{U\subset \subset D}\mathbb {E}^x|u(X_{\tau _U})|^p = \mathbb {E}^x|g(X_{\tau _D})|^p. \end{aligned}$$

Therefore, by using the Hardy–Stein identity (7) we find that

$$\begin{aligned} \mathbb {E}^x|g(X_{\tau _D})|^p - |u(x)|^p = p(p-1)\int _D G_D(x,y)|u(y)|^{p-2}|\nabla u(y)|^2\, dy. \end{aligned}$$
(15)

By the proof of Lemma 2,

$$\begin{aligned} \int _{\partial D} F_p(g(w),g(z))\gamma _D(z,w)\, dz<\infty \end{aligned}$$
(16)

for almost every \(w\in \partial D\). For such w, we shall compute the corresponding normal derivative of the left-hand side of (15). Recall that the inward normal vector at \(w\in \partial D\) is denoted by \(\textbf{n} = \textbf{n}_w\). By the “p-variance” formulas [8, Lemma 2.1] (see also [18, (9.4)]) we have

$$\begin{aligned} \mathbb {E}^x |g(X_{\tau _D})|^p - |u(x)|^p&= \int _{\partial D} F_p(u(x),g(z))P_D(x,z)\, dz \end{aligned}$$
(17)
$$\begin{aligned}&= \int _{\partial D} F_p(g(w),g(z))P_D(x,z)\, dz - F_p(g(w),u(x)). \end{aligned}$$
(18)

Taking \(x = w + h\textbf{n}\) with small \(h>0\) and using (12), we get

$$\begin{aligned} F_p(g(w),g(z))\frac{P_D(x,z)}{h} =F_p(g(w),g(z))\frac{P_D(x,z)}{\delta _D(x)} \lesssim F_p(g(w),g(z))\gamma _D(z,w). \end{aligned}$$

We let \(h\rightarrow 0^+\), in particular, \(x\rightarrow w\). By the Lebesgue Dominated Convergence Theorem and (16),

$$\begin{aligned} \partial _{\textbf{n}}^w\int _{\partial D} F_p(g(w),g(z))P_D(\cdot ,z)\, dz = \int _{\partial D} F_p(g(w),g(z))\gamma _D(w,z)\, dz. \end{aligned}$$

By (18) and the fact that \(F_p\ge 0\), we get (for \(z\ne w\))

$$\begin{aligned}&\limsup \limits _{h\rightarrow 0^+}\frac{1}{h}\int _{\partial D} F_p(u(w+h\textbf{n}),g(z)) P_D(w+h\textbf{n},z)\, dz \\&\quad \le \int _{\partial D} F_p(g(w),g(z))\gamma _D(w,z)\, dz. \end{aligned}$$

On the other hand, [29, Theorem 5.8] states that \(u(w+h\textbf{n})\) converges to g(w) as \(h\rightarrow 0^+\) for almost every \(w\in \partial D\). For such w, by Fatou’s lemma and Lemma 1, we find that

$$\begin{aligned}&\liminf \limits _{h\rightarrow 0^+}\frac{1}{h} \int _{\partial D} F_p(u(w+h\textbf{n}),g(z))P_D(w+h\textbf{n},z)\, dz\\ {}&\quad \ge \int _{\partial D} F_p(g(w),g(z))\gamma _D(w,z)\, dz. \end{aligned}$$

Therefore,

$$\begin{aligned} \partial _{\textbf{n}}^w(\mathbb {E}^{\, \cdot }|g(X_{\tau _D})|^p - |u(\cdot )|^p) = \int _{\partial D} F_p(g(w),g(z))\gamma _D(w,z)\, dz. \end{aligned}$$

From (15) it follows that for almost every \(w\in \partial D\),

$$\begin{aligned} \begin{aligned}&\int _{\partial D} F_p(g(w),g(z))\gamma _D(z,w)\, dz\\ {}&\quad =p(p-1)\partial _{\textbf{n}}^w\int _D G_D(\cdot ,y)|u(y)|^{p-2}|\nabla u(y)|^2\, dy. \end{aligned} \end{aligned}$$
(19)

By Fatou’s lemma, for \(w\in \partial D\),

$$\begin{aligned} \partial _{\textbf{n}}^w\int _D G_D(\cdot ,y)|u(y)|^{p-2}|\nabla u(y)|^2\, dy \ge \int _D P_D(y,w) |u(y)|^{p-2}|\nabla u(y)|^2\, dy. \end{aligned}$$

It follows that

$$\begin{aligned}&\int _{\partial D}\int _{\partial D} F_p(g(w),g(z))\gamma _D(z,w)\, dz\, dw\\&\quad = p(p-1)\int _{\partial D}\partial _{\textbf{n}}^w\int _D G_D(\cdot ,y)|u(y)|^{p-2}|\nabla u(y)|^2\, dy\, dw\\&\quad \ge p(p-1)\int _{\partial D} \int _D P_D(y,w) |u(y)|^{p-2}|\nabla u(y)|^2\, dy\, dw\\&\quad = p(p-1)\int _D |u(y)|^{p-2}|\nabla u(y)|^2\, dy. \end{aligned}$$

In particular, the last expression is finite. We next show that the inequality above is actually an equality, that is, the reverse inequality holds. By Fatou’s lemma and Fubini–Tonelli,

$$\begin{aligned}&\int _{\partial D}\partial _{\textbf{n}}^w\int _D G_D(\cdot ,y)|u(y)|^{p-2}|\nabla u(y)|^2\, dy\, dw\nonumber \\&\quad \le \liminf \limits _{h\rightarrow 0^+} \int _{\partial D}\int _D\frac{G_D(w+h\textbf{n},y)}{h}|u(y)|^{p-2}|\nabla u(y)|^2\, dy\, dw\nonumber \\&\quad = \liminf \limits _{h\rightarrow 0^+}\int _{D}|u(y)|^{p-2}|\nabla u(y)|^2\int _{\partial D} \frac{G_D(w+h\textbf{n},y)}{h}\, dw\, dy. \end{aligned}$$
(20)

With the intent of using the Lebesgue Dominated Convergence Theorem in (20), we next show that

$$\begin{aligned} \lim _{h\rightarrow 0^+} \int _{\partial D} \frac{G_D(w+h\textbf{n},y)}{h}\,dw = \int _{\partial D} P_D(y,w)\,dw = 1, \quad y\in D, \end{aligned}$$
(21)

and that there exists \(C>0\) such that for small \(h>0\),

$$\begin{aligned} \int _{\partial D}\frac{G_D(w+h\textbf{n},y)}{h}\, dw \le C, \quad y\in D. \end{aligned}$$
(22)

For the remainder of the proof, we assume that \(h<(r_0/2) \wedge (1/2\,L)\), where L is the Lipschitz constant of the mapping \(w\mapsto \textbf{n}_w\). For \(y\in D\), \(w\in \partial D\) and \(h\le \delta _D(y)/2\),

$$\begin{aligned} |w-y| \le |w+h\textbf{n} -y| + h \le |w+h\textbf{n} - y| + \frac{\delta _D(y)}{2} \le |w+h\textbf{n} - y| + \frac{|w-y|}{2}, \end{aligned}$$

hence \(|w-y| \le 2|w+h\textbf{n} - y|\). Thus, by (9), (10), and (11), the inequalities

$$\begin{aligned} \frac{G_D(w+h\textbf{n},y)}{h} \lesssim \frac{\delta _D(y)}{|w+h\textbf{n} - y|^d} \lesssim \frac{\delta _D(y)}{|w-y|^d} \lesssim P_D(y,w) \end{aligned}$$

hold with constants independent of y and h. Hence, the Lebesgue Dominated Convergence Theorem gives (21) for every \(y\in D\).

From the above, we also get (22) in the case \(\delta _D(y) \ge 2h\). It remains to prove (22) for \(\delta _D(y) < 2h\). Assume first that \(d\ge 3\). Then, by (9),

$$\begin{aligned} \int _{\partial D}\frac{G_D(w+h\textbf{n},y)}{h}\, dw&\lesssim \int _{\partial D}\frac{1}{h}\bigg (1\wedge \frac{h^2}{|w+h\textbf{n}-y|^2}\bigg )|w+h\textbf{n} - y|^{2-d}\, dw. \end{aligned}$$
(23)

Since \(h<r_0/2\) and \(\delta _D(y) < 2h\), there is a unique point \(w_y\in \partial D\) for which \(\delta _D(y) = |y - w_y|\). If we let \(y^* = w_y + h\textbf{n}_{w_y}\), then \(\delta _D(y^*) = h\). We claim that

$$\begin{aligned} |w + h\textbf{n} - y| > rsim |w+h\textbf{n} - y^*|. \end{aligned}$$
(24)

In order to prove this we first define

$$\begin{aligned} D_h:= \{x\in D: \delta _D(x) > h\}. \end{aligned}$$

Note that

$$\begin{aligned} \partial D_h = \{x = w+\textbf{n}h: w\in \partial D\} \end{aligned}$$

and the correspondence between \(x=w+\textbf{n}h\) and w is one to one (this is true because D is \(C^{1,1}\) and the interior ball with radius smaller than \(r_0\) is unique and tangent to exactly one point of the boundary). Therefore, since y lies on the line segment connecting \(w_y\) and \(w_y + 2h\textbf{n}w_y\), we have

$$\begin{aligned} \overline{B(y,|y-y^*|)}\cap \partial D_h=\{y^*\}, \end{aligned}$$

because if any other point was in the intersection, then it would mean that \(\delta _D(y)\) is attained at two points of \(\partial D\). Consequently, for every \(x\in \partial D_h\),

$$\begin{aligned} |y^*-x| \le |y^* - y| + |y-x| \le 2|y-x|, \end{aligned}$$

which proves (24). As a consequence, we see that

$$\begin{aligned}&\int _{\partial D}\frac{1}{h}\bigg (1\wedge \frac{h^2}{|w+h\textbf{n}-y|^2}\bigg )|w+h\textbf{n} - y|^{2-d}\, dw\\&\quad \lesssim \int _{\partial D}\frac{1}{h}\bigg (1\wedge \frac{h^2}{|w+h\textbf{n}-y^*|^2}\bigg )|w+h\textbf{n} - y^*|^{2-d}\, dw.\\ \end{aligned}$$

By the \(C^{1,1}\) geometry of D, we find that

$$\begin{aligned} |w-w_y| \le |w+h\textbf{n}- y^*| + h|\textbf{n}_{w} - \textbf{n}_{w_y}| \le |w+h\textbf{n} - y^*| +hL|w-w_y|. \end{aligned}$$

Therefore, since \(h<1/2L\), we get

$$\begin{aligned} |w-w_y| \le 2|w+h\textbf{n}-y^*|, \end{aligned}$$
(25)

so that

$$\begin{aligned}&\int _{\partial D}\frac{1}{h}\bigg (1\wedge \frac{h^2}{|w+h\textbf{n}-y^*|^2}\bigg )|w+h\textbf{n} - y^*|^{2-d}\, dw\\&\quad \lesssim \int _{\partial D} \frac{1}{h}\bigg (1\wedge \frac{h^2}{|w-w_y|^2}\bigg )|w-w_y|^{2-d}\, dw\\&\quad =\int _{|w-w_y|>h} + \int _{|w-w_y|\le h} =: I_1 + I_2. \end{aligned}$$

By using polar coordinates,

$$\begin{aligned} I_1&\lesssim h\int _{\{w\in \partial D: |w-w_y| >h\}} |w-w_y|^{-d}\, dw\\&\approx h\int _{\{\xi \in \mathbb {R}^{d-1}: h< |\xi |\le 1\}} |\xi |^{-d}\, d\xi \approx h\int _h^1 r^{-2} \, dr \approx 1 \end{aligned}$$

and

$$\begin{aligned} I_2&\lesssim \frac{1}{h}\int _{\{w\in \partial D: |w-w_y| \le h\}} |w-w_y|^{2-d}\, dw\\&\approx \frac{1}{h} \int _{\{\xi \in \mathbb {R}^{d-1}: 0< |\xi | \le h\}} |\xi |^{2-d}\, d\xi \approx \frac{1}{h} \int _0^h \, dr = 1, \end{aligned}$$

thus the case \(\delta _D(y) < 2h\) is completed, and so (22) is proven for \(d\ge 3\). For \(d=2\), (22) is obtained by similar arguments using (10). Indeed, the proofs of (24) and (25) remain valid, so the only difference is that for \(d=2\) we want to estimate the integral

$$\begin{aligned} \int _{\partial D} \frac{1}{h}\ln \bigg (1 + \frac{h^2}{|w-w_y|^2}\bigg )\, dw. \end{aligned}$$

To this end we use the following computation:

$$\begin{aligned} \int _0^1\frac{1}{h}\ln \bigg (1+\frac{h^2}{t^2}\bigg )\, dt = \int _h^{\infty } \frac{\ln (1+u^2)}{u^2}\, du \le \int _0^{\infty } \frac{\ln (1+u^2)}{u^2}\, du <\infty . \end{aligned}$$

Having proven (21) and (22), we may use the Lebesgue Dominated Convergence Theorem to interchange the limit and the integral in (20), ending the proof.

Note that the case \(d=1\) is summarized in (8). \(\square \)

4 Trace-type results

In the previous section the starting point for our considerations was the function g on the boundary; our results could be thought of as an extension-type theorem. In this section we focus on a complementary trace-type theorem for Sobolev-type functions on D. In particular, we prove the Douglas identity for harmonic functions u in this class and exhibit the boundary function g for such u, see Theorem 11.

Definition 4

We define a Sobolev-type space

$$\begin{aligned} \mathcal {V}^{1,p}(D)= \{u\in L^p(D): \int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx < \infty \}. \end{aligned}$$

To clarify, the above gradient of \(u^{\langle p/2 \rangle }\) is understood in the distributional sense and is assumed to be a square integrable function. Since D is \(C^{1,1}\), by Maz’ya [35, p. 21, Corollary], the assumption \(u\in L^p(D)\) is redundant, because the finiteness of \(\int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx\) implies \(u^{\langle p/2\rangle }\in L^2(D)\). We note that \(\mathcal {V}^{1,p}(D)\) is not a linear space for \(p\ne 2\). For example, if \(D = (0,1)\), \(u=1\), and \(v(x) = x^{1/(p\wedge 2)}\), then for \(1<p<2\) we have \(u,u+v\in \mathcal {V}^{1,p}(D)\), but \(v\notin \mathcal {V}^{1,p}(D)\), and for \(p>2\) we have \(u,v\in \mathcal {V}^{1,p}(D)\), but \(u+v\notin \mathcal {V}^{1,p}(D)\).

The equality (26) in the following result demonstrates the relation of \({\mathcal {V}}^{1,p}(D)\) to the forms studied previously.

Lemma 5

Assume that \(p\in (1,2)\), \(u\in C^2(D)\) and let \(x\in D\). If either

  • \(u(x) \ne 0\), or

  • \(u(x) = 0\) and \(\nabla u(x) = 0\),

then \(\nabla u^{\langle p/2 \rangle }(x)\) exists in the classical sense and

$$\begin{aligned} \nabla u^{\langle p/2 \rangle }(x) = \frac{p}{2} \nabla u(x)|u(x)|^{p/2-1}.\end{aligned}$$
(26)

If \(p\in [2,\infty )\), then (26) holds for every \(x\in D\).

Proof

The case \(p\in [2,\infty )\) is trivial, so in the sequel we let \(p\in (1,2)\). If \(u(x) \ne 0\), then the statement follows immediately from the chain rule. If \(u(x) = 0\) and \(\nabla u(x) = 0\), then for y close to x we have \(|u(y)| = |u(y) - u(x)| \lesssim |y-x|^2\), hence

$$\begin{aligned} |u(y)^{\langle p/2 \rangle } - u(x)^{\langle p/2 \rangle }| = |u(y)^{\langle p/2 \rangle }| \lesssim |y-x|^p. \end{aligned}$$

Since \(p>1\), we find that \(\nabla u^{\langle p/2 \rangle }(x) = 0\), which ends the proof. \(\square \)

Lemma 6

Assume that \(u\in \mathcal {V}^{1,p}(D)\cap C^{2}(D)\). Then the gradient \(\nabla u^{\langle p/2 \rangle }\) exists in the classical sense almost everywhere in D, coincides with the weak gradient, and (26) holds for a.e. \(x\in D\).

Proof

Since \(u\in \mathcal {V}^{1,p}(D)\), we have \(u^{\langle p/2 \rangle }\in W^{1,2}(D)\). By [35, 1.1.3, Theorem 1] we get that \(\nabla u^{\langle p/2 \rangle }\) exists in the classical sense almost everywhere and coincides with the weak gradient. Formula (26) in case \(p\ge 2\) now follows from the chain rule, thus in the sequel we assume that \(p\in (1,2)\). Note that if \(\nabla u^{\langle p/2 \rangle }(x)\) exists in the classical sense, then either \(u(x)\ne 0\) or \(u(x) = 0\) and \(\nabla u(x) = 0\). Indeed, let \(e_i\) be the unit vector in the i-th coordinate direction and assume that \(u(x)=0\) and \(\partial _i u(x) \ne 0\). Then

$$\begin{aligned} \bigg |\frac{u^{\langle p/2 \rangle }(x+he_i) - u^{\langle p/2 \rangle }(x)}{h}\bigg | = \bigg |\frac{u^{\langle p/2 \rangle }(x+he_i)}{h}\bigg | > rsim |h|^{p/2-1} \mathop {\longrightarrow }\limits _{h\rightarrow 0} \infty , \end{aligned}$$

which contradicts the existence of \(\nabla u^{\langle p/2 \rangle }(x)\). Thus by Lemma 5 we get that (26) holds for a.e. \(x\in D\). \(\square \)

The setting of \({\mathcal {V}}^{1,p}(D)\) is convenient for formulating trace-type results, owing to the connection with the classical Sobolev spaces. The functions u in \(W^{1,2}(D)\) have a well-defined trace \(\widetilde{{{\,\textrm{Tr}\,}}}{\,u}\) which belongs to \(L^2(\partial D)\), see, e.g., Evans [20, p. 272]. The trace \(\widetilde{{{\,\textrm{Tr}\,}}}\) is constructed as a continuous extension of the restriction map from \(C^{\infty }(\overline{D})\) to \(W^{1,2}(D)\). Note that \(C^\infty (\overline{D})\) is dense in \(W^{1,2}(D)\), because D is \(C^{1,1}\), see [35, 1.1.6, Theorem 2]. Here and below, the reference measure for \(L^p(\partial D)\) is the surface measure on \(\partial D\).

Definition 7

Let \(u\in \mathcal {V}^{1,p}(D)\). We define the trace of u as

$$\begin{aligned} {{\,\textrm{Tr}\,}}u = (\widetilde{{{\,\textrm{Tr}\,}}}\, u^{\langle p/2 \rangle })^{\langle 2/p \rangle }. \end{aligned}$$

The above expression makes sense, because \(u^{\langle p/2 \rangle } \in W^{1,2}(D)\). In consequence, \({{\,\textrm{Tr}\,}}u \in L^p(\partial D)\).

The next result gives a more explicit description of the trace, but we will not use it in the sequel.

Lemma 8

If \(u\in \mathcal {V}^{1,p}(D)\), then for almost every \(z\in \partial D\),

$$\begin{aligned} {{\,\textrm{Tr}\,}}u(z) = \lim \limits _{r\rightarrow 0^+} \bigg (\frac{1}{|B(z,r)\cap D|} \int _{B(z,r)\cap D} u(y)^{\langle p/2\rangle }\, dy\bigg )^{\langle 2/p\rangle }. \end{aligned}$$

Proof

Let \(v\in W^{1,2}(D)\). Then, for almost every \(z\in \partial D\) we have

$$\begin{aligned} \widetilde{{{\,\textrm{Tr}\,}}}\, v(z) = \lim \limits _{r\rightarrow 0^+} \frac{1}{|B(z,r)\cap D|} \int _{B(z,r)\cap D} v(y)\, dy. \end{aligned}$$
(27)

Indeed, this is true for \(v\in C^\infty (\overline{D})\). For general \(v\in W^{1,2}(D)\), the result follows from Anzellotti and Giaquinta [3]: Since \(W^{1.2}(D)\hookrightarrow W^{1,1}(D) \hookrightarrow BV(D)\) for bounded D, by [3, Proposition 4], the right-hand side of (27) exists z-almost everywhere. Furthermore, if \(v_n \rightarrow v\) in \(W^{1,2}(D)\), then \(v_n\rightarrow v\) in BV(D), so by [3, Theorem 4] we get (27), from which the lemma follows immediately. \(\square \)

Theorem 9

Assume that \(u\in L^p(D)\) satisfies

$$\begin{aligned} \int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx <\infty . \end{aligned}$$

Then the trace \(g = {{\,\textrm{Tr}\,}}u\) satisfies

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw \lesssim \int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx < \infty . \end{aligned}$$

Proof

If \(u\in L^p\), then \(u^{\langle p/2 \rangle }\in L^2(D)\). By the trace theorem for \(W^{1,2}(D)\) (see, e.g., Kufner, John, and Fučík [33, Theorems 6.8.13, 6.9.2]), we therefore get that the trace \(g^{\langle p/2 \rangle }\) of \(u^{\langle p/2 \rangle }\) exists, belongs to \(W^{1/2,2}(\partial D)\) and satisfies

$$\begin{aligned} \int _{\partial D}\int _{\partial D} (g^{\langle p/2 \rangle }(z) - g^{\langle p/2 \rangle }(w))^2\, |z-w|^{-d}\, dz\, dw \lesssim \int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx. \end{aligned}$$

Recall that by (14) we have \((a^{\langle p/2 \rangle } - b^{\langle p/2 \rangle })^2 \approx F_p(a,b)\). It follows that

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w)) \gamma _D(z,w)\, dz\, dw\lesssim \int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx < \infty . \end{aligned}$$

\(\square \)

Here is a variant of Theorem 3 adapted to \(\mathcal {V}^{1,p}(D)\) spaces.

Proposition 10

Assume that \(g:\partial D\rightarrow \mathbb {R}\) satisfies

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw < \infty . \end{aligned}$$

Let \(u=P_D[g]\). Then \(\nabla u^{\langle p/2 \rangle }(x)\) exists in the classical sense for a.e. \(x\in D\) and

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw = \frac{4p-4}{p}\int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx. \end{aligned}$$

Proof

By virtue of Theorem 3, it suffices to prove that

$$\begin{aligned} p(p-1)\int _D |\nabla u(x)|^2 |u(x)|^{p-2}\, dx = \frac{4p-4}{p}\int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx.\end{aligned}$$
(28)

Since u is harmonic, it is also smooth, so according to Lemma 5, (28) obviously holds for \(p\in [2,\infty )\). For \(p\in (1,2)\) we will show that under present assumptions on u, the set

$$\begin{aligned} A = \{x\in D: u(x) = 0,\ \nabla u(x) \ne 0\} \end{aligned}$$

has Lebesgue measure zero. Since the left-hand side of (28) is finite we find that \(|\nabla u(x)|^2|u(x)|^{p-2}\) is finite for almost all \(x\in D\), but on the other hand this expression is infinite for any \(x\in A\), hence \(|A| = 0\) and by Lemma 5 we get (28) for \(p\in (1,2)\). \(\square \)

Theorem 11

Assume that nontrivial harmonic function u belongs to \(\mathcal {V}^{1,p}(D)\). Then, for \(g = {{\,\textrm{Tr}\,}}[u]\) we have \(u = P_D[g]\) and the p-Douglas identity holds:

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw&= p(p-1)\int _D |\nabla u(x)|^2 |u(x)|^{p-2}\, dx\\ {}&= \frac{4p-4}{p}\int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx. \end{aligned}$$

Proof of Theorem 11

Since \(u\in \mathcal {V}^{1,p}(D)\), Theorem 9 gives the existence of the trace \(g = {{\,\textrm{Tr}\,}}u\), which satisfies

$$\begin{aligned} \int _{\partial D}\int _{\partial D} F_p(g(z),g(w))\gamma _D(z,w)\, dz\, dw < \infty . \end{aligned}$$

Therefore, by Theorem 3 and Proposition 10, the statement of Theorem 11 holds for u and g, provided that \(u = P_D[g]\). In order to show that \(u = P_D[g]\), we will use another notion of trace, the so-called fine boundary function f of u, for which it is known that \(u = P_D[f]\). Then we will prove that \(f=g\). Here are the details. By Lemma 6 we have

$$\begin{aligned} \int _D |\nabla u(x)|^2 |u(x)|^{p-2}\, dx < \infty . \end{aligned}$$

Fix \(x_0\in D\). Since u is locally bounded in D and \(G_D(x,x_0)\) is integrable and bounded outside any neighborhood of \(x_0\), it follows that

$$\begin{aligned} \infty&> \int _D G_D(x,x_0)|\nabla u(x)|^2 |u(x)|^{p-2}\, dx\\ {}&\ge \sup \limits _{U\subset \subset D}\int _U G_U(x,x_0)|\nabla u(x)|^2 |u(x)|^{p-2}\, dx. \end{aligned}$$

By the Hardy–Stein identity (7) we therefore obtain that

$$\begin{aligned} \sup \limits _{U\subset \subset D} \mathbb {E}^x|u(X_{\tau _U})|^p < \infty . \end{aligned}$$

According to Doob [16, Lemma 4.1] the above condition puts us in a position to apply [17, Theorems 9.3 and 5.2] in order to get that u has a fine boundary function f such that

$$\begin{aligned} u(x) = P_D[f](x),\quad x\in D. \end{aligned}$$

In order to finish the proof it suffices to show that \(f=g\), which we do below. Recall that the trace in \(W^{1,2}(D)\) is defined first for functions \(v\in C^\infty (\overline{D})\) as the restriction \(v|_{\partial D}\) and for the rest of the functions via a density argument. Consider a sequence of functions \(v_n \in C^\infty (\overline{D})\) which converges to \(u^{\langle p/2 \rangle }\) in \(W^{1,2}(D)\) and almost everywhere, and let \(f_n\) be the fine boundary function of \(v_n\) for \(n=1,2,\ldots \). By the result of Hunt and Wheeden [27, Theorem 5.7], the trace and the fine boundary function agree almost everywhere for \(v_n\). Using this and the definition of the trace operator in \(W^{1,2}(D)\) we get

$$\begin{aligned} \begin{aligned}\Vert f_n - g^{\langle p/2 \rangle }\Vert _{L^2(\partial D)}&= \Vert f_n - {{\,\textrm{Tr}\,}}u^{\langle p/2 \rangle }\Vert _{L^2(\partial D)}\\ {}&= \Vert {{\,\textrm{Tr}\,}}v_n - {{\,\textrm{Tr}\,}}u^{\langle p/2 \rangle }\Vert _{L^2(\partial D)} \mathop {\longrightarrow }\limits ^{n\rightarrow \infty } 0. \end{aligned} \end{aligned}$$
(29)

On the other hand, since \(u^{\langle p/2 \rangle }\) is continuous and \(v_n\rightarrow u^{\langle p/2 \rangle }\) in \(W^{1,2}(D)\) (so in the BLD sense [18, pp. 573–574]), by [18, Theorem 4.3] the fine boundary functions of \(v_n\) converge in \(L^2\) to the fine boundary function h of \(u^{\langle p/2 \rangle }\), that is,

$$\begin{aligned} \Vert f_n - h\Vert _{L^2(\partial D)} \mathop {\longrightarrow }\limits ^{n\rightarrow \infty } 0.\end{aligned}$$
(30)

Since the function \(t\mapsto t^{\langle p/2 \rangle }\) is continuous, we have \(h = f^{\langle p/2 \rangle }\). Therefore, by (29) and (30) we conclude that \(f=g\) a.e. on \(\partial D\), which ends the proof. \(\square \)

5 Minimization and an identity with a remainder term

We define

$$\begin{aligned} \widetilde{\mathcal {E}}_D^p[u] = \frac{4(p-1)}{p}\int _D |\nabla u^{\langle p/2 \rangle }(x)|^2\, dx. \end{aligned}$$

Note that formally \(\widetilde{\mathcal {E}}_D^p[u] = \mathcal {E}_D^p[u]\). It is well-known that the harmonic function \(P_D[g]\) minimizes the Dirichlet energy \(\widetilde{{\mathcal {E}}}_D^{2}{[u]}\) in D among functions satisfying \(u=g\) on \(\partial D\). This allows us to easily identify the minimizer of \(\widetilde{\mathcal {E}}_D^p\) under boundary condition g, as we do in the following proposition.

Proposition 12

Let \(g\in \mathcal {V}^{1,p}(D)\). Then \(u=\big (P_D[g^{\langle p/2 \rangle }]\big )^{\langle 2/p \rangle }\) is the unique minimizer of \(\widetilde{\mathcal {E}}_D^p\) with the boundary condition g in the following sense: \(u^{\langle p/2 \rangle }-g^{\langle p/2 \rangle }\in W^{1,2}_0(D)\) and for every \(v\in \mathcal {V}^{1,p}(D)\) such that \(v^{\langle p/2 \rangle }-g^{\langle p/2 \rangle }\in W^{1,2}_0(D)\), we have \( \widetilde{\mathcal {E}}_D^p[u]\le \widetilde{\mathcal {E}}_D^p[v]. \)

Due to the uniqueness, the harmonic function \(u=P_D[g]\) cannot be a minimizer of \(\widetilde{\mathcal {E}}_D^p\) with the boundary condition g (except for \(p=2\) or constant g). It is, however, a quasi-minimizer.

Definition 13

We say that u is a quasiminimizer of \(\widetilde{\mathcal {E}}_D^p\) if there exists \(K\ge 1\) such that for every open \(C^{1,1}\) set \(U\subset \subset D\) and v which agrees with u on \(\partial U\) we have \(\widetilde{\mathcal {E}}_U^p[u]\le K\widetilde{\mathcal {E}}_U^p[v]\).

Quasiminimizers were introduced by Giaquinta and Giusti [22]. To keep the discussion below simple, in Definition 13 we require the sets U to be \(C^{1,1}\), but we should also remark that restricting the test sets may occasionally affect the notion of the quasiminimizer, see Giusti [23, Example 6.5].

Proposition 14

If \(\mathcal {H}_{\partial D}^p[g]<\infty \), then \(u=P_D[g]\) is a quasiminimizer of \(\widetilde{\mathcal {E}}_D^p\).

Proof

Let \(U\subset \subset D\) be \(C^{1,1}\) and let \(v:\overline{U}\rightarrow \mathbb {R}^d\) be equal to u on \(\partial U\). We may assume that \(\widetilde{\mathcal {E}}_U^p[v]<\infty \). By the trace theorem for \(W^{1,2}(U)\) (or Theorem 9 above) and (14),

$$\begin{aligned} \widetilde{\mathcal {E}}_U^p[v] > rsim \mathcal {H}_U^2[u^{\langle p/2 \rangle }] \approx \mathcal {H}_U^p[u]. \end{aligned}$$

Note that since u is harmonic, we have \(u=P_U[u]\) in U, therefore by the Douglas identity in Theorem 11 we get

$$\begin{aligned} \mathcal {H}_U^p[u] = \widetilde{\mathcal {E}}_U^p[u], \end{aligned}$$

which ends the proof. \(\square \)

We will now give a variant of the Douglas identity for functions which need not be harmonic.

Theorem 15

Assume that \(p\in [2,\infty )\) and let \(u\in C^2({\overline{D}})\). Then

$$\begin{aligned} \mathcal {E}_D^p[u]&= \mathcal {E}_D^p[P_D[u]] - p\int _D \Delta u(x) u^{\langle p-1 \rangle }(x)\, dx +\frac{p}{2} \int _D \Delta u(x) P_D[u^{\langle p-1 \rangle }](x)\, dx\\&= \mathcal {H}_{\partial D}^p[u] -p\int _D \Delta u(x) u^{\langle p-1 \rangle }(x)\, dx +\frac{p}{2} \int _D \Delta u(x) P_D[u^{\langle p-1 \rangle }](x)\, dx. \end{aligned}$$

Proof

Let \(u\in C^2(\overline{D})\). Then, since \(p\in [2,\infty )\) we get that \(u^{\langle p-1 \rangle } \in C^1(\overline{D})\) and

$$\begin{aligned} \nabla u^{\langle p-1\rangle }(x) = (p-1)\nabla u(x) |u(x)|^{p-2},\quad x\in D. \end{aligned}$$

This puts us in a position to use Green’s identity in the following way:

$$\begin{aligned}&\int _D u^{\langle p-1 \rangle }(x)\Delta u(x)\, dx + (p-1)\int _D |\nabla u(x)|^2|u(x)|^{p-2}\, dx\\&\quad = -\int _{\partial D} u^{\langle p-1 \rangle }(w)\partial _{\textbf{n}}^w u\, dw, \end{aligned}$$

or equivalently,

$$\begin{aligned} \mathcal {E}_D^p[u] = -p\int _D u^{\langle p-1 \rangle }(x)\Delta u(x)\, dx -p\int _{\partial D} u^{\langle p-1 \rangle }(w)\partial _{\textbf{n}}^w u\, dw. \end{aligned}$$
(31)

Let \(v = P_D[u]\), \(\phi = u - v\), and note that \(\Delta \phi = \Delta u\) and \(\phi = 0\) (and so, \(u=v\)) on \(\partial D\). Furthermore,

$$\begin{aligned} \partial _{\textbf{n}}^w u = \partial _{\textbf{n}}^w v + \partial _{\textbf{n}}^w\phi . \end{aligned}$$
(32)

Since u is \(C^2({\overline{D}})\), by, e.g., Øksendal [37, Theorem 7.4.1] and [13, page 37] we have \(\Delta \phi = \Delta u =f\in C({\overline{D}})\) and \(\phi (x) = -\frac{1}{2}\int _D G_D(x,y) f(y)\, dy\). Therefore, by using an argument similar to the one in [4, Lemma 3.2.1], we get that

$$\begin{aligned} \partial _{\textbf{n}}^w \phi = -\frac{1}{2}\lim \limits _{h\rightarrow 0^+}\int _D\frac{G_D(y,w+h\textbf{n})}{h} f(y)\, dy = -\frac{1}{2}\int _D P_D(y,w)f(y)\, dy. \end{aligned}$$

Note that this means that both derivatives on the right-hand side of (32) exist. By Fubini’s theorem,

$$\begin{aligned} \int _{\partial D} u^{\langle p-1 \rangle }(w)\partial _{\textbf{n}}^w \phi \, dw&= -\frac{1}{2}\int _{\partial D} u^{\langle p-1 \rangle }(w)\int _D P_D(y,w) f(y)\, dy \, dw\nonumber \\ {}&= -\frac{1}{2}\int _D f(y) \int _{\partial D}u^{\langle p-1 \rangle }(w) P_D(y,w)\, dw\, dy\nonumber \\&=-\frac{1}{2}\int _D \Delta u(y)P_D[u^{\langle p-1\rangle }](y) dy. \end{aligned}$$
(33)

By Grisvard [24, Theorem 2.2.2.3], we have \(\phi \in W^{2,2}(D)\), and so \(v\in W^{2,2}(D)\) as well. Since v is smooth in D, this further yields \(v^{\langle p-1 \rangle }\in W^{1,2}(D)\). By Green’s identity [24, Theorem 1.5.3.1] and the Douglas identity of Theorem 11,

$$\begin{aligned} \int _{\partial D}u^{\langle p-1\rangle }(w)\partial _{\textbf{n}}^w v\, dw&= \int _{\partial D}v^{\langle p-1\rangle }(w)\partial _{\textbf{n}}^w v\, dw\\ {}&= -(p-1)\int _D|\nabla v(x)|^2|v(x)|^{p-2}\, dx\\&=-\frac{1}{p} \mathcal {H}_{\partial D}^p[u]. \end{aligned}$$

Putting this together with (33) and (32) we get

$$\begin{aligned}&-p\int _{\partial D}u^{\langle p-1\rangle }(w)\partial _{\textbf{n}}^w u\, dw\\ {}&\quad = \ -p\int _{\partial D}u^{\langle p-1\rangle }(w)\partial _{\textbf{n}}^w v\, dw -p\int _{\partial D}u^{\langle p-1\rangle }(w)\partial _{\textbf{n}}^w \phi \, dw\\&\quad =\ \mathcal {H}_{\partial D}^p[u] + \frac{p}{2}\int _D \Delta u(y)P_D[u^{\langle p-1\rangle }](y) dy\\&\quad =\ \mathcal {E}_D^p[P_D[u]] + \frac{p}{2}\int _D \Delta u(y)P_D[u^{\langle p-1\rangle }](y) dy, \end{aligned}$$

where in the last equality we used the Douglas identity of Theorem 3. By this and (31) we obtain the desired identities. \(\square \)