1 Introduction

We consider the two-phase functional \(J_{{tp}}\) defined, for every open set \(D\subset \mathbb {R}^d\) and every function \(u:D\rightarrow \mathbb {R}\), as

$$\begin{aligned} J_{{tp}}(u, D):=\int _{D} |\nabla u|^2\,dx+\lambda ^2_+| \Omega _u^+\cap D|+\lambda ^2_-|\Omega _u^-\cap D|, \end{aligned}$$
(TP)

where the constants \(\lambda _+>0\) and \(\lambda _->0\) are given and fixed, and the two phases

$$\begin{aligned} \Omega _u^+=\{u>0\}\qquad \text {and}\qquad \Omega _u^-=\{u<0\} \end{aligned}$$

are the positivity sets of the functions \(u^+:=\max \{u,0\}\) and \(u^-:=\max \{-u,0\}\).

We say that a function \(u:D\rightarrow \mathbb {R}\) is a local minimizer of \(J_{{tp}}\) in D if

$$\begin{aligned} J_{{tp}}\big (u, \Omega \big )\le J_{{tp}}\big (v, \Omega \big ) \end{aligned}$$

for all open sets \(\Omega \) and functions \(v:D\rightarrow \mathbb {R}\) such that \(\overline{\Omega }\subset D\) and \(v=u\) on \(D\setminus \Omega \).

In this paper we aim to study the regularity of the free boundary \(\partial \Omega _u^+\cup \partial \Omega _u^-\cap D\) for local minimizers of \(J_{{tp}}\) in D. Our main result is a full description of \(\partial \Omega _u^+\) and \(\partial \Omega _u^-\) around two-phase points:

$$\begin{aligned} \Gamma _{{tp}}:=\partial \Omega _u^+\cap \partial \Omega _u^-\cap D. \end{aligned}$$

More precisely, we prove that, in a neighborhood of a two-phase point, the sets \(\Omega _u^+\) and \(\Omega _u^-\) are \(C^{1,\eta }\)-regular domains touching along the closed set \(\Gamma _{{tp}}\).

Theorem 1.1

(Regularity around two-phase points). Let \(u:D\rightarrow \mathbb {R}\) be a local minimizer of \(J_{{tp}}\) in the open set \(D\subset \mathbb {R}^d\). Then, for every two-phase point \(x_0\in \Gamma _{{tp}}\cap D\), there exists a radius \(r_0>0\) (depending on \(x_0\)) such that \(\partial \Omega _u^\pm \cap B_{r_0}(x_0)\) are \(C^{1,\eta }\) graphs for some \(\eta >0\).

Combining Theorem 1.1 with the known regularity theory for one-phase problem, one obtains the following result, which provides a full description of the free boundary of local minimizers of \(J_{{tp}}\).

Corollary 1.2

(Regularity of the free boundary). Let \(u:D\rightarrow \mathbb {R}\) be a local minimizer of \(J_{{tp}}\) in the open set \(D\subset \mathbb {R}^d\). Then, each of the sets \(\partial \Omega _u^+\cap D\) and \(\partial \Omega _u^-\cap D\) can be decomposed as a disjoint union of a regular and a (possibly empty) singular part

$$\begin{aligned} \partial \Omega _u^\pm \cap D={{\,\mathrm{Reg}\,}}(\partial \Omega _u^{\pm })\cup {{\,\mathrm{Sing}\,}}(\partial \Omega _u^{\pm }), \end{aligned}$$

with the following properties:

  1. (i)

    The regular part \(\mathrm{Reg}(\partial \Omega _u^{\pm })\) is a relatively open subset of \(\partial \Omega _u^\pm \cap D\) and is locally the graph of a \(C^{1,\eta }\)-regular function, for some \(\eta >0\). Moreover, the two-phase free boundary is regular, that is,

    $$\begin{aligned} \Gamma _{{tp}}\cap D\subset {{\,\mathrm{Reg}\,}}(\partial \Omega _u^{\pm }). \end{aligned}$$
  2. (ii)

    The singular set \(\mathrm{Sing}(\partial \Omega _u^{\pm })\) is a closed subset of \(\partial \Omega _u^{\pm }\cap D\) of Hausdorff dimension at most \(d - 5\). Precisely, there is a critical dimensionFootnote 1\(d^*\in [5,7]\) such that

    • if \(d<d^*\), then \({{\,\mathrm{Sing}\,}}(\partial \Omega _u^\pm )=\emptyset \);

    • if \(d=d^*\), then \(\mathrm{Sing}(\partial \Omega _u^\pm )\) is locally finite in D;

    • if \(d> d^*\), then \({{\,\mathrm{Sing}\,}}(\partial \Omega _u^\pm )\) is a closed \((d-d^*)\)-rectifiable subset of \(\partial \Omega _u^\pm \cap D\) with locally finite \(\mathcal {H}^{d-d^*}\) measure.

As a second corollary of our analysis, by applying the same type of arguments as in [43] we obtain a complete regularity results for the following shape optimization problem, studied in [6, 8, 45], where the optimal sets have the same qualitative behavior as the sets \(\Omega _u^+\) and \(\Omega _u^-\) in Corollary 1.2, contrary to the classical optimal partition problem studied in [13, 14, 19,20,21] (which corresponds to the case of zero weights \(m_i=0\), for every i).

Corollary 1.3

(Regularity for a multiphase shape optimization problem). Let D be a \(C^{1,\gamma }\)-regular bounded open domain in \(\mathbb {R}^d\), for some \(\gamma >0\) and \(d\ge 2\). Let \(n\ge 2\) and \(m_i>0\), \(i=1,\ldots ,n\) be given. Let \((\Omega _1,\ldots ,\Omega _n)\) be a solution of the following optimization problem:

$$\begin{aligned}&\min \Big \{\sum _{i=1}^n\big (\lambda _1(\Omega _i)+m_i|\Omega _i|\big )\ :\ \Omega _i\subset D\\\&\quad \text {open}\,;\ \Omega _i\cap \Omega _j=\emptyset \quad \text {for}\quad i\ne j\Big \}. \end{aligned}$$
(SOP)

where \(\lambda _1(\Omega _i)\) is the first eigenvalue for the Dirichlet Laplacian in \(\Omega _i\).

Then, the free boundary \(\partial \Omega _i\) of each of the sets \(\Omega _i\), \(i=1,\ldots ,n\), can be decomposed as the disjoint union of a regular part \(\mathrm{Reg}(\partial \Omega _i)\) and a (possibly empty) singular part \(\mathrm{Sing}(\partial \Omega _i)\), where:

  1. (i)

    The regular part \(\mathrm{Reg}(\partial \Omega _i)\) is a relatively open subset of \(\partial \Omega _i\) and is locally the graph of a \(C^{1,\eta }\)-regular function, for some \(\eta >0\). Moreover, both the contact set with the boundary of the box and the two-phase free boundaries are regular, that is,

    $$\begin{aligned} \partial \Omega _i\cap \partial D\subset {{\,\mathrm{Reg}\,}}(\partial \Omega _i)\quad \text {and}\quad \partial \Omega _i&\cap \partial \Omega _j \subset {{\,\mathrm{Reg}\,}}(\partial \Omega _i)\\&\text {for every}\quad j\in \{1,\ldots ,n\}\setminus \{i\}. \end{aligned}$$
  2. (ii)

    The singular set \(\ \mathrm{Sing}(\partial \Omega _i)\) is a closed subset of \(\partial \Omega _i\) of Hausdorff dimension at most \(d - 5\). Precisely,

    • if \(d<d^*\), then \({{\,\mathrm{Sing}\,}}(\partial \Omega _i)=\emptyset \),

    • if \(d=d^*\), then \(\mathrm{Sing}(\partial \Omega _i)\) is locally finite in D,

    • if \(d> d^*\), then \({{\,\mathrm{Sing}\,}}(\partial \Omega _i)\) is a closed \((d-d^*)\)-rectifiable subset of \(\partial \Omega _i\) with locally finite \(\mathcal {H}^{d-d^*}\) measure,

    where \(d^*\in \{5,6,7\}\) is the critical dimension from Corollary 1.2.

1.1 Regularity of local minimizers of the Bernoulli functional

The study of the regularity of minimizers of \(J_{{tp}}\) started in the seminal paper of Alt and Caffarelli [1], which was dedicated to the one-phase case, in which u is non-negative. In this case, it is sufficient to work with the one-phase functional

$$\begin{aligned} J_{{op}}(u, D):=\int _{D} |\nabla u|^2\,dx+\lambda ^2_+| \Omega _u^+\cap D|, \end{aligned}$$
(OP)

as the negative phase \(\Omega _u^-\) is empty. In [1] it was proved that for a local minimizer u of \(J_{{op}}\), the free boundary \(\partial \Omega _u^+\cap D\) decomposes into a \(C^{1,\eta }\)-regular set \(\mathrm{Reg}(\partial \Omega _u^+)\) and a closed singular set \(\mathrm{Sing}(\partial \Omega _u^+)\) of zero \(\mathcal {H}^{d-1}\)-Hausdorff measure. A precise estimate on the Hausdorff dimension of \(\mathrm{Sing}(\partial \Omega _u^+)\) was then given by Weiss [46] as a consequence of his monotonicity formula and its rectifiability was established by Edelen and Engelstein [31]. In fact, the results in Corollary 1.2 are an immediate consequence of Theorem 1.1 and the known regularity for the one-phase parts

$$\begin{aligned} \Gamma ^+_{{op}}:=\big (\partial \Omega _u^+\setminus \partial \Omega _u^-\big )\cap D\qquad \text {and} \qquad \Gamma ^-_{{op}}:=\big (\partial \Omega _u^-\setminus \partial \Omega _u^+\big )\cap D. \end{aligned}$$

Indeed:

  • the regularity of \(\mathrm{Reg}(\partial \Omega _u^\pm )\) (Corollary 1.2 (i)) follows by Theorem 1.1 and [1, Theorem 8.1];

  • the estimates on the dimension of the singular set \(\mathrm{Sing}(\partial \Omega _u^\pm )\) (Corollary 1.2 (ii)) are again a consequence of Theorem 1.1 (which shows that singularities can appear only on the one-phase parts of the free boundary) and the results in [31, 46].

The regularity of local minimizers with two-phases (that is, local minimizers of \(J_{{tp}}\) which change sign) was first addressed by Alt, Caffarelli and Freedman [2], where the authors consider free boundary functionals that weight also the zero level set of u:

figure a

where \(\lambda _+\ge \lambda _0\ge 0\) and \(\lambda _-\ge \lambda _0\ge 0\). When \(D\subset \mathbb {R}^2\) is a planar domain, and under the additional assumptions

$$\begin{aligned} \lambda _+\ne \lambda _-\qquad \text {and}\qquad \lambda _0=\lambda _+\, \text { or }\,\lambda _-, \end{aligned}$$

they showed that the free boundaries \(\partial \Omega _u^+\cap D\) and \(\partial \Omega _u^-\cap D\) are \(C^1\)-regular curves. The key observation here is that the additional assumption

$$\begin{aligned} \lambda _0=\lambda _+\ \text { or }\ \lambda _0=\lambda _-\,, \end{aligned}$$
(1.1)

forces the level set \(\{u=0\}\) to have zero Lebesgue measure. Thus, the two boundaries \(\partial \Omega _u^+\cap D\) and \(\partial \Omega _u^-\cap D\) coincide and the solution u satisfies the transmission condition

$$\begin{aligned} |\nabla u^+|^2-|\nabla u^-|^2=\lambda ^2_+-\lambda ^2_-\qquad \text {on}\qquad \partial \Omega _u^+=\partial \Omega _u^-. \end{aligned}$$
(1.2)

The free boundary regularity for local minimizers of \(J_{{acf}}\) in the case (1.1) is already known in any dimension. Indeed, the regularity of the free boundary \(\partial \Omega _u^+=\partial \Omega _u^-\), for functions which are harmonic (or solve an elliptic PDE) in \(\Omega _u^+\cup \Omega _u^-\) and satisfy the transmission condition (1.2), is today well-understood, after the seminal work of Caffarelli [9,10,11] (see also the book [15]) and the more recent results of De Silva, Ferrari and Salsa [27,28,29], which are based on the techniques introduced by De Silva [26] and which are central also in the present paper.

On the other hand, in the general case,

$$\begin{aligned} \lambda _+>\lambda _0\ \text { and }\ \lambda _->\lambda _0\,, \end{aligned}$$
(1.3)

one can easily construct solutions of ACF for which the zero set \(\{u=0\}\) has positive measure, preventing the application of the existing results and techniques about two-phase free boundary problems, as for instance [9,10,11, 27,28,29], which rely on the transmission condition (1.2).

To the best of our knowledge, the only known regularity result for minimizers of ACF under the condition (1.3) is due to the second and third authors in [42], where it is proved that, in dimension \(d=2\), the free boundaries \(\partial \Omega _u^+\) and \(\partial \Omega _u^-\) are \(C^{1,\eta }\) regular. The proof relies on a novel epiperimetric type inequality which applies only in dimension two and it was recently extended (still in dimension two) to almost-minimizers by the same two authors and Trey [43].

In this paper, we complete the analysis started by Alt, Caffarelli and Freedman [2], by proving a regularity result for the free boundaries of local minimizers of , in the general case (1.3) and in any dimension \(d\ge 2\). Indeed, Theorem 1.1 and Corollary 1.2 apply directly to ACF as the local minimizers of ACF, corresponding to the parameters \(\lambda _0\), \(\lambda _+\) and \(\lambda _-\), are local minimizers of (TP) with parameters

$$\begin{aligned} \lambda _+'=\sqrt{\lambda _+^2-\lambda _0^2}\quad \text { and }\quad \lambda _-'=\sqrt{\lambda _-^2-\lambda _0^2}\,. \end{aligned}$$

1.2 One-phase, two-phase and branching points on the free boundary

Let \(u:B_1\rightarrow \mathbb {R}\) be a (local) minimizer of \(J_{{tp}}\) in \(B_1\) and let, as above, \(\Omega _u^\pm =\{\pm u>0\}\). Notice that, the zero level set \(\{u=0\}\) might have positive Lebesgue measure in \(B_1\) and also non-empty interior, contrary to what happens with the minimizers of ACF with \(\lambda _+=\lambda _0\). This introduces a new element in the analysis of the free boundary, which can now switch from one-phase to two-phase at the so-called branching points, at which the zero level set looks like a cusp. Precisely, this means that the free boundary \(\partial \Omega _u^+\cap B_1\) (the same holds for the negative phase \(\partial \Omega _u^-\cap B_1\)) can be decomposed into:

  • a set of one-phase points \(\Gamma _{{op}}^+:=\partial \Omega _u^+\setminus \partial \Omega _u^-\cap B_1\), and

  • a set of two-phase points \(\Gamma _{{tp}}:=\partial \Omega _u^+\cap \partial \Omega _u^-\cap B_1\).

By definition the set of one-phase points \(\Gamma _{{op}}^+\) is relatively open in \(\partial \Omega _u^+\). Precisely, if \(x_0\in \Gamma _{{op}}^+\), then there is a ball \(B_r(x_0)\) which does not contain points from the negative phase, \(B_r(x_0)\cap \Omega _u^-=\emptyset \). Thus, u is a minimizer of the one-phase functional \(J_{{op}}\) in \(B_r(x_0)\) and the regularity of \(\partial \Omega _u^+\cap B_r(x_0)\) follows from the results in [1, 46].

For what concerns the two-phase points, we can further divide them into interior and branching points:

  • we say that \(x_0\) is an interior two-phase point, \(x_0\in \Gamma _{{tp}}^{\mathrm{int}}\), if \(x_0\in \Gamma _{{tp}}\) and

    $$\begin{aligned} \big |B_r(x_0)\cap \{u=0\}\big |=0\quad \text {for some}\quad r>0\,; \end{aligned}$$
  • conversely, we say that \(x_0\) is a branching point, \(x_0\in \Gamma _{{tp}}^{\mathrm{br}}\), if \(x_0\in \Gamma _{{tp}}\) and

    $$\begin{aligned} \big |B_r(x_0)\cap \{u=0\}\big |>0\quad \text {for every}\quad r>0\,. \end{aligned}$$

By definition, \(\Gamma _{{tp}}^{\mathrm{int}}\) is an open subset of \(\partial \Omega _u^+\cap B_1\). In particular, u is a minimizer of the Alt–Caffarelli–Friedman functional ACF with \(\lambda _+=\lambda _0\) in a small ball \(B_r(x_0)\) and the regularity of \(\Gamma _{{tp}}^{\mathrm{int}}\) is a consequence of the results in [2, 9,10,11, 15, 27,28,29].

In order to complete the study of the regularity of the free boundaries one has then to focus on the branching points. Note that by the previous discussion \(|\nabla u^+|\) is a Hölder continuous function on \(\Gamma _{{op}}^+\cup \Gamma _{{tp}}^{\mathrm{int}}\). By relying on the results of [26], to prove Theorem 1.1 one has to show that \(|\nabla u^+|:\partial \Omega _u^+\cap B_1\rightarrow \mathbb {R}\) is Hölder continuous across the branching points

$$\begin{aligned} \Gamma _{{tp}}^{\mathrm{br}}=\left( \partial \Omega _u^+\cap B_1\right) \setminus \left( \Gamma _{{op}}^+\cup \Gamma _{{tp}}^{\mathrm{int}}\right) . \end{aligned}$$

By following [42, 43] this will be consequence of

uniform “flatness” decay at the two-phase points \(x_0\in \Gamma _{{tp}}\),

which is the main result of our paper.

1.3 Flatness decay at the two-phase points

By the Weiss’ monotonicity formula (see [46]), at every two-phase point \(x_0\in \Gamma _{{tp}}\), the limits of blow-up sequences

$$\begin{aligned} u_{x_0,r_k}(y)=\frac{u(x_0+r_k y)}{r_k} \end{aligned}$$

are two-plane solutions of the form

figure b

However, a priori the limiting profile might depend on the chosen sequence. As it is usual in this type of problems, uniqueness of the blow-up profile (and thus regularity of \(u\)) is a consequence of a uniform flatness (or excess) decay.

Given \(u\), its flatness in \(B_r(x_0)\) with respect to \(H=H_{\alpha ,\varvec{e}}\) is defined as

$$\begin{aligned} {{\,\mathrm{flat}\,}}_{B_r(x_0)}\,(u,H) =\frac{1}{r}\Vert u-H\Vert _{L^\infty (B_r(x_0))}. \end{aligned}$$

In particular, we can assume that the flatness becomes small at a uniform scale in a neighborhood of any \(x_0\in \Gamma _{{tp}}\). Precisely, for every \(\varepsilon >0\) and \(x_0\in \Gamma _{{tp}}\), there is \(r>0\) and a neighborhood \(\,\mathcal U\) of \(x_0\), such that

$$\begin{aligned} {{\,\mathrm{flat}\,}}_{B_r(y_0)}\,(u,H) \le \varepsilon \quad \text {for every}\quad y_0\in \mathcal U\cap \Gamma _{{tp}}. \end{aligned}$$

Our aim is to prove that there is a universal threshold \(\varepsilon >0\) such that

$$\begin{aligned} {{\,\mathrm{flat}\,}}_{B_r(x_0)}\,(u,H) \le \varepsilon \quad \text {for some two-plane solution}\quad H=H_{\alpha ,\varvec{e}}, \end{aligned}$$

then it improves in the ball \(B_{{r}/2}(x_0)\), which means that there exists another two-plane solution \(\widetilde{H}=H_{\tilde{\alpha },\tilde{\varvec{e}}}\) such that

$$\begin{aligned} {{\,\mathrm{flat}\,}}_{B_{{r}/2}(x_0)}\,(u,\widetilde{H})\le 2^{-\gamma }\,{{\,\mathrm{flat}\,}}_{B_r(x_0)}\,(u,H), \end{aligned}$$
(1.4)

for some small, but universal, \(\gamma >0\).

In order to prove (1.4), we argue by contradiction. That is, there is a sequence of minimizers \(u_k\) and a sequence of two-plane solutions \(H_k\), such that

$$\begin{aligned} \varepsilon _k:=\Vert u_k-H_k\Vert _{L^\infty (B_1)}\rightarrow 0 \qquad \text {but}\qquad \inf _{\widetilde{H}}\,\Vert u_k-\widetilde{H}\Vert _{L^\infty (B_{{1}/{2}})}\ge 2^{-\gamma }\varepsilon _k\,, \end{aligned}$$

where the infimum is taken over all \(\widetilde{H}\) of the form TpS.

Now, the two key points of the argument are to show that the sequence

$$\begin{aligned} v_k:=\frac{u_k-H_k}{\varepsilon _k} \end{aligned}$$

is (pre-)compact in a suitable topology and that any limit point \(v_\infty \) is a solution of a suitable “linearized” problem (that turns out to be a non-linear one); then the regularity theory for the limiting problem allows to obtain the desired contradiction.

While the linearized problem can be guessed by formal computations, in order to transfer back regularity estimates for \(v_\infty \) to \(v_k\), it is crucial to establish the uniform convergence of \(v_k\) (which is a priori only bounded in \(L^\infty \)) to \(v_\infty \). In our case, as well as for other variational problems, this is not just a technical issue but is where the proof of \(\varepsilon \)-regularity-type theorems may actually fail, even if the “formal” linearized problem enjoys all the desired estimates. Instances of this phenomena are well known in literature. For example, while an \(\varepsilon \)-regularity theorem for minimizers of quasi-convex functions holds true (as proved by Evans [32]), a similar result is false for critical points, as shown by Muller and Sverak [36], eventhough the two problems share the same formal linearization. A similar issue happens for harmonic maps: an \(\varepsilon \)-regularity theorem is true for minimizers but it is false for critical points as it was proved by Rivière [37]; also in this case the formal linearized problem is the same namely the Laplace equation. In general, in many variational problems which exhibit singular behavior (as in our situation), the linearization is well-understood, but the compactness is still out of reach.

Let us now briefly analyze these two main steps of the proof.

The “linearized” problem. The nature of the limiting problem depends on the type of free boundary point one is considering. At branching points (the ones that we are most interested in), \(v_\infty \) turns out be the the solution of a two-membrane problem, (3.10). At interior two-phase points \(\Gamma _{{tp}}^{\mathrm{int}}\), we instead recover a transmission problem as in [27].

Note that in the first case, the “linearized” problem is actually non-linear. Similar phenomena have been already observed in a number of related situation: in this same context, a derivation of the limiting problem was done in [4], while for Bernoulli type problems a similar fact appears in studying regularity close to the boundary of the container, [18]. See also [33, 41] for similar issues in studying the singular set of obstacle type problems. Heuristically linearizing to an “obstacle” type problem is due to the fact that there is a natural “ordering” between the negative and the positive phases of any possible competitor. Note instead if one linearizes the plain one phase problem, the natural linearized problem is the Neumann one, this was observed in [3] (in the parabolic case) and fully exploited in [26], see also [16, 17] where other non-local type problems appear as linearization.

Compactness of the linearizing sequence \(v_k\). We follow the approach introduced by De Silva [26], which is based on a partial Harnack type inequality, introduced in different context by Savin [39, 40]. This is a weaker form of the flatness decay estimate (1.4) that does not take into account the scaling of the functional (which means that it cannot be used to obtain the regularity of the free boundary in a direct way). The rough idea is that if \(\Vert u-H\Vert _{L^\infty (B_{r}(x_0))}\) falls below a certain (universal) threshold, then u is closer to H in the ball \(B_{{r}/2}(x_0)\), precisely:

$$\begin{aligned} \Vert u-H\Vert _{L^\infty (B_{{r}/2}(x_0))}\le 2^{-\delta }\Vert u-H\Vert _{L^\infty (B_{r}(x_0))}, \end{aligned}$$
(1.5)

for some \(\delta >0\). This estimate implies the compactness of the sequence \(v_k\) by a classical (Ascoli-Arzelà type) argument.

For local minimizers of the one-phase functional (OP) or the two-phase functional ACF with coefficients satisfying the condition (1.1), the functions H can be chosen in the respective class of blow-up limits. In fact, for the one-phase problem, it is sufficient to take H to be the (possibly translated and rotated) one-homogeneous global one-phase solution \(H(x)=\lambda _+x_d^+\) (as in [26]); for the two-phase problem in the case (1.1), it is sufficient to take H in the class of two-plane solutions TpS, precisely as in [27]. However, in our case, it turns out that the class of two-plane solutions is not large enough. The reason is that there exist solutions which are arbitrarily close to a two-plane solution of the form \(H_{\lambda _+,\varvec{e}_d}\) but which are not a smooth perturbation of it. For instance the function,

$$\begin{aligned} H(x)=\lambda _+(x_d+\varepsilon _1)^+-\lambda _-(x_d-\varepsilon _2)^-, \end{aligned}$$
(1.6)

is \(\max \{\varepsilon _1, \varepsilon _2\}\)-close to the two-plane solution \(H_{\lambda _+,\varvec{e}_d}\), but (1.5) fails for it.

This is not just a technical difficulty. In fact, in order to get the compactness of the linearizing sequence, the partial improvement of flatness (1.5) is not needed just at one two-phase point \(x_0\), but in all the points in a neighborhood of \(x_0\). Now, since at a branching point, the behavior of the free boundary switches from two-phase (which roughly speaking corresponds to the case when the two free boundaries \(\partial \Omega _u^+\) and \(\partial \Omega _u^-\) coincide) to one-phase (in which the two free boundaries \(\partial \Omega _u^+\) and \(\partial \Omega _u^-\) are close to each other but separate, as on Fig. 1 below), the class of reference functions H has to contain both the two-plane solutions TpS and the solutions of the form (1.6).

Fig. 1
figure 1

In a neighborhood of a branching point \(x_0\) the solution u might get closer to the solution of the form(1.6)

Structure of the paper . This paper is organized as follows: in Sect. 2 we recall some basic properties of minimizers and we fix the notation; in Sect. 3 we establish the excess decay lemma; in Sect. 4 we prove our main results; in “Appendices A and B” we collect the proofs of some technical facts.

At the final stage of the preparation of this work, the authors have been informed by personal communication that two other groups are working on similar problems, namely in [4] the authors aim to establish a result analogous to the ours via variational techniques, while in [24] the goal is to prove the same result for almost minimizers in the spirit of [22, 23, 25]. At our knowledge, at this date, none of these works has appeared in a journal or on arxiv.

2 Basic properties of minimizers

In this section we recall (mostly without proof) some basic properties of local minimizers of \(J_{{tp}}\). In particular, in Sect. 2.1 we recall Lipschitz-regularity and non-degeneracy property of u; Sect. 2.2 is dedicated to the study of blow-up limits of u at two-phase points and in Sect. 2.3 we show that u satisfies an optimality condition in viscosity sense.

2.1 Regularity of minimizers

Let u be a local minimizer of \(J_{{tp}}\). Then, it is well-known that u is locally Lipschitz continuous and non-degenerate.

Throughout this paper, we will assume that the weights in (TP) are ordered as follows:

$$\begin{aligned} \lambda _+\ge \lambda _->0. \end{aligned}$$
(2.1)

Notice that this is not restrictive as one can always replace \(u\) by \(-u\) in \(J_{{tp}}\).

Proposition 2.1

(Lipschitz regularity and non-degeneracy of local minimizers). Let \(D\subset \mathbb {R}^d\) be an open set, \(\lambda _+\ge \lambda _->0\), and u be a local minimizer of \(J_{{tp}}\). Then the following properties hold:

  1. (i)

    Lipschitz continuity. \(u\in C^{0,1}_{\mathrm {loc}}(D)\).

  2. (ii)

    Non-degeneracy. There is constant \(\alpha =\alpha (d, \lambda _\pm )>0\) such that

    $$\begin{aligned} \displaystyle {\fint _{\partial B_r(x_0)}u^\pm \ge \alpha \,r}\quad \text {for every } x_0\in \overline{\Omega _u^\pm }\cap D\text { and every } 0<r<{{\,\mathrm{dist}\,}}(x_0,\partial D). \end{aligned}$$

Proof

The second claim was first proved in [2, Theorem 3.1] and depends only on the fact that each of the two phases \(\Omega _u^+\) and \(\Omega _u^-\) is optimal with respect to one-sided inwards perturbations (see for instance [8] and [44, Section 4]). The Lipschitz continuity of u is more involved and requires the use of the Alt–Caffarelli–Friedman monotonicity formula and the non-degeneracy of \(u^+\) and \(u^-\). It was first proved in [2, Theorem 5.3], see also the recent paper [23] for quasi-minimizers. \(\square \)

2.2 Blow-up sequences and blow-up limits

Let u be a local minimizer of \(J_{{tp}}\) in the open set \(D\subset \mathbb {R}^d\). For every \(x_0\in \partial \Omega _u\cap D\) and every \(0<r<{{\,\mathrm{dist}\,}}(x_0,\partial D)\), we consider the function

$$\begin{aligned} u_{x_0,r}(x):=\frac{u(x_0+rx)}{r}, \end{aligned}$$

which is well-defined for \(|x|<\frac{1}{r} {{\,\mathrm{dist}\,}}(x_0,\partial D)\) and vanishes at the origin. Given a sequence \(r_k>0\) such that \(r_k \rightarrow 0\), we say that the sequence of functions \(u_{x_0,r_k}\) is a blow-up sequence. Note that, for every \(R>0\), and \(k\gg 1\), the functions \(u_{x_0,r_k}\) are defined on the ball \(B_R\), vanish at zero and are uniformly Lipschitz in \(B_R\). Hence, there is a Lipschitz continuous function \(v:\mathbb {R}^d\rightarrow \mathbb {R}\) and a (non-relabeled) subsequence of \(u_{x_0,r_k}\) such that \(u_{x_0,r_k}\) converges to v uniformly on every ball \(B_R\subset \mathbb {R}^d\). We say that v is a blow-up limit of u at \(x_0\). Notice that v might depend not only on \(x_0\) and u but also on the (sub-)sequence \(r_k\). We will denote by \(\mathcal {BU}(x_0)\) the collection of all possible blow-up limits of u at \(x_0\).

The following lemma classifies all the possible elements of \(\mathcal {BU}(x_0)\) when \(x_0 \in \Gamma _{{tp}}\).The result is well-known and we only sketch the proof for the sake of completeness.

Lemma 2.2

(Classification of the blow-up limits). Let u be a local minimizer of \(J_{{tp}}\) in the open set \(D\subset \mathbb {R}^d\), and let v be a blow-up limit of u at the two-phase point \(x_0\in \Gamma _{{tp}}\). Then, v is of the form

$$\begin{aligned} v(x)=H_{\alpha ,\varvec{e}}(x)=\alpha (x\cdot \varvec{e})^+-\beta (x\cdot \varvec{e})^-, \end{aligned}$$

where \(\varvec{e} \in \mathbb S^{d-1}\), and \(\alpha ,\beta \) are such that

$$\begin{aligned} \ \alpha ^2-\beta ^2=\lambda _+^2-\lambda _-^2\qquad \text {and}\qquad \alpha \ge \lambda _+,\quad \beta \ge \lambda _-. \end{aligned}$$

Proof

Let v be a blow-up limit of u at \(x_0\) and let \(u_{x_0,r_k}\) be a blow-up sequence converging to v (locally uniformly in \(\mathbb {R}^d\)). First, notice that the non-degeneracy of u, Lemma 2.1 (ii), implies that v is non trivial and changes sign: \(v^+\not \equiv 0\) and \(v^-\not \equiv 0\). Moreover, since every \(u_{x_0,r_k}\) is a local minimizer of \(J_{{tp}}\) ( it is standard to infer that v is also a local minimizer of \(J_{{tp}}\) in \(\mathbb {R}^d\) (see for instance [44, Section 6]). Thus, v is harmonic on \(\Omega _v^+\) and \(\Omega _v^-\). On the other hand, by the Weiss monotonicity formula, [46], v is one-homogeneous, in polar coordinates:

$$\begin{aligned} v(\rho , \theta )=\rho V(\theta ). \end{aligned}$$

In particular V is an eigenfunction of the spherical Laplacian \(\Delta _{\mathbb S}\) on the spherical sets \(\Omega _v^\pm \cap \mathbb S^{d-1}\):

$$\begin{aligned} -\Delta _{\mathbb S}V^\pm =(d-1)V^\pm \quad \text {in}\quad \Omega _v^\pm \cap \mathbb S^{d-1}. \end{aligned}$$
(2.2)

We now choose \(c>0\) such that

$$\begin{aligned} \int _{\mathbb S^{d-1}}(V^+-cV^-)d\mathcal {H}^{d-1}=0. \end{aligned}$$

Using (2.2) and integrating by parts, we get that

$$\begin{aligned} \int _{\mathbb S^{d-1}}|\nabla _\theta (V^+-cV^-)|^2\,d\mathcal {H}^{d-1}=(d-1)\int _{\partial B_1}|V^+-cV^-|^2\,d\mathcal {H}^{d-1}. \end{aligned}$$

This means that \(V^+-cV^-\) is an eigenfunction of the spherical Laplacian on \(\mathbb S^{d-1}\), corresponding to the eigenvalue \((d-1)\). Since the \((d-1)\)-eigenspace contains only linear functions one easily deduce that v is of the form TpS.

Conditions (2.2) can be obtained by a smooth variation of the free boundary \(\{v=0\}\). Indeed, if considering competitors of the form \(v_t(x)=v(x+t\xi (x))\) for smooth compactly vector fields \(\xi \), and taking the derivative of \(J_{{tp}}(v_t,B_1)\) at \(t\rightarrow 0\), we get that

$$\begin{aligned} \int _{\{v=0\}\cap B_1}(\varvec{e}\cdot \xi )\Big (|\nabla v^+|^2-|\nabla v^-|^2-\big (\lambda _+^2-\lambda _-^2\big )\Big )\,d\mathcal {H}^{d-1}=0, \end{aligned}$$

which by the arbitrariness of \(\xi \) is precisely the first part of (2.2). The second part of (2.2) is analogous and follows by considering competitors of the form \(v_t(x)=v^+(x)-v^-(x+t\xi (x))\) for vector fields with \(\xi \cdot \varvec{e}\le 0\) so that it moves negative phase only inwards, that is, \(\{v_t<0\}\subset \{v<0\}\). Taking the derivative of the energy at \(t>0\), we get

$$\begin{aligned} \int _{\{v=0\}\cap B_1}(\xi \cdot \varvec{e})\big (|\nabla v^-|^2-\lambda _-^2\big )\,d\mathcal {H}^{d-1}\le 0, \end{aligned}$$

which gives \(\beta \ge \lambda _-\). The estimate on \(\alpha \) is analogous. \(\square \)

The following consequence of Lemma 2.2 says that the “flatness” can be chosen uniformly small in a neighborhood of a two-phase point.

Corollary 2.3

Let u be a local minimizer of \(J_{{tp}}\) in the open set \(D\subset \mathbb {R}^d\), and let \(x_0\) be a two-phase point \(x_0\in \Gamma _{{tp}}\). Then, for every \(\varepsilon >0\) there are \(r>0\) and \(\rho >0\), and a function \(H_{\alpha , \varvec{e}}\) of the form TpS such that

$$\begin{aligned} \Vert u_{y_0,r}-H_{\alpha , \varvec{e}}\Vert _{L^\infty (B_1)}\le \varepsilon \quad \text {for every}\quad y_0\in B_\rho (x_0). \end{aligned}$$

Proof

By Lemma 2.2, there exists \(r>0\) and a function H of the form (TpS) such that \(\Vert u_{x_0,r}-H\Vert _{L^\infty (B_1)}\le {\varepsilon }/2\). On the other hand, by the Lipschitz continuity of u

$$\begin{aligned} \Vert u_{x_0,r}-u_{y_0,r}\Vert _{L^\infty (B_1)}\le \frac{L}{r}|x_0-y_0|. \end{aligned}$$

Choosing \(\rho \) small enough (such that \(\frac{L\rho }{r}\le \varepsilon /2\)), we get the claim. \(\square \)

2.3 Optimality conditions at the free boundary

Let \(u:D\rightarrow \mathbb {R}\) be a local minimizer of \(J_{{tp}}\). In this section, we will show that u satisfies the following optimality conditions at two-phase free boundary points:

$$\begin{aligned} |\nabla u^+|^2-|\nabla u^-|^2=\lambda _+^2-\lambda _-^2\qquad \text {and}\qquad |\nabla u^\pm |\ge \lambda _\pm \qquad \text {on}\qquad \Gamma _{{tp}}. \end{aligned}$$
(2.3)

We notice that if u was differentiable at \(x_0\in \Gamma _{{tp}}\), that is,

$$\begin{aligned} {\left\{ \begin{array}{ll} u^+(x)=(x-x_0)\cdot \nabla u^+(x_0)+o(|x-x_0|)\quad \text {for every}\quad x\in \Omega _u^+,\\ u^-(x)=(x-x_0)\cdot \nabla u^-(x_0)+o(|x-x_0|)\quad \text {for every}\quad x\in \Omega _u^-, \end{array}\right. } \end{aligned}$$
(2.4)

then (2.3) would be an immediate consequence of Lemma 2.2. Of course, differentiability of \(u^+\) and \(u^-\) (and the uniqueness of the blow-up limits)Footnote 2 is not a priori known, so we will use the optimality condition in some weak (viscosity) sense, based on comparison with (more regular) test functions.

Definition 2.4

Let D be an open set.

  1. (i)

    We say that a function \(Q:D\rightarrow \mathbb {R}\) touches a function \(w:D\rightarrow \mathbb {R}\) from below (resp. from above) at a point \(x_0\in D\) if \(Q(x_0)=w(x_0)\) and

    $$\begin{aligned} Q(x)-w(x)\le 0 \quad \bigl ( \text {resp. }\, Q(x)-w(x)\ge 0 \bigr ) \end{aligned}$$

    for every x in a neighborhood of \(x_0\). We will say that Q touches w strictly from below (resp. above), if the above inequalities are strict for \(x\ne x_0\).

  2. (ii)

    A function Q is an admissible comparison function in D if

    1. (a)

      \(Q\in C^1\big (\overline{\{Q>0\}}\cap D\big )\cap C^1\big (\overline{\{Q<0\}}\cap D\big )\);

    2. (b)

      \(Q\in C^2\big (\{Q>0\}\cap D\big )\cap C^2\big (\{Q<0\}\cap D\big )\);

    3. (c)

      \(\partial \{Q>0\}\) and \(\partial \{Q<0\}\) are smooth manifolds in D.

The optimality conditions on u are given in the next lemma. Before we give the precise statement, we recall that \(\partial \Omega _u\cap D=\Gamma _{{op}}^+\cup \Gamma _{{op}}^-\cup \Gamma _{{tp}},\) where

$$\begin{aligned} \Gamma _{{op}}^+&:=\partial \Omega _u^+\setminus \partial \Omega _u^-\cap D,\quad \Gamma _{{op}}^-:=\partial \Omega _u^-\setminus \partial \Omega _u^+\cap D\\&\quad \text {and}\quad \Gamma _{{tp}}:=\partial \Omega _u^-\cap \partial \Omega _u^+\cap D. \end{aligned}$$

Lemma 2.5

(The local minimizers are viscosity solutions). Let u be a local minimizer of \(J_{{tp}}\) in the open set \(D\subset \mathbb {R}^d\). Then, u in harmonic in \(\Omega _u^+\cup \Omega _u^-\) and satisfies the following optimality conditions on the free boundary \(\partial \Omega _u\cap D\).

  1. (A)

    Suppose that Q is a comparison function that touches u from below at \(x_0\).

    1. (A.1)

      If \(x_0\in \Gamma _{{op}}^+\), then \(|\nabla Q^+(x_0)| \le \lambda _+ \);

    2. (A.2)

      if \(x_0\in \Gamma _{{op}}^-\), then \(Q^+\equiv 0\) in a neighborhood of \(x_0\) and \(|\nabla Q^-(x_0)| \ge \lambda _-\);

    3. (A.3)

      if \(x_0\in \Gamma _{{tp}}\), then \(|\nabla Q^-(x_0)| \ge \lambda _- \) and

      $$\begin{aligned} |\nabla Q^+(x_0)|^2-|\nabla Q^-(x_0)|^2\le \lambda _+^2-\lambda _-^2. \end{aligned}$$
  2. (B)

    Suppose that Q is a comparison function that touches u from above at \(x_0\).

    1. (B.1)

      If \(x_0\in \Gamma _{{op}}^+\), then \(Q^-\equiv 0\) in a neighborhood of \(x_0\) and \(|\nabla Q^+(x_0)| \ge \lambda _+\);

    2. (B.2)

      if \(x_0\in \Gamma _{{op}}^-\), then \(|\nabla Q^-(x_0)| \le \lambda _-\);

    3. (B.3)

      if \(x_0\in \Gamma _{{tp}}\), then \(|\nabla Q^+(x_0)| \ge \lambda _+\) and

      $$\begin{aligned} |\nabla Q^+(x_0)|^2-|\nabla Q^-(x_0)|^2\ge \lambda _+^2-\lambda _-^2. \end{aligned}$$

Proof

If \(x_0\) is a one-phase point, then the gradient bounds in (A.1), (A.2), (B.1) and (B.2) follow by [44, Proposition 7.1], the claims \(Q^+\equiv 0\) in (A.2) and \(Q^-\equiv 0\) in (B.2) being trivially true. Suppose now that \(x_0\in \Gamma _{{tp}}\) and that Q touches u from below at \(x_0\). Let \(u_{x_0,r_k}\) and \(Q_{x_0,r_k}\) be blow-up sequences of u and Q at \(x_0\). Then, up to extracting a subsequence, we can assume that \(u_{x_0,r_k}\) converges uniformly to a blow-up limit \(H_u\in \mathcal {BU}(x_0)\) of the form

$$\begin{aligned} H_u(x)=\alpha (x\cdot \varvec{e})_+-\beta (x\cdot \varvec{e})_-. \end{aligned}$$

On the other hand, since \(Q^+\) and \(Q^-\) are differentiable at \(x_0\) (respectively in \(\overline{\Omega }_Q^+\) and \(\overline{\Omega }_Q^-\)), we get that \(Q_{x_0,r_k}\) converges to the function

$$\begin{aligned} H_Q(x)=|\nabla Q^+(x_0)|(x\cdot \varvec{e}')_+-|\nabla Q^-(x_0)| (x\cdot \varvec{e}')_-, \end{aligned}$$

where \(\varvec{e}'=|\nabla Q^+(x_0)|^{-1}\nabla Q^+(x_0)=-|\nabla Q^-(x_0)|^{-1}\nabla Q^-(x_0)\). Now since, \(H_Q\) touches \(H_u\) from below (and since \(\alpha \ne 0\) and \(\beta \ne 0\)), we have that \(\varvec{e}'=\varvec{e}\),

$$\begin{aligned}&|\nabla Q^+(x_0)|^2-|\nabla Q^-(x_0)|^2\le \alpha ^2-\beta ^2\\&\qquad \text {and}\qquad |\nabla Q^+(x_0)| \le \alpha ,\quad |\nabla Q^-(x_0)| \ge \beta . \end{aligned}$$

Combined with (2.2), this gives (A.3). The proof of (B.3) is analogous. \(\square \)

In particular, if \(u:D\rightarrow \mathbb {R}\) is a continuous function such that the claims (A) and (B) hold for every comparison function Q, then we say that u satisfies the following overdetermined condition on the free boundary in viscosity sense:

$$\begin{aligned} {\left\{ \begin{array}{ll} |\nabla u^+|^2-|\nabla u^-|^2=\lambda _+^2-\lambda _-^2 ,\, |\nabla u^+|\ge \lambda _+\,\text {and}\, |\nabla u^-|\ge \lambda _- &{}\text {on}\quad \Omega _u^+\cap \Omega _u^-\cap D\,;\\ |\nabla u^+|=\lambda _+&{}\text {on}\quad D\cap \Omega _u^+\setminus \Omega _u^-\,; \\ |\nabla u^-|=\lambda _-&{}\text {on}\quad D\cap \Omega _u^-\setminus \Omega _u^+\,. \end{array}\right. } \end{aligned}$$
(2.5)

Thus, Lemma 2.5 can be restated as follows: If u is a local minimizer of \(J_{{tp}}\) in D, then it satisfies (2.5) in viscosity sense.

We conclude this section by recording the following straightforward consequence of definition of viscosity solution, where we consider what happens when a function is touching only one of the two phases (note that in the second item we are restricting the touching points only to the one-phase free boundaries).

Lemma 2.6

Let \(u: D \rightarrow \mathbb {R}\) be a continuous function which satisfies (2.5).

  1. (i)

    Assume that \(Q\) is a comparison function touching \(u^+\) from above at the point \(x_0\in \partial \Omega _{u}^+\) (resp. \(-u^-\) from below at \(x_0\in \partial \Omega _{u}^-\)) , then

    $$\begin{aligned} |\nabla Q^+|(x_0)\ge \lambda _+ \qquad \Bigl (\text {resp.\quad } |\nabla Q^-|(x_0)\ge \lambda _-\Bigr ). \end{aligned}$$
  2. (ii)

    Assume that \(Q\) is a comparison function touching \(u^+\) from below at the point \(x_0\in \Gamma _{\textsc {op}}^+\) (resp. \(-u^-\) from above at \(x_0\in \Gamma _{\textsc {op}}^-\)) , then

    $$\begin{aligned} |\nabla Q^+|(x_0)\le \lambda _+ \qquad \Bigl (\text {resp.\quad } |\nabla Q^-|(x_0)\le \lambda _-\Bigr ). \end{aligned}$$

Proof

The claim (i) simply follows by, for instance, noticing that the assumption implies that \(Q\ge u^+\ge 0\) so that \(Q\) touching \(u\) from above and thus one can apply \(B.1\) and the first part of \(B.3\) in the definition of viscosity solution and that a symmetric argument holds for \(u^{-}\).

Concerning claim (ii), we note that since \(x_0\in \Gamma _{\textsc {op}}^+\), \(u\ge 0\) in a neighborhood of \(x_0\). In particular, the function \(Q^+\) is touching \(u\) from below at \(x_0\) and thus the conclusion follows by (B.2) in the definition of viscosity solution. \(\square \)

3 Flatness decay

In this section we prove that, at two-phase points, the flatness decays from one scale to the next. Our main result is the following theorem, which applies to any viscosity solution of the two-phase problem.

Theorem 3.1

(Flatness decay for viscosity solutions). For every \(L\ge \lambda _+\ge \lambda _->0\) and \(\gamma \in (0,1/2)\), there exist \(\varepsilon _0>0\), \(C>0\) and \(\rho \in (0,1/4)\) such that the following holds. Suppose that the function \(u:B_1\rightarrow \mathbb {R}\) satisfies:

  1. (a)

    u is \(L\)-Lipschitz continuous;

  2. (b)

    zero is on the two-phase free boundary, \(0\in \Gamma _{{tp}}=\partial \Omega _{u}^{+}\cap \partial \Omega _{u}^{-}\);

  3. (c)

    u is harmonic in \(\Omega _{u}^{+}\cup \Omega _{u}^{-}\);

  4. (d)

    u satisfies the optimality condition (2.5) in viscosity sense;

  5. (e)

    u is \(\varepsilon _0\)-flat in \(B_1\), that is,

    $$\begin{aligned} \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}\le \varepsilon _0\qquad \text {for some}\qquad L\ge \alpha \ge \lambda _+\,. \end{aligned}$$
    (3.1)

Then, there are \(\varvec{e}\in \mathbb S^{d-1}\) and \(\tilde{\alpha }\ge \lambda _+\) such that

$$\begin{aligned} |\varvec{e}-\varvec{e}_d|+|\tilde{\alpha }-\alpha |\le C\,\Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}, \end{aligned}$$
(3.2)

and

$$\begin{aligned} \Vert u_\rho -H_{\tilde{\alpha },\varvec{e}}\Vert _{L^\infty (B_1)}\le \rho ^{\gamma }\,\Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}. \end{aligned}$$
(3.3)

Proof of Theorem 3.1 follows easily combining the two upcoming lemmas. In the first one we deal with the situation where the two-plane solution is, roughly, \(H_{\lambda _+}\). Note that this is the situation where one might expect the presence of branching points and it is indeed in this setting that we will obtain the two membrane problem as “linearization”. In the second lemma, we deal with the case when the closest half-plane solution has a gradient much larger than \(\lambda _+\). We will later show that in this case the origin is an interior two-phase point.

Lemma 3.2

(Improvement of flatness: branching points). For every \(L\ge \lambda _+\ge \lambda _->0\), \(\gamma \in (0,1/2)\), and \(M>0\), there exist \(\varepsilon _1=\varepsilon _1(\gamma ,d,L, M)\), \(C_1=C_1(\gamma ,d,L, M)\) and \(\rho =\rho (\gamma ,d,L,M)\) such that the following holds. For every function \(u:B_1\rightarrow \mathbb {R}\) satisfying (a)–(d) of Theorem 3.1 and such that

$$\begin{aligned} \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}\le \varepsilon _1 \,,\quad \text {with}\quad 0\le \alpha -\lambda _+\le M\Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}, \end{aligned}$$

there exist \(\varvec{e}\in \mathbb S^{d-1}\) and \(\tilde{\alpha }\ge \lambda _+\), for which (3.2) and (3.3) hold.

Lemma 3.3

(Improvement of flatness: non-branching points). For every \(L\ge \lambda _+\ge \lambda _->0\) and \(\gamma \in (0,1)\), there exist \(\varepsilon _2=\varepsilon _2(\gamma ,d, L)\), \(\overline{M}=\overline{M}(\gamma ,d,L)\) and \(\rho =\rho (\gamma ,d,L)\) \(C_2=C_2(\gamma ,d, L)\) such that the following holds. For every function \(u:B_1\rightarrow \mathbb {R}\) satisfying (a)–(d) of Theorem 3.1 and such that

$$\begin{aligned} \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}\le \varepsilon _2 \,,\quad \text {with}\quad \alpha -\lambda _+\ge \overline{M}\Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)} , \end{aligned}$$

there exist \(\varvec{e}\in \mathbb S^{d-1}\) and \(\,\tilde{\alpha }\ge \lambda _+\), for which (3.2) and (3.3) hold.

Let us first show that Theorem 3.1 follows from Lemmas 3.2 and 3.3.

Proof of Theorem 3.1

Fix \(\gamma \in (0,{1}/{2})\) and notice that \(\alpha <2L\), where \(L\) is the Lipschitz constant of \(u\). Next choose \(M=2\overline{M}\) in Lemma 3.2, where \(\overline{M}\) is as in Lemma 3.3. Let \(\varepsilon _0=\min \big \{\varepsilon _2(2\overline{M}),{\varepsilon _1}/{2}\big \}\). Then, we can apply either Lemmas 3.2 or 3.3. \(\square \)

In order to prove Lemmas 3.2 and 3.3, we will argue by contradiction. Hence in the following we consider a sequence \(u_k\) of minimizers such that

$$\begin{aligned} \varepsilon _k:=\Vert u_k-H_{\alpha _k,\varvec{e}_d}\Vert _{L^\infty (B_1)}\rightarrow 0\qquad \text {and}\qquad \lambda _+\le \alpha _k\le L, \end{aligned}$$
(3.4)

where

$$\begin{aligned} \Vert \nabla u_k\Vert _{L^\infty (B_1)}\le L\qquad \text {for every}\qquad k\ge 1. \end{aligned}$$

We also set

$$\begin{aligned} \ell := \lambda _{+}^2\lim _{k\rightarrow \infty }\frac{\alpha ^2_k-\lambda ^2_+}{2\alpha ^2_k\varepsilon _k}=\lambda _{-}^2\lim _{k\rightarrow \infty }\frac{\beta ^2_k-\lambda ^2_-}{2\beta ^2_k\varepsilon _k} \end{aligned}$$
(3.5)

which we can assume to exists up to extracting a subsequence. It might be useful to keep in mind that \(\ell =\infty \) will correspond to Lemma 3.3 while \(0\le \ell \le M<\infty \) to Lemma 3.2.

In order to prove Lemmas 3.3 and 3.2, we will first show that the sequence

$$\begin{aligned} v_k(x)= {\left\{ \begin{array}{ll} v_{+,k}(x):=\dfrac{u_k(x)-\alpha _k x_d^+}{\alpha _k\varepsilon _k}\qquad &{}x\in \Omega _{u_k}^+\cap B_1 \\ v_{-,k}(x):=\dfrac{u_k(x)+\beta _k x_d^-}{\beta _k\varepsilon _k}\qquad &{}x\in \Omega _{u_k}^-\cap B_1 \end{array}\right. } \end{aligned}$$
(3.6)

is compact in some suitable sense; we give the precise statement in Corollary 3.4 below and we postpone the proof to Sect. 3.1. We then establish in Lemma 3.5 the limiting problem solved by its limit \(v\). Note that this problem depends on the value of \(\ell \) which is distinguishing whether we are or not at branching points.

Finally, in Sect. 3.3 we show how to deduce Lemmas 3.3 and 3.2 from Corollary 3.4 and Lemma 3.5. In the rest of the paper we will use the notation

$$\begin{aligned} B_r^{\pm }:=B_r\cap \{ x_d^\pm>0 \} \qquad \text {for every }r>0\,. \end{aligned}$$

Lemma 3.4

(Compactness of the linearizing sequence \(v_k\)). Let \(u_k\) be a sequence of functions satisfying (a), (b), (c) and (d) of Theorem 3.1 uniformly in \(k\) and let \(\varepsilon _k\) and \(\alpha _k\) be as in (3.4) and let \(v_k\) be defined by (3.6). Then there are Hölder continuous functions

$$\begin{aligned} v_+ : \overline{B^+_{1/2}}\rightarrow \mathbb {R}\qquad \text {and}\qquad v_-: \overline{B^-_{1/2}} \rightarrow \mathbb {R}, \end{aligned}$$

with

$$\begin{aligned} v_+\le v_-\text { on } B_{1/2}\cap \{x_d=0\}, \qquad v_+ (0)=v_-(0)=0, \end{aligned}$$

and such that the sequences of closed graphs

$$\begin{aligned} \Gamma _k^\pm :=\Big \{(x, v_{\pm ,k}(x))\ :\ x\in \overline{\Omega _{u_k}^\pm \cap B_{1/2}}\Big \}, \end{aligned}$$

converge, up to a (non-relabeled) subsequence, in the Hausdorff distance to the closed graphs

$$\begin{aligned} \Gamma _\pm =\Big \{(x, v_\pm (x))\ :\ x\in \overline{B_{1/2}^\pm }\Big \}. \end{aligned}$$

In particular, the following claims hold:

  1. (i)

    For every \(\delta >0\), \(v_{\pm ,k}\) converges uniformly to \(v\pm \) on \(B_{1/2}\cap \{ \pm x_d>\delta \}\).

  2. (ii)

    For every sequence \(x_k\in \overline{\Omega _{u_k}^\pm }\cap B_1\) converging to \(x\in \overline{B_{1/2}^\pm }\), we have

    $$\begin{aligned} v_\pm (x)=\lim _{k\rightarrow \infty } v_{\pm ,k}(x_k). \end{aligned}$$
  3. (iii)

    For every \(x\in \{x_d=0\}\cap B_{1/2}\) , we have

    $$\begin{aligned} v_\pm (x)=\mp \lim _{k\rightarrow \infty }\frac{x_k\cdot \varvec{e}_d}{\alpha _k\varepsilon _k}\quad \text {for any sequence}\quad \partial \Omega _{u_k}^\pm \ni x_k\rightarrow x. \end{aligned}$$

In particular, \(\{x_d=0\}\cap \overline{B}_{1/2}\) decomposes into a open jump set

$$\begin{aligned} \mathcal J=\{v_+<v_-\}\cap \{x_d=0\}\cap \overline{B}_{1/2}, \end{aligned}$$

and its complementary contact set

$$\begin{aligned} \mathcal C=\{v_+=v_-\}\cap \{x_d=0\}\cap \overline{B}_{1/2}. \end{aligned}$$

Furthermore, if \(x\in \mathcal J\), then

$$\begin{aligned} \liminf _{k\rightarrow \infty }{{\,\mathrm{dist}\,}}\big (x,\partial \Omega _{u_k}^+\cap \partial \Omega _{u_k}^-\big )>0. \end{aligned}$$
(3.7)

In particular for all \(x\in \mathcal J\), there exists two sequences \(x^\pm _k\in \Gamma _{k,\textsc {op}}^{\pm }\) such that \(x_k^\pm \rightarrow x\).

In the next lemma we determine the limiting problem solved by the function \(v\) defined as

$$\begin{aligned} v(x)= {\left\{ \begin{array}{ll} v_+(x)\quad \text {for}\quad x\in B^{+}_{{1}/{2}}, \\ v_-(x)\quad \text {for}\quad x\in B^{-}_{{1}/{2}}, \end{array}\right. } \end{aligned}$$
(3.8)

where \(v_+\) and \(v_-\) are as in Corollary 3.4.

Lemma 3.5

(The “linearized” problem). Let \(u_k\), \(\varepsilon _k\) and \(\alpha _k\) be as in (3.4), \(v_k\) be defined by (3.6) and \(\ell \) as in (3.5). Let also \(v_\pm \) be as in Corollary 3.4:

\(\varvec{\ell =\infty :}\) Then \(\mathcal J=\emptyset \) and \(v_\pm \) are viscosity solutions of the transmission problem:

$$\begin{aligned} {\left\{ \begin{array}{ll} \Delta v_{\pm }=0 \qquad &{}\text {in } B^\pm _{{1}/{2}}\\ \alpha _\infty ^2\partial _{d} v_{+} = \beta _\infty ^2\partial _{d} v_{-} &{}\text {on } B^\pm _{{1}/{2}}\cap \{x_d=0\} \end{array}\right. } \end{aligned}$$
(3.9)

where \(\alpha _\infty =\lim _k \alpha _k\) and \(\beta _\infty =\lim _k \beta _k\), which we can assume to exist up to extracting a further subsequence.

\(\varvec{0\le \ell <\infty :}\) Then \(v\) is a viscosity solution of the two membrane problem:

$$\begin{aligned} {\left\{ \begin{array}{ll} \Delta v_{\pm }=0 \qquad &{}\text {in } B^\pm _{{1}/{2}},\\ \lambda ^2_{\pm } \partial _{d} v_{\pm }+\ell \ge 0 &{}\text {in } B_{{1}/{2}}\cap \{x_d=0\},\\ \lambda _{\pm }^2\partial _{d} v_{\pm } +\ell =0 &{}\text {in }\mathcal J,\\ \lambda _+^2\partial _{d} v_{+} = \lambda _-^2\partial _{d} v_{-} &{}\text {in } \mathcal C,\\ v_+\le v_- &{} \text {in } B_{{1}/{2}}\cap \{x_d=0\}. \end{array}\right. }\,. \end{aligned}$$
(3.10)

Remark 3.6

Here by viscosity solution of (3.9) and (3.10) we mean a function v as in (3.8) such that \(v_\pm \) are continuous in \(\overline{B^\pm _{{1}/{2}}}\), \(\Delta v_\pm =0\) in \(B^\pm _{{1}/{2}}\) and such that the following holds:

  • If we are in case (3.9), let \(p,q\in \mathbb {R}\) and let \(\tilde{P}\) be a smooth function such that \(\partial _d \tilde{P}=0\). Suppose that \(\tilde{P}\) is subharmonic (superharmonic) and that the function

    $$\begin{aligned} P:=px_{d}^{+}-qx_{d}^{-}+\tilde{P} \end{aligned}$$

    touches \(v\) strictly from below (above) at \(x_0\in B_{1/2}\cap \{x_d=0\}\), then

    $$\begin{aligned} \alpha ^2_\infty p\le \beta ^2_\infty q\qquad \Bigl ( \alpha ^2_\infty p\ge \beta ^2_\infty q\Bigr )\,. \end{aligned}$$
  • If we are in case (3.10) then

    1. (1)

      if \(P_\pm \) is a smooth superharmonic function in \(B_{1/2}^\pm \) touching \(v_\pm \) strictly from above at \(x_0\in B_{1/2}\cap \{x_d=0\}\), then \(\lambda _{\pm }^2\partial _d P_\pm \ge 0\);

    2. (2)

      if \(P_\pm \) is a smooth subharmonic function in \(B_{1/2}^\pm \) touching \(v_\pm \) strictly from below at \(x_0\in \mathcal J\), then \(\lambda _{\pm }^2\partial _d P_\pm \le 0\);

    3. (3)

      if \(p,q\in \mathbb {R}\) and \(\tilde{P}\) is a smooth subharmonic (superharmonic) function such that \(\partial _d \tilde{P}=0\) and such that the function

      $$\begin{aligned} P:=px_{d}^{+}-qx_{d}^{-}+\tilde{P} \end{aligned}$$

      touches \(v\) strictly from below (above) at \(x_0\in B_{1/2}\cap \{x_d=0\}\), then

      $$\begin{aligned} \lambda _+^2p \le \lambda _-^2 q \qquad \Bigl (\lambda _+^2p \ge \lambda _-^2q \Bigr )\,. \end{aligned}$$

3.1 Compactness of the linearizing sequence: Proof of Corollary 3.4

The key point in establishing a suitable compactness for \(v_k\) is a “partial Harnack” inequality, in the spirit of [26, 27]. As explained in the introduction, in dealing with branching points one needs to work separately on the positive and negative part. An additional difficulties arise also at pure two-phase points since we want also to deal with the case \(\lambda _-=\lambda _+\). Let us briefly explain the ideas of the proof.

If \(u\) is close in \(B_1\) to a global solution of the form \(H_{\alpha ,\varvec{e_d}}\) with \(\alpha >\lambda _+\), then we expect that in a small neighborhood \(B_\rho \) of the origin the level set \(\{u=0\}\) has zero Lebesgue measure and that all the free boundary points in \(B_\rho \) are “interior” two-phase points (indeed, at the end, this will be a consequence of the \(C^{1}\) regularity of u and of the free boundary). In this case one expects to be able to do the same argument as in [27]. This is true except for the following caveat, if one wants to deal with the case \(\lambda _-=\lambda _+\) then the sliding arguments used in [26, 27] (see also [9, 10]) does not yield the desired contradiction since the positive term might actually be zero. For this reason one has first to “increase” the slope of the trapping solution, so that the sliding argument would give the desired contradiction. Namely if \(u\) is trapped between two translation of a two-plane solution:

$$\begin{aligned} H_{\alpha , \varvec{e}_d}(x+b)\le u\le H_{\alpha , \varvec{e}_d}(x+a) \end{aligned}$$

in say \(B_1\) and at the point \(P=(0,\ldots ,0,{1}/{2})\) \(u\) is closer to \(H_{\alpha , \varvec{e}_d}(\cdot +a)\) then to \(H_{\alpha , \varvec{e}_d}(\cdot +b)\), we can increase in a quantitative way the slope of the positive part of the lower two-plane solution in half ball, i.e.

$$\begin{aligned} u\ge \alpha '(x+b)^+-\beta (x+b)^+, \qquad \alpha '>\alpha , \end{aligned}$$

see Lemma 3.7. The sliding argument of [26, 27] then allows to translate this to a a (quantitative) increase of \(b\), yielding the partial decay of flatness of the free boundary. This is the situation studied in Lemma 3.9.

If instead \(u\) is close to \(H_{\lambda _+,\mathbf {e}_d}\) then the free boundary can behave in several different ways. Indeed, in this case the origin can be either an interior two-phase point, a branching two-phase point but it might also happen that

$$\begin{aligned} u(x)\approx \lambda _+ (x_d+\varepsilon _1)_+-\lambda _- (x_d-\varepsilon _2)_-\quad \text {with}\quad 0<\varepsilon _1,\varepsilon _2\ll 1. \end{aligned}$$

Since as explained in the introduction we have to deal with all the of the above situations we have to prove a decay in this situation is to improve separately the positive and the negative parts of u. More precisely if in \(B_1\)

$$\begin{aligned}&\lambda _{+}\bigl (x_d+ b_+\bigr )^+\le u^+(x)\le \lambda _{+} \bigl (x_d+ a_+\bigr )^+, \\&\quad -\lambda _{-}\bigl (x_d+ b_-\bigr )^-\le -u^-(x)\le - \lambda _{-}\bigl (x_d+ a_-\bigr )^-, \end{aligned}$$

for suitable \(a_{\pm }, b_{\pm }\), one wants to find new constants \(\bar{a}_{\pm }, \bar{b}_{\pm }\in \) with

$$\begin{aligned} (\bar{b}_--\bar{a}_-)<(b_--a_-),\qquad (\bar{b}_+-\bar{a}_+)<(b_+-a_+), \end{aligned}$$

and for which, in half the ball,

$$\begin{aligned}&\lambda _{+}\bigl (x_d+ \bar{b}_+\bigr )^+\le u^+(x)\le \lambda _{+} \bigl (x_d+ \bar{a}_+\bigr )^+, \\&\quad -\lambda _{-}\bigl (x_d+ \bar{b}_-\bigr )^-\le -u^-(x)\le - \lambda _{-}\bigl (x_d+ \bar{a}_-\bigr )^-. \end{aligned}$$

Here one has to distinguishes the case in which, say, the lower function

$$\begin{aligned} \lambda _{+}\bigl (x_d+ \bar{b}_+\bigr )^+-\lambda _{-}\bigl (x_d+ \bar{b}_-\bigr )^- \end{aligned}$$

looks like a two plane solution, i.e \(b_+-b_-\ll 1\), or not and to perform different comparisons according to the situation. This dealt in Lemma 3.8.

We start with the following simple lemma which allows to “increase” the slope of the comparison functions.

Lemma 3.7

There is a dimensional constants \(\tau =\tau (d)>0\) such that the following hold. Assume that \(v: B_1\rightarrow \mathbb {R}\) is a continuous function with \(\Delta v=0\) on \(\{v>0\}\) and such that

$$\begin{aligned} \lambda \bigl (x_d+b\bigr )^+\le v \le \lambda \bigl (x_d+a\bigr )^+\,, \end{aligned}$$

for some \(a,b\in \big (-{1}/{100}, {1}/{100}\big )\). Let \(P=( 0, \ldots , 0, {1}/{2})\), then for all \(\varepsilon \in (0,\frac{1}{2})\)

$$\begin{aligned} v(P)&\le \lambda (1-\varepsilon )\Bigl (\frac{1}{2}+a\Bigr )^+&\Longrightarrow&v\le \lambda (1-\tau \varepsilon ) \bigl (x_d+a\bigr )^+\quad \text {in}\quad B_{1/4}(0)\,, \end{aligned}$$

and

$$\begin{aligned} v(P)&\ge \lambda (1+\varepsilon ) \Bigl (\frac{1}{2}+b\Bigr )^+&\Longrightarrow&v\ge \lambda (1+\tau \varepsilon ) \bigl (x_d+b\bigr )^+ \quad \text {in}\quad B_{1/4}(0). \end{aligned}$$

Proof

We prove only the first implication, since the second one can be obtained by the same arguments. First, we notice that, since \(b \le {1}/{100}\), both \(v\) and \(\lambda (x_d+a)_+\) are positive and harmonic in \(B_{1/4}(P)\). Thus,

$$\begin{aligned} \lambda (x_d+a)^+-v\ge 0\quad \text {in} \quad B_{1/4}(P) \end{aligned}$$

and

$$\begin{aligned} \lambda \Bigl (\frac{1}{2}+a\Bigr )^+-v(P)\ge \lambda \varepsilon \Bigl (\frac{1}{2}+a\Bigr )^+\ge \frac{49}{100} \lambda \varepsilon . \end{aligned}$$

Hence, by Harnack inequality and the bound \(|a|\le {1}/{100}\) there are dimensional constants \(\bar{c}\) and \(c\) such that

$$\begin{aligned} v(x) \le \lambda \bigl (x_d+a\bigr )^+-\lambda \bar{c} \varepsilon \le \lambda (1-c\varepsilon )\bigl (x_d+a\bigr )^+ \qquad \text {for all } x \in B_{1/8}(P). \end{aligned}$$

We now let \(w\) be the solution of the following problem:

$$\begin{aligned} {\left\{ \begin{array}{ll} \Delta w=0\qquad &{}\text {in } B_{1}(0)\setminus B_{1/8}(P)\cap \{x_d> -a\},\\ w=0 &{}\text {on } B_{1}\cap \{x_d = -a\},\\ w= \lambda \bigl (x_d+a\bigr )^+ &{}\text {on } \partial B_{1}(0)\cap \{x_d> -a\},\\ w=\lambda (1-c\varepsilon \bigr )\bigl (x_d+a\bigr )^+ &{}\text {on } \partial B_{1/8}(P)\cap \{x_d > -a\}. \end{array}\right. } \end{aligned}$$

By the Hopf Boundary Lemma,

$$\begin{aligned} w(x)\le (1-\tau \varepsilon )(x_d+a)^+ \quad \text {for every } x\text { in}\quad B_{1/4}\cap \{x_d > -a\}, \end{aligned}$$

for a suitable constant \(\tau =\tau (d)\). Since, by the comparison principle, \(u\le w\), this concludes the proof. \(\square \)

We next prove the two partial Harnack inequalities.

The proof is based on comparison with suitable test functions. In order to build these “barriers”, we will often use the following function \(\varphi \). Let \(Q=( 0, \ldots , 0, 1/5)\) and we let \(\varphi : B_1\rightarrow R\) be defined by:

$$\begin{aligned} \varphi (x)= {\left\{ \begin{array}{ll}1&{}\text { if } x\in B_{{1}/{100}}(Q),\\ \kappa _d \Big (|x-Q|^{-d}-\big (3/4\big )^{-d}\Big ) &{} \text { if } x\in B_{3/4}(Q)\setminus \overline{B}_{{1}/{100}}(Q),\\ 0 &{}\text { otherwise}, \end{array}\right. } \end{aligned}$$
(3.11)

where the dimensional constant \(\kappa _d\) is chosen in such a way that \(\varphi \) is continuous.

It is immediate to check that \(\varphi \) has the following properties:

  • (\(\varphi .1\)) \(0\le \varphi \le 1\) in \(\mathbb {R}^d\), and \(\varphi =0\) on \(\partial B_1\);

  • (\(\varphi .2\)) \(\Delta \varphi \ge c_d>0\) in \(\{\varphi >0\}\setminus \overline{B}_{{1}/{100}}(Q)\);

  • (\(\varphi .3\)) \(\partial _d \varphi >0 \) in \(\{\varphi >0\}\cap \{|x_d|\le {1}/{100}\}\);

  • (\(\varphi .4\)) \( \varphi \ge c_d>0\) in \(B_{1/6}\).

where \(c_d\) is a dimensional constant. We distinguish two cases.

Lemma 3.8

(Partial Boundary Harnack I). Given \(\lambda _+\ge \lambda _->0\) there exist constants \(\bar{\varepsilon }=\bar{\varepsilon }(d, \lambda _{\pm })>0\) and \(\bar{c}=\bar{c}(d, \lambda _{\pm })\in (0,1)\) such that, for every function \(u:B_4\rightarrow \mathbb {R}\) satisfying (a), (c) and (d) in Theorem 3.1, the following property holds true.

Let \(a_{\pm }, b_{\pm }\in \bigl (-{1}/{100},{1}/{100}\bigr )\) be such that

$$\begin{aligned} b_-\le a_-, \qquad b_+\le a_+,\qquad b_-\le b_+,\qquad a_-\le a_+, \end{aligned}$$

and

$$\begin{aligned} (a_--b_-)+( a_+-b_+)\le \bar{\varepsilon }. \end{aligned}$$

Assume that for \(x \in B_4\):

$$\begin{aligned} \lambda _{+}\bigl (x_d+ b_+\bigr )^+\le u^+(x)\le \lambda _{+} \bigl (x_d+ a_+\bigr )^+ \end{aligned}$$

and

$$\begin{aligned} -\lambda _{-}\bigl (x_d+ b_-\bigr )^-\le -u^-(x)\le - \lambda _{-}\bigl (x_d+ a_-\bigr )^-. \end{aligned}$$

Then, one can find new constants \(\bar{a}_{\pm }, \bar{b}_{\pm }\in \bigl (-{1}/{100},{1}/{100}\bigr )\), with

$$\begin{aligned} \bar{b}_-\le \bar{a}_-, \qquad \bar{b}_+\le \bar{a}_+,\qquad \bar{b}_-\le \bar{b}_+,\qquad \bar{a}_-\le \bar{a}_+, \end{aligned}$$

and

$$\begin{aligned} \bar{a}_--\bar{b}_-\le \bar{c} (a_--b_-) \qquad \bar{a}_+-\bar{b}_+\le \bar{c} (a_+-b_+) \end{aligned}$$

such that for \(x \in B_{1/6}\):

$$\begin{aligned} \lambda _{+}\bigl (x_d+\bar{b}_+\bigr )^+\le u^+(x)\le \lambda _{+} \bigl (x_d+\bar{a}_+\bigr )^+ \end{aligned}$$

and

$$\begin{aligned} -\lambda _{-}\bigl (x_d+\bar{b}_-\bigr )^-\le -u^-(x)\le - \lambda _{-}\bigl (x_d+\bar{a}_-\bigr )^-. \end{aligned}$$

Proof

Let us show how to improve the positive part. More precisely we show how given \(a_+, a_-, b_+, b_-\) as in the statement we can find \(\bar{a}_+\) and \(\bar{b}_+\). The proof for \(\bar{b}_-\) and \(\bar{a}_-\) works in the same way and is left to the reader.

We set

$$\begin{aligned} P=( 0, \ldots , 0, 2) \end{aligned}$$

and we distinguish two cases:

\(\bullet \) Case 1. Improvement from above. Assume that, at the point P, \(u^+\) is closer to \(\lambda _+(2+b_+)^+\) than to the upper barrier \(\lambda _+(2+a_+)^+\). Precisely that

$$\begin{aligned} u^+(P)\le \lambda _+(2+a_+)^+-\frac{\lambda _+ (a_+-b_+)}{2}. \end{aligned}$$

In this case, we will show that \(u\) is below \(\lambda _+(x+\bar{a}_+)^{+}\) in a smaller ball centered at the origin for \(\bar{a}_+\) strictly smaller than \(a_+\).

We start by setting

$$\begin{aligned} \varepsilon :=a_+-b_+ \le \bar{\varepsilon }. \end{aligned}$$

Then

$$\begin{aligned} u^+(P)\le \lambda _+(2+a_+)^+-\frac{\lambda \varepsilon }{2} \le \lambda _+(1- c \varepsilon ) (2+a_+)^+ \end{aligned}$$

for a suitable (universal) constant \(c\). We can thus apply (the scaled version of) Lemma 3.7 to \(u^+\), to infer the existence of a dimensional constant \(\tau \) such that

$$\begin{aligned} u^+\le \lambda _+(1-\tau \varepsilon )\bigl (x_d+a_+\bigr )^+\quad \text {in}\quad B_{1}. \end{aligned}$$
(3.12)

For \(\varphi \) as in (3.11) and \(t\in [0,1]\) we set

$$\begin{aligned} f_t=\lambda _+(1-\tau {\varepsilon }/2)\bigl (x_d+a_+-t c\varepsilon \varphi \bigr )^+, \end{aligned}$$

where \(c=c(d)\) is a small constant chosen such that for all \(x\in B_{{1}/{100}}(Q)\) and \( t\in [0,1)\),

$$\begin{aligned} u(x)&\le \lambda _+(1-\tau \varepsilon )\bigl (x_d+a_+\bigr )^+ \nonumber \\&\le \lambda _+(1-\tau \varepsilon /2)\bigl (x_d+a_+-c\varepsilon \bigr )^+ <f_t(x), \end{aligned}$$
(3.13)

where we used that \((x_d+a_+)\) is within two universal constants for \(x\in B_{{1}/{100}}(Q)\).

We now let \(\bar{t}\in (0,1]\) the largest \(t\) such that \(f_t\ge u\) in \(B_1\) and we claim that \(\bar{t}=1\). Indeed assume that \(\bar{t}<1\), then there exists \(\bar{x}\in B_1\) such that

$$\begin{aligned} u(x)-f_{\bar{t}}(x)\le u(\bar{x})-f_{\bar{t}}(\bar{x})=0\quad \text {for all}\quad x\in B_1. \end{aligned}$$
(3.14)

Note that by (3.13), \(\bar{x} \notin B_{{1}/{100}}(Q)\), while, by (\(\varphi .1\)) and (3.12), \(\bar{x} \in \{\varphi >0\}\). Moreover \(\bar{x} \in \{f_{\bar{t}}=0\}\). In fact, if this was not the case, then, by (\(\varphi .2\)), \(\Delta f_{\bar{t}}(\bar{x})<0\) and \(\Delta u(\bar{x})=0\), a contradiction with (3.14). Assume now \(\bar{x} \in \{f_{\bar{t}}=0\}\), since \(u\) is a viscosity solution we get that, by (\(\varphi .3\)),

$$\begin{aligned} \lambda _+^2\le |\nabla f_{\bar{t}}(\bar{x})|^2= \lambda _+^2(1-\tau \varepsilon /2)^2-2c \varepsilon \bar{t} \lambda _+ \partial _d \varphi (\bar{x})+O(\varepsilon ^2)<\lambda ^2_+ \end{aligned}$$

provided \(\varepsilon \le \bar{\varepsilon }(d, \lambda _+)\ll 1\) (note that necessarily \(u (\bar{x})=0\) which gives that \(\bar{x} \in \{|x_d|\le {1}/{100}\}\)). This contradiction implies that \(\bar{t}=1\). Hence, by (\(\varphi .4\)), we get for all \(x\in B_{1/6}\).

$$\begin{aligned} u(x)\le \lambda _+(1-\tau \varepsilon /2)\bigl (x_d+a_+-c\varepsilon \varphi \bigr )^+\le \lambda _+\bigl (x_d+a_+-\bar{c}\varepsilon \bigr )^+ \end{aligned}$$

for a suitable dimensional constant \(\bar{c}\). Setting

$$\begin{aligned} \bar{a}_+=a_+-\bar{c}\varepsilon ,\qquad \bar{b}_+=b_+ \end{aligned}$$

and recalling that \(\varepsilon =(b_+-a_+)\) allows to conclude the proof in this case.

\(\bullet \) Case 2. Improvement from below. We now assume that, at the point P, \(u^+\) is closer to \(\lambda _+(2+a_+)^+\) than to \(\lambda _+(2+b_+)^+\). Hence, we have

$$\begin{aligned} u^+(P)\ge \lambda _+(2+b_+)^++\frac{\lambda _+ (a_+-b_+)}{2} \end{aligned}$$

and we set again

$$\begin{aligned} \varepsilon :=a_+-b_+ \le \bar{\varepsilon }. \end{aligned}$$

Arguing as in Case \(1\), by Lemma 3.7, there exists a dimensional constant \(\tau \) such that

$$\begin{aligned} u^+\ge \lambda _+(1+\tau \varepsilon )\bigl (x_d+b_+\bigr )^+\quad \text {in}\quad B_{1}. \end{aligned}$$
(3.15)

We need now to distinguish two further sub-cases:

\(\bullet \) Case 2.1: Suppose that

$$\begin{aligned} 0\le b_+-b_-\le \eta \varepsilon \end{aligned}$$

where \(\eta \ll \tau \) is a small universal constant which we will choose at the end of the proof. In this case, for \(x\in B_1\),

$$\begin{aligned} u&\ge \lambda _+(1+\tau \varepsilon )\bigl (x_d+b_+\bigr )^+-\lambda _-(x_d+b_-\bigr )^- \nonumber \\&\ge \lambda _+(1+\tau \varepsilon )\bigl (x_d+b_+\bigr )^+-\lambda _-(1-c_1\eta \varepsilon )\bigl (x_d+b_+\bigr )^- \end{aligned}$$
(3.16)

for a suitable universal constant \(c_1\). We now take \(\varphi \) as in (3.11) and we set, for \(t\in [0,1]\),

$$\begin{aligned} f_t(x)=\lambda _+(1+\tau \varepsilon /2)\bigl (x_d+b_++c_2t\varphi \bigr )^+-\lambda _-(1-c_1\eta \varepsilon )\bigl (x_d+b_++c_2t\varphi \bigr )^- \end{aligned}$$

for a suitably small universal constant \(0<c_2\ll \tau \), chosen so that for all \(x \in B_{{1}/{100}}(Q)\):

$$\begin{aligned} \bigl (1+\tau \varepsilon \bigr )\bigl (x_d+b_+\bigr )^+\ge \bigl (1+\tau \varepsilon /2\bigr )\bigl (x_d+b_++c_2\varepsilon \bigr )^+. \end{aligned}$$

This together with (3.15) implies that

$$\begin{aligned} u(x)\ge \lambda _+(1+\tau \varepsilon )\bigl (x_d+b_+\bigr )^+&\ge \lambda _+(1+\tau \varepsilon /2)\bigl (x_d+b_++c_2 \bigr )^+ \nonumber \\&\ge f_1(x)\ge f_t(x) \end{aligned}$$
(3.17)

for all \(x \in B_{{1}/{100}}(Q), t\in [0,1]\). Furthermore \(u\ge f_0\) in \(B_1\) thanks to (3.16).

As in Case 1 we let \(\bar{t}\) the biggest \(t\) such that \(f_t\le u\) in \(B_1\) and \(\bar{x}\) the first contact point, so that

$$\begin{aligned} u(x)-f_{\bar{t}}(x)\ge u(\bar{x})-f_{\bar{t}}(\bar{x})=0\qquad \text {for all } x\in B_1. \end{aligned}$$

Since \(\Delta f_{\bar{t}}>0\) on \(\{f_t\ne 0\}\cap B_{{1}/{100}}(Q)\), as in Case 1, \(\bar{x}\) is a free boundary point. Moreover, since \(f_{\bar{t}}\) changes sign in a neighborhood of \(\bar{x}\):

$$\begin{aligned}&\text {either}\quad \bar{x} \in \Gamma _{\textsc {op}}^+=\partial \Omega _u^+\setminus \partial \Omega _u^-, \\&\text {or }\quad \bar{x} \in \Gamma _{\textsc {tp}}=\partial \Omega _u^+\cap \partial \Omega _u^-. \end{aligned}$$

In the first case, by definition of viscosity solution and (\(\varphi .3\)),

$$\begin{aligned} \lambda _+^2\ge |\nabla f_{\bar{t}}^+(\bar{x})|^2= \lambda _+^2(1+\tau \varepsilon /2)^2+2c \varepsilon \bar{t} \lambda _+ \partial _d \varphi (\bar{x})+O(\varepsilon ^2)>\lambda _+^2, \end{aligned}$$

a contradiction for \(\varepsilon \ll 1\). In the second case we have a contradiction as well, provided \(\eta \ll \tau \), since (recall also that \(\lambda _+\ge \lambda -\), (2.1)):

$$\begin{aligned} \lambda _+^2-\lambda _-^2&\ge |\nabla f_{\bar{t}}^+|^2- |\nabla f_{\bar{t}}^-|^2 \\&= \lambda _+^2(1+\tau \varepsilon /2)^2-\lambda _-^2(1-c_1\eta \varepsilon )^2\\&\quad +2c_2 \varepsilon \bar{t} (\lambda _+-\lambda _-) \partial _d \varphi (\bar{x})+O(\varepsilon ^2) \\&>\lambda _+^2-\lambda _-^2 \end{aligned}$$

provided \(\eta =\eta (d) \ll \tau \) and \(\varepsilon \ll 1\) (only depending on \(d\) and \(\lambda _+\)). Hence, \(\bar{t}=1\), \(u\ge f_1\) which implies the desired conclusion by setting

$$\begin{aligned} \bar{a}_+=a_+,\qquad \bar{b}_+=b_+ +\bar{c}_2\varepsilon \end{aligned}$$

and by recalling that \(\varepsilon =(a_+-b_+)\).

\(\bullet \) Case 2.2: Assume instead that

$$\begin{aligned} b_+-b_-\ge \eta \varepsilon , \end{aligned}$$

where \(\eta =\eta (d)\) has been chosen according to Case 2.1. In this case we consider the family of functions

$$\begin{aligned} f_t(x)=\lambda _+(1+\tau \varepsilon /2)\bigl (x_d+b_++\eta t\varphi \bigr )^+-\lambda _-\bigl (x_d+b_-)^-. \end{aligned}$$

Being \(\varphi \le 1\), this is well defined since \(b_+\ge b_-+\eta \). Moreover \(u\ge f_0\) and, thanks, to (3.15) and by possibly choosing \(\eta \) smaller depending only on the dimension,

$$\begin{aligned} u(x)\ge f_{1}(x)\ge f_t(x) \qquad \text {for all } x \in B_{{1}/{100}}(Q), t\in [0,1]. \end{aligned}$$

We consider again the first touching time \(\bar{t}\) and the first touching point \(\bar{x}\). Note that this can not happen where \(u\ne 0\). Moreover, by the very definition of \(f_{\bar{t}}\), \(\bar{x} \in \partial \Omega ^+_u\setminus \partial \Omega _u^-\). However, again by arguing as in Case 2.1, this is in contradiction with \(u\) being a viscosity solution. We now conclude as in the previous cases.

Since either the assumption of Case \(1\) or the one of Case \(2\) is always satisfied, this concludes the proof. \(\square \)

The next lemma deals with the case in which the origin is not a branching point.

Lemma 3.9

(Partial Boundary Harnack II). Given \(L\ge \lambda _+\ge \lambda _->0\) there exist constants \(\bar{\varepsilon }=\bar{\varepsilon }(d, \lambda _{\pm },L)>0\), \(M=M(d, \lambda _{\pm },L)\) and \(c=c(d, \lambda _{\pm },L)\in (0,1)\) such that for every function \(u:B_4\rightarrow \mathbb {R}\) satisfying (a), (c) and (d) in Theorem 3.1 the following property holds true. If there are constants \(a,b \in \bigl (-{1}/{100}, {1}/{100}\bigr )\) with

$$\begin{aligned} 0\le a-b\le \bar{\varepsilon } \end{aligned}$$

such that for \(x \in B_4\)

$$\begin{aligned} H_{\alpha , \varvec{e}_d}(x+b \varvec{e}_d)\le u(x)\le H_{\alpha , \varvec{e}_d}(x+a \varvec{e}_d) \end{aligned}$$

and

$$\begin{aligned} \lambda _++M\varepsilon \le \alpha \le 2L, \end{aligned}$$

then there are constants \(\bar{a},\bar{b} \in \bigl (-{1}/{100}, {1}/{100}\bigr )\) with

$$\begin{aligned} 0\le \bar{b}-\bar{a}\le c (b-a) \end{aligned}$$

such that for \(x \in B_{1/6}\)

$$\begin{aligned} H_{\alpha , \varvec{e}_d}(x+\bar{b} \varvec{e}_d)\le u(x)\le H_{\alpha , \varvec{e}_d}(x+\bar{a} \varvec{e}_d). \end{aligned}$$

Proof

We consider the point \(P=( 0, \ldots , 0, 2)\) and we distinguish the two cases (note that one of the two is always satisfied):

$$\begin{aligned} \text {either}\,\,&H_{\alpha , \varvec{e}_d}\Bigl (P+b \varvec{e}_d\Bigr )+\frac{\alpha (a-b)}{2} \le u(P), \\ \text {or}\,\,&H_{\alpha , \varvec{e}_d}\Bigl (P+a \varvec{e}_d\Bigr )-\frac{\alpha (a-b)}{2} \ge u(P). \end{aligned}$$

Since the argument in both cases is completely symmetric we only consider the second one. If we set

$$\begin{aligned} \varepsilon =(a-b), \end{aligned}$$

by Lemma 3.7 and by arguing as in Lemma 3.8 we deduce the existence of a dimensional constant \(\tau \) such that

$$\begin{aligned} u\le \alpha (1-\tau \varepsilon ) \bigl (x_d+a\bigr )^+-\beta \bigl (x_d+a\bigr )^- \end{aligned}$$

in \(B_1\). We let \(\varphi \) as in (3.11) and we set

$$\begin{aligned} f_t(x)=\alpha (1-\tau \varepsilon /2) \bigl (x_d+a-ct \varphi \bigr )^+-\beta \bigl (x_d+a-ct \varphi \bigr )^- \end{aligned}$$

where \(c\) is a dimensional constant chosen such that

$$\begin{aligned} u(x)\le f_{1}(x)\le f_t(x) \qquad \text {for all } x \in B_{{1}/{100}}(Q), t\in [0,1]. \end{aligned}$$

where, again, \(Q=( 0, \ldots , 0, )\). As in Lemma 3.8 we let \(\bar{t}\) and \(\bar{x}\) be the first contact time and the first contact point and we aim to show that \(\bar{t}=1\). For, we note that, by the same arguments as in Lemma 3.8, necessarily \(\bar{x} \in \{u=0\}\). We claim that

$$\begin{aligned} \bar{x} \in \Gamma _{\textsc {tp}}=\partial \Omega _u^+\cap \partial \Omega _u^-. \end{aligned}$$

Indeed otherwise \(\bar{x} \in \partial \Omega ^{-}_{u}\setminus \partial \Omega ^{+}_{u}\), the case \(\bar{x} \in \partial \Omega ^{+}_{u}\setminus \partial \Omega ^{-}_{u}\) being impossible since \(f_{\bar{t}}\) is negative in a neighborhood of \(\bar{x}\). By definition of viscosity solution this would imply

$$\begin{aligned} \lambda _{-}^2 \ge |\nabla f_{\bar{t}}^-(\bar{x})|^2=\beta ^2-O(\varepsilon )\ge \lambda _{-}^2 +2M\lambda _+ \varepsilon -O (\varepsilon ), \end{aligned}$$
(3.18)

where the implicit constants in \(O(\varepsilon )\) depends on \(\lambda _{\pm }\), \(L\) and \(d\) and we exploited that, since \(\alpha \ge \lambda _++M\varepsilon \),

$$\begin{aligned} \beta ^2=\alpha ^2-\lambda _+^2+\lambda _-^2\ge \lambda _-^2+2M\lambda _+ \varepsilon . \end{aligned}$$

Inequality (3.18) is impossible if \(M\) is chosen sufficiently large. Hence \(\bar{x} \in \Omega ^{-}_{u}\cap \partial \Omega ^{+}_{u}\). This however implies:

$$\begin{aligned} \lambda _+^2-\lambda _{-}^2&\le |\nabla f_{\bar{t}}^+(\bar{x})|^2-|\nabla f_{\bar{t}}^-(\bar{x})|^2 \\&= \alpha ^2(1-\tau \varepsilon /2)^2-\beta ^2-2c \bar{t}\varepsilon (\alpha -\beta ) \partial _d \varphi (\bar{x}) + O(\varepsilon ^2) \\&\le \lambda _+^2-\lambda _{-}^2-\alpha ^2\tau \varepsilon + O(\varepsilon ^2), \end{aligned}$$

where we have used (\(\varphi .3\)), the equality

$$\begin{aligned} \lambda _+^2-\lambda _{-}^2=\alpha ^2-\beta ^2 \end{aligned}$$

and that since \(\lambda _+\ge \lambda _-\), \(\alpha \ge \beta \). This is a contradiction provided \(\bar{\varepsilon }\) is chosen small enough. Hence \(\bar{t}=1\) and , as in Lemma 3.8, this concludes the proof. \(\square \)

With Lemmas 3.9 and 3.8 at hand we can use the same arguments as in [26, 27] to prove Corollary 3.4.

Proof of Corollary 3.4

We distinguish two cases:

\( \varvec{0\le \ell <+\infty :}\) By triangular inequality we have

$$\begin{aligned} \Vert u_k-H_{\lambda _+, \varvec{e_d}}\Vert _{L^\infty (B_1)}\le (2\ell +1) \varepsilon _k \end{aligned}$$

for k sufficiently large. In particular we can repeatedly apply Lemma 3.8 as in [26], see also [44, Lemma 7.14 and Lemma 7.15] for a detailed proof, to deduce that if we define the sequence \((w_k)_k\) by

$$\begin{aligned} w_k(x)= {\left\{ \begin{array}{ll} w_{+,k}(x):=\dfrac{u_k(x)-\lambda _+x_d^+}{\alpha _k\varepsilon _k}\qquad &{}x\in \Omega _{u_k}^+\cap B_1,\\ w_{-,k}(x):=\dfrac{u_k(x)+\lambda _- x_d^-}{\beta _k\varepsilon _k}\qquad &{}x\in \Omega _{u_k}^-\cap B_1, \end{array}\right. } \end{aligned}$$

then the sets

$$\begin{aligned} \tilde{\Gamma }_k^\pm :=\Big \{(x, w_{\pm ,k}(x))\ :\ x\in \overline{\Omega _{u_k}^\pm \cap B_{1/2}}\Big \} \end{aligned}$$

converge, up to a not relabeled subsequence, in the Hausdorff distance to the closed graphs

$$\begin{aligned} \tilde{\Gamma }_\pm =\Big \{(x, w_\pm (x))\ :\ x\in \overline{B_{1/2}^\pm }\Big \}, \end{aligned}$$

where \(w\in C^{0,\alpha }\) for a suitable \(\alpha \). Since

$$\begin{aligned} h_k(x):=\frac{H_{\alpha _k,\varvec{e_d}}-H_{\lambda ^+, \varvec{e_d}}}{\varepsilon _k} \rightarrow {\left\{ \begin{array}{ll} \lambda _+^{-1} \ell x_d &{} \text {if } x_d>0,\\ \lambda _- ^{-1}\ell x_d &{} \text {if } x_d<0, \end{array}\right. } \end{aligned}$$

the original sequence \(v_k\) satisfies that their graphs,

$$\begin{aligned} \tilde{\Gamma }_\pm =\Big \{(x, v_\pm (x))\ :\ x\in \overline{B_{1/2}^\pm }\Big \}, \end{aligned}$$

converges to the graph of a limiting function \(v\) as we wanted, this in particular proves (i), (ii) and (iii).

Since \(0\in \partial \Omega _{u_k}^+\cap \partial \Omega _{u_k}^-\) then \(0\) is in the domain of \(v_{\pm ,k}\) and

$$\begin{aligned} v_{\pm ,k}(0)=0, \end{aligned}$$

which implies that \(v_{\pm }(0)=0\). To show that \(v_+(x)\le v_-(x)\) for \(x=(x',0)\in \{x_d=0\} \cap B_{{1}/{2}}\) we simply exploit (iii) at the points \(x^\pm _k=(x', t_k^\pm )\) where

$$\begin{aligned} t^+_k=\sup \bigl \{t: (x',t)\in \partial \Omega _{u_k}^+\bigr \} \qquad \text {and} \qquad t^-_k=\inf \bigl \{t: (x',t) \in \partial \Omega _{u_k}^-\bigr \} \end{aligned}$$

and by noticing that \(-t_k^+ \le -t_k^-\). Finally to show the last claim it is enough to note that if \(x_k\in \partial \Omega _{u_k}^+\cap \partial \Omega _{u_k}^-\) is converging to \(x\) then \(v_{+,k}(x_k)=v_{-,k}(x_k)\) and thus \(v_{+}(x)=v_{-}(x)\), yielding \(x\in \mathcal C\).

\( \varvec{\ell =\infty {:}}\) In this case the conclusion follows exactly as in [27] by using Lemma 3.9 and noticing that its assumptions are satisfied since \(\ell =\infty \). \(\square \)

3.2 The linearized problem: Proof of Lemma 3.5

The following technical lemma is instrumental to the proof of Lemma 3.5. We defer its proof to “Appendix A” below.

Lemma 3.10

Let \(u_k\), \(\varepsilon _k\) and \(\alpha _k\) be as in the statement of Corollary 3.4, \(v_k\) be defined by (3.6) and \(v_\pm \) be as in Corollary 3.4. Then:

  1. (1)

    Let \(P_+\) a strictly subharmonic (superharmonic) function on \(B_{1/2}^+\) touching \(v_+\) strictly from below (above) at a point \(x_0\in \{x_d=0\}\cap B_{1/2}\). Then, there exists a sequence of points \(\partial \Omega _{u_k}^+\ni x_k\rightarrow x_0\) and a sequence of comparison functions \(Q_{k}\) such that \(Q_{k}\) touches from below (above) \(u^+_k\) at \(x_k\), and such that

    $$\begin{aligned} \nabla Q_{k}^+(x_k)=\alpha _k\varvec{e}_d+\alpha _k\varepsilon _k\nabla P_+(x_0)+o(\varepsilon _k). \end{aligned}$$
    (3.19)
  2. (2)

    Let \(P_-\) be a strictly subharmonic (superharmonic) function on \(B_{1/2}^-\) and touching \(v_-\) strictly from below (above) at a point \(x_0\in \{x_d=0\}\cap B_{1/2}\). Then, there exists a sequence of points \(\partial \Omega _{u_k}^-\ni x_k\rightarrow x_0\) and a sequence of comparison functions \(Q_{k}\) such that \(Q_{k}\) touches from below (above) \(-u^-_k\) at \(x_k\), and such that

    $$\begin{aligned} \nabla Q_{k}^-(x_k)=-\beta _k\varvec{e}_d+\beta _k\varepsilon _k\nabla P_-(x_0)+o(\varepsilon _k). \end{aligned}$$
    (3.20)
  3. (3)

    Let \(p,q\in \mathbb {R}\) and \(\tilde{P}\) be a function on \(B_{1/2}\) such that \(\partial _d \tilde{P}=0\). Suppose that \(\tilde{P}\) is subharmonic (superharmonic) and that the function

    $$\begin{aligned} P:=px_{d}^{+}-qx_{d}^{-}+\tilde{P} \end{aligned}$$

    touches \(v\) strictly from below (above) at a point \(x_0\in \mathcal C\). Then, there exists a sequence of points \(x_k\rightarrow x_0\) and a sequence of comparison functions \(Q_{k}\) such that \(Q_{k}\) touches from below (above) the function \(u_k\) at \(x_k\in \partial \Omega _{u_k}\), and such that

    $$\begin{aligned} \nabla Q_{k}^+(x_k)&=\alpha _k\varvec{e}_d+\alpha _k\varepsilon _kp+o(\varepsilon _k) \nonumber \\ \nabla Q^-_{k}(x_k)&=-\beta _k\varvec{e}_d+\beta _k\varepsilon _k q+o(\varepsilon _k). \end{aligned}$$
    (3.21)

    In particular, if \(p>0\) and \(Q_{k}\) touches \(u_{k}\) from below then \(x_{k}\notin \partial \Omega _{u_{k}}^{-}\setminus \partial \Omega _{u_{k}}^{+}\), while if \(q<0\) and \(Q_k\) touches \(u_k\) from above then \(x_{k}\notin \partial \Omega _{u_{k}}^{+}\setminus \partial \Omega _{u_{k}}^{-}\).

Proof of Lemma 3.5

We note that \(v_k^\pm \) converge uniformly to \(v_\pm \) on every compact subset of \(\{\pm x_d>0\}\cap B_{{1}/{2}}\). Since these functions are harmonic there, by elliptic estimates the convergence is smooth and in particular \(v_{\pm }\) are harmonic on the (open) half balls \(B^\pm _{{1}/{2}}\). Hence we only have to check the boundary conditions on \(\{x_d=0\}\). We distinguish two cases.

\(\varvec{\ell =\infty }.\) In this case we first want to show that \(\mathcal J = \emptyset \). Assume not, since the set \(\{v_->v_+\}\) is open in \(\{x_d= 0\}\), it contains a \((d-1)\)-dimensional ball

$$\begin{aligned} B'_\varepsilon (y'):=B_\varepsilon ((y',0))\cap \{x_d=0\}\subset \mathcal J\,. \end{aligned}$$

Next let P be the polynomial

$$\begin{aligned} P(x)=A\big ((d-1/2)x_d^2-|x'-y'|^2\big )-Bx_d\,,\quad \text {where}\quad x=(x',x_d)\,, \end{aligned}$$

for some constants AB. We first choose \(A\gg 1 \) large enough so that

$$\begin{aligned} P<v^+\qquad \text {on} \quad \{|x'-y'|=\varepsilon \}\cap \{x_d=0\} \end{aligned}$$

and then we choose \(B\gg A\) so that

$$\begin{aligned} P<v^+ \quad \text {on} \quad B_\varepsilon ((y',0)). \end{aligned}$$

Now we can translate \(P\) first down and then up to find that there exists \(C\) such that \(P+C\) is touching \(v^+\) from below at a point \(x_0\in B_\varepsilon ((y',0)) \cap \{x_d\ge 0\}\). Since \(\Delta P>0\), the touching point can not be in the interior of the (half) ball and thus \(x_0\in B'_\varepsilon (y')\subset \mathcal J\).

By using Lemma 3.10, there exists a sequence of points \(\partial \Omega _{u_k}^+\ni x_k\rightarrow x_0\) and of functions \(Q_k\) touching \(u^+_k\) from below at \(x_k\) and such that

$$\begin{aligned} \nabla Q_k^+(x_k)=\alpha _k\varvec{e}_d+\alpha _k\varepsilon _k\nabla P(x_0)+o(\varepsilon _k). \end{aligned}$$

Since \(x_0\in \mathcal J\), by (3.7) in Lemma 3.10, \(x_k\in \partial \Omega _{u_k}^+\setminus \partial \Omega _{u_k}^-\). Hence, by (ii) in Lemma 2.6

$$\begin{aligned} \lambda _+^2\ge |\nabla Q_k^+(x_k)|^2\ge \alpha _k^2+2\alpha _k^2\varepsilon _k\partial _d P(x_0)+o(\varepsilon _k) \end{aligned}$$

Hence, recalling the definition of \(\ell \),

$$\begin{aligned} -B=\partial _d P(x_0)\le \frac{\lambda _+^2-\alpha _k^2}{2\alpha _k^2\varepsilon _k}+o(1)\rightarrow -\infty . \end{aligned}$$

This contradiction proves that \(\mathcal J=\emptyset \).

We next prove the transmission condition in (3.9). Let us show that

$$\begin{aligned} \alpha _\infty ^{2}\partial _{d}v_{+}-\beta _\infty ^{2}\partial _{d} v_{-}\le 0, \end{aligned}$$

the opposite inequality can then be proved by the very same argument. Suppose that there exist \(p\) and \(q\) with \(\alpha _\infty ^{2} p>\beta _\infty ^{2}q\) and a strictly sub-harmonic function \(\tilde{P}\) with \(\partial _{d} \tilde{P}=0\) such that

$$\begin{aligned} P=px_{d}^{+}-qx_{d}^{-}+\tilde{P} \end{aligned}$$

touches \(v\) strictly from below at a point \(x_{0}\in \{x_{d}=0\}\cap B_{}\) (note that the last set coincide with \(\mathcal C\) by the previous step). By Lemma 3.10 there exists a sequence of points \(\partial \Omega _{u_{k}}\ni x_{k}\rightarrow x_{0}\) and a sequence of comparison functions \(Q_{k}\) touching \(u_{k}\) from below at \(x_{k}\) and satisfying (3.21). In particular \(x_{k}\notin \partial \Omega _{u_{k}}^{-}\setminus \partial \Omega _{u_{k}}^{+}\). We claim that \(x_{k}\in \partial \Omega _{u_{k}}^{+}\cap \partial \Omega _{u_{k}}^{-}\). Indeed, if this was not the case, then by (A.1) in Lemma 2.5,

$$\begin{aligned} \lambda _+^2\ge |\nabla Q_k^+(x_k)|^2. \end{aligned}$$

Arguing as above, this contradicts \(\ell =+\infty \). Hence, by Lemma 2.5 (A.3)

$$\begin{aligned} \lambda _{+}^{2}-\lambda _{-}^{2}&\ge |\nabla Q^{+}_{k}(x_{k})|^{2}-|\nabla Q^{-}_{k}(x_{k})|^{2} \\&=\alpha _{k}^{2}-\beta _{k}^{2}+2\varepsilon _{k}(\alpha _{k}^{2}p-\beta _{k}^{2}q)+o(\varepsilon _{k}) \\&=\lambda _{+}^{2}-\lambda _{-}^{2}+2\varepsilon _{k}(\alpha _{k}^{2}p-\beta _{k}^{2}q)+o(\varepsilon _{k}). \end{aligned}$$

Dividing by \(\varepsilon _{k}\) and letting \(k\rightarrow \infty \), we obtain the desired contradiction.

\(\varvec{0\le \ell <\infty }.\) We start by showing that \(\lambda _{\pm }^2\partial _d v_\pm \ge -\ell \) on \(B_{{1}/{2}}\cap \{x_d=0\}\). We focus on \(v_-\) since the argument is symmetric. Let us assume that there exists \(q\in \mathbb {R}\) with \(\lambda _-^2q<-\ell \) and a strictly subharmonic function \(\tilde{P}\) with \(\partial _{d} \tilde{P}=0\) such that function

$$\begin{aligned} P=q x_{d}+\tilde{P} \end{aligned}$$

touches \(v_-\) strictly from below at a point \(x_{0}\in \{x_{d}=0\}\cap B_{}\). Let now \(x_{k}\) and \(Q_{k}\) be as in Lemma 3.10 (2). By the optimality conditions

$$\begin{aligned} \lambda _{-}^{2}\le |\nabla Q_{k}^{-}(x_{k})|^{2}=\beta _{k}^{2}+2\varepsilon _{k}\beta _{k}^{2}q+o(\varepsilon _{k}). \end{aligned}$$

Since \(\ell <\infty \), we have \(\beta _{k}=\lambda _{-}+O(\varepsilon _{k})\) and so the above inequality leads to

$$\begin{aligned} -\frac{\ell }{\lambda _-^2}=\lim _{k\rightarrow \infty }\frac{\lambda _{-}^{2} - \beta _{k}^{2} }{2\varepsilon _{k}\beta _{k}^{2}} \le q<-\frac{\ell }{\lambda _-^2}, \end{aligned}$$

which is a contradiction.

We now show that \(\lambda _\pm ^2 \partial _d v_\pm =-\ell \) on \(\mathcal J\) and again we focus on \(v_-\). By the previous step it is enough to show that if there exists a strictly superharmonic polynomial \(\tilde{P}\) with \(\partial _{d} \tilde{P}=0\) such

$$\begin{aligned} P=q x_{d}+\tilde{P} \end{aligned}$$

touches \(v_{-}\) strictly from above at a point \(x_{0}\in \mathcal J\), then \(\lambda _-^2q\le -\ell \). Again, by Lemma 3.10, we find points \(x_{k}\rightarrow x_{0}\) and functions \(Q_{k}\) satisfying (3.20) and touching \(-u^-_{k}\) from below at \(x_{k}\). Since \(x_{0}\in \mathcal J\), by (3.7) in Corollary 3.4, \(x_{k}\in \partial \Omega _{u_k}^-\setminus \partial \Omega _{u_k}^+\). Hence, by Lemma 2.5,

$$\begin{aligned} \lambda _{-}^{2}\ge |\nabla Q_{k}^{-}(x_{k})|^{2}=\beta _{k}^{2}+2\beta _{k}^{2} \varepsilon _{k} q+o(\varepsilon _{k}), \end{aligned}$$

which by arguing as above implies that \(\lambda _-^2 q\le -\ell \).

It then remain to show the transmission condition in (3.10) at points in \(\mathcal C\). Again by symmetry of the arguments we will only show that

$$\begin{aligned} \lambda _{+}^{2}\partial _{d}v_{+}-\lambda _{-}^{2}\partial _{d} v_{-}\le 0 \qquad \text {on } \mathcal C. \end{aligned}$$

Let us hence assume that there exist \(p\) and \(q\) with \(\lambda _{+}^{2} p>\lambda _{-}^{2}q\) and a strictly subharmonic polynomial \(\tilde{P}\) with \(\partial _{d} \tilde{P}=0\) such that

$$\begin{aligned} P=px_{d}^{+}-qx_{d}^{-}+\tilde{P} \end{aligned}$$

touches \(v^+ \) and \(v^-\) strictly from below at \(x_{0}\in \mathcal C\). By Lemma 3.10, we find points \(x_{k}\rightarrow x_{0}\) and functions \(Q_{k}\) satisfying (3.21). In particular \(x_{k}\notin \partial \Omega _{u_{k}}^{-}\setminus \partial \Omega _{u_{k}}^{+}\). By the previous step we know that \(\lambda _-^2q\ge -\ell \) and thus \(\lambda _+^2 p>-\ell \), since we are assuming \(\lambda _+^2p+>\lambda _-^2q\ge 0\). We now distinguish two cases:

  1. (1)

    \(x_{k }\) are one-phase points, namely \(x_{k}\in \partial \Omega _{u_{k}}^{+}\setminus \partial \Omega _{u_{k}}^{-}\). In this case

    $$\begin{aligned} \lambda _{+}^{2}\ge |\nabla Q_{k}^{+}(x_{k})|^{2}=\alpha _{k}^{2}+2\alpha _{k}^{2} \varepsilon _{k} p+o(\varepsilon _{k}), \end{aligned}$$

    which implies that

    $$\begin{aligned} \lambda _+^2 p+\ell =\lambda _{+}^2\lim _{k \rightarrow \infty }\Bigl (p+\frac{\alpha _k^2-\lambda _+^2}{2\alpha _k^2\varepsilon _k}\Bigr )\le 0 \end{aligned}$$

    in contradiction with \(\lambda _+^2p>-\ell \).

  2. (2)

    \(x_{k }\) are two-phase points, namely \(x_{k}\in \partial \Omega _{u_{k}}^{+}\cap \partial \Omega _{u_{k}}^{-}\). Arguing as in Case 1, we have that, by Lemma 2.5,

    $$\begin{aligned} \lambda _{+}^{2}-\lambda _{-}^{2}&\ge |\nabla Q^{+}_{k}(x_{k})|^{2}-|\nabla Q^{-}_{k}(x_{k})|^{2} \\&=\alpha _{k}^{2}-\beta _{k}^{2}+2\varepsilon _{k}(\alpha _{k}^{2}p-\beta _{k}^{2}q)+o(\varepsilon _{k}) \\&=\lambda _{+}^{2}-\lambda _{-}^{2}+2\varepsilon _{k}(\lambda _+^2p-\lambda _-^2q)+o(\varepsilon _{k}), \end{aligned}$$

    which gives a contradiction with \( \lambda _+^2p>\lambda _-^2q\) as \(\varepsilon _k \rightarrow 0\).

\(\square \)

3.3 Proof of Lemmas 3.3 and 3.2

We recall the following regularity results for the limiting problems.

Lemma 3.11

(Regularity for the transmission problem). There exists a universal constant \(C=C(\alpha _\infty , \beta _\infty , d)>0\) such that if \(v\in C^0(B_{1/2})\) is a viscosity solution of (3.9) with \(\Vert v\Vert _{L^\infty (B_{1/2})}\le 1\) then there exists \(\varvec{v}\in \mathbb \mathbb {R}^{d-1}\), \(p, q \in \mathbb {R}\) with \(\alpha ^2_\infty \,p=\beta ^2_\infty \, q\) such that

$$\begin{aligned} \sup _{x\in B_r} \frac{\bigl |v(x)-v(0)-(\varvec{v}\cdot x'+ p\,x_d^+-\,q\,x_d^-)\bigr |}{r^2} \le C. \end{aligned}$$
(3.22)

The proof of this fact can be found in [27, Theorem 3.2]. A similar result holds for the linearized problem (3.10).

Lemma 3.12

(Regularity for the two-membrane problem). There exists a universal constant \(C=C(\lambda _\pm , d)>0\) such that if \(v\in C^0(B_{1/2})\) is a viscosity solution of (3.10) with \(\Vert v\Vert _{L^\infty (B_{1/2})}\le 1\) then there exists \(\varvec{v}\in \mathbb \mathbb {R}^{d-1}\), \(p, q \in \mathbb {R}\) satisfying \(\lambda _+^2 \,p=\lambda _-^2 \, q\ge -\ell \) such that

$$\begin{aligned} \sup _{x\in B_r} \frac{ \bigl |v(x)-v(0)-(\varvec{v}\cdot x'+ \,p\,x_d^+-q\,x_d^-)\bigr |}{r^{}}\le C(1+\ell ). \end{aligned}$$
(3.23)

The proof of the above lemma reduces easily to the one of the thin obstacle problem, since we were not able to find the statement of this fact in the literature, we sketch its proof in “Appendix B”.

It is by now well known that the regularity theory fo the limiting problems and a classical compactness argument prove Lemmas 3.3 and 3.2. We sketch their arguments here:

Proof of Lemma 3.2

We argue by contradiction and we assume that for fixed \(\gamma \in (0,1/2)\) and \(M\) we can find a sequences of functions \(u_k\) and numbers \(\alpha _k\) such that

$$\begin{aligned} \varepsilon _k=\Vert u_k-H_{\alpha _k,\varvec{e}_d}\Vert _{L^\infty (B_1)}\rightarrow 0 \quad \text {and}\quad 0\le \alpha _k-\lambda _+\le M \varepsilon _k, \end{aligned}$$

but for which (3.2) and (3.3) for any choice of \(\rho \) and \(C\). Note that by the second assumption above

$$\begin{aligned} \ell <\frac{M}{\lambda _+}. \end{aligned}$$

We let \((v_k)_k\) be the sequence of functions defined in (3.6) and we assume that they converge to a function \(v\) as in Corollary 3.4, note that \(\Vert v\Vert _{L^\infty (B_{1/2})}\le 1\). By Lemma 3.5, \(v\) solves (3.10) and thus by Lemma 3.12 there exists \(\varvec{v}\in \mathbb \mathbb {R}^{d-1}\), \(p, q \in \mathbb {R}\) satisfying \(\lambda _+^2 \,p=\lambda _-^2 \, q\ge -\ell \) such that for all \(r\in (0,1/4)\)

$$\begin{aligned} \sup _{x\in B_{\rho }} \frac{ \bigl |v(x)-v(0)-(\varvec{v}\cdot x'+ \,p\,x_d^+-q\,x_d^-)\bigr |}{r^{\gamma }}\le r^{-\gamma }C(1+M). \end{aligned}$$
(3.24)

Hence we can fix \(\rho =\rho (\lambda _{\pm }, \gamma , M)\) such that

$$\begin{aligned} \sup _{x\in B_{\rho }} \bigl |v(x)-v(0)-(\varvec{v}\cdot x'+ \,p\,x_d^+-q\,x_d^-)\bigr |\le \frac{\rho ^\gamma }{2}. \end{aligned}$$
(3.25)

We now set

$$\begin{aligned} \tilde{\alpha }_k:=\alpha _k(1+ \varepsilon _k p)+\delta _k \varepsilon _k \qquad \text{ and }\qquad \varvec{e}_k:=\frac{\varvec{e}_d +\varepsilon _k \varvec{v}}{\sqrt{1+\varepsilon _k^2\,|\varvec{v}|^2}}\,, \end{aligned}$$

where \(\delta _k\rightarrow 0\) is chosen so that \(\tilde{\alpha }_k \ge \alpha _k\), note that the existence of such a sequence is due to the condition \(\lambda _+^2 p\ge -\ell \) since

$$\begin{aligned} \alpha _k(1+\varepsilon _k p)=\Bigl (\lambda _++\frac{\ell }{\lambda _+}\varepsilon _k+o(\varepsilon _k)\Bigr )(1+\varepsilon _k p)\ge \lambda _++o(\varepsilon _k). \end{aligned}$$

We let \(H_k:=H_{\tilde{\alpha }_k, \varvec{e_k}}\) and we note that

$$\begin{aligned} |\alpha _k-\alpha |+|\varvec{e_k}-\varvec{e}_d|\le C\, \varepsilon _k \end{aligned}$$

for a universal constant \(C>0\), hence the proof will be concluded if we can show that

$$\begin{aligned} \sup _{B_{\rho }} |u_k(x)-H_k(x)|\le \rho ^{\gamma } \varepsilon _k, \end{aligned}$$

where \(\rho \) is defined so that (3.25) holds. This however easily follows from the convergence of \(v_k\) to \(v\) in the sense of Corollary 3.4 since the sequence of functions defined by

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{H_k(x)-H_{\alpha _k, \varvec{e}_d}}{\alpha _k \varepsilon _k}\qquad &{} x_d>0\\ \frac{H_k(x)-H_{\alpha _k, \varvec{e}_d}}{\beta _k \varepsilon _k}\qquad &{} x_d<0 \end{array}\right. } \end{aligned}$$

converges (again in the sense of Corollary 3.4) to the function

$$\begin{aligned} \varvec{v}\cdot x'+p x_d^+-qx_d^-. \end{aligned}$$

\(\square \)

Proof of Lemma 3.3

Arguing by contradiction one assume for fixed \(\gamma \in (0,1)\) the existence of a sequence of of functions \(u_k\) and numbers \(\alpha _k\), \(M_k\rightarrow \infty \) such that

$$\begin{aligned} \varepsilon _k=\Vert u_k-H_{\alpha _k,\varvec{e}_d}\Vert _{L^\infty (B_1)}\rightarrow 0 \quad \text {and}\quad \frac{\alpha _k-\lambda _+}{\varepsilon _k}\ge M_k\rightarrow \infty , \end{aligned}$$

but for which (3.2) and (3.3) for any choice of \(\rho \) and \(C\). This implies that \(\ell =\infty \) and that the limiting functions \(v\) obtained in Corollary 3.4 are solutions of (3.9). One then concludes the proof as above by using (3.11). \(\square \)

4 Proof of the main results

4.1 Proof of Theorem 1.1 and Corollary 1.2

The final step to obtain the desired regularity result is to show that \(|\nabla u^\pm |\) are \(C^\eta \) for a suitable \(\eta >0\) up to the boundary. This indeed implies that \(u^\pm \) are solutions of the classical one-phase free boundary problem in its viscosity formulation and the regularity will follows form [26]. The argument is similar to the one in [42], therefore we only sketch the main steps and refer the reader to that paper for more details.

Lemma 4.1

Suppose that u is a local minimizer of \( J_{\textsc {tp}}\) in D. Then at every point of \(\Gamma _{{tp}}\) there is a unique blow-up, that is,

$$\begin{aligned} \mathcal BU(x_0)=\{H_{\alpha (x_0), \varvec{e}(x_0)}\}. \end{aligned}$$

Moreover there exists \(\eta >0\) such that for every open set \(D'\Subset D\) there is a constant \(C(D', \lambda _{\pm }, d) >0\) such that, for every \(x_0,y_0\in \Gamma _{{tp}}\cap D'\), we have

$$\begin{aligned} |\alpha (x_0)-\alpha (y_0)|\le C|x_0-y_0|^\eta \qquad \text{ and }\qquad |\varvec{e}(x_0)-{\varvec{e}}(y_0)|\le C_0|x_0-y_0|^\eta , \end{aligned}$$
(4.1)

where \(H_{{\varvec{e}}(x_0),\alpha (x_0)}\) and \(H_{{\varvec{e}}(x_0),\alpha (x_0)}\) are the blow-ups at \(x_0\) and \(y_0\) respectively. In particular, \(\Gamma _{{tp}}\cap D'\) is locally a closed subset of the graph of a \(C^{1,\eta }\) function.

Proof

We first notice that by Corollary 2.3 and the definition of \(\mathcal {BU}(x_0)\), given \(\varepsilon _0>0\) as in Theorem 3.1 we can find \(r_0>0\) and \(\rho _0\) such that (3.1) is satisfied by \(u_{y_0,r_0}\) for some \(H_{\alpha , \varvec{e}}\in \mathcal {BU}(x_0)\) and for all \(y_0\in B_{\rho _0}(x_0)\).

We can thus repeatedly apply Theorem 3.1 together with standard arguments to infer that for all \(y_0\in B_{\rho _0}(x_0)\) there exists a unique \(H_{{\varvec{e}}(y_0),\alpha (y_0)}\) such that

$$\begin{aligned} \Vert u_{r,x_0}-H_{{\varvec{e}}(y_0),\alpha (y_0)}\Vert _{L^\infty (B_r(y_0))}\le C_0 r^\gamma \end{aligned}$$
(4.2)

where \(\gamma \in (0,1/2)\). A covering argument implies the validity of the above estimate for all \(x_0\in \Gamma _{{tp}}\cap D'\). Next, for \(x_0, y_0\in \Gamma _{{tp}}\cap D'\) set \(r:=|x_0-y_0|^{1-\eta }\) and \(\eta :={\gamma }/{(1+\gamma )}\), and recall that u is L-Lipschitz (with constant depending on \(D'\)) to get

$$\begin{aligned}&\Vert H_{{\varvec{e}}(x_0),\alpha (x_0)}-H_{{\varvec{e}}(y_0),\alpha (y_0)}\Vert _{L^\infty (B_1)}\\&\quad \le \Vert u_{r,x_0}-H_{{\varvec{e}}(x_0),\alpha (x_0)}\Vert _{L^\infty ( B_1)}\\&\qquad +\Vert u_{r,x_0}-u_{r,y_0}\Vert _{L^\infty ( B_1)}+\Vert u_{r,y_0}-H_{{\varvec{e}}(y_0),\alpha (y_0)}\Vert _{L^\infty ( B_1)}\\&\quad \le \left( C_0 r^{\gamma } + \frac{L}{r}{\left| x_0-y_0\right| }+C_0 r^{\gamma } \right) =(L+2C_0)\, \left| x_0-y_0\right| ^{\eta }\,. \end{aligned}$$

The conclusion now follows easily from this inequality. \(\square \)

Lemma 4.2

Under the same assumptions of Lemma 4.1, there are \(C^{0,\eta }\) continuous functions \(\alpha :\partial \Omega _u^+\rightarrow \mathbb {R}\), \(\beta :\partial \Omega _u^-\rightarrow \mathbb {R}\) such that \(\alpha \ge \lambda _+\) , \(\beta \ge \lambda -\), and \(u^\pm \) are viscosity solutions of the one-phase problem

$$\begin{aligned} \Delta u^+=0\quad \text {in}\quad \Omega _u^+\,,\qquad |\nabla u^+|=\alpha \quad \text {on}\quad \partial \Omega _u^+ \end{aligned}$$

and

$$\begin{aligned} \Delta u^-=0\quad \text {in}\quad \Omega _u^-\,,\qquad |\nabla u^-|=\beta \quad \text {on}\quad \partial \Omega _u^-\,. \end{aligned}$$

Proof

We will sketch the argument for \(u^+\), \(u^-\) being the same. Clearly \(\Delta u^+=0\) in \(\Omega _u^+\). By (4.2) we have that, if \(x_0\in \Gamma _{{tp}}\cap D'\), then

$$\begin{aligned}&\big |u^+(x)-\alpha (x_0)(x-x_0)\cdot \varvec{e}(x_0)\big |\le C_0|x-x_0|^{1+\gamma } \end{aligned}$$
(4.3)

for every \(x\in B_{r_0}(x_0)\cap \Omega _u^+\), where \(r_0\) and \(C_0\) depends only on \(D'\). In particular, \(u^+\) is differentiable on \(\Omega _u^+\) up to \(x_0\) and \(|\nabla u^+(x_0)|=\alpha (x_0)\). On the other hand if \(x_0\in \Gamma _{\textsc {op}}^+:=\Omega _u^+\setminus \partial \Omega _u^-\), then \(|\nabla u^+(x_0)|=\lambda _+\) is constant, in the viscosity sense.

To conclude we only need to prove that \(\alpha \in C^{0,\eta }(\partial \Omega _+)\). Since \(\alpha \) is \(\eta \) Hölder continuous on \(\Gamma _{{tp}}\) by Lemma 4.1 and constant on \(\Gamma _{\textsc {op}}^+\), we just need to show that if \(x_0\in \Gamma _{{tp}}\) is such that there is a sequence \(x_k\in \Gamma _{\textsc {op}}^+\) converging to \(x_0\), then \(\alpha (x_0)=\lambda _+\). To this end, let \(y_k \in \Gamma _{{tp}}\) be such that

$$\begin{aligned} {{\,\mathrm{dist}\,}}(x_k, \Gamma _{{tp}})=|x_k-y_k|\,. \end{aligned}$$

Let us set

$$\begin{aligned} r_k=|x_k-y_k|\qquad \text {and}\qquad u_k(x)=\frac{1}{r_k}u^+(x_k+r_kx), \end{aligned}$$

and note that \(u_k\) is a viscosity solution of the free boundary problem

$$\begin{aligned} \Delta u_k=0\quad \text {in}\quad \Omega _{u_k}^+\cap B_1\,,\qquad |\nabla u_k|=\lambda _+\quad \text {on}\quad \partial \{u_k>0\}\cap B_1\,. \end{aligned}$$

Since \(u_k\) are uniformly Lipschitz they converge to a function \(u_\infty \) which is also a viscosity solution of the same problem, [26]. On the other hand, by (4.3), we have that

$$\begin{aligned} u_\infty (x)=\alpha (x_0)(x\cdot \varvec{e}(x_0))^+, \end{aligned}$$

which gives that \(\alpha (x_0)=\lambda _+\). \(\square \)

Proof of Theorem 1.1

Let \(x_0\in \Gamma _{{tp}}=\partial \Omega _u^+\cap \partial \Omega _u^-\) and let \(\bar{\varepsilon }\) be the constant in [26, Theorem 1.1]. Thanks to the classification of blow-ups at points of \(\Gamma _{{tp}}\), we can choose \(r_0>0\), depending on \(x_0\), such that

$$\begin{aligned} \Vert u_{x_0,r_0}-H_{\alpha ,\varvec{e}} \Vert _{L^{\infty }(B_1)}<\bar{\varepsilon } \end{aligned}$$

so that thanks to Lemma 4.2, we can apply [26, Theorem 1.1] to conclude that locally at \(x_0\in \Gamma _{{tp}}\) the free boundaries \(\partial \Omega _u^\pm \) are \(C^{1,\eta }\) graphs. By the arbitrariness of \(x_0\) this concludes the proof. \(\square \)

Proof of Corollary 1.2

The proof of the corollary is straightforward. Indeed by Theorem 1.1 there exits an open neighborhood \(W\) of the two-phase free boundary \(\Gamma _{\textsc {tp}}\) such that \(\partial \Omega _u^\pm \cap W\subset {{\,\mathrm{Reg}\,}}(\partial \Omega _u^\pm ) \). Outside \(W\), \(u^\pm \) are (local) minimizers of the one-phase problem and thus the desired decomposition and the stated properties follows by the results in [1, 31, 46]. \(\square \)

4.2 Proof of Theorem 1.3

In this section we prove the regularity of the solutions to the shape optimization problem (SOP). The proof is a consequence of Theorem 1.1 and the analysis in [43]. Indeed, the existence of an optimal (open) partition \((\Omega _1,\ldots ,\Omega _n)\) was proved in [8] and (in dimension two) in [6]. Moreover, in [8, 45], it has been shown that each of the eigenfunctions \(u_i\) on \(\Omega _i\) is Lipschitz continuous as a function defined on \(\mathbb {R}^d\) (extended as zero outside \(\Omega _i\)). Furthermore, there are no triple points inside the box D and no two-phase points on the boundary \(\partial D\), that is,

  • \(\partial \Omega _i\cap \partial \Omega _j\cap \partial \Omega _k=\emptyset \) for every set \(\{i,j,k\}\subset \{1,\ldots ,n\}\) of different coefficients;

  • \(\partial \Omega _i\cap \partial \Omega _j\cap \partial D=\emptyset \) for every \(i\ne j\in \{1,\ldots ,n\}\).

The regularity of \(\partial \Omega _i\) can then be obtained as follows.

  • By [43, Lemma 7.3], the function \(u=u_i-u_j\) is a almost of (OP) with \(\lambda ^2_+=m_i\) and \(\lambda ^2_-=m_j\), in the sense that

    $$\begin{aligned} J_{\textsc {tp}}(u, B_r)\le J_{\textsc {tp}}(v, B_r)+Cr^{d+2}\qquad \text {for all } v=u\text { on } \partial B_r\,, \end{aligned}$$

    provided \(r\) is sufficiently small.

  • By the classification of the blow up limits in [43, Proposition 4.3] and the arguments in Sect. 2.3, \(u\) is a viscosity solution of

    $$\begin{aligned} {\left\{ \begin{array}{ll} \Delta u= -\lambda _1(\Omega _i)u_i+\lambda _1(\Omega _j)u_j\qquad &{}\text {on } \{u\ne 0\},\\ |\nabla u^+|^2-|\nabla u^-|^2=m_i-m_j ,\, |\nabla u^+|\ge \sqrt{m_i}\quad \text {and}\quad |\nabla u^-|\ge \sqrt{m_j} &{}\text {on } \partial \Omega _u^+\cap \partial \Omega _u^-\,;\\ |\nabla u^+|=\sqrt{m_i}&{}\text {on }\partial \Omega _u^+\setminus \partial \Omega _u^-\,; \\ |\nabla u^-|=\sqrt{m_j}&{}\text {on } \partial \Omega _u^-\setminus \partial \Omega _u^+\,. \end{array}\right. } \end{aligned}$$
  • \(C^{\infty }\) regularity of the one-phase part \(\partial \Omega _i\setminus \bigl (\partial D\cup \bigl (\bigcup _{i\ne j}\partial \Omega _j\bigr )\bigr )\) follows by techniques in [1], see [7];

  • \(C^{1,\eta }\)-regularity of \(\partial \Omega _i\) in a neighborhood of \(\partial \Omega _i\cap \partial D\) was proved in [38]; the main argument boils down to the regularity result from [18];

  • \(C^{1,\eta }\)-regularity of \(\partial \Omega _i\) in a neighborhood of \(\partial \Omega _i\cap \partial \Omega _j\) follows by using the same argumentsFootnote 3 in the proof of Theorem 1.1, using Theorem 4.3 in place of Theorem 3.1.

Theorem 4.3

Let \(0\le \lambda _+\le \lambda _-\le L\), \(f \in C^0(B_1)\) and let \(u:B_1 \rightarrow \mathbb {R}\) be a \(L\)-Lipschitz viscosity solution of

$$\begin{aligned} {\left\{ \begin{array}{ll} \Delta u= f\qquad &{}\text {on }\{u\ne 0\} \\ |\nabla u^+|^2-|\nabla u^-|^2=\lambda _+^2-\lambda _-^2 ,\, |\nabla u^+|\ge \lambda _+\quad \text {and}\quad |\nabla u^-|\ge \lambda _- &{}\text {on }\partial \Omega _u^+\cap \partial \Omega _u^-\,;\\ |\nabla u^+|=\lambda _+&{}\text {on } \partial \Omega _u^+\setminus \partial \Omega _u^-\,; \\ |\nabla u^-|=\lambda _-&{}\text {on } \partial \Omega _u^-\setminus \partial \Omega _u^+\,. \end{array}\right. } \end{aligned}$$

Then for every \(\gamma \in (0,1/2)\), there exist \(\varepsilon _0>0\), \(C>0\) and \(\rho \in (0,1/4)\) depending only on \(\lambda _{\pm }\), \(L\) and \(\gamma \) such that if

$$\begin{aligned} \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}\le \varepsilon _0\qquad \text {for some}\qquad L\ge \alpha \ge \lambda _+\,. \end{aligned}$$

then, there are \(\varvec{e}\in \mathbb S^{d-1}\) and \(\tilde{\alpha }\ge \lambda _+\) such that

$$\begin{aligned} |\varvec{e}-\varvec{e}_d|+|\tilde{\alpha }-\alpha |\le C\bigl (\Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}+\Vert f\Vert _{L^\infty (B_1)}\bigr ) \end{aligned}$$
(4.4)

and

$$\begin{aligned} \Vert u_\rho -H_{\tilde{\alpha },\varvec{e}}\Vert _{L^\infty (B_1)}\le \rho ^{\gamma }\,\Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}+C\Vert f\Vert _{L^\infty (B_1)} \end{aligned}$$

Proof

Note that (4.3) is satisfied with \(\tilde{\alpha }=\alpha \) and \(\varvec{e}=\varvec{e}_d\), \(\rho ={1}/{4}\) and \(C=C(\varepsilon )\) if

$$\begin{aligned} \Vert f\Vert _{L^\infty (B_1)}\ge \varepsilon \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}. \end{aligned}$$

Hence it is enough to show that there exists \(\varepsilon _0\) universal such that the conclusion of the theorem holds provided

$$\begin{aligned} \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}\le \varepsilon _0\qquad \text {for some}\qquad L\ge \alpha \ge \lambda _+\, \end{aligned}$$

and

$$\begin{aligned} \Vert f\Vert _{L^\infty (B_1)}\le \varepsilon _0 \Vert u-H_{\alpha ,\varvec{e}_d}\Vert _{L^\infty (B_1)}. \end{aligned}$$
(4.5)

We can then argue by contradiction as in the proof of Theorem 3.1 by noticing that, thanks to (4.5) the contradicting sequence satisfies

$$\begin{aligned} \Delta u_k=o(\varepsilon _k). \end{aligned}$$

This allows to almost verbatim repeat the proofs in Sect. 3, see for instance [26, 27]. \(\square \)