The boundary Harnack inequality for variable exponent $p$-Laplacian, Carleson estimates, barrier functions and $p(\cdot)$-harmonic measures

We investigate various boundary decay estimates for $p(\cdot)$-harmonic functions. For domains in $\mathbb{R}^n, n\geq 2$ satisfying the ball condition ($C^{1,1}$-domains) we show the boundary Harnack inequality for $p(\cdot)$-harmonic functions under the assumption that the variable exponent $p$ is a bounded Lipschitz function. The proof involves barrier functions and chaining arguments. Moreover, we prove a Carleson type estimate for $p(\cdot)$-harmonic functions in NTA domains in $\mathbb{R}^n$ and provide lower- and upper- growth estimates and a doubling property for a $p(\cdot)$-harmonic measure.


Introduction
The studies of boundary Harnack inequalities for solutions of differential equations have a long history. In the setting of harmonic functions on Lipschitz domains such a result was first proposed by Kemper [41] and later studied by Ancona [11], Dahlberg [23] and Wu [60]. Subsequently, Kemper's result was extended by Caffarelli-Fabes-Mortola-Salsa [21] to a class of elliptic equations, by Jerison-Kenig [40] to the setting of nontangentially accessible (NTA) domains, Bañuelos-Bass-Burdzy [14] and Bass-Burdzy [15] studied the case of Hölder domains while Aikawa [6] the case of uniform domains. The extension of these results to the more general setting of p-harmonic operators turned out to be difficult, largely due to the nonlinearity of p-harmonic functions for p = 2. However, recently there has been a substantial progress in studies of boundary Harnack inequalities for nonlinear Laplacians: Aikawa-Kilpeläinen-Shanmugalingam-Zhong [7] studied the case of pharmonic functions in C 1,1 -domains, while Lewis-Nyström [45,47,48] considered more general geometry such as Lipschitz and Reifenberg-flat domains. Lewis-Nyström results have been partially generalized to operators with variable coefficients, Avelin-Lundström-Nyström [12], Avelin-Nyström [13], and to p-harmonic functions in the Heisenberg group, Nyström [55]. Moreover, in [52] the second author proved a boundary Harnack inequality for p-harmonic functions with n < p ≤ ∞ vanishing on a m-dimensional hyperplane in R n for 0 ≤ m ≤ n−1. We also refer to Bhattacharya [18] and Lundström-Nyström [53] for the case p = ∞, where the latter investigated A-harmonic and Aronsson-type equations in planar uniform domains. Concerning applications of boundary Harnack inequalities we mention free boundary problems and studies of the Martin boundary.
The main goal of this paper is to show the boundary Harnack inequality for p(·)-harmonic functions on domains satisfying the ball condition (see Theorem 5.4 below). Let us briefly describe main ingredients leading to this result, as it requires number of auxiliary lemmas and observations which are interesting per se and can be applied in other studies of variable exponent PDEs.
In Section 3 we study oscillations of p(·)-harmonic functions close to the boundary of a domain and prove, among other results, variable exponent Carleson estimates on NTA-domains, cf. Theorem 3.7. Similar estimates play important role, for instance in studies of the Laplace operator, in particular in relations between the topological boundary and the Martin boundary of the given domain; also in the p-harmonic analysis (see presentation in Section 3 for further details and references). The main tools used in the proof of Theorem 3.7 are Hölder continuity up to the boundary, Harnack's inequality and an argument by Caffarelli-Fabes-Mortola-Salsa [21] which, in our situation, relies on various geometric concepts such as quasihyperbolic geodesics and related chaining arguments; also on characterizations of uniform and NTA domains. Section 4 is devoted to introducing two types of barrier functions, called Wolanski-type and Bauman-type barrier functions, respectively. In the analysis of PDEs, barrier functions appear, for example, in comparison arguments and in establishing growth conditions for functions, see e.g. Aikawa-Kilpeläinen-Shanmugalingam-Zhong [7], Lundström [52], Lundström-Vasilis [54] for the setting of p-harmonic functions. Furthermore, barriers can be applied in the solvability of the Dirichlet problem, especially in studies of regular points, see e.g. Chapter 6 in Heinonen-Kilpeläinen-Martio [38] and Chapter 11 in Björn-Björn [19]. We would like to mention that our results on barriers enhance the existing results in variable exponent setting, see Remark 4.2.
In Section 5 we prove our main results, a boundary Harnack inequality and growth estimates for p(·)harmonic functions vanishing on a portion of the boundary of a domain Ω ⊂ R n satisfying the ball condition. We refer to Section 2 for a definition of the ball condition and point out that a domain satisfies the ball condition if and only if its boundary is C 1,1 -regular. Let us now briefly sketch our results. Let w ∈ ∂Ω and r > 0 be small and suppose that p is a bounded Lipschitz continuous variable exponent. Assume that u is a positive p(·)-harmonic function in Ω ∩ B(w, r) vanishing continuously on ∂Ω ∩ B(w, r). Then we prove that for constantsc and C whose values depend on the geometry of Ω, variable exponent p and certain features of u and v, see the statement of Theorem 5.4. Here d(x, ∂Ω) denotes the Euclidean distance from x to ∂Ω. Inequality (1.2) says that u vanishes at the same rate as the distance to the boundary when x approaches the boundary.
Suppose that v satisfies the same assumptions as u above. An immediate consequence of (1.2) is then the following boundary Harnack inequality: saying that u and v vanishes at the same rate as x approaches the boundary (see Theorem 5.4 in Section 5). Among main tools used in the proof of boundary Harnack estimates let us mention Lemmas 5.1 and 5.3 where we show the lower-and upper estimates for the rate of decay of a p(·)-harmonic function close to a boundary of the domain. It turns out that the geometry of the domain affects the number and type of parameters on which the rate of decay depends. Namely, our estimates depend on whether a domain satisfies the interior ball condition or the ball condition in Lemma 5.1 , cf. parts (i) and (ii) of Lemma 5.1. Besides the ball condition, the proof of (1.2) uses the barrier functions derived in Section 4, the comparison principle and Harnack's inequality. Our approach extends arguments from Aikawa-Kilpeläinen-Shanmugalingam-Zhong [7] to the case of variable exponents. We point out that the constants in (1.2), and thus also in the boundary Harnack inequality, depend on u and v. Such a dependence is expected for variable exponent PDEs and difficult to avoid, as e.g. parameters in the Harnack inequality Lemma 3.1 and the barrier functions depend on solutions as well.
Finally, in Section 6 we define and study a lower and upper estimates for a p(·)-harmonic measure. We also prove a weak doubling property for such measures. In the constant exponent setting similar results were obtained by Eremenko-Lewis [26], Kilpeläinen-Zhong [43] and Bennewitz-Lewis [17]. For p = const, p-harmonic measures were employed to prove boundary Harnack inequalities, see e.g. [17], Lewis-Nyström [46] and Lundström-Nyström [53]. The p-harmonic measure, defined as in the aforementioned papers, as well as boundary Harnack inequalities, have played a significant role when studying free boundary problems, see e.g. Lewis-Nyström [48].

Preliminaries
We letΩ and ∂Ω denote, respectively, the closure and the boundary of the set Ω ⊂ R n , for n ≥ 2. We define d(y, Ω) to equal the Euclidean distance from y ∈ R n to Ω, while ·, · denotes the standard inner product on R 2 and |x| = x, x 1/2 is the Euclidean norm of x. Furthermore, by B(x, r) = {y ∈ R n : |x − y| < r} we denote a ball centered at point x with radius r > 0 and we let dx denote the n-dimensional Lebesgue measure on R n .
If Ω ⊂ R n is open and 1 ≤ q < ∞, then by W 1,q (Ω), W 1,q 0 (Ω) we denote the standard Sobolev space and the Sobolev space of functions with zero boundary values, respectively. Moreover, let ∆(w, r) = B(w, r) ∩ ∂Ω. By f A we denote the integral average of f over a set A.
For background on variable exponent function spaces we refer to the monograph by Diening-Harjulehto-Hästö-Růžička [24].
A measurable function p : Ω → [1, ∞] is called a variable exponent, and we denote In this paper we assume that our variable exponent functions are bounded, i.e.
The set of all such exponents in Ω will be denoted P(Ω). The function α defined in a bounded domain Ω is said to be log-Hölder continuous if there is constant L > 0 such that for all x, y ∈ Ω. We denote p ∈ P log (Ω) if 1/p is log-Hölder continuous; the smallest constant for which 1 p is log-Hölder continuous is denoted by c log (p). If p ∈ P log (Ω), then for every ball B ⊂ Ω and x ∈ B; here p B is the harmonic average, 1 pB := B 1 p(x) dx. The constants in the equivalences depend on c log (p) and diam Ω. One of the immediate consequences of (2.3) is that if x ∈ B(w, r), with c depending only on constants in (2.3).
In this paper we study only log-Hölder continuous or Lipschitz continuous variable exponents. Both types of exponents can be extended to the whole R n with their constants unchanged, see [24,Proposition 4.1.7] and McShane-type extension result in Heinonen [37,Theorem 6.2], respectively. Therefore, without loss of generality we assume below that variable exponents are defined in the whole R n .
We define a (semi)modular on the set of measurable functions by setting here we use the convention t ∞ = ∞χ (1,∞] (t) in order to get a left-continuous modular, see [24,Chapter 2] for details. The variable exponent Lebesgue space L p(·) (Ω) consists of all measurable functions u : Ω → R for which the modular ̺ L p(·) (Ω) (u/µ) is finite for some µ > 0. The Luxemburg norm on this space is defined as Equipped with this norm, L p(·) (Ω) is a Banach space. The variable exponent Lebesgue space is a special case of an Orlicz-Musielak space. For a constant function p, it coincides with the standard Lebesgue space. Often it is assumed that p is bounded, since this condition is known to imply many desirable features for L p(·) (Ω). There is not functional relationship between norm and modular, but we do have the following useful inequality: One of the consequences of these relations is the so-called unit ball property: If E is a measurable set of finite measure, and p and q are variable exponents satisfying q ≤ p, then L p(·) (E) embeds continuously into L q(·) (E). In particular, every function u ∈ L p(·) (Ω) also belongs to L p − Ω (Ω). The variable exponent Hölder inequality takes the form where p ′ is the point-wise conjugate exponent, 1/p(x) + 1/p ′ (x) ≡ 1.
Definition 2.1. The Sobolev p(·)-capacity of a set Ω ⊂ R n is defined as where the infimum is taken over all u ∈ W 1,p(·) (R n ) such that u ≥ 1 in a neighbourhood of Ω.
The properties of p(·)-capacity are similar to those in the constant case, see Theorem 10.1.2 in [24]. In particular C p(·) is an outer measure, see Theorem 10.1.1 in [24].
Another type of capacity used in the paper is the so-called relative p(·)-capacity which appears for instance in the context of uniform p(·)-fatness (see next section and Chapter 10.2 in [24] for more details).
Definition 2.2. The relative p(·)-capacity of a compact set K ⊂ Ω is a number defined by where the infimum is taken over all u ∈ C ∞ 0 (Ω) ∩ W 1,p(·) (Ω) such that u ≥ 1 in K. The definition extends to the setting of general sets in R n in the same way as in the case of constant p, cf. [24] for details and further properties of the relative p(·)-capacity. In what follows we will need the following estimate, see Proposition 10.2.10 in [24]: for a bounded log-Hölder continuous variable exponent p : The similar upper estimate holds for r ≤ 1, cf. Lemma 10.2.9 in [24].
for all (nonnegative) φ ∈ C ∞ 0 (Ω). In what follows we will exchangeably be using terms (sub)solution and p(·)-(sub)solution. Similarly, we say that u is a supersolution (p(·)-supersolution) if −u is a subsolution. A function which is both a subsolution and a supersolution is called a (weak) solution to the p(·)-harmonic equation. A continuous weak solution is called a p(·)-harmonic function.
By the standard reasoning the comparison principle implies the following maximum principle: If u ∈ W 1,p(·) (Ω)∩ C(Ω) is a p(·)-subsolution in Ω, then the maximum of u is attained at the boundary of Ω. For further discussion on comparison principles in the variable exponent setting we refer e.g. to Section 3 in Adamowicz-Björn-Björn [3].
We close our discussion of basic definitions and results with a presentation of the geometric concepts used in the paper. Definition 2.6. A uniform domain Ω ⊂ R n with constant M Ω is called a non-tangentially accessible (NTA) domain if Ω and its complement R n \ Ω satisfy, additionally, the so-called corkscrew condition: For some r Ω > 0 and for any w ∈ ∂Ω and r ∈ (0, r Ω ), there exists a point a r (w) ∈ Ω such that r M Ω < |a r (w) − w| < r and d a r (w), ∂Ω > r M Ω .
We note that in fact the (interior) corkscrew condition is implied by a uniform domain, see Bennewitz-Lewis [17] and Gehring [30]. Among examples of NTA domains we mention quasidisks, bounded Lipschitz domains and domains with fractal boundary such as the von Koch snowflake. A domain with the internal power-type cusp is an example of a uniform domain which fails to be NTA-domain. Uniform domains are necessarily John domains, the latter one enclosing e.g. bounded domain satisfying the interior cone condition. See Näkki-Väisälä [56] and Väisälä [58] for further information on uniform and John domains.
Recall, that a quasihyperbolic distance k Ω between points x, y in a domain Ω R n is defined as follows where the infimum is taken over all rectifiable curves γ joining x and y in Ω. Any two points in a uniform domain Ω can always be join by at least one quasihyperbolic geodesic, i.e. a curve for which the above infimum can be achieved. See Bonk-Heinonen-Koskela [20, Section 2] and Gehring-Osgood [31] for more information. We end this section by recalling the following geometric definition.
Definition 2.7. A domain Ω ⊂ R n is said to satisfy the interior ball condition with radius r i > 0 if for every Similarly, a domain Ω ⊂ R n is said to satisfy the exterior ball condition with radius r e > 0 if for every w ∈ ∂Ω there exists η e ∈ R n \ Ω such that B(η e , r e ) ⊂ R n \ Ω and ∂B(η e , r e ) ∩ ∂Ω = {w}. A domain Ω ⊂ R n is said to satisfy the ball condition with radius r b if it satisfies both the interior ball condition and the exterior ball conditions with radius r b .
It is well known that Ω ⊂ R n satisfies the ball condition if and only if Ω is a C 1,1 -domain. See Aikawa-Kilpeläinen-Shanmugalingam-Zhong [7, Lemma 2.2] for a proof. We also note that if Ω ⊂ R n satisfies the ball condition then Ω is a NTA-domain and hence also a uniform domain.
Throughout the paper, unless otherwise stated, c and C will denote constants whose values may vary at each occurrence. If c depends on the parameters a 1 , . . . , a n we sometimes write c(a 1 , . . . , a n ). When constants depend on the variable exponent p(·) we write "depending on p − , p + , c log " in place of "depending on p" whenever dependence on p easily reduces to p − , p + , c log .

Oscillation and Carleson estimates for p(·)-harmonic functions
This section is devoted to discussing some important auxiliary results used throughout the rest of the paper. Namely, in Lemmas 3.4, 3.5 and 3.6 we study oscillations of p(·)-harmonic functions over the balls intersecting the boundary of the underlying domain. We also employ geometric concepts such as NTA and uniform domains, quasihyperbolic geodesics and distance together with the Harnack inequality to obtain a supremum estimate for a p(·)-harmonic function over a chain of balls. Such estimates, discussed in p = const setting for instance in Aikawa-Shanmugalingam [8] or Holopainen-Shanmugalingam-Tyson [39], require extra attention for variable exponent p(·) as now constant in the Harnack inequality depends on a p(·)-harmonic function and the inequality is non-homogeneous. In Theorem 3.7 we show the main result of this section, namely the variable exponent Carleson estimate. Such estimates play crucial role in studies of positive p-harmonic functions, see e.g. Aikawa-Shanmugalingam [8], also Garofalo [29] for an application of Carleson estimates for a class of parabolic equations. According to our best knowledge Carleson estimates in the setting of equations with nonstandard growth have not been known so far in the literature. We apply Lemma 3.7 in the studies of p(·)-harmonic measures in Section 5. Moreover, the geometry of the underlying domain turns out to be important in our investigations, in particular properties of NTA domains and uniform p(·)-fatness of the complement come into play.
We begin with recalling the Harnack estimate for p(·)-harmonic functions.

Lemma 3.1 (Variable exponent Harnack inequality).
Let p be a bounded log-Hölder continuous variable exponent. Assume that u is a nonnegative p(·)-harmonic function in B(w, 4r), for some w ∈ R n and 0 < r < ∞.
Then there exists a constant c H , depending on n, p and sup Ω∩B(w,4r) u, such that Remark 3.2. The variable Harnack inequality in the above form was proved by Alkhutov [9] (see also Alkhutov-Krasheninnikova [10]) and subsequently improved to embrace the case of unbounded solutions by Harjulehto-Kinnunen-Lukkari [36,Theorem 3.9]. There, c H depends only on n, p and the L q ′ s (B(w, 4r))-norm of u for 1 < q < n n−1 and s > p . In what follows we will often iterate the Harnack inequality and therefore we need to carefully estimate the growth of constants involved in such iterations. Let Ω ⊂ R n be a uniform domain with constant M Ω (for the definition of uniform domains and related concepts see the discussion in the end of Section 2). We follow the argument in the proof of Lemma 3.9 in Holopainen-Shanmugalingam-Tyson [39] and note that a quasihyperbolic geodesic joining two points in Ω is an M ′ -uniform curve with M ′ depending only on M Ω , cf. discussion in Gehring-Osgood [31]. Let now x and y be given points in B(w, r M ′ ) ∩ Ω for w ∈ ∂Ω and some fixed r > 0. As in [39] we find a sequence of balls B i , i = 1, . . . , N covering quasihyperbolic geodesic γ joining x and y in Ω (such a geodesic always exists for points in uniform domains, see discussion preceding the proof of [39, Lemma 3.9]) and satisfying the following conditions (recall that k Ω (x, y) stands for a quasihyperbolic distance between points x and y and is given in (2.11)): We estimate the quasihyperbolic distance k Ω (x, y) similarly as in formula (16) in Aikawa-Shanmugalingam [8,Section 4]. Among other facts we employ the definition of John curve. Assume that d(x, ∂Ω) ≤ d(y, ∂Ω) and note that then for a John curve γ, parametrized by arc-length so that γ(0) = x and γ(l(γ)) = y, the following is true. For all z ∈ γ we have M Ω d(z, ∂Ω) ≥ l(γ xz ), where γ xz is the sub curve from x to z. Using this we see that Combining this with the estimate for the number of balls N we get . This estimate can be used in the iteration of Harnack inequality as follows.
Suppose that x, y ∈ B(w, r M ′ ). Then by the variable exponent Harnack inequality (Lemma 3.1) and the construction of the chain of balls B i above, we have that By using (3.1) we find that In some results of this section we appeal to notion of uniform p(·)-fatness. For the sake of completeness of the presentation we recall necessary definitions, cf. Lukkari [50, Sections 3 and 4] and Holopainen-Shanmugalingam-Tyson [39, Section 3] . Definition 3.3. We say that Ω has uniformly p(·)-fat complement, if there exist a radius r 0 > 0 and a constant c 0 > 0 such that for all x ∈ R n \ Ω and all r ≤ r 0 .
The next lemma provides an oscillation estimate. Similar result was proven by Lukkari in [50, Proposition 4.2]. However, here we adapt the discussion from [50] to our case, for instance we do not require the boundary data to be Hölder continuous.

Lemma 3.4.
Let Ω ⊂ R n be a domain having a uniformly p(·)-fat complement with constants c 0 and r 0 . Let further p be a bounded log-Hölder continuous variable exponent satisfying either p + ≤ n or p − > n. Suppose that w ∈ ∂Ω, r > 0 and u is a p(·)-harmonic function in Ω ∩ B(w, r), continuous on Ω ∩ B(w, r) with u = 0 on ∂Ω ∩ B(w, r). Then there exist β, 0 < β ≤ 1, a constant c > 0 and a radiusr such that for all ρ ≤ r/2 and r ≤r. The constants β and c depend on n, p, sup B(w,r)∩Ω u and c 0 , whiler depends on n, p − , p + , c log and r 0 .
Proof. Denote p 0 := p(w) and split the discussion into two cases: p 0 > n and p 0 ≤ n. We start by proving the lemma for p 0 > n. By assumptions u is continuous on B(w, r) ∩ Ω with u = 0 on B(w, r) ∩ ∂Ω. Hence, we may use Theorem 1.2 in Alkhutov-Krasheninnikova [10], with D = B(w, r) ∩ Ω and f = u. In a consequence f (w) = 0 and osc ∂D f ≤ sup B(w,r)∩Ω u and we obtain that there exists c = c(n, p, sup B(w,r)∩Ω u) such that for all ρ ≤ r/4 and with r ≤r(n, p + , p − , c log , r 0 ). The dependence ofr on the listed parameters follows from the proof of Theorem 1.2 in [10]. Hence, we conclude the lemma for p 0 > n by taking β = β(p 0 , n) = 1 − n/p 0 . Assume now that p 0 ≤ n. To prove the lemma in this case we will follow the steps and notation of the proof of Proposition 4.2 in Lukkari [50]. In the applications of Lemma 3.4 we will need to understand the exact dependence on constants and, therefore we repeat parts of the proof from [50].
To prove Hölder continuity up to the boundary we will also use the following oscillation estimate which follows from Theorem 4.2, Lemma 2.8 in Fan-Zhao [28] and Lemma 4.8 in Ladyzhenskaya-Ural'tseva [44]. The careful scrutiny of the presentation in [28] reveals the dependance of c and κ on sup Ω u and structure constants (cf. lemma below). A similar result is given by Theorem 2.2 in Lukkari [50], but under the assumption that p + ≤ n.
Lemma 3.5. Let p be a bounded log-Hölder continuous variable exponent and let u be a p(·)-harmonic function in Ω and let B(w, r) ⋐ Ω. Then there exist c and κ, 0 < κ < 1, such that for all 0 < ρ ≤ r it holds that The constants c and κ depend on n, p + , p − and sup Ω u.
We are now ready to formulate the version of Hölder continuity up to the boundary which will be needed in this paper. Lemma 3.6. Let Ω ⊂ R n be a domain having a uniformly p(·)-fat complement with constants c 0 and r 0 . Let further p be a bounded log-Hölder continuous variable exponent. Suppose that w ∈ ∂Ω, r > 0 and u is a p(·)harmonic function in Ω ∩ B(w, 2r), continuous on Ω ∩ B(w, 2r) with u = 0 on ∂Ω ∩ B(w, 2r). Let γ = min{κ, β} and r <r for β andr as in Lemma 3.4 and κ as in Lemma 3.5. Then there exists C > 0 such that Proof. Let x, y ∈ B(w, r) ∩ Ω and let x 0 ∈ ∂Ω be such that d(x, ∂Ω) = |x − x 0 |. We distinguish two cases.
Since |x − y| < r, the last inequality holds as well with exponent γ = min{κ, β}, giving us the assertion of the lemma in this case. The proof of Lemma 3.6 is, therefore, completed.
Following the proof of Theorem 6.31 in [38] one can show that if the complement of Ω satisfies the corkscrew condition at w ∈ ∂Ω, then R n \ Ω is p(·)-fat at w. Indeed, using the elementary properties of the relative p(·)-capacity (see Section 10.2 in Dieninig-Harjulehto-Hästö-Růžička [24], in particular Lemma 10.2.9 in [24] and the discussion following it) one shows that (3.3) holds at w. Here the log-Hölder continuity of p(·) plays an important role as one also employs property (2.4). Hence, the complement of a NTA domain is uniformly p(·)-fat, see Definition 2.6.
We are now in a position to prove the main result of this section, the Carleson-type estimate. Proof. We proceed following the main lines of Caffarelli-Fabes-Mortola-Salsa [21]. Let k be a large number to be determined later and assume that where x 1 ∈ ∂B(w, r ′ ) ∩ Ω by the maximum principle. We want to derive a contradiction if k is chosen large enough. Suppose first that d(x 1 , ∂Ω) ≥ r ′ /100. Since Ω is an NTA domain, it is in particular uniform. Hence, we may assume that r ′ is so small that any two points in B(w, 2r ′ ) ∩ Ω can be connected by a Harnack chain totally contained in B(w, r) ∩ Ω. Then r ′ = r/c ′ depends only on M Ω and r Ω . Since the L ∞ -norm of u is bounded in B(w, r) ∩ Ω, we can iterate Harnack's inequality using the same constant for each ball contained in B(w, r) ∩ Ω. Thus, the Harnack inequality yields the existence of a constant c 0 , which by (3.2) depends only on c H and M Ω , and such that This gives us a contradiction if k > c 0 and hence the proof of Theorem 3.7 follows in the case when d(x 1 , ∂Ω) ≥ r ′ /100. Next, assume that d(x 1 , ∂Ω) < r ′ /100. It follows by the Harnack inequality and discussion before (3.2) that there exist constantsĉ, λ ∈ [1, ∞), depending only on M Ω and c H , such that From (3.6) and (3.8) we see that Let x + 1 ∈ B(w, r ′ ) ∩ ∂Ω be a point minimizing |x + 1 − x 1 |. By decreasing r ′ if necessary, we apply Lemma 3.6 for B(x + 1 , r ′ /2) to obtain where γ and C depend on n, p, sup B(w,r)∩Ω u and M Ω . The constant c ′ now depends on n, p − , p + , c log , M Ω and r Ω . By using the Harnack inequality, the maximum principle, assumption (3.6) together with (3.9) and (3.10) we obtain, for some x 2 ∈ ∂B(x + 1 , r ′ /2) ∩ Ω, the existence ofč =č(c H , M Ω ) such that In the last inequality, we have also used d(a r ′ (w), ∂Ω) ≤ r ′ . Define constant k 1 such thať By demanding k > max{c 0 , k 1 } we obtain Let k > 1. Then kr ′ /2 ≥ r ′ /4 and the above inequalities take the following form: We will now repeat the above argument starting from (3.6) with (3.12) replacing (3.6). As now the initial condition has an additional term on the right-hand-side, we provide details of the reasoning. Once those are explained, it will become more apparent how to continue with the recurrence argument. Suppose first that d(x 2 , ∂Ω) ≥ r ′ /200. Then, similarly as for x 1 we get from (3.12) and the Harnack inequality that where c 0 is the constant from (3.7). Hence, we again obtain the contradiction if k > c 0 . Let now d(x 2 , ∂Ω) < r ′ /200. The discussion similar to that for (3.8) gives us From (3.12) and (3.13) we see that We take point x + 2 ∈ B(x + 1 , r ′ 2 ) ∩ ∂Ω minimizing |x 2 − x + 2 | and then apply Lemma 3.6 for B(x + 2 , r ′ 4 ). In a result we get Following the same reasoning as in (3.11) we obtain, for some x 3 ∈ ∂B(x + 2 , r ′ 4 ) ∩ Ω, that Since k > k 1 and kr ′ /4 ≥ r ′ /8 we arrive at Having established first two steps of the iteration, we now choose points x m , x + m in the similar way as we found x 1 , x + 1 and x 2 , x + 2 and get that k u(a r ′ /2 m (x + m )) + If m → ∞, then x m → y ∈ ∂Ω ∩ B(w, 2r ′ ). Since u is assumed continuous on Ω ∩ B(w, r) with u = 0 on ∂Ω ∩ B(w, r) we obtain that u(x m ) → u(y) = 0. Hence we conclude that This gives k (u(a r ′ (w)) + r ′ ) < r ′ 2 which leads to k < 1/2 and results in the contradiction by demanding k > max{1, c 0 , k 1 }. Thus the proof of Theorem 3.7 is completed.

Constructions of p(·)-barriers
Below we present two types of barrier functions. The first type is based on a work of Wolanski [59], however our Lemma 4.1 improves result of [59], see Remark 4.2. We employ Wolanski-type barriers in the upper and lower boundary Harnack estimates, see Section 5. The second type of barriers has been inspired by a work of Bauman [16] who uses barriers in studies of a boundary Harnack inequality for uniformly elliptic equations with bounded coefficients. Both approaches have advantages. On one hand a radius of a ball on which a Wolanski-type barrier exists depends on less number of parameters then a radius of a corresponding ball for a Bauman-type barrier, but on the other hand exponents in Wolanski-type barriers depend on larger number of parameters than exponents in Bauman-type barriers, cf. Lemmas 4.1 and 4.3. Therefore, both types of barriers are useful in applications. Then there exist r * = r * (p − , ||∇p|| L ∞ ) and µ * = µ * (p + , p − , n, ||∇p|| L ∞ , M ) such thatû(x) is a p(·)-supersolution andǔ(x) is a p(·)-subsolution in B(y, 2r) \ B(y, r) whenever µ ≥ µ * and r ≤ r * . Furthermore, it holds that u(x) = M on ∂B(y, 2r) andû(x) = 0 on ∂B(y, r) u(x) = 0 on ∂B(y, 2r) andǔ(x) = M on ∂B(y, r).

Upper and lower p(·)-barriers of Wolanski-type
Remark 4.2. We would like to point out that the above theorem improves substantially some results on barrier functions in variable exponent setting, see Corollary 4.1 in Wolanski [59]. Namely, in [59] the radius r depends also on M whereas here we manage to avoid such a dependence (see (4.7) and (4.8) for details). This plays a role in the proof of Lemma 5.1.
Proof. We begin the proof by noting that for any twice differentiable function u we have Moreover, assuming |∇u| > 0 we obtain the following: From (4.1) we see that comparing to the constant p case we have the extra term involving no second derivatives but the gradient of both u and p(·) instead. We begin by showing thatû is a supersolution. We will find µ, A, B and r such that the function has the desired properties. Differentiation ofû yieldŝ Next we observe that and We collect expressions (4.4) and (4.5) and insert them into (4.1) to obtain the following inequality.
Assume that µ is large and combine (4.6) together with (4.7) to obtain thatû is a supersolution provided that the following condition is satisfied.
Upon rearranging terms in (4.8) we obtain the following inequality: Pick r 0 = (p − − 1)/(4 ∇p L ∞ ). Then for r ≤ r 0 the above inequality can be satisfied by a large enough µ (upon including the term | log M | into the first log-term). Moreover, taking r * = min{r 0 , 1/4} ensures that r| log r| is an increasing function of r for r ≤ r * . Thus we conclude that if r ≤ r * , then there exists µ * = µ * (p + , p − , n, ||∇p|| L ∞ , M ) such thatû is a supersolution for µ ≥ µ * . This completes the proof of the supersolution.
Next we want to show thatǔ is a subsolution. We will find µ, C, D and r in the functioň In this caseǔ Similarly to computations in (4.4) and (4.5) we observe that Collecting terms we obtain from (4.1) that the condition forǔ to be a subsolution becomes This is equivalent to (4.6). Finally, we check that assumptionsǔ(x) = 0 whenever x ∈ ∂B(y, 2r) andǔ(x) = M whenever x ∈ ∂B(y, r) imply C = M/(e −µ − e −4µ ) and D = M e −4µ /(e −µ − e −4µ ). Let A be as in the definition of supersolutionû, see (4.2) and cf. the discussion following (4.6). Since C = A, we obtain that bounds for log(|∇ǔ|) are identical to the case of supersolution. Therefore, the proof of the lemma is completed.

Upper and lower p(·)-barriers of Bauman-type
To find the upper bound we make use of the following barrier functions.
Proof. Note that by the formal computations div |∇û| p(x)−2 ∇û ≤ 0 is equivalent to ∇ |∇û| p(x)−2 , ∇û + |∇û| p(x)−2 ∆û ≤ 0. (4.11) Clearlyû ∈ C 2 (B(y, 2r) \ B(y, r)) and thus we have that (4.12) Moreover, computations at (4.14) (see below) will give us that in the given annulus |∇û| > 0. This, together with (4.11) and (4.12) imply that we need the following inequality to be satisfied: From (4.13) we see that comparing to the constant p case we have the extra term involving no second derivatives but the gradient of bothû and p(·) instead. Let us show first thatû is a subsolution. This will be done by choosing parameters µ, A, B and r in the functionû where r < |x − y| < 2r.
Differentiation ofû yieldŝ Next we calculate the following expressions: As n i,j=1 δ ij (x i − y i )(x j − y j ) = |x − y| 2 and n i,j=1 (x i − y i ) 2 (x j − y j ) 2 = |x − y| 4 we also get that Next, we collect the above expressions and substitute them into (4.13). After division by |∇û| 2 we obtain the following inequality Use ∇p, ∇u = Aµr µ |x − y| −(µ+2) ∇p, (x − y) in order to simplify (4.15): This holds true if In fact, µ * = n−p − +1 p − −1 . Next we need functionû to satisfy |û(x) −û(z)| = M whenever x ∈ ∂B(y, 2r) and z ∈ ∂B(y, r). This implies that A = M/(1 − 2 −µ ). Our next step is to find conditions for r so that the first term on the left-hand side of (4.16) does not exceed value −1. Since |x − y| ≤ 2r it is enough to ensure that ∇p L ∞ | log (|∇û|) |2r ≤ 1. (4.18) Then the proof will be completed by (4.16), (4.17) and (4.18). Hence it only remains to satisfy (4.18). We have Since r < |x − y| < 2r, it holds: We choose r so small that the left hand side is larger than one. Such a requirement leads to condition that r < r * * := Mµ 2(2 µ −1) and thus r * * depends on M and µ * and therefore on M , p − and n.
provided that r ≤ r * is small enough. Indeed, if r| log r| < 1/(2 ∇p L ∞ ) and r < 1/(4|∇p L ∞ | log(2 µ+1 r * * )|), then (4.19) holds. In a consequence r * depends only on M , ∇p L ∞ , p − and n. The last inequality completes the proof of (4.18). By taking B := −A it holds thatû satisfies the boundary value conditions. In order to show thatǔ is a p(·)-subsolution we proceed in the analogous way as in the second part of Lemma 4.1, cf. discussion between formulas (4.9) and (4.10). We defině where r < |x − y| < 2r.

Upper and lower boundary growth estimates. The boundary Harnack inequality
This section contains main result of the paper, namely the proof of the boundary Harnack inequality for positive p(·)-harmonic functions on domains satisfying the ball condition, see Theorem 5.4. The proof relies on Lemmas 5.1 and 5.3, where we show the lower-and, respectively, the upper estimates for a rate of decay of a p(·)-harmonic function close to a boundary of the underlying domain. In particular, Lemmas 5.1 and 5.3 imply stronger result than the usual boundary Harnack inequality. Namely, that a p(·)-harmonic function vanishes at the same rate as the distance function. Moreover, Lemma 5.1 illustrates the following phenomenon: the geometry of the domain effects the sets of parameters on which the rate of decay depends. Indeed, it turns out that constants in our lower estimate depend whether domain satisfies the interior ball condition or the ball condition, cf. parts (i) and (ii) of Lemma 5.1. As a corollary we also obtain a decay estimate for supersolutions (a counterpart of Proposition 6.1 in Aikawa-Kilpeläinen-Shanmugalingam-Zhong [7]). For w ∈ ∂Ω we denote by A r (w) a point satisfying d(A r (w), ∂Ω) = r and |A r (w) − w| = r. Existence of such a point is guaranteed by the interior ball condition (with radius r i ) for r ≤ r i /2. Recall also that by c H we denote the constant from the Harnack inequality, Lemma 3.1.

Lemma 5.1 (Lower estimates).
Let Ω ⊂ R n be a domain satisfying the interior ball condition with radius r i , w ∈ ∂Ω and 0 < r < r i . Let p be a bounded Lipschitz continuous variable exponent. Assume that u is a positive p(·)-harmonic function in Ω ∩ B(w, r) satisfying u = 0 on ∂Ω ∩ B(w, r). Then the following is true.
(i) There exist constants c andc such that ifr := r/c then The constant c depends on inf Γw,r u, r i and p + , p − , n, ∇p L ∞ , where Γ w,r = {x ∈ Ω|r < d(x, ∂Ω) < 3r} ∩ B(w, r). The constantc depends only on r i and p − , ∇p L ∞ .
Assume in addition that Ω satisfies the ball condition with radius r b and that 0 < r < r b .
(ii) Then there exist constants c L andc L such that ifr := r/c L then The constant c L depends on sup Ω∩B(w,r) u, u(A 2r (w)), r b and p + , p − , n, ∇p L ∞ , whilec L depends only on r b and p − , ∇p L ∞ .
To prove (ii), assumec L to be so large thatr = r/c L ≤ min{r * , r/6} and note that nowc L depends only on ∇p L ∞ , p − and r b . We proceed as in the former case but with (5.1) replaced by the following claim: where c 0 depends only on c H , u(A 2r (w)), ∇p L ∞ , r b , p − , p + , n, see details below and Figure 1. In a consequence we obtain, instead of (5.2), the following inequality: Assume r H so small that r H ≤ min{ 1 2cH u(A 2r (w)),r} and observe that then We now use Lemma 4.1 to find a subsolutionǔ in Constant c 1 arises from computingǔ for x such that |x − A 2r (w)| = 3 2 r H (cf. the definition ofǔ in Lemma 4.1). Furthermore, c 1 > 2c H depends only on c H , u(A 2r (w)), ∇p L ∞ , p − , p + , n, since µ * in Lemma 4.1 depends only on these parameters.
We proceed by constructing a sequence of barrier functions and building a chain of balls joining points A 2r (w) and η i 2r , where η i 2r is the same point as discussed in part (i) of the proof. Using the ball condition we find that ifr is small enough, depending only on r b , then That suchr can be found follows from the argument similar to the one presented in Sections 2 and 3 in Aikawa-Kilpeläinen-Shanmugalingam-Zhong [7] as Ω is a C 1,1 -domain, and thus the unit normal is Lipschitz continuous. Consider the subsolution in B(y, 2r H ) \ B(y, r H ) for a y ∈ [η i 2r , A 2r (w)] with boundary values 1 c1 on B(y, r H ) and 0 on B(y, 2r H ). Put y as close as possible to point η i 2r under the restriction that B(y, r H ) ⊂ B(A 2r (w), 3/2 r H ). By the comparison principle we then obtain that where c 2 > c 1 > 2c H depends only on c H , u(A 2r (w)), ∇p L ∞ , p − , p + , n. Proceeding in this way we obtain a chain of balls centered at points y which, eventually, contain η i 2r , see Figure 1. Indeed, each ball adds distance r H /2 to the length of chain, and hence the number of balls needed to approach η i 2r depends only onr/r H , which in turn depends only on c H , u(A 2r (w)), ∇p L ∞ , p − and r b . We can proceed in the same way to cover B(η i 2r ,r). Hence we conclude the proof of (5.3) and therefore the proof of Lemma 5.1. Denote u * the lsc-regularization of a supersolution u (see e.g. Adamowicz-Björn-Björn [3, Theorem 3.5] and discussion therein).
Corollary 5.2 (cf. Proposition 6.1 in [7]). Let Ω ⊂ R n be a bounded domain satisfying the interior ball condition for r i and let p be a bounded Lipschitz continuous variable exponent such that p + < n. Furthermore, let u ≥ 0 be a supersolution in Ω. If there exists a point w ∈ ∂Ω such that lim inf Ω∋y→w u * (y) d(y, ∂Ω) = 0, then u * ≡ 0 in Ω.
Since the comparison principle applies to supersolutions, we proceed as in the proof of Lemma 5.1 part (i) to obtain u * (y) d(y, ∂Ω) for all w ∈ ∂Ω and the corollary is proven.
We now show the upper boundary growth estimates.

Lemma 5.3 (Upper estimates).
Let Ω ⊂ R n be a domain satisfying the exterior ball condition with radius r e , w ∈ ∂Ω and 0 < r < r e . Let p be a bounded Lipschitz continuous variable exponent. Assume that u is a positive p(·)-harmonic function in Ω ∩ B(w, r) satisfying u = 0 on ∂Ω ∩ B(w, r). Then there exist constants c andc such that ifr = r/c then

p(·)-Harmonic measure
In this section we study p(·)-harmonic measures. In Lemma 6.2 we show the existence of a p(·)-harmonic measure and in Theorem 6.3 we provide our main results of this section: lower-and upper-growth estimates for such measures. Finally, using these growth estimates and the Carleson estimate (Theorem 3.7) we conclude in Corollary 6.5 a weak doubling property of the p(·)-harmonic measure. Let us now explain motivations for our studies. Harmonic measures were employed to prove a Boundary Harnack inequality in the setting of harmonic functions, see Dahlberg [23] and Jerison-Kenig [40]. When studying boundary behavior of p-harmonic type functions, various versions of generalizations of harmonic measures have been introduced and studied for p = 2, see e.g. Llorente-Manfredi-Wu [49]. In the case of constant p (p = 2) Bennewitz and Lewis employed the doubling property of a p-harmonic measure, first proved in Eremenko-Lewis [26], to obtain a Boundary Harnack inequality for p-harmonic functions in the plane, see Bennewitz-Lewis [17]. This result has been generalized to the setting of Aronsson-type equations by Lewis-Nyström [46] and Lundström-Nyström [53]. The p-harmonic measure, defined as in the aforementioned papers, as well as Boundary Harnack inequalities, have played a significant role when studying free boundary problems, see for example Lewis-Nyström [48]. The p-harmonic measure was also used to find the optimal Hölder exponent of p-harmonic functions vanishing near the boundary, see Kilpeläinen-Zhong [42] and Lundström [52]. Moreover, a work of Peres-Sheffield [57] provides discussion of connections between p-harmonic measures, defined in a different way though, and tug-of-war games. As for the equations with nonstandard growth we mention paper by Lukkari-Maeda-Marola [51], where some upper estimates for p(·)-harmonic measures were studied in the context of Wolff potentials.
To prove our results concerning p(·)-measures we begin by stating a Caccioppoli-type estimate.
The following existence lemma is probably known to experts in the variable exponent analysis, but to our best knowledge have not appeared earlier in the literature. Therefore, we include its proof for the readers convenience.
Lemma 6.2. Assume that Ω ⊂ R n , w ∈ ∂Ω, 0 < r < ∞ and let p be a bounded log-Hölder continuous variable exponent. Suppose that u is a positive p(·)-harmonic function in Ω ∩ B(w, 2r), continuous onΩ ∩ B(w, 2r) with u ≡ 0 on ∂Ω ∩ B(w, 2r). Extend u to B(w, 2r) by defining u ≡ 0 on B(w, 2r)\Ω. Then there exists a unique finite positive Borel measure µ on R n , with support in ∂Ω ∩ B(w, r), such that whenever ψ ∈ C ∞ 0 (B(w, r)) then Proof. We first prove that the extended function is a subsolution in B(w, r). To do so, we begin by showing that the extension, denoted by U , belongs to W 1,p(·) loc (B(w, r)). It is immediate that U belongs to L p(·) (B(w, r)) and that ∇U ∈ L p(·) (B(w, r)). To conclude that U ∈ W 1,p(·) loc (B(w, r)) it remains to show that U ∈ W 1,p(·) loc (B R ) for any ball B R ⋐ B(w, r), which in turn boils down to showing that ∇u is the distributional gradient of U in B R . Indeed, let η ∈ C ∞ 0 (B R ) be arbitrary and let φ ∈ C ∞ 0 ((Ω ∩ B R ) ∪ supp η) be such that 0 ≤ φ ≤ 1 and φ ≡ 1 on Ω ∩ B R ∩ supp η. Then ηφ ∈ C ∞ 0 ((Ω ∩ B R ) ∪ supp η). Since ∇u is the distributional gradient of u in The first integral in the right-hand side is zero, U = 0 in B R \ Ω and hence, ∇u is the distributional gradient of U in B R , and U ∈ W 1,p(·) loc (B(w, r)). To this end, for the sake of simplicity of notation, denote u = U . Next, we show that if ψ ∈ C ∞ 0 (B(w, r)) and ψ ≥ 0, then To prove (6.2), define ψ 1 := [(δ + max{u − ε, 0}) ε − δ ε ]ψ.
Upon using the last inequality and the fact that h is p(·)-harmonic in B(w,r) and ψ is an appropriate test function for h together with Lemma 6.2 we obtain ψdµ ≤ max{0, βM (r) −r}µ(B(w,r)).
Since measure µ is supported on ∆(w,r) we see that µ(B(w,r)) = µ(∆(w,r)). Hence, by the above inequality and (6.14) we see that (6.13) holds true. Next, by assumingc ≥c it follows from (6.6) that we have βM (r) −r < 1. Note that nowc depends on n, p − , p + , c log , sup B(w,r)∩Ω u and c 0 , r 0 . Using this fact and the definition of ψ in (6.12) we get that 0 ≤ ψ ≤ 1 and thus B(w,r) |ψ| p(x) dx ≤ ω nr n ≤ ω n . The classical formula for the volume of the unit ball implies, that if 1 ≤ n ≤ 12, then ω n > 1. It follows that If n > 12, then ω n < 1 and so in (6.15) instead of ω 1/p − n one has ω 1/p + n . Eventually, this effects only the power of ω n in (6.18) which for ω n < 1 is 1 − p + /p − − p − /p + instead of 2 − p + /p − but has no impact on the other expressions in the discussion below. Therefore, we present the argument only in the case of ω n > 1.
By the unit ball property (2.6) we get where C Sob depends on n and c log . In order to pass from the norm of the gradient to its modular we use similar approach as in (6.15) and (6.16). For the sake of brevity and clarity of the presentation we will skip some of the tedious computations. Without the loss of generality we may assume that µ(∆(w,r)) ≤ 2 1−p + . Indeed, this can be obtained by using the upper bound of µ(∆(w,r)) proved above ((i) in Theorem 6.3) together with (6.6) and by decreasing r if necessary. Note thatc depends on n, p − , p + , c log , sup B(w,r)∩Ω u and c 0 , r 0 . Then by (6.13) we have that the modular function of ∇ψ does not exceed value one and thus, by (2.5) ∇ψ p + L p(·) (B(w,r)) ≤