1 Introduction

One of the most classical problems in ordinary differential equations consists in the study of second-order equations coming from mechanical systems having a Hamiltonian structure. For instance, one can consider the simple one-dimensional case in which the Hamiltonian has the form

$$\begin{aligned} H(p,q)=\frac{p^2}{2}-W(q)\,,\qquad p,q\in {\mathbb {R}}, \end{aligned}$$

giving rise to the system of equations

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{q}=\partial _p H=p,\\ \dot{p}=-\partial _q H=W'(q).\end{array}\right. } \end{aligned}$$

Noticing that \(\ddot{q}=\dot{p}\), this system of ordinary differential equations reduces to the single second-order equation

$$\begin{aligned} \ddot{q}=W'(q). \end{aligned}$$
(1.1)

Equation (1.1) has a variational structure, coming from the action functional

$$\begin{aligned} \int _{\mathbb {R}}\frac{\dot{q}^2(t)}{2}+W(q(t))\,{\mathrm{d}}t, \end{aligned}$$
(1.2)

namely minimizers (or, more generally, critical points) of this functional satisfy (1.1): in jargon, one says that (1.1) is the Euler–Lagrange equation associated with the functional in (1.2).

A typical and concrete example of this setting is given by the equation of the pendulum: in this case, setting the Lyapunov stable equilibrium of the pendulum at \(q=0\) and the Lyapunov unstableFootnote 1 ones at \(q=\pm 1\), and considering unit gravity for simplicity, one can take

$$\begin{aligned} W(q)=\frac{1+\cos (\pi q)}{\pi } \end{aligned}$$
(1.3)

in (1.1) and obtain the equation

$$\begin{aligned} \ddot{q}=-\sin (\pi q). \end{aligned}$$
(1.4)

An interesting analogue of (1.1) in partial differential equations arises in the study of phase coexistence models, and in particular in the analysis of the Allen–Cahn equation

$$\begin{aligned} \Delta u+u-u^3=0. \end{aligned}$$
(1.5)

If one considers the one-dimensional case, with the choice

$$\begin{aligned} W(u)=\frac{(1-u^2)^2}{4}, \end{aligned}$$
(1.6)

then (1.5) can be also reduced to (1.1).

A well-established topic for the dynamical systems as in (1.4) is the search for heteroclinic orbits, that are orbits which connect two (Lyapunov unstable) equilibria. These solutions have the special feature of separating the phase space into regions in which solutions exhibit different topological behaviors (e.g. oscillations versus librations), and, in higher dimensions, they provide the essential building block to chaos.

The analogue of such heteroclinic connections for the phase coexistence problems in (1.5) provides a transition layer connecting two (variationally stable) pure phases of the system. In higher dimensions, these solutions constitute the cornerstone to describe at a large scale the phase separation, as well as the phase parameter in dependence to the distance from the interface.

In this article, we explore a brand new line of investigation focused on a nonlocal analogue of (1.1), in which the second derivative is replaced by a finite difference. More concretely, we will consider a functional similar to that in (1.2), but in which the derivative is replaced by an oscillation term. We recall that other nonlocal analogues of (1.1) have been considered in the literature, mainly replacing the second derivative with a fractional second derivative, see [4, 6, 14, 19, 20]. Other lines of investigation took into account the case in which the second derivative is replaced by a quadratic interaction with an integrable kernel, see [1] and the references therein.

The interest in this problem combines perspectives in pure and in applied mathematics. Indeed, from the theoretical point of view, nonlocal functionals typically exhibit a number of novel features that are worth exploring and provide several conceptual difficulties that are completely new with respect to the classical cases. On the other hand, in terms of applications, nonlocal functionals can capture original and interesting phenomena that cannot be described by the classical models.

In our framework, in particular, we take into account a nonlocal interaction which is not scale invariant. This type of nonlocal structures is closely related to several geometric motions that have been recently studied both for their analytic interest in the calculus of variations and for their concrete applicability in situations in which detecting different scales allows the preservation of details and irregularities in the process of removing white noises (e.g. in the digitalization of fingerprints, in which one wants to improve the quality of the image without losing relevant features at small scales). We refer in particular to [5, 7,8,9,10,11,12,13, 17] for several recent contributions in the theoretical and applied analysis of nonlocal problems without scale invariance.

While the previous literature mostly focuses on geometric evolution equations, viscosity solutions, perimeter type problems and questions arising in the calculus of variations, in this paper we aim at investigating the existence and basic properties of heteroclinic minimizers for nonlocal problems with lack of scale invariance.

Since this topic of research is completely new, we will need to introduce the necessary methodology from scratch. In particular, one cannot rely on standard methods, since:

  • the problems taken into account do not possess standard compactness properties,

  • the functional to minimize cannot be easily differentiated,

  • the solutions found need not to be (and in general are not) regular,

  • the solutions found need not to be (and in general are not) unique.

In the rest of the introduction, we give formal statements concerning the mathematical setting in which we work and we present our main results, regarding the existence of the heteroclinic connections, their monotonicity properties, the Euler–Lagrange equation that they satisfy, and their lack of regularity and uniqueness. Then, we take into account the Dirichlet problem, obtaining explicit solutions and optimal oscillation bounds.

1.1 Main assumptions

Given an interval \(I\subset {\mathbb {R}}\), we consider the oscillation of a function \(u\in L^\infty (I)\), defined as

$$\begin{aligned} {\underset{I}{{\text {osc}}}}\,u:=\sup _I u-\inf _I u. \end{aligned}$$
(1.7)

Given \(r>0\), \(a<b\), with \(b-a>2r\), and \(W\in C({\mathbb {R}})\), we consider the energy functional

$$\begin{aligned} {\mathcal {E}}_{(a,b)}(u):=\frac{1}{2r^2}\int _a^b \left( {\underset{(x-r,x+r)}{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x+\int _{a}^{b} W(u(x))\,{\mathrm{d}}x. \end{aligned}$$
(1.8)

As customary, we say that \(u\in L^\infty _{\mathrm{loc}}({\mathbb {R}})\) is a local minimizer of \({\mathcal {E}}\) if, for any \(a<b\) and any \(v\in L^\infty _{\mathrm{loc}}({\mathbb {R}})\) such that \(u=v\) outside \([a+r,b-r]\), we have that

$$\begin{aligned} {\mathcal {E}}_{(a,b)}(u)\leqslant {\mathcal {E}}_{(a,b)}(v). \end{aligned}$$

Notice that, due to the nonlocal character of the oscillation functional, we require the competitor v to coincide with the minimizer u outside \([a+r,b-r]\) instead of [ab] (see [8] for a discussion of this issue).

We shall assume the following structural conditions on the potential W:

$$\begin{aligned} {\left\{ \begin{array}{ll} W\in C({\mathbb {R}}),\qquad W(-1)=W(1)=0<W(t)\quad {\text{ for }}\,\, {\text{ all }}\,\,t\in {\mathbb {R}}\setminus \{-1,1\},\\ W\, {\text {is}}\,{\text {strictly}}\, {\text {decreasing}}\,{\text {in}}\, (-\infty ,-1)\,{\text{ and }}\,{\text {strictly}}\,{\text {increasing}}\,{\text {in}}\,(1,+\infty ),\\ W\, {\text{ is }}\,{\text {an}}\,{\text {even}}\,{\text {function}}\,{\text {in}}\,[-1,1]\,{\text{ and }}\,{\text {has}}\,{\text {a}}\,{\text {unique}}\,{\text {local}}\,{\text {maximum}}\,{\text {at}}\,t=0,\end{array}\right. } \end{aligned}$$
(1.9)

and we denote

$$\begin{aligned} c_W:=\int _{-1}^1 W(s)\,{\mathrm{d}}s>0. \end{aligned}$$
(1.10)

The last assumption in (1.9) can be slightly generalized by simply assuming that W has a unique local maximum in \([-1,1]\), with some minor technical adaptations of our arguments. We point out that condition (1.9) is satisfied by the standard “double well” potentials, e.g. the ones in (1.3) and (1.6).

In the forthcoming Sects. 1.2, 1.3 and 1.4 we give precise statements of our main results concerning the existence, possible uniqueness, and geometric properties of the minimizers of the functional in (1.8), specifically focused on heteroclinic connections, that, in our setting, are critical points of the functional which connect the two equilibria \(-1\) and 1. The Dirichlet problem associated with (1.8) (when restricted to monotone functions) will be described in detail in Sect. 1.5.

1.2 Existence of minimal heteroclinic connections

Now we discuss the construction of local minimizers to (1.8) which connect the two stable equilibria \(-1\) and 1. Our main result on this topic goes as follows:

Theorem 1.1

(Existence of minimal heteroclinic connections) Assume that (1.9) holds true. Then, there exists a local minimizer \(u\in L^\infty ({\mathbb {R}})\) to (1.8) such that u is monotone nondecreasing and satisfies

$$\begin{aligned} \lim _{x\rightarrow \pm \infty } u(x)=\pm 1. \end{aligned}$$
(1.11)

Moreover,

$$\begin{aligned} \begin{aligned} {\mathcal {E}}(u)\,&=\min \Big \{ {\mathcal {E}}(v) \;{ \text{ s.t. } }\, v\in L^\infty ({\mathbb {R}}),\, {\text {monotone}}\,{\text {nondecreasing}},\,{\text {s.t.}}\, (1.11)\, {\text {holds}} \Big \}\\ &\leqslant \min \left\{ \frac{4}{r}, 4+c_W\right\} , \end{aligned} \end{aligned}$$
(1.12)

where

$$\begin{aligned} {\mathcal {E}}(v):=\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x+ \int _{{\mathbb {R}}} W(v(x))\,{\mathrm{d}}x. \end{aligned}$$

We stress that the existence of heteroclinic connections in nonlocal problems is usually a rather difficult task in itself, which cannot be achieved by standard ordinary differential equations methods and cannot rely directly on conservation of energy formulas. For problems modeled on fractional equations, a careful investigation of heteroclinic solutions and of their basic properties has been recently performed in [2, 4, 6, 14, 15, 18,19,20].

The case that we treat in this paper is very different from the existing literature, due to the lack of scale invariance. In particular, the proof of the existence result in Theorem 1.1 is more involved than the standard argument based on direct methods, due to the lack of appropriate compactness results for the oscillation functional. In order to gain compactness in our case, we will need to prove that it is possible to restrict the space of competitors for the Dirichlet problem to monotone functions, and then we utilize suitable approximation arguments in compact intervals.

The technical arguments utilized in the proofs are specifically tailored to our case, since we do not have any a priori information on the regularity of the competitors involved in the minimization, and solutions may be discontinuous. Therefore, all the methods based on pointwise analysis and geometric considerations are not available at once in our setting, and they need to be replaced by ad-hoc arguments.

See also [7] for further discussions about compactness issues for oscillatory functionals, and [8] for existence and rigidity results for minimizers when \(W\equiv 0\). The case \(W\not \equiv 0\) that we consider in this paper cannot be reduced to the existing literature on the subject, since it is the presence of a nontrivial potential that defines the notion of equilibria and makes the construction of heteroclinic orbits meaningful.

1.3 Geometric properties of minimal heteroclinic connections

Now we describe the main characteristics of the minimal heteroclinic connections given by Theorem 1.1. In particular, we will show that:

  • they are monotone,

  • they satisfy an appropriate “finite difference” Euler–Lagrange equation,

  • and they are not necessarily continuous, since there exists at least one minimal heteroclinic connection which is piecewise constant on intervals of length 2r.

In our setting, the simplest competitor for heteroclinic connections is the piecewise constant function defined (up to translations) as

$$\begin{aligned} u_0(x):={\left\{ \begin{array}{ll} 1&\quad { \text{ if } } \,x>0,\\ -1 &\quad { \text{ if } }\,x<0.\end{array}\right. } \end{aligned}$$
(1.13)

It is easy to check that

$$\begin{aligned} {\mathcal {E}}(u_0)=\frac{4}{r}. \end{aligned}$$
(1.14)

A natural question is whether this is also a minimal heteroclinic connection. This would be the case if one considers discontinuous double well potentials of the form \(W(t):=\chi _{(-1,1)}(t)\). On the other hand, we can rule out the possibility that \(u_0\) is a minimizer when either r is sufficiently small or W is sufficiently regular, as stated precisely in the next result:

Proposition 1.2

Assume that (1.9) holds true. Then, the function \(u_0\) is not a minimal heteroclinic connection if

  • either \(r\in \left( 0,\frac{4}{4+c_W}\right) \), being \(c_W\) defined in (1.10),

  • or W is differentiable at \(\pm 1\).

We also show that all the heteroclinic connections are necessarily monotone:

Theorem 1.3

(Monotonicity of the heteroclinics) Assume that (1.9) holds true. Let \(u\in L^\infty _{{\mathrm{{loc}}}}({\mathbb {R}})\) be a local minimizer to (1.8) which satisfies (1.11). Then, u is monotone nondecreasing.

An interesting consequence of Theorem 1.3 is that every minimal heteroclinic connection satisfies an appropriate finite difference equation, which can be seen as an Euler–Lagrange equation associated with the energy functional in (1.8). The precise result that we have goes as follows:

Theorem 1.4

(Euler–Lagrange equation) Assume that (1.9) holds true and that W restricted to \([-1,1]\) is a \(C^1\) function. Let \(u\in L^\infty _{\mathrm{loc}}({\mathbb {R}})\) be a local minimizer for the functional in (1.8) which satisfies (1.11).

Then u satisfies the Euler–Lagrange equation

$$\begin{aligned} \frac{u(x+2r)+u(x-2r)-2u(x)}{r^2}= W'(u(x))\quad {\text{ for }}\,{\text {a.e.}}\, x\in {\mathbb {R}}. \end{aligned}$$
(1.15)

We stress that it is not evident to obtain pointwise equations as in (1.15) directly from the minimization of oscillation functionals as in (1.8) since, roughly speaking, it is not easy to carry the derivatives inside the oscillation terms (for instance, while in the classical case one can obtain Eq. (1.1) by simply taking derivatives of the functional in (1.2), this approach does not lead to Eq. (1.15) by direct differentiation of the functional in (1.8)).

On the other hand, it is always desirable to find necessary conditions for minimization, and, in our case, the identity in (1.15) plays an important role since it allows us to reconstruct certain values of the minimizers by a partial knowledge of the values nearby. In this sense, the operator on the left-hand side of (1.15) is a discretization of the second derivative and (1.15) can be seen as a discrete version of the classical pendulum and Allen–Cahn equations (compare with (1.1), (1.4) and (1.5)).

It is also interesting to observe that, as \(r\searrow 0\), the heteroclinic orbits found in Theorem 1.1 recover the classical heteroclinics. This result makes use of the Euler–Lagrange equation given by Theorem 1.4, and its statement goes as follows:

Proposition 1.5

(Limit behavior as \(r\searrow 0\)) Assume that (1.9) holds true and that W restricted to \([-1,1]\) is a \(C^1\) function. For every \(r>0\), let \(u_r\in L^\infty ({\mathbb {R}})\) be a local minimizer of (1.8) which is monotone nondecreasing and satisfies (1.11), as given in Theorem 1.1.

Then, up to a translation, we have that \(u_r\) converges a.e. to the classical heteroclinic u, namely the unique solution to

$$\begin{aligned}&4u''(x)=W'(u(x))\qquad {\text{ for }}\,{\text {all }}\,x\in {\mathbb {R}}, \end{aligned}$$
(1.16)
$$\begin{aligned}&u(0)=0, \end{aligned}$$
(1.17)
$$\begin{aligned} {\text{ and } }\,\,&\lim _{x\rightarrow \pm \infty }u(x)=\pm 1. \end{aligned}$$
(1.18)

In the next result, we show that minimal heteroclinic connections are not necessarily regular, and this is a fundamental difference with respect to the classical case of ordinary differential equations. To this end, we establish the existence of a piecewise constant (and, in particular, discontinuous) minimal heteroclinic connection.

Theorem 1.6

(Lack of regularity and discontinuity of heteroclinic connections) Assume that (1.9) holds true and moreover that W restricted to \([-1,1]\) is a \(C^1\) function. Then, there exists at least one minimal heteroclinic connection u which is piecewise constant, on intervals of length 2r.

In particular, there exists a sequence \((u_n)_{n\in {\mathbb {Z}}}\) such that

$$\begin{aligned} u(x)\equiv u_n \quad {\text{ for }}\,{\text {all}}\,x\in [2nr, 2(n+1)r). \end{aligned}$$

The sequence \(u_n\) is monotone nondecreasing, that is \(u_n\leqslant u_{n+1}\), it satisfies

$$ \lim _{n\rightarrow \pm \infty } u_n=\pm 1,$$

and the recurrence relation

$$\begin{aligned} u_{n+2} = 2u_{n+1}-u_n +r^2 W'(u_{n+1}). \end{aligned}$$
(1.19)

We point out that the recurrence relation (1.19) is the discrete version of the Euler–Lagrange equation in (1.15).

1.4 Uniqueness issues

An interesting problem which is left open in the previous description of the minimal heteroclinic connections is the issue of uniqueness. In this direction, in the forthcoming Corollary 1.8 we provide a result about nonuniqueness of monotone solutions to the Euler–Lagrange equation (1.15) which satisfy (1.11). This is based on the construction of two different heteroclinic sequences satisfying the recurrence relation in (1.19), as given in the following result:

Proposition 1.7

Assume that (1.9) holds true and that W restricted to \([-1,1]\) is a \(C^1\) function. Then, there exist two different sequences \((\bar{w}_n)_{n\in {\mathbb {Z}}}\) and \((\bar{z}_n)_{n\in {\mathbb {Z}}}\) which satisfy the following properties:

  • \((\bar{w}_n)_{n\in {\mathbb {Z}}}\) and \((\bar{z}_n)_{n\in {\mathbb {Z}}}\) are monotone nondecreasing in n,

  • \((\bar{w}_n)_{n\in {\mathbb {Z}}}\) and \((\bar{z}_n)_{n\in {\mathbb {Z}}}\) satisfy the recurrence relation (1.19),

  • \((\bar{w}_n)_{n\in {\mathbb {Z}}}\) and \((\bar{z}_n)_{n\in {\mathbb {Z}}}\) satisfy the limit property

    $$\begin{aligned} \lim _{n\rightarrow \pm \infty }\bar{w}_n=\lim _{n\rightarrow \pm \infty }\bar{z}_n=\pm 1, \end{aligned}$$
    (1.20)
  • \((\bar{w}_n)_{n\in {\mathbb {Z}}}\) and \((\bar{z}_n)_{n\in {\mathbb {Z}}}\) are odd sequences, in the sense that

    $$\begin{aligned} \begin{aligned}&\bar{w}_0=0 \quad {\text{ and }}\,\,\bar{w}_n=-\bar{w}_{-n} \quad {\text{ for }}\,{\text {all}}\, n>0,\\&\bar{z}_{n}= -\bar{z}_{-n-1} \quad {\text{ for }}\,{\text {all}}\, n\geqslant 0.\end{aligned} \end{aligned}$$
    (1.21)

We recall that existence of heteroclinic solutions to discrete recurrence relations such as (1.19) has been also considered in the literature, see e.g. [21, 22]. A consequence of Proposition 1.7 is the following result.

Corollary 1.8

(Lack of uniqueness for heteroclinic solutions) Assume that (1.9) holds true and that W restricted to \([-1,1]\) is a \(C^1\) function. Then, there exist two geometrically different monotone nondecreasing functions \(u,v:{\mathbb {R}}\rightarrow [-1,1]\) which satisfy (1.11) and are solutions to the Euler–Lagrange equation (1.15).

1.5 The Dirichlet problem

We now observe that the lack of regularity that we pointed out for solutions to the Euler–Lagrange equation (1.15) is a general phenomenon in equations involving the discrete difference operator

$$\begin{aligned} D_r u(x):= \frac{u(x+r)+u(x-r)-2u(x)}{r^2}. \end{aligned}$$
(1.22)

In particular, we consider the Dirichlet problem associated with this operator with source term \(f\in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\) and boundary data \(\alpha , \beta \in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\):

$$\begin{aligned} \left\{ \begin{array}{ll} D_r u=f&\quad { \text{ in } }\,(a,b),\\ u=\alpha &\quad { \text{ in } }\,[a-r,a],\\ u=\beta &\quad { \text{ in } }\,[b,b+r]. \end{array}\right. \end{aligned}$$
(1.23)

In this setting, we provide basic existence, uniqueness and regularity properties of the solutions of (1.23). We start by showing that there exists a unique solution to (1.23), according to the following result:

Theorem 1.9

(Dirichlet problem for \(D_r\)) The system in (1.23) has a unique solution u (up to sets of zero measure), which is given by the function

$$\begin{aligned} u(x) := \left\{ \begin{array}{ll} \alpha (x) & \quad { \text{ if } }\, x\in [a-r,a],\\ \begin{array}{ll} \displaystyle \frac{{\overline{k}}(x)}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg (\alpha (x-{\underline{k}} (x)r)-r^2\, \displaystyle \sum _{j=1}^{{\underline{k}}(x)-1} j f\big (x-({\underline{k}}(x)-j)r\big )\Bigg ) \\ + \displaystyle \frac{{\underline{k}}(x)}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg (\beta (x+{\underline{k}} (x)r)-r^2 \,\displaystyle \sum _{j=1}^{{\overline{k}}(x)-1} j f\big (x+({\overline{k}}(x)-j)r\big ) \Bigg ) \\ -r^2\displaystyle \frac{{\underline{k}}(x){\overline{k}}(x)}{{\overline{k}}(x)+{\underline{k}}(x)} \,f(x) \end{array} &\quad { \text{ if } }\,x\in (a,b),\\ \beta (x) & \quad { \text{ if } }\,x\in [b,b+r], \end{array}\right. \end{aligned}$$
(1.24)

where

$$\begin{aligned} {\overline{k}}(x):=\left\lceil \frac{b-x}{r}\right\rceil \qquad {\text{ and }}\quad {\underline{k}}(x):=\left\lceil \frac{x-a}{r}\right\rceil . \end{aligned}$$
(1.25)

A useful tool towards the proof of the uniqueness result in Theorem 1.9 consists in a suitable Maximum Principle for the operator \(D_r\) (which will be presented in Lemma 8.1).

We analyze now the regularity of the solution to (1.23). In particular, we obtain a uniform bound on the solution in terms of the external data \(\alpha \) and \(\beta \), and of the source function f. Then, we bound the possible jumps of the solution by a quantity that depends on r, \(\alpha \), \(\beta \) and f (and which becomes small as \(r\searrow 0\)).

Corollary 1.10

(Continuity and jump bounds for the Dirichlet problem for \(D_r\)) Let \(\alpha \in C([a-r,a])\), \(\beta \in C([b,b+r])\), and \(f\in C([a,b])\), and let u be the solution to (1.23).

Then, \(u\in L^\infty ([a-r,b+r])\), with

$$\begin{aligned} \Vert u\Vert _{ L^\infty ([a-r,b+r]) }\leqslant \Vert \alpha \Vert _{ L^\infty ([a-r,a]) } +\mathop {\mathop {\sup }\limits _{{p\in [a-r,a]}}}\limits _{q\in [b,b+r]}|\alpha (p)-\beta (q)|+\big ((b-a)^2+r^2\big )\,\Vert f\Vert _{L^\infty ([a,b])}. \end{aligned}$$
(1.26)

Also, we have that \(u\in C([a-r,b+r]\setminus {\mathcal {J}})\), where

$$\begin{aligned} {\mathcal {J}}:= (a+r{\mathbb {N}})\cup (b-r{\mathbb {N}}). \end{aligned}$$

Moreover, at any points of \({\mathcal {J}}\), the function u jumps by at most

$$\begin{aligned} \sup _{[a-r,a]}\alpha -\inf _{[a-r,a]}\alpha + \frac{r}{b-a}\mathop {\mathop {\sup }\limits _{{p\in [a-r,a]}}}\limits _{q\in [b,b+r]}|\alpha (p)-\beta (q)|+ \frac{Cr}{b-a}\,\big ( (b-a)^2+r^2\big )\,\Vert f\Vert _{L^\infty ([a,b])} \end{aligned}$$
(1.27)

for some \(C>0\) depending on abr.

It is interesting to observe that the jump bound in (1.27) improves as \(r\searrow 0\) and in fact it recovers continuity in the limit (and this fact can be also compared with the asymptotic result of Proposition 1.5). As a counterpart of this observation, we stress that the Dirichlet problem run by the operator \(D_r\) does exhibit, in general, discontinuous solutions:

Corollary 1.11

(Lack of regularity and discontinuity of the solutions of the Dirichlet problem) Fix \(n\in {\mathbb {N}}\), with \(n>1\). The solution of the Dirichlet problem (1.23) with \(r:=1/n\), \(\alpha :=0\), \(\beta := 1\), \(f:= 0\), \(a:=0\) and \(b:=1\) is discontinuous.

The discontinuous example in Corollary 1.11 can be seen as a natural counterpart in the setting of the Dirichlet problem (1.23) of the phenomenon discussed in Theorem 1.6 in the case of global heteroclinics.

Plan of the paper The rest of this paper is organized as follows. Section 2 contains the construction of a local minimizer to (1.8) which connects monotonically \(-1\) and 1, that is the proof of Theorem 1.1. This construction is obtained by approximation, by solving suitable Dirichlet problems. In Sect. 3 we prove that every local minimizer to (1.8) which connects the two variationally stable equilibria is monotone, namely Theorem 1.3. Section 4 is devoted to the proof of Theorem 1.4. This is obtained by introducing a new functional \({\mathcal {F}}\), which coincides with \({\mathcal {E}}\) on monotone functions.

The asymptotics as \(r\searrow 0\) is discussed in Sect. 5, which contains the proof of Proposition 1.5. Then, Sect. 6 contains the proofs of Theorem 1.6, Proposition 1.7, and Corollary 1.8, so in particular it contains the analysis of the discrete version of the Euler–Lagrange equation (1.15), and the nonuniqueness issues described in Proposition 1.7 and Corollary 1.8 are discussed in Sect. 7.

Finally, in Sect. 8 we consider the Dirichlet problem for \(D_r\), and we present the proofs of Theorem 1.9, and of Corollaries 1.10 and 1.11.

Notation In the \(\sup \), \(\inf \), \(\limsup \) and \(\liminf \) notation, we mean the “essential supremum and infimum” of the function (i.e., sets of null measure are neglected) and the essential superior and inferior limit of a function at a point. Moreover, we shall identify a set \(E\subseteq {\mathbb {R}}^n\) with its points of density one, and \(\partial E\) with the topological boundary of the set of points of density one.

For \(x\in {\mathbb {R}}\), we will denote with \(\left\lceil x\right\rceil \) (resp. \(\left\lfloor x\right\rfloor \)) the smallest integer z such that \(x\leqslant z\) (the biggest integer z such that \(x\geqslant z\)) that is

$$\begin{aligned} \left\lceil x\right\rceil :=\min \{z\in {\mathbb {Z}}\,\,{ \text{ s.t. } }\,\, x\leqslant z\}\qquad ({\text {resp.}}\,\left\lfloor x\right\rfloor :=\max \{z\in {\mathbb {Z}}\,{ \text{ s.t. } } \,x\geqslant z\}). \end{aligned}$$

Finally for any \(u:I\subset {\mathbb {R}}\rightarrow {\mathbb {R}}\) monotone function, we will always identify u with its right continuous representative.

2 Existence of minimal heteroclinic connections, and proofs of Theorem 1.1 and Proposition 1.2

The construction of the local minimizer given by Theorem 1.1 will be obtained by approximations, using solutions to appropriate Dirichlet problems.

To this end, we fix \(R>2r\) and consider the minimization problem

$$\begin{aligned} &\inf \Big \{ {\mathcal {E}}_{(-R,R)} (u) \,\,{ \text{ s.t. } }\,\, u\in L^{\infty }({\mathbb {R}}), \, u(x)=1 \, {\text{ for }}\,\, {\text{ a.e. }}\,\, \\ &\quad x\geqslant R-r \,{\text{ and }} \,u(x)=-1\, {\text{ for }}\,{ \text{ a.e. }}\, x\leqslant -R+r\Big \}. \end{aligned}$$
(2.1)

To prove that (2.1) admits a minimum, we will use standard direct method in the calculus of variations. First of all, though, we need to restrict the space of competitors to gain some more compactness. Namely, we prove that we can consider monotone nondecreasing competitors, as stated in the following result:

Lemma 2.1

Assume that (1.9) holds true. Let \(R>2r\) and \(v\in L^{\infty }({\mathbb {R}})\), with \( v(x)=1\) for a.e. \(x\geqslant R-r\) and \(v(x)=-1\) for a.e. \(x\leqslant -R+r\).

Then, there exists a monotone nondecreasing function \(\tilde{v}\) such that \(\tilde{v}=v\) in \((-\infty , -R+r)\cup (R-r, +\infty )\) and

$$\begin{aligned} {\mathcal {E}}_{(-R,R)} (\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)} (v). \end{aligned}$$

Proof

We first prove that it is enough to consider competitors v taking values in \([-1,1]\). For this, we claim that

$$\begin{aligned} {\mathcal {E}}_{(-R,R)}\big (\max \{-1, \min \{1, v\}\}\big )\leqslant {\mathcal {E}}_{(-R,R)}(v). \end{aligned}$$
(2.2)

To prove (2.2), we observe that, by definition, for every \(c\in {\mathbb {R}}\) and \(x\in {\mathbb {R}}\),

$$\begin{aligned} {\underset{(x-r,x+r)}{{\text {osc}}}}\, u= {\underset{(x-r,x+r)}{{\text {osc}}}}\, \min \{u,c\}+{\underset{(x-r,x+r)}{{\text {osc}}}}\, \max \{u,c\}.\end{aligned}$$
(2.3)

Then, given v as in the statement of Lemma 2.1, by (2.3) we get that for all \(x\in {\mathbb {R}}\)

$$\begin{aligned} {\underset{(x-r,x+r)}{{\text {osc}}}}\, \max \{-1, \min \{1, v\}\}\leqslant {\underset{(x-r,x+r)}{{\text {osc}}}}\, v.\end{aligned}$$
(2.4)

Moreover, by the hypothesis on W in (1.9), we have that

$$\begin{aligned} \int _{-R}^{R} W\big ( \max \{-1, \min \{1, v\}\}(x)\big )\,{\mathrm{d}}x \leqslant \int _{-R}^{R} W(v(x))\,{\mathrm{d}}x. \end{aligned}$$
(2.5)

Hence, (2.2) follows from (1.8), (2.4), and (2.5).

Now, if v is monotone nondecreasing, the proof of Lemma 2.1 is completed by taking \(\tilde{v}:=v\).

Hence, we suppose that v is not monotone nondecreasing, and we provide a method to modify v in \([-R+r,R-r]\) in order to get a monotone nondecreasing function \(\tilde{v}\) with lower energy, as desired.

Since v is not monotone nondecreasing, there exist a, \(b\in {\mathbb {R}}\) such that

$$\begin{aligned} a<b,\qquad B:=\liminf _{x\rightarrow b}v(x)<\limsup _{x\rightarrow a}v(x)=:A \quad {\text{ and }}\quad B\leqslant v(x)\leqslant A \quad {\text{ for }}\,{\text{ a.e. }}\, x\in [a,b]. \end{aligned}$$
(2.6)

The idea is to consider all possible quadruples as in (2.6), by substituting v with a function \(\tilde{v}\) which coincides with v outside \([-R+r, R-r]\) and has lower energy than v, and this will imply the thesis of Lemma 2.1. The precise details go as follows.

If \(A=1\), we define

$$\begin{aligned} \tilde{v}(x):= {\left\{ \begin{array}{ll} 1=\max \{v(x), 1\} &\quad {\text{ if }}\, a\leqslant x\leqslant R-r,\\ v(x) &\quad {\text{ otherwise }}. \end{array}\right. } \end{aligned}$$
(2.7)

Using (2.3) and the first assumption on W in (1.9), we conclude that

$${\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v).$$

Similarly, if \(B=-1\), we define

$$\begin{aligned} \tilde{v}(x):= {\left\{ \begin{array}{ll} -1=\min \{v(x),-1\} &\quad { \text{ if } }\, -R+r\leqslant x< b,\\ v(x) & \quad {\text{ otherwise }},\end{array}\right. } \end{aligned}$$
(2.8)

and we get that

$$\begin{aligned} {\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v). \end{aligned}$$

As a consequence, from now on we assume that \(-1<B<A<1\). We define

$$\begin{aligned} B_0:=\inf _{x\geqslant a} \liminf _{y\rightarrow x} v(y). \end{aligned}$$

Observe that \(B_0\leqslant B\) and \(v(x)\geqslant B_0\) for all \(x\geqslant a\).

If \(B_0=B\), we set \(b_0=b\). If \(B_0<B\), then let \(\eta _j\) such that \(v(\eta _j)\rightarrow B_0\). Then up to extracting a subsequence, we get that \(\eta _j\rightarrow b_0\), for some \(b_0\in {\mathbb {R}}\). In this case, due to (2.6), we have that \(b_0>b>a\).

We also notice that \(B_0>-1\), otherwise, if \(B_0=-1\), we argue as before, defining \(\tilde{v}\) as in (2.8) with \(b_0\) in place of b, and obtaining that \( {\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\).

Now, if \(A+B_0\geqslant 0\), then since \(A>B_0\), by assumption (1.9), we get that \(W(t)\geqslant W(A)\) for all \(t\in [B_0,A]\). We define

$$\begin{aligned} \tilde{v}(x)= {\left\{ \begin{array}{ll} \max \{v(x), A\} &\quad { \text{ if } }\, a\leqslant x\leqslant R-r,\\ v(x) &\quad {\text{ otherwise }},\\ \end{array}\right. } \end{aligned}$$

and, recalling that \(v(x)\geqslant B_0\) for all \(x\geqslant a\), we conclude that \({\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\).

Hence, we suppose that \(A+B_0<0\), and we define

$$\begin{aligned} A_0:=\sup _{x\leqslant b_0} \limsup _{y\rightarrow x} v(y). \end{aligned}$$

Observe that \(A_0\geqslant A\), and \(v(x)\leqslant A_0\) for all \(x\leqslant b_0\).

If \(A_0=A\), since \(A+B_0<0\), we have that \(W(t)\geqslant W(B_0)\) for all \(t\in [B_0,A]\). So, we define

$$\begin{aligned} \tilde{v}(x)= {\left\{ \begin{array}{ll} \min \{v(x), B_0\} &\quad { \text{ if } }\, -R+r\leqslant x<b_0,\\ v(x) &\quad {\text{ otherwise }},\end{array}\right. } \end{aligned}$$

and, recalling that \(v(x)\leqslant A_0=A\) for all \(x\leqslant b_0\), we conclude that \({\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\).

Assume now that \(A_0>A\). Let \(\eta _j\) such that \(v(\eta _j)\rightarrow A_0\). Then up to extracting a subsequence, we get that \(\eta _j\rightarrow a_0\), for some \(a_0<b_0\).

We observe that if \(A_0=1\), we argue as before, defining \(\tilde{v}= 1\) as in (2.7) with \(a_0\) in place of a, and we conclude that \({\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\).

Now we iterate this procedure, setting

$$\begin{aligned} B_1:=\inf _{x\geqslant a_0} \liminf _{y\rightarrow x} v(y), \end{aligned}$$

and noticing that \(B_1\leqslant B_0\) and \(v(x)\geqslant B_1\) for all \(x\geqslant a_0\).

If \(B_0=B_1\), we consider two cases: either \(A_0+B_0\leqslant 0\) or \(A_0+B_0> 0\). If \(A_0+B_0\leqslant 0\), we define \(\tilde{v}\) as in (2.8) with \(b_0\) in place of b, and we conclude again that \({\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\). If instead \(A_0+B_0> 0\), we set \(\tilde{v}\) as in (2.7) with \(a_0\) in place of a, obtaining that \({\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\).

So, we are left with the case \(B_1<B_0\). The possibility that \(B_1=-1\) can be dealt with as before. Hence, if \(B_1>-1\), we define \(b_1\) such that

$$\begin{aligned} \liminf _{y\rightarrow b_1} v(y)=B_1. \end{aligned}$$

Observe that necessarily \(a_0<b_1<a<b_0\). So if \(x\geqslant a_0\) we have that \(v(x)\geqslant B_1\) and if \(x\leqslant b_1\) we have that \(v(x)\geqslant A_1\). As above, we separate two cases, namely we consider the case in which \(A_0+B_1\leqslant 0\) and the one in which \(A_0+B_1> 0\). In the first case, we define \(\tilde{v}\) as in (2.8) with \(b_1\) in place of b, while in the second case we set \(\tilde{v}\) as in (2.7) with \(a_0\) in place of a. In both cases, we obtain that \( {\mathcal {E}}_{(-R,R)}(\tilde{v})\leqslant {\mathcal {E}}_{(-R,R)}(v)\).

These observations took into account all possible cases given by (2.6), and so the proof of Lemma 2.1 is complete. □

With the aid of Lemma 2.1, we can prove existence of a solution to the minimization problem in (2.1).

Proposition 2.2

For every \(R>2r+1\), there exists \(u_R\in L^\infty ({\mathbb {R}})\) solution of the minimization problem in (2.1). Moreover, \(u_R\) is monotone nondecreasing.

In addition,

$$\begin{aligned} {\mathcal {E}}_{(-R, R)}(u_R)\leqslant \min \left\{ \frac{4}{r}, 4+c_W\right\} \end{aligned}$$
(2.9)

where \(c_W\) is as in (1.10).

Proof

In light of Lemma 2.1, the minimization problem in (2.1) is equivalent to the following minimization problem

$$\begin{aligned} \inf _{v\in {\mathcal {M}}_R} {\mathcal {E}}_{(-R, R)}(v), \end{aligned}$$
(2.10)

where

$$\begin{aligned} \begin{aligned} {\mathcal {M}}_R :=\,&\big \{v\in L^\infty ({\mathbb {R}})\,{\text{ s.t. }}v\,{\hbox {is}}\,{\hbox {monotone}}\, {\hbox {nondecreasing,}}\\&\quad v(x)=1\,\, { \text{ for }}\,{\text {a.e.}}\, x\geqslant R-r\, { \text{ and } }\, v(x)=-1\ {\text{ for }}\,{\text {a.e.}}\, x\leqslant -R+r\big \}. \end{aligned} \end{aligned}$$
(2.11)

We start proving (2.9). We consider the function \(v_{\pm 1}\in {\mathcal {M}}_R\) with \(v_{\pm 1}:=\pm 1\) in \((-R+r,R-r)\). Then, in view of the properties of W given in (1.9),

$$\begin{aligned} {\mathcal {E}}_{(-R, R)}(v_{\pm 1})= \frac{4}{r}, \end{aligned}$$

and this implies that

$$\begin{aligned} \inf _{v\in {\mathcal {M}}_R} {\mathcal {E}}_{(-R, R)}(v)\leqslant \frac{4}{r}. \end{aligned}$$
(2.12)

Furthermore, we let  \(\tilde{v} \in {\mathcal {M}}_R\) such that

$$\begin{aligned} \tilde{v}(x):= {\left\{ \begin{array}{ll} x+R-r-1 &\quad {\text{ for }}\,{\text {any }} \,x\in [-R+r, 2-R+r],\\ 1 & \quad {\text{ for }}\,{\text {any}}\, x\in [ 2-R+r, R-r]. \end{array}\right. } \end{aligned}$$
(2.13)

We note that \(2-R+r<R-r\), since \(R>1+r\). By (1.9) and (1.10), we get that

$$\begin{aligned} \int _{-R}^{R} W(\tilde{v}(x))\,{\mathrm{d}}x= \int _{-R}^{2-R+r} W(x+R-r-1)\,{\mathrm{d}}x = \int _{-1}^1 W(s)\, {{\mathrm{d}}}s=c_W. \end{aligned}$$
(2.14)

Since \(r\leqslant 1\) (and so in particular \(-R+2r\leqslant -R+2\)) and \(R>r+1\), we get

$$\begin{aligned}&\frac{1}{2r^2} \int _{-R}^R \Big ({\underset{(x-r,x+r)}\,{{\text {osc}}}}\, \tilde{v}\Big )^2\,{\mathrm{d}}x \\&\quad = \frac{1}{2r^2} \int _{-R}^{-R+2r} \big (\tilde{v}(x+r)+1\big )^2\, {\mathrm{d}}x + \frac{1}{2r^2} \int _{-R+2r}^{-R+2} \big (\tilde{v}(x+r)-\tilde{v}(x-r)\big )^2 \,{\mathrm{d}}x \nonumber \\&\qquad + \frac{1}{2r^2} \int _{-R+2}^{-R+2+2r} \big (1- \tilde{v}(x-r)\big )^2\, {\mathrm{d}}x \nonumber \\&\quad = \frac{1}{2r^2} \int _{0}^{2r} x^2 \,{\mathrm{d}}x+ \frac{1}{2r^2} \,4r^2(2-2r)+ \frac{1}{2r^2} \int _{0}^{2r}x^2\, {\mathrm{d}}x\nonumber \\&\quad =\frac{8}{3} r+ 4(1-r).\nonumber \end{aligned}$$
(2.15)

As a consequence of this and (2.14),

$$\begin{aligned} {\mathcal {E}}_{(-R,R)}(\tilde{v})= \frac{8}{3} r+ 4(1-r)+ c_W\leqslant 4+c_W. \end{aligned}$$

From this and (2.12), we obtain (2.9).

We show now that a minimizer \(u_R\) does exist. To this aim, we consider a minimizing sequence \(u_n\in {\mathcal {M}}_R\), and we have that \(u_n\) is uniformly bounded. Moreover, the sequence \(u_n\) has uniformly bounded variation (since it consists of equibounded monotone functions). By compact embeddings of \(BV(-R+r,R-r)\) in \(L^p(-R+r, R-r)\) for every \(p\geqslant 1\) (see [3, Corollary 3.49]), we obtain that, up to a subsequence, \(u_n\rightarrow u_R\) pointwise and in \(L^1(-R+r,R-r)\), as \(n\rightarrow +\infty \), for some \(u_R\in {\mathcal {M}}_R\).

Now, by the lower semicontinuity of the oscillation functional with respect to \(L^1\) convergence (see [7]), and the continuity of the potential term of the energy with respect to pointwise convergence, we conclude that \(u_R\) is a solution to (2.10), and therefore to (2.1). □

Now we are in the position of completing the proof of Theorem 1.1.

Proof of Theorem 1.1

For any \(R>2r+1\), we consider the solution \(u_R\) of (2.1) constructed in Proposition 2.2. We recall the notation in (2.11), and we observe that \(u_{R}\in {\mathcal {M}}_{R'}\), for any \(R'>R\). Hence, we obtain that

$$\begin{aligned} e_R:= {\mathcal {E}}_{(-R, R)}(u_R)={\mathcal {E}}_{(-R', R')}(u_R)\geqslant {\mathcal {E}}_{(-R', R')} (u_{R'})=:e_{R'}.\end{aligned}$$
(2.16)

Therefore, recalling also the uniform bound in (2.9), we conclude that

$$\begin{aligned} \lim _{R\rightarrow +\infty } e_R=\inf _{R>2r} e_R=:e\in \left[ 0, \min \left\{ \frac{4}{r},4+c_W\right\} \right] . \end{aligned}$$
(2.17)

Now, up to a translation, we can assume that, for all \(R>2r+1\), \(u_R(x)<0\) for any \(x<0\) and \(u_R(x)\geqslant 0\) for any \(x\geqslant 0\). Moreover, we observe that the sequence \(u_R\) is equibounded, and has equibounded total variation, since the functions \(u_R\) are all monotone. Thus, by compactness theorem (see [3, Corollary 3.49]) we get that, up to extracting a subsequence, \(u_R\rightarrow u\) pointwise and locally in \(L^p\) for every \(p\geqslant 1\), as \(R\rightarrow +\infty \). We point out that

$$\begin{aligned} {\text{ the }}\,{\text {limit}}\,{\text {function}}\,u\in L^\infty ({\mathbb {R}}),\,{\hbox {with}}\, |u|\leqslant 1,\,{\hbox {it}}\,{\hbox {is}}\, {\hbox {monotone}}\,{\hbox {nondecreasing}}\,{\hbox {and}}\,{\hbox {satisfies}}\,(1.11). \end{aligned}$$
(2.18)

Now, we set

$$\begin{aligned} {\mathcal {E}}(v):=\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x+ \int _{{\mathbb {R}}} W(v(x))\,{\mathrm{d}}x, \end{aligned}$$

we recall (2.17) and we claim that

$$\begin{aligned} e={\mathcal {E}}(u). \end{aligned}$$
(2.19)

For this, we fix \(M>0\). Then, by the lower semicontinuity of the oscillation part of the functional with respect to \(L^1\) convergence and the continuity of the potential part with respect to the pointwise convergence, we get

$$\begin{aligned} 0&\leqslant {\mathcal {E}}_{(-M,M)} (u)\\&= \frac{1}{2r^2}\int _{-M}^M \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\, {\mathrm{d}}x+\int _{-M}^{M} W(u(x))\,{\mathrm{d}}x\\&\leqslant \liminf _{R\rightarrow +\infty } \left[ \frac{1}{2r^2}\int _{-M}^M \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R\right) ^2\, {\mathrm{d}}x +\int _{-M}^{M} W(u_R(x))\,{\mathrm{d}}x\right] \\&\leqslant \liminf _{R\rightarrow +\infty }\left[ \frac{1}{2r^2}\int _{\mathbb {R}} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R\right) ^2+\, {\mathrm{d}}x+\int _{\mathbb {R}} W(u_R(x))\,{\mathrm{d}}x\right] \\&= \lim _{R\rightarrow +\infty } e_R= e, \end{aligned}$$

where we used the notation in (2.16). Consequently, since \({\mathcal {E}}_{(-M,M)} (u)\) is monotone nondecreasing in M, sending \(M\rightarrow +\infty \), we conclude that

$$\begin{aligned} 0\leqslant {\mathcal {E}}(u) \leqslant e. \end{aligned}$$
(2.20)

Now, for any \(v\in L^\infty ({\mathbb {R}})\) such that v is monotone nondecreasing and

$$\begin{aligned} -1\leqslant v\leqslant 1,\quad \lim _{x\rightarrow \pm \infty }v(x)=\pm 1,\quad {\text{ and }}\quad {\mathcal {E}}(v)<+\infty . \end{aligned}$$
(2.21)

and for any \(M>0\), we define the function

$$\begin{aligned} v^M(x)= {\left\{ \begin{array}{ll} v(x), &\quad { \text{ if } }\, x\in (-M+r,M-r),\\ 1, &\quad { \text{ if } }\, x\geqslant M-r,\\ -1, & \quad { \text{ if } }\, x\leqslant -M+r.\end{array}\right. } \end{aligned}$$
(2.22)

We claim that

$$\begin{aligned} \lim _{M\rightarrow +\infty } {\mathcal {E}}(v^M)={\mathcal {E}}(v). \end{aligned}$$
(2.23)

For this, we fix \(\varepsilon >0\) and we take M sufficiently large such that

$$\begin{aligned} |v(x)- 1|+|v(y)+1|\leqslant \varepsilon , \quad {\text{ for }}\,{\text {any}}\, x\in [M-3r,+\infty ) \quad {\text{ and }}\,{\text {for}}\,{\text {any}}\,y\in (-\infty ,-M+3r], \end{aligned}$$

in light of (2.21). This gives that, for any \(x\in (-\infty ,-M+2r]\cup [M-2r,+\infty )\),

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\leqslant 2\varepsilon , \end{aligned}$$

and so, for any \(x\in (-\infty ,-M+2r]\cup [M-2r,+\infty )\),

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\leqslant 2\varepsilon . \end{aligned}$$
(2.24)

Also,

$$\begin{aligned}&\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\right) ^2\,{\mathrm{d}}x\\&\quad = \frac{1}{2r^2}\int _{-M+2r}^{M-2r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\right) ^2\,{\mathrm{d}}x+ \frac{1}{2r^2}\int _{M-2r}^{+\infty } \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\right) ^2\,{\mathrm{d}}x +\frac{1}{2r^2}\int _{-\infty }^{-M+2r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\right) ^2\,{\mathrm{d}}x\\&\quad = \frac{1}{2r^2}\int _{-M+2r}^{M-2r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x+ \frac{1}{2r^2}\int _{M-2r}^{M} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\right) ^2\,{\mathrm{d}}x +\frac{1}{2r^2}\int _{-M}^{-M+2r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v^M\right) ^2\,{\mathrm{d}}x. \end{aligned}$$

Therefore, using (2.24),

$$\begin{aligned}\begin{aligned}&\left| \frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}} \,v^M\right) ^2\,{\mathrm{d}}x -\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x\right| \\ &\quad\leqslant \;\left| \frac{1}{2r^2}\int _{-M+2r}^{M-2r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x -\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x\right| + \frac{8\varepsilon ^2}{r}. \end{aligned}\end{aligned}$$

As a consequence,

$$\begin{aligned}&\left| {\mathcal {E}}(v^M)-{\mathcal {E}}(v)\right| \\&\quad \leqslant \left| \frac{1}{2r^2}\int _{-M+r}^{M-r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x -\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}} \,v\right) ^2\,{\mathrm{d}}x\right| + \frac{8\varepsilon ^2}{r}\\&\qquad + \left| \int _{\mathbb {R}} W(v^M(x))\,{\mathrm{d}}x - \int _{\mathbb {R}} W(v(x))\,{\mathrm{d}}x\right| \\&\quad \leqslant \left| \frac{1}{2r^2}\int _{-M+2r}^{M-2r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x -\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x\right| + \frac{8\varepsilon ^2}{r}\\&\qquad +\left| \int _{-M}^{M} W(v^M(x))\,{\mathrm{d}}x - \int _{\mathbb {R}} W(v(x))\,{\mathrm{d}}x\right| , \end{aligned}$$

which implies the desired result in (2.23) sending \(\varepsilon \rightarrow 0\) and \(M\rightarrow +\infty \).

From (2.23), we have that for any \(\varepsilon >0\) there exists \(M(\varepsilon , v)\) such that

$$\begin{aligned} {\mathcal {E}}(v)\geqslant {\mathcal {E}}(v^M)-\varepsilon \qquad { \text{ for }}\, {\text{ all } }\, M\geqslant M(\varepsilon , v). \end{aligned}$$
(2.25)

We also observe that \(v^M\in {\mathcal {M}}_M\), and therefore, by the minimality of \(u_M\) and using (2.25), (2.16) and (2.17), we obtain that

$$\begin{aligned} {\mathcal {E}}(v)\geqslant {\mathcal {E}}(v^M)-\varepsilon \geqslant {\mathcal {E}}_{(-M,M)}(v^M)-\varepsilon \geqslant {\mathcal {E}}_{(-M,M)}(u_M)-\varepsilon =e_M-\varepsilon \geqslant e-\varepsilon . \end{aligned}$$

By the arbitrariness of \(\varepsilon \), we conclude that 

$$\begin{aligned} {\mathcal {E}}(v)\geqslant e. \end{aligned}$$
(2.26)

Now we observe that u satisfies (2.21), in view of (2.18) and (2.20), and so we can take \(v:=u\), obtaining that \({\mathcal {E}}(u)\geqslant e\). This and (2.20) give the claim in (2.19). Moreover, (2.26) and (2.19) imply directly (1.12).

In order to complete the proof of Theorem 1.1, it only remains to show that

$$\begin{aligned} u\, {\text{ is }}\, {\text {a}}\, {\text {local}}\, {\text {minimizer}}\, {\text {for}}\, {\text {the}}\, {\text {functional}}\,{\text {in}}\,(1.8). \end{aligned}$$
(2.27)

To this end, we argue towards a contradiction, assuming that there exist \(M_0>0\), a function \(v\in L^{\infty }({\mathbb {R}})\) such that

$$\begin{aligned} v=u\,{\text{ outside }}\, [-M_0+r,M_0-r], \end{aligned}$$
(2.28)

and \(\varepsilon >0\) such that

$$\begin{aligned} {\mathcal {E}}_{(-M_0, M_0)}(v)\leqslant {\mathcal {E}}_{(-M_0, M_0)}(u)- 2\varepsilon . \end{aligned}$$
(2.29)

Also, recalling (2.17) and (2.19), and using (2.25) (with \(v:=u\) and \(v^M:=u^M\) defined in (2.22)), we get that there exists \(M_1>2r\) such that for all \(M\geqslant M_1\),

$$\begin{aligned} e_M\geqslant e={\mathcal {E}}(u)\geqslant {\mathcal {E}}(u^M)-\varepsilon . \end{aligned}$$
(2.30)

Now we take \(M>\max \{M_1,M_0+r\}\) and we consider \(v^{M}\) as given in (2.22). Then, we get from (2.28) and (2.29) that

$$\begin{aligned} {\mathcal {E}}_{(-M, M)}(v^{M})\leqslant {\mathcal {E}}_{(-M, M)}(u^{M})-2\varepsilon . \end{aligned}$$

Consequently, recalling also (2.30) and the notation in (2.16), we conclude that

$$\begin{aligned} {\mathcal {E}}_{(-M, M)}(v^{M})\leqslant {\mathcal {E}}_{(-M, M)}(u^{M})- 2\varepsilon \leqslant {\mathcal {E}}(u^M)-2\varepsilon \leqslant {\mathcal {E}}(u)-\varepsilon \leqslant e_M-\varepsilon = {\mathcal {E}}_{(-M,M)}(u_M)-\varepsilon . \end{aligned}$$
(2.31)

Now from Lemma 2.1 we know that there exists a monotone nondecreasing function \(\tilde{v}^M\) such that \(\tilde{v}^M=v^M\) in \((-\infty , -M+r)\cup (M-r,+\infty )\) such that

$$\begin{aligned} {\mathcal {E}}_{(-M,M)}(\tilde{v}^M)\leqslant {\mathcal {E}}_{(-M,M)}({v}^M). \end{aligned}$$

Furthermore, the function \(\tilde{v}^M\) belongs to \({\mathcal {M}}_M\) (recall the definition of this space in (2.11)). As a consequence of this observation and of (2.31), we find that

$$\begin{aligned} {\mathcal {E}}_{(-M,M)}(\tilde{v}^M)\leqslant {\mathcal {E}}_{(-M,M)}(u_M)-\varepsilon , \end{aligned}$$

which is in contradiction with the minimality of \(u_M\). This concludes the proof of Theorem 1.1. □

We conclude the section proving Proposition 1.2.

Proof of Proposition 1.2

In light of (1.14), to prove the statement, it is sufficient to construct a function \(v:{\mathbb {R}}\rightarrow {\mathbb {R}}\), which is monotone nondecreasing and satisfies (1.11) and such that

$$\begin{aligned} {\mathcal {E}}(v)<\frac{4}{r}={\mathcal {E}}(u_0). \end{aligned}$$

To this end, we observe that, if \(r<\frac{4}{4+c_W}\), then

$$\begin{aligned} 4+c_W<\frac{4}{r}, \end{aligned}$$

and therefore the first case in the statement is a consequence of (1.12).

Hence we now focus on the case in which W is differentiable in \(\pm 1\). For any \(\varepsilon >0\), we consider the function

$$\begin{aligned} v_\varepsilon (x):= {\left\{ \begin{array}{ll} -1 &\quad { \text{ if } }\,x<0,\\ 1-\varepsilon &\quad { \text{ if } }\, 0<x<2r, \\ 1 &\quad { \text{ if } }\,x>2r.\end{array}\right. } \end{aligned}$$

Then

$$\begin{aligned} {\mathcal {E}}(v_\varepsilon )= \int _{-r}^r \frac{(2-\varepsilon )^2}{2r^2}\, {\mathrm{d}}s +\int _{r}^{3r} \frac{\varepsilon ^2}{2r^2}\,{\mathrm{d}}s +\int _0^{2r} W(1-\varepsilon )\, {\mathrm{d}}s= \frac{4}{r}+\varepsilon \left( \frac{2\varepsilon }{r}-\frac{4}{r}+2r\frac{W(1-\varepsilon )}{\varepsilon }\right) . \end{aligned}$$

Since W is differentiable in 1, recalling that \(W(1)=0=W'(1)\) (thanks to (1.9)), we get that

$$\begin{aligned}\lim _{\varepsilon \rightarrow 0}\left( \frac{2\varepsilon }{r}-\frac{4}{r}+2r\frac{W(1-\varepsilon )-W(1)}{\varepsilon }\right) = -\frac{4}{r}<0, \end{aligned}$$

and therefore there exists \(\varepsilon _0=\varepsilon _0(r)\) such that for all \(0<\varepsilon <\varepsilon _0\) we get that

$$\begin{aligned} {\mathcal {E}}(v_\varepsilon )=\frac{4}{r}+\varepsilon \left( \frac{2\varepsilon }{r} -\frac{4}{r}+2r\frac{W(1-\varepsilon )-W(1)}{\varepsilon }\right) <\frac{4}{r}={\mathcal {E}}(u_0). \end{aligned}$$

This completes the proof of Proposition 1.2. □

3 Rigidity results for minimal heteroclinic connections, and proof of Theorem 1.3

We divide the proof of Theorem 1.3 in several steps. From now on, we assume that u is as in the statement of Theorem 1.3.

Step 1: bounds on u, namely \(|u|\leqslant 1\).

We fix \(\delta >0\) and we show that

$$\begin{aligned} u\leqslant 1+\delta \quad {\text{(up }}\,{\text {to}}\, {\text {null}}\, {\text {measure}}\, {\text {sets).}} \end{aligned}$$
(3.1)

To this end, we argue by contradiction and assume, for instance, that the set \(\{u>1+\delta \}\) has positive measure. Let \(v:=\min \{u,1+\delta \}\). By (1.11), we know that there exist \(\alpha _0\), \(\beta _0\in {\mathbb {R}}\) such that \(u\leqslant 0\) in \((-\infty ,\alpha _0]\) and \(|u-1|\leqslant \frac{\delta }{2}\) in \([\beta _0,+\infty )\). In particular, if \(\alpha :=\alpha _0-r\) and \(x\in (-\infty ,\alpha +r)\), we have that \(u(x)\leqslant 0\) and so \(u(x)=v(x)\). Also, if \(\beta :=\beta _0+r\) and \(x\in (\beta -r,+\infty )\), then \(u(x)\leqslant 1+\frac{\delta }{2}\) and so \(u(x)=v(x)\). These considerations give that

$$\begin{aligned} u=v\,{ \text{ outside } }\,[\alpha +r,\beta -r] \end{aligned}$$
(3.2)

and so, by minimality,

$$\begin{aligned} \begin{aligned} 0\,&\leqslant {\mathcal {E}}_{(\alpha ,\beta )}(v)-{\mathcal {E}}_{(\alpha ,\beta )}(u) \\&=\frac{1}{2r^2}\int _\alpha ^\beta \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\right) ^2\,{\mathrm{d}}x -\frac{1}{2r^2}\int _\alpha ^\beta \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x\\&\quad +\int _{(\alpha +r,\beta -r)\cap \{u>1+\delta \}} \Big ( W(1+\delta )-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned} \end{aligned}$$
(3.3)

We also remark that, by (2.3), for any \(x\in {\mathbb {R}}\),

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u. \end{aligned}$$
(3.4)

Then, by (3.3) and (3.4),

$$\begin{aligned} 0\leqslant \int _{(\alpha +r,\beta -r)\cap \{u>1+\delta \}} \Big ( W(1+\delta )-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned}$$

Recalling the assumptions on W in (1.9), we conclude that \((\alpha +r,\beta -r)\cap \{u>1+\delta \}\) must have zero Lebesgue measure. Also, by (3.2), we have that \(u=v\leqslant 1-\delta \) outside \([\alpha +r,\beta -r]\). We thereby obtain that \(\{u>1+\delta \}\) has zero Lebesgue measure, which proves (3.1). Then, since \(\delta \) can be taken arbitrarily close to zero in (3.1), we infer that \(u\leqslant 1\).

In a similar manner, one shows that \(u\geqslant -1\), and then the claim follows, as desired.

Step 2: u has finite global energy.

Namely, we show here that

$$\begin{aligned} {\mathcal {E}}(u):=\frac{1}{2r^2}\int _{\mathbb {R}}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x+\int _{\mathbb {R}} W(u(x))\,{\mathrm{d}}x<+\infty . \end{aligned}$$
(3.5)

For this, we fix \(R\geqslant 2(r+1)\) and let \(\xi _R\in C^\infty ({\mathbb {R}},[0,1])\), with \(\xi _R=1\) in \([-R+1,R-1]\), \(\xi _R=0\) in \((-\infty , -R]\cup [R, +\infty )\) and \(|\xi _R'|\leqslant 4\). Let \(u_R:=\xi _R+(1-\xi _R) u\). Notice that \(u_R=u\) outside \([-R,R]\), and so the minimality of u gives that

$$\begin{aligned} {\mathcal {E}}_{(-R-r,R+r)}(u)\leqslant {\mathcal {E}}_{(-R-r,R+r)}(u_R), \end{aligned}$$

namely

$$\begin{aligned} \begin{aligned}&\frac{1}{2r^2}\int _{-R-r}^{R+r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x +\int _{-R-2r}^{R+r} W(u(x))\,{\mathrm{d}}x \\&\quad \leqslant \frac{1}{2r^2}\int _{-R-r}^{R+r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R\right) ^2 \,{\mathrm{d}}x+\int _{-R-r}^{R+r} W(u_R(x)) \,{\mathrm{d}}x. \end{aligned} \end{aligned}$$
(3.6)

Now, if \(x\in ( -R+1+r,R-1-r)\), we have that \((x-r,x+r)\subseteq ( -R+1,R-1)\), where \(\xi _R=1\) and so \(u_R=1\). Consequently,

$$\begin{aligned} {\text{ for }}\, {\text{ any } }\,x\in ( -R+1+r,R-1-r),\,{\hbox {we}}\, {\hbox {have}}\, {\hbox {that }}\, {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R=0. \end{aligned}$$
(3.7)

On the other hand, by Step 1 and the definition of \(u_R\), we have that \(|u_R|\leqslant 1\), and therefore

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R\leqslant 2. \end{aligned}$$

Combining this and (3.7), we deduce that

$$\begin{aligned} \frac{1}{2r^2}\int _{-R-r}^{R+r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R\right) ^2\,{\mathrm{d}}x\leqslant \frac{1}{2r^2}\int _{\{|x|\in (R-1-r,R+r)\}} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_R\right) ^2\,{\mathrm{d}}x\leqslant \frac{4(1+2r)}{r^2}. \end{aligned}$$
(3.8)

Similarly, since \(u_R=1\) in \(( -R+1,R-1)\),

$$\begin{aligned} \int _{-R-r}^{R+r} W(u_R(x))\,{\mathrm{d}}x= \int _{\{|x|\in (R-1,R+r)\}} W(u_R(x))\,{\mathrm{d}}x\leqslant 2(1+r)\Vert W\Vert _{L^\infty ([-1,1])}. \end{aligned}$$

Then, we plug this information and (3.8) into (3.6) and we conclude that

$$\begin{aligned} \frac{1}{2r^2}\int _{-R-r}^{R+r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x +\int _{-R-r}^{R+r} W(u(x))\,{\mathrm{d}}x\leqslant \frac{4(1+2r)}{2r^2}+2(r+1)\Vert W\Vert _{L^\infty ([-1,1])}. \end{aligned}$$

By taking R as large as we wish, one deduces (3.5), as desired.

Step 3: monotonicity of u.

We suppose, by contradiction, that u is not monotone, and so in particular there exist a, \(b\in {\mathbb {R}}\) Lebesgue points for u such that

$$\begin{aligned} a<b\,\,\, {\text{ and }} \,\,\, -1<B=\liminf _{x\rightarrow b}u(x)<\limsup _{x\rightarrow a}u(x)=A<1. \end{aligned}$$
(3.9)

Our aim is to show that quadruples (abAB) which satisfy (3.9) cannot exist, due to minimality of u. The argument used here is very similar to the one used in the proof of Lemma 2.1.

First of all we claim the following: if quadruples (abAB) as in (3.9) do exist, then

$$\begin{aligned} {\text{ there }}\, {\text{ exists }}\, {\text{ at }}\,{ \text{ least }}\,{ \text{ one }}\,{ \text{ quadruple }}\, (a,b,A,B)\,{\hbox {as}}\,{\text {in}}\, (3.9)\, {\hbox {such}}\,{\text {that}}\, B<0. \end{aligned}$$
(3.10)

By contradiction, if it were not the case, we would let (abAB) any quadruple such that (3.9) holds, with

$$\begin{aligned} 1>A>B\geqslant 0. \end{aligned}$$
(3.11)

In particular, since (3.10) does not hold, necessarily

$$\begin{aligned} u(x)\geqslant 0\,\,{\text{ for }}\,{\text {almost}}\,{\text {every}}\,x\in [a, +\infty ). \end{aligned}$$
(3.12)

We also notice that, in light of (3.11), and recalling the assumptions in (1.9), we get that \(W(t)>W(A)\) for every \(t\in [0,A)\). Now, we define the function

$$\begin{aligned} v(x):={\left\{ \begin{array}{ll} u(x) &\quad { \text{ if } } \,x\leqslant a,\\ \max \{u(x), A\}& \quad { \text{ if } }\,x>a. \end{array}\right. } \end{aligned}$$
(3.13)

Since \(A<1\) and (1.11) holds true, we see that there exists \(c>a\) such that \(v(x)=u(x)\) on \([c, +\infty )\). Also, due to (2.3), we get that

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u \end{aligned}$$

for all x. Moreover, thanks to (3.12), we have that \(0\leqslant u(x)\leqslant v(x)=A<1\) for any \(x\in (a,c)\). Hence, by (1.9), we obtain that \(W(v(x))\leqslant W(u(x))\) for any \(x\in (a,c)\), with strict inequality on the set

$$\begin{aligned} \{x\in (a,c) \;{\text{ s.t. }}\; u(x)<A\} \end{aligned}$$

which has positive measure.

Collecting all these pieces of information, we conclude that

$$\begin{aligned} {\mathcal {E}}_{(a-r,c+r)}(v)<{\mathcal {E}}_{(a-r,c+r)}(u), \end{aligned}$$

and v is a competitor for u in \((a-r,c+r)\), since \(v=u\) on \((-\infty , a]\cup [c, +\infty )\). This is in contradiction with the minimality of u, and therefore (3.10) is established.

As a consequence, we fix now a quadruple \((a,b_0,A,B_0)\) as in (3.10), with \(-1<B_0<0\), and we define

$$\begin{aligned} A_0:=\sup _{x\leqslant b_0}\limsup _{y\rightarrow x} u(y). \end{aligned}$$
(3.14)

Then \(A_0\geqslant A>B_0\). By definition of \(A_0\) there exists a sequence \( \eta _{j}\in (-\infty ,b_0]\) with

$$\begin{aligned} u(\eta _{j})\rightarrow A_0\,{\hbox { as}}\,j\rightarrow +\infty . \end{aligned}$$

We observe that, since \(A_0>-1\) and (1.11) holds true, the sequence \(\eta _{j}\) is uniformly bounded; otherwise, passing to a subsequence, we would have \(\eta _j\rightarrow -\infty \) and \(u(\eta _j)\rightarrow -1\not =A_0\). So, passing to a subsequence, we define

$$\begin{aligned} a_0:=\lim _j \eta _j<b_0. \end{aligned}$$
(3.15)

We claim that

$$\begin{aligned} A_0<1. \end{aligned}$$
(3.16)

Not to interrupt this calculation, we postpone the proof of this claim, which is quite long, to Step 4.

We prove now that

$$\begin{aligned} A_0+ B_0>0. \end{aligned}$$
(3.17)

Assume on the contrary that \(A_0+B_0\leqslant 0\). If this is true, since \(-1<B_0\leqslant 0\) and \(B_0<A_0<1\), due to assumption (1.9), we get that \(W(t)>W(B_0)\) for all \(t\in (B_0, A_0)\). We define the function

$$\begin{aligned} v(x)={\left\{ \begin{array}{ll} u(x) &\quad {\text{ if }}\, x\geqslant b_0,\\ \min \{u(x), B_0\}&\quad {\text{ if }}\, x<b_0. \end{array}\right. } \end{aligned}$$
(3.18)

We observe that, since \(B_0>-1\) and (1.11) holds true, there exists \(c_0<0\) such that \(v(x)=u(x)\) on \((-\infty , c_0]\). Moreover, by the definition of \(A_0\) in (3.14), we get that \(u(x)\leqslant A_0\) for almost every \(x\leqslant b_0\). Therefore, as shown before, we get that \(W(v(x))\leqslant W(u(x))\) for any \(x\in (c_0, b_0)\), with strict inequality on the set

$$\begin{aligned} \{x\in (c_0, b_0)\;{ \text{ s.t. } }\; B_0< u(x)<A_0\} \end{aligned}$$

which has positive measure. Therefore \(v=u\) on \((-\infty , c_0]\cup [b_0, +\infty )\) and has strictly less potential energy in \((c_0-r,b_0+r)\). These observations contradict the minimality of u, and so (3.17) holds true.

We define now

$$\begin{aligned} B_1:=\inf _{x\geqslant a_0}\liminf _{y\rightarrow x} u(y)\leqslant B_0. \end{aligned}$$
(3.19)

We show that

$$\begin{aligned} B_1<B_0. \end{aligned}$$
(3.20)

Indeed, if this were not the case, then, in light of (3.19), we would have that \(B_1=B_0\) and \(u(x)\geqslant B_0\) for almost every \(x\geqslant a_0\). We note that since \(A_0+B_0>0\) by (3.17), and \(B_0<0\), then \(W(t)>W(A_0)\) for every \(t\in [B_0, A_0)\). We define the function v as in (3.13) with \(A_0\) in place of A and \(a_0\) in place of a. Again, since \(A_0<1\) by (3.16) and (1.11) holds true, we have that there exists \(c_1>a_0\) such that \(v(x)=u(x)\) on \([c_1, +\infty )\). Moreover, due to (2.3), we get that

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u \end{aligned}$$

for all x, and, as shown before, we see that \(W(v(x))\leqslant W(u(x))\) with strict inequality on the set

$$\begin{aligned} \{x\in (a,c)\, { \text{ s.t. } }\, u(x)<A_0\} \end{aligned}$$

which has positive measure. Therefore \(v=u\) on \((-\infty , a_0]\cup [c_1, +\infty )\) and has strictly less potential energy in \((a-r,c+r)\): by the minimality of u, we find that necessarily \(u=v\). Therefore (3.20) holds true.

Now, by the definition of \(B_1\) in (3.19), there exists a sequence \( \zeta _{j}\in [a_0, +\infty )\) with

$$\begin{aligned} u(\zeta _{j})\rightarrow B_1\,{\hbox {as}}\,j\rightarrow +\infty . \end{aligned}$$

We observe that, due to the fact that (1.11) holds and \(B_1<1\), the sequence \(\zeta _{j}\) is uniformly bounded, and passing to a subsequence, we define

$$\begin{aligned} b_1:=\lim _j \zeta _j>a_0. \end{aligned}$$

Following the same arguments as for the proof of (3.16), we can prove that

$$\begin{aligned} B_1>-1. \end{aligned}$$
(3.21)

See Step 5 for a brief sketch of this.

Next we observe that

$$\begin{aligned} A_0+B_1<0. \end{aligned}$$
(3.22)

Indeed, if this were not true, we could argue as in the proof of claim (3.20), define the function v as in (3.13) with \(A_0\) in place of A and \(a_0\) in place of a, and show that \(u=v\) outside a compact interval and moreover that v has strictly less energy of u, since \(u(x)\geqslant B_1\) for almost every \(x\geqslant a_0\), in contradiction with the minimality of u.

Then, we claim that

$$\begin{aligned} b_1>b_0. \end{aligned}$$
(3.23)

Indeed, if this were not the case, then \(a_0<b_1<b_0\), and in particular \(u(x)\leqslant A_0\) for every \(x\leqslant b_1\), and \(A_0+B_1<0\), by (3.22). Hence, we can proceed as in the proof of claim (3.17). That is, briefly, we define the function v as in (3.18) with \(B_1\) in place of \(B_0\) and \(b_1\) in place of \(b_0\), we show that \(u=v\) outside a compact interval and finally we prove that v has strictly less energy of u, since \(u(x)\leqslant A_0\) for almost every \(x\leqslant b_1\), in contradiction with the minimality of u.

Now we define

$$\begin{aligned} A_1:=\sup _{x\leqslant b_1}\limsup _{y\rightarrow x} u(y). \end{aligned}$$
(3.24)

Then \(A_1\geqslant A_0>B_1\). Also, we observe that \(A_1>A_0\), otherwise we could repeat exactly the same proof of claim (3.23) and obtain a contradiction to the minimality of u. Moreover, we see that \(A_1<1\) by using the same argument as for (3.16), see Step 4.

By definition of \(A_1\) in (3.24), there exists a sequence \( \eta _{j}\in (-\infty ,b_1]\) with

$$\begin{aligned} u(\eta _{j})\rightarrow A_1\,{\hbox {as}}\,j\rightarrow +\infty . \end{aligned}$$

Up to passing to a subsequence, we define

$$\begin{aligned} a_1:=\lim _j \eta _j. \end{aligned}$$

Since \(A_1>A_0\) and \(u(x)\leqslant A_0\) for almost every \(x\leqslant b_0\), necessarily \( a_0<b_0<a_1<b_1\). Moreover \(u(x)\geqslant B_1\) for almost every \(x\geqslant a_1\) and \(u(x)\leqslant A_1\) for almost every \(x\leqslant b_1\).

We observe that two possibilities may arise: either \(A_1+B_1<0\) or \(A_1+B_1\geqslant 0\). We will show that both of them are in contradiction with the minimality of u and then this implies that quadruples as in (3.9) cannot exist, and then finally that u is monotone.

If \(A_1+B_1\geqslant 0\), we argue as in the proof of claim (3.20), namely we define the function v as in (3.13) with \(A_1\) in place of A and \(a_1\) in place of a, and we show that \(u=v\) outside a compact interval and moreover that v has strictly less energy of u, since \(u(x)\geqslant B_1\) for almost every \(x\geqslant a_1\), in contradiction to the minimality of u.

If instead \(A_1+B_1<0\), we can proceed as in the proof of claim (3.17): we define the function v as in (3.18) with \(B_1\) in place of \(B_0\) and \(b_1\) in place of \(b_0\), we show that \(u=v\) outside a compact interval and finally we prove that v has strictly less energy of u, since \(u(x)\leqslant A_1\) for almost every \(x\leqslant b_1\), in contradiction to the minimality of u.

These observations imply that u is monotone, and thus the claim in Step 3 is established.

Step 4: proof of claim (3.16).

We argue towards a contradiction, assuming that \(A_0=1\). Hence, recalling (3.14) and (3.15), we have that

$$\begin{aligned} \limsup _{x\rightarrow a_0} u(x)=1. \end{aligned}$$
(3.25)

Let  \(\mu \in (0,1)\), to be taken arbitrarily small in the following. Then, by (1.11), we know that there exists \(\rho _\mu >a_0\) such that

$$\begin{aligned} u(x)\geqslant 1-\mu \quad {\text{ for }}\,{\text {every }}\,x\in [\rho _\mu , +\infty ). \end{aligned}$$
(3.26)

For \(\rho \geqslant \rho _\mu >a_0\), we take \(\tau _{\rho }\in C^\infty \left( {\mathbb {R}},[0,1]\right) \), with \(\tau _{\rho }=1\) in \((-\infty ,\rho ]\) and \(\tau _{\rho }=0\) in \([3r+\rho , +\infty )\). Let also

$$\begin{aligned} u_{\rho }(x):=\left\{ \begin{array}{ll} u(x) &\quad { \text{ if } }\,x\leqslant a_0,\\ \tau _{\rho }(x)+(1-\tau _{\rho }(x))\,u(x)&\quad { \text{ if }}\,x>a_0.\end{array} \right. \end{aligned}$$
(3.27)

We notice that, since \(\rho >a_0\), we get that

$$\begin{aligned} u_{\rho }=1\quad {\text{ in } }\,(a_0, \rho ]. \end{aligned}$$
(3.28)

Furthermore, since \(|u|\leqslant 1 \) by Step 1, and \(\tau _{\rho }\geqslant 0\), we get that, if \(x>a_0\),

$$ u_\rho -u=\tau _{\rho }(1-u)\geqslant 0,$$

and therefore

$$\begin{aligned} u\leqslant u_{\rho }\leqslant 1. \end{aligned}$$
(3.29)

Moreover, for any \(x\in (a_0-r,a_0+r)\) we have that \(a_0\in (x-r,x+r)\), and thus, in light of (3.25),

$$\begin{aligned} \sup _{(x-r,x+r)} u=\sup _{(x-r,x+r)} u_{\rho }=1. \end{aligned}$$
(3.30)

By (3.29) and (3.30), we obtain that, for any \(x\in (a_0-r,a_0+r)\),

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u. \end{aligned}$$
(3.31)

Now, we observe that, by definition, \(u_{\rho }=u\) outside \([a_0,\rho +3r]\), so, by the minimality of u, we get that

$$\begin{aligned} \begin{aligned} 0 \,&\leqslant {\mathcal {E}}_{(a_0-r,\rho +4r)}(u_{\rho })-{\mathcal {E}}_{ (a_0-r,\rho +4r)}(u)\\&= \frac{1}{2r^2}\int _{a_0-r}^{\rho +4r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x +\int _{a_0-r}^{\rho +4r} \Big ( W(u_{\rho }(x))-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned} \end{aligned}$$
(3.32)

Hence, recalling (3.31) and the definition of \(u_{\rho }\), we obtain

$$\begin{aligned} 0\leqslant \frac{1}{2r^2}\int _{a_0+r}^{\rho +4r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x +\int _{a_0}^{\rho +3r} \Big ( W(u_{\rho }(x))-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned}$$
(3.33)

Now, we claim that

$$\begin{aligned} \frac{1}{2r^2}\int _{a_0+r}^{+\infty } \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u \right) ^2\, {\mathrm{d}}x+\int _{a_0}^{+\infty }W(u(x)){\mathrm{d}}x>0. \end{aligned}$$
(3.34)

Indeed, if it were not the case, we would have that \(u(x)=1\) for almost every \(x\geqslant a_0\). But this would be in contradiction with the fact that \(a_0<b_0\) and \(\liminf _{x\rightarrow b_0} u(x)=B_0<0\). Hence, (3.34) is established.

As a consequence of (3.34), for large \(\rho \), we can write

$$\begin{aligned} \frac{1}{2r^2}\int _{a_0+r}^{\rho -r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x +\int _{a_0}^{\rho } W(u(x))\,{\mathrm{d}}x\geqslant \hat{c}, \end{aligned}$$
(3.35)

for some \(\hat{c}>0\), independent of \(\mu \) and \(\rho \).

Also, from (3.28) we deduce that

$$\begin{aligned} \frac{1}{2r^2}\int _{a_0+r}^{\rho -r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2{\mathrm{d}}x=0 \quad {\text{ and }}\quad \int _{a_0}^{\rho }W(u_{\rho }(x))\,{\mathrm{d}}x =0. \end{aligned}$$

This and (3.35) imply that

$$\begin{aligned} \frac{1}{2r^2}\int _{a_0+r}^{\rho -r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x +\int _{a_0}^{\rho } \Big ( W(u_{\rho }(x))-W(u(x))\Big )\,{\mathrm{d}}x\leqslant -\hat{c}. \end{aligned}$$

Then, we insert this information into (3.33) and we find that

$$\begin{aligned} \hat{c}\leqslant \frac{1}{2r^2}\int _{\rho -r}^{\rho +4r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho ,R}\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x +\int _\rho ^{\rho +3r} \Big ( W(u_{\rho }(x))-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned}$$
(3.36)

Now we observe that, thanks to (3.26), for any \(x\in [\rho ,\rho +3r]\),

$$\begin{aligned} u_{\rho }(x)-u(x)= \tau _{\rho }(x)\,(1-u(x))\leqslant \mu , \end{aligned}$$

and thus

$$\begin{aligned} \left| \int _\rho ^{\rho +3r} \Big ( W(u_{\rho }(x))-W(u(x))\Big )\,{\mathrm{d}}x\right| \leqslant 3 r \mathop {\mathop {\max }\limits _{{t,s\in [-1,1]}}}\limits _{|t-s|\leqslant \mu } |W(t)-W(s)|\rightarrow 0 \quad {\text{ as }}\, \mu \rightarrow 0. \end{aligned}$$

Using this, as long as \(\mu >0\) is sufficiently small (possibly in dependence on r), we get from (3.36) that

$$\begin{aligned} \frac{\hat{c}}{2}\leqslant \frac{1}{2r^2}\int _{\rho -r}^{\rho +4r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x. \end{aligned}$$
(3.37)

We also observe that if \(\rho \geqslant \rho _\mu +2r\) and \(x\geqslant \rho -r\), then \(x-r\geqslant \rho _\mu >a_0\), and therefore, by the definition of \(u_\rho \), and recalling (3.26), we get

$$\begin{aligned} \sup _{(x-r,x+r)} u_{\rho }\leqslant \sup _{(x-r,x+r)} u+\sup _{(x-r,x+r)} \tau _{\rho }(1-u)\leqslant \sup _{(x-r,x+r)} u+\mu . \end{aligned}$$

Then, using this observation and recalling (3.29), we conclude that

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}} \,u+\mu , \end{aligned}$$
(3.38)

for any \(x\geqslant \rho -r\) with \(\rho \geqslant \rho _\mu +2r\).

From (3.38), for any \(x\geqslant \rho -r\) and \(\rho \geqslant \rho _\mu +2r\), we have that

$$\begin{aligned}&\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2 \leqslant \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u+\mu \right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\\&\quad = \mu ^2+2\mu \,{\underset{(x-r,x+r)}\,{{\text {osc}}}} \,u \leqslant \mu ^2+\mu +\mu \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2. \end{aligned}$$

Therefore, we conclude that, if \(\rho \geqslant \rho _\mu +2r,\),

$$\begin{aligned} \int _{\rho -r}^{\rho +4r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\rho }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x\leqslant 5\mu ^2r+5\mu r+ \mu {\mathcal {E}}(u) \end{aligned}$$

where \( {\mathcal {E}}(u)\) is the energy defined in (3.5). Plugging this information into (3.37), and recalling the claim (3.5) in Step 2, we conclude that

$$\begin{aligned} \frac{\hat{c}}{2} \leqslant \frac{ 5\mu ^2r+5\mu r+ \mu {\mathcal {E}}(u)}{2r^2}, \end{aligned}$$

which leads to a contradiction by sending \(\mu \searrow 0\), and this concludes the proof of (3.16).

Step 5: proof of claim (3.21).

For the proof of (3.21), the argument is the same as for the proof of (3.16) in Step 4, with obvious modifications. We sketch it briefly for the reader’s convenience.

We fix \(\mu >0\) and \( \lambda _\mu <b_1\) such that \(u(x)<-1+\mu \) for every \(x\leqslant \lambda _\mu \). For any \(\lambda <\lambda _\mu \), we take \(\tau _{\lambda }\in C^\infty \left( {\mathbb {R}},[-1,0]\right) \), with \(\tau _{\lambda }=-1\) in \([\lambda , +\infty )\) and \(\tau _{\lambda }=0\) in \((-\infty , \lambda -3r,]\), and we define

$$\begin{aligned} u_{\lambda }(x):=\left\{ \begin{array}{ll} u(x) & \quad { \text{ if } }\,x\geqslant b_1,\\ \tau _{\lambda }(x)+(1+\tau _{\lambda }(x))\,u(x)&\quad { \text{ if } }\,x<b_1.\end{array} \right. \end{aligned}$$
(3.39)

As done in Step 4, it is easy to check that for any \(x\in (b_1-r,b_1+r)\)

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\lambda }\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u \end{aligned}$$
(3.40)

and \(u=u_\lambda \) outside \([\lambda -3r, b_1]\). As a consequence of these observations and of the minimality of u,

$$\begin{aligned} 0\leqslant \frac{1}{2r^2}\int _{\lambda -4r}^{b_1-r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\lambda }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x +\int _{\lambda -3r}^{b_1} \Big ( W(u_{\lambda }(x))-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned}$$

As in Step 4, we see that, for \(\lambda<<-1\),

$$\begin{aligned} \frac{1}{2r^2}\int _{\lambda +r}^{b_1-r} \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\,{\mathrm{d}}x +\int _{\lambda }^{b_1} W(u(x))\,{\mathrm{d}}x\geqslant \hat{c}, \end{aligned}$$

for some \(\hat{c}>0\), independent of \(\mu \), \(\lambda \), otherwise we would get \(u(x)=-1\) for almost every \(x\leqslant b_1\) in contradiction with the definition of \(A_0\).

Thus, using the fact that  \(u_{\lambda }=-1\) in \([\lambda , b_1)\), we conclude that

$$\begin{aligned} \hat{c}\leqslant \frac{1}{2r^2}\int _{\lambda -4r}^{\lambda +r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\lambda }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x +\int _{\lambda -3r}^{\lambda } \Big ( W(u_{\lambda }(x))-W(u(x))\Big )\,{\mathrm{d}}x. \end{aligned}$$

Now we observe that, for any \(x\in [\lambda -3r, \lambda ]\),

$$\begin{aligned}\left| \int _{\lambda -3r}^\lambda \Big ( W(u_{\lambda }(x))-W(u(x))\Big )\,{\mathrm{d}}x\right| \leqslant 3 r \mathop {\mathop {\max }\limits _{{t,s\in [-1,1]}}}\limits _{|t-s|\leqslant \mu } |W(t)-W(s)|\rightarrow 0 \quad {\text{ as }}\, \mu \rightarrow 0. \end{aligned}$$

Therefore, for \(\lambda<<-1\), we get that

$$\begin{aligned} \frac{\hat{c}}{2}\leqslant \frac{1}{2r^2}\int _{\lambda -4r}^{\lambda +r} \left[ \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\lambda }\right) ^2- \left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u\right) ^2\right] \,{\mathrm{d}}x. \end{aligned}$$
(3.41)

Moreover, recalling the definition of \(u_\lambda \), it is easy to check that, for any \(x\leqslant \lambda +r\) and \(\lambda <\lambda _\mu -2r\), there holds

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_{\lambda }\leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u+\mu . \end{aligned}$$

Now the conclusion follows plugging this information in (3.41) and sending \(\mu \rightarrow 0\), obtaining a contradiction as in Step 4.

4 The difference equation satisfied by minimal heteroclinic connections, and proof of Theorem 1.4

In this section, we provide a proof of Theorem 1.4. In order to get the result, we will need to introduce an auxiliary functional. We observe that, for monotone functions, the oscillation defined in (1.7) reads as

$$\begin{aligned} {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u=|u(x+r)-u(x-r)|. \end{aligned}$$

Moreover, it is easy to check that for any \(v\in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\), there holds

$$\begin{aligned} \left| v(x+r)-v(x-r)\right| \leqslant {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, v. \end{aligned}$$

We introduce the following auxiliary functional, defined, for any \(r>0\), \(a<b\), and W as in (1.9), as

$$\begin{aligned} {\mathcal {F}}_{(a,b)}(u):=\frac{1}{2r^2}\int _a^b \left( u(x+r)-u(x-r)\right) ^2\,{\mathrm{d}}x +\int _{a}^{b} W(u(x))\,{\mathrm{d}}x. \end{aligned}$$
(4.1)

In this setting, we say that \(u\in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\) is a local minimizer of \({\mathcal {F}}\) if, for any \(a<b\) and any \(v\in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\) such that \(u=v\) outside \([a+r,b-r]\), we have that

$$\begin{aligned} {\mathcal {F}}_{(a,b)}(u)\leqslant {\mathcal {F}}_{(a,b)}(v). \end{aligned}$$

It is easy to check that if u is a critical point for the operator \({\mathcal {F}}_{(a,b)}\) in (4.1), then

$$\begin{aligned} \int _{\mathbb {R}}\frac{(u(x+2r)+u(x-2r)-2 u(x))}{r^2} \,\varphi (x)\,{\mathrm{d}}x =\,\int _{\mathbb {R}}W'(u(x))\,\varphi (x) \,{\mathrm{d}}x, \end{aligned}$$
(4.2)

for all \(\varphi \in C^\infty ({\mathbb {R}})\), such that \(\varphi \equiv 0\, {\text{ in }}\, {\mathbb {R}}\setminus [a+r,b-r]\).

Comparing (1.8) and (4.1), one notices that for any \(v\in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\),

$$\begin{aligned} {\mathcal {F}}_{(a,b)}(v)\leqslant {\mathcal {E}}_{(a,b)}(v). \end{aligned}$$
(4.3)

and moreover

$$\begin{aligned} {\text{ if } }\,u\,{\hbox { is}}\,{\hbox{monotone}}\,{\hbox{in }}\,(a-r,b+r),\,{\hbox { then }}\, {\mathcal {F}}_{(a,b)}(u)= {\mathcal {E}}_{(a,b)}(u). \end{aligned}$$
(4.4)

Combining (4.3) with (4.4) we obtain that

$$\begin{aligned} \begin{aligned}&{\text{ if }}\, u\,{\hbox { is}}\,{\hbox{monotone}}\,{\hbox{and}}\,{\hbox{it}}\, {\hbox{is}}\, {\hbox{a}}\, {\hbox{local}}\, {\hbox{minimizer}}\, {\hbox{for}}\, {\hbox{the}}\, {\hbox{functional}}\, {\hbox{in}}~(4.1), \\&{\text{ then }}\, {\text{ it }}\,{ \text{ is }}\, {\text{ also }}\,{\text{ a }}\,{\text{ local }}\, {\text{ minimizer }}\, {\text{ for }}\, {\text{ the }}\,{ \text{ functional }}\,{ \text{ in }}~(1.8). \end{aligned} \end{aligned}$$
(4.5)

In order to prove Theorem 1.4, in light of (4.2), it is sufficient to show that the reverse statement of (4.5) holds true. This will be accomplished in Proposition 4.2.

To this aim, we need the following result, which is the analogous of Proposition 2.2 for the functional (4.1). More precisely:

Lemma 4.1

Assume that (1.9) holds true and consider \(R>2r\).

Then there exists a solution \(v_R\) to the Dirichlet problem

$$\begin{aligned} \inf \Big \{ {\mathcal {F}}_{(-R,R)} (v) \,{ \text{ s.t. } }\, v\in L^{\infty }({\mathbb {R}}), \, v(x)=1 \, {\text{ for }}\,{ \text{ a.e. }}\, x\geqslant R-r\,{\hbox { and }}\,v(x)=-1\, {\text{ for }}\, {\text{ a.e. }}\, x\leqslant -R+r\Big \}. \end{aligned}$$
(4.6)

Moreover \(v_R\) is monotone nondecreasing and piecewise constant on intervals of length at least 2r.

Finally \(v_R\) is also a solution to the Dirichlet problem (2.1).

Proof

We notice that for any \(c\in {\mathbb {R}}\) and for any \(v\in L^{\infty }_{\mathrm{{loc}}}({\mathbb {R}})\), we get that

$$\begin{aligned} |v(x+r)-v(x-r)|=&|\min \{v(x+r),c\}-\min \{v(x-r),c\}|\\ &+ |\max \{v(x+r),c\}-\max \{v(x-r),c\}|, \end{aligned}$$
(4.7)

at almost every x. Indeed, if \(v(x-r)\leqslant c\) and \(v(x+r)\leqslant c\), then

$$\begin{aligned}&|\min \{v(x+r),c\}-\min \{v(x-r),c\}|=|v(x+r)-v(x-r)|, \\ {\text{ and } }&|\max \{v(x+r),c\}-\max \{v(x-r),c\}|=0, \end{aligned}$$

which implies (4.7) in this case. The case in which \(v(x-r)\geqslant c\) and \(v(x+r)\geqslant c\) can be treated similarly.

If instead \(v(x-r)\leqslant c\leqslant v(x+r)\) (or similarly \(v(x+r)\leqslant c \leqslant v(x-r)\)), then

$$\begin{aligned}&|\min \{v(x+r),c\}-\min \{v(x-r),c\}| + |\max \{v(x+r),c\}-\max \{v(x-r),c\}|\\&\quad = c-v(x-r)+v(x+r)-c=|v(x+r)-v(x-r)|, \end{aligned}$$

which gives (4.7) in this case as well.

Therefore, thanks to (4.7) and (1.9), we get that

$$\begin{aligned} {\mathcal {F}}_{(-R,R)} \big (\max \{-1,\min \{1,v\}\}\big ) \leqslant {\mathcal {F}}_{(-R,R)} (v). \end{aligned}$$

This implies that we can reduce to consider the case in which \(-1\leqslant v(x)\leqslant 1\) for a.e. x. So, we fix \(v\in L^\infty ({\mathbb {R}})\) with values in \([-1,1]\) such that

$$\begin{aligned} v(x)=1\,{\hbox {for}}\,{\hbox {a.e.}}\,x\geqslant R-r\,{\hbox { and }}\,v(x)=-1\,{\hbox {for}}\,{\hbox {a.e.}}\,x\leqslant -R+r. \end{aligned}$$
(4.8)

Let \(N:=\left\lceil \frac{2R}{r}\right\rceil . \) For any fixed \(x\in [-R-r, -R)\), we define the sequence

$$\begin{aligned} v_n^x:= v(x+nr), \quad {\text {for}}\,n\in {\mathbb {Z}}. \end{aligned}$$
(4.9)

Note that

$$\begin{aligned} v_n^x=-1\,{\hbox { if }}\,n\leqslant 1\,\,{\hbox {and}}\,\,v_n^x=1\,\,{\hbox {if}}\,\,n\geqslant N,\,{\hbox {for}}\,{\hbox {all}}\, x\in [-R-r, -R), \end{aligned}$$
(4.10)

thanks to (4.8).

From (4.8), we also see that

$$\begin{aligned} \begin{aligned} {\mathcal {F}}(v)\,&= \int _{\mathbb {R}}\left( \frac{1}{2r^2} (v(y+r)-v(y-r))^2+ W(v(y))\right) \,{\mathrm{d}}y \\ &=\sum _{n\in {\mathbb {Z}}} \int _{-R+(n-1)r}^{-R+nr}\left( \frac{1}{2r^2} (v(y+r)-v(y-r))^2+ W(v(y))\right) \, {\mathrm{d}}y. \end{aligned} \end{aligned}$$
(4.11)

Furthermore, by the change of variable \(y=x+nr\),

$$\begin{aligned} \int _{-R-r}^{-R}\left( \frac{1}{2r^2} (v_{n+1}^x-v_{n-1}^x)^2+ W(v_n^x)\right) \, {\mathrm{d}}x= \int _{-R+(n-1)r}^{-R+nr}\left( \frac{1}{2r^2} (v(y+r)-v(y-r))^2+ W(v(y))\right) \, {\mathrm{d}}y. \end{aligned}$$

From this and (4.11), dividing odd and even indexes, we have that

$$\begin{aligned} {\mathcal {F}}_{(-R,R)} (v)&= \int _{-R-r}^{-R} \sum _{n\in {\mathbb {Z}}}\left( \frac{1}{2r^2} (v_{n+1}^x-v_{n-1}^x)^2+ W(v_n^x) \right) \, {\mathrm{d}}x \\&= \int _{-R-r}^{-R} \sum _{k\in {\mathbb {Z}}}\left( \frac{1}{2r^2} (v_{2k+2}^x-v_{2k}^x)^2+ W(v_{2k+1}^x) \right) \ {\mathrm{d}}x\\&\quad+ \int _{-R-r}^{-R} \sum _{k\in {\mathbb {Z}}}\left( \frac{1}{2r^2} (v_{2k+1}^x-v_{2k-1}^x)^2+ W(v_{2k}^x) \right) \ {\mathrm{d}}x. \end{aligned}$$

Hence, in light of (4.10), if we set \(K:=\left\lfloor \frac{N}{2}\right\rfloor \), we can write

$$\begin{aligned} \begin{aligned} {\mathcal {F}}_{(-R,R)} (v)\,&= \int _{-R-r}^{-R} \sum _{k=0 }^K\left( \frac{1}{2r^2} (v_{2k+2}^x-v_{2k}^x)^2+ W(v_{2k+1}^x) \right) \ {\mathrm{d}}x\\ &\quad + \int _{-R-r}^{-R} \sum _{k=0}^K\left( \frac{1}{2r^2} (v_{2k+1}^x-v_{2k-1}^x)^2+ W(v_{2k}^x) \right) \ {\mathrm{d}}x. \end{aligned} \end{aligned}$$
(4.12)

Then, we consider the finite minimization problem:

$$\begin{aligned} m_R:=\min \left\{ \sum _{j=0}^K \left( \frac{1}{2r^2} (w_{j+1}-w_{j})^2+ W(w_j)\right) \right\} , \end{aligned}$$
(4.13)

where the class of competitors is such that \(w_j=-1\) for all \(j\leqslant 0\), \(w_{j}=1\) for all \(j\geqslant K+1\), and \(w_j\in [-1,1]\) for all \(j\in {\mathbb {Z}}\).

Note that, by (4.10) and (4.12), we get that

$$\begin{aligned} {\mathcal {F}}_{(-R,R)} (v)\geqslant 2\, r\,m_R. \end{aligned}$$
(4.14)

With analogous arguments as in the proof of Lemma 2.1, one can see that monotone sequences make the energy functional lower, and therefore, as in Proposition 2.2, one finds that there exists a monotone nondecreasing solution to (4.13), that is a solution with \(w_j\leqslant w_{j+1}\). Let us denote with \((w^R_j)\) this solution.

We define now a function \(v_R:[-R-r, R+r]\rightarrow [-1,1]\) as follows:

$$\begin{aligned} v_R(x):= w_j^R, \qquad \forall x\in [-R-r+2jr, -R-r+2(j+1)r). \end{aligned}$$
(4.15)

We have that \(v_R(x)=-1\) for \(x\leqslant -R+r\), \(v_R(x)=1\) for \(x\geqslant R-r\), \(v_R\) is monotone nondecreasing and \( {\mathcal {F}}_{(-R,R)} (v_R)=2\; r\;m_R\). Recalling (4.14), we see that \(v_R\) attains the minimal possible value, and this concludes the proof of existence of a monotone nondecreasing, piecewise constant solution to (4.6).

Finally, \(v_R\) is also a solution to the Dirichlet problem (2.1), due to (4.5). □

As a consequence of Lemma 4.1, we obtain the counterpart of (4.5).

Proposition 4.2

Let u be a local minimizer for the functional in (1.8) which satisfies (1.11). Then, u is also a local minimizer for the functional in (4.1).

Proof

By Theorem 1.3, we know that u is monotone. Now, we argue by contradiction, assuming that there exist \(M_0>0\), a function \(v\in L^{\infty }({\mathbb {R}})\) such that \(v=u\) outside \([-M_0+r,M_0-r]\), and \(\varepsilon >0\), such that

$$\begin{aligned} {\mathcal {F}}_{(-M_0, M_0)}(v)\leqslant {\mathcal {F}}_{(-M_0, M_0)}(u)- 2\varepsilon = {\mathcal {E}}_{(-M_0, M_0)}(u)- 2\varepsilon , \end{aligned}$$
(4.16)

where (4.4) is used in the last equality.

Since u is a local minimizer for the functional (1.8), and the two functionals (1.8) and (4.1) coincide on monotone functions, we get that v is not monotone in \((M_0+r,M_0-r)\).

Now we take \(M>M_0+r \) and we consider \(v^{M}\) and \(u^M\) as given in (2.22). Then, we get from (4.16) that

$$\begin{aligned} {\mathcal {F}}_{(-M, M)}(v^{M})\leqslant {\mathcal {F}}_{(-M, M)}(u^{M})-2\varepsilon . \end{aligned}$$

Consequently, recalling the notation of \(e_M\) and e, as given in (2.16) and (2.17), and exploiting (2.19) and (2.25), we see that

$$\begin{aligned} \begin{aligned}&{\mathcal {F}}_{(-M, M)}(v^{M})\leqslant {\mathcal {F}}_{(-M, M)}(u^{M})- 2\varepsilon = {\mathcal {E}}_{(-M, M)}(u^{M})- 2\varepsilon \\&\quad \leqslant {\mathcal {E}}(u^M)-2\varepsilon \leqslant {\mathcal {E}}(u)-\varepsilon =e-\varepsilon \leqslant e_M-\varepsilon , \end{aligned} \end{aligned}$$
(4.17)

where \(u_M\) is constructed in Proposition 2.2.

Now, by Lemma 4.1, we get that there exists \(v_M\) which is monotone and such that

$$\begin{aligned} e_M ={\mathcal {E}}_{(-M,M)} (v_M)={\mathcal {F}}_{(-M,M)} (v_M). \end{aligned}$$
(4.18)

On the other hand, since \(v_M=v^M=-1\) in \((-\infty , -M+r)\) and \(v_M=v^M=1\) in \((M-r, +\infty )\), we have that

$$\begin{aligned} {\mathcal {F}}_{(-M,M)} (v_M)\leqslant {\mathcal {F}}_{(-M,M)} (v^M) \end{aligned}$$

This and (4.18) lead to

$$\begin{aligned} e_M\leqslant {\mathcal {F}}_{(-M,M)} (v^M) . \end{aligned}$$
(4.19)

From (4.17) and (4.19), we get that

$$\begin{aligned} e_M\leqslant {\mathcal {E}}_{(-M,M)}(u_M)-\varepsilon =e_M-\varepsilon \end{aligned}$$

which gives a contradiction. □

From Proposition 4.2, we obtain Theorem 1.4 by arguing as follows:

Proof of Theorem 1.4

By Proposition 4.2, we get that u is a local minimizer of (4.1). Therefore, in view of (4.2), it is a solution to (1.15). □

5 Asymptotics as \(r\searrow 0\), and proof of Proposition 1.5

In this section, we show that the heteroclinic connections constructed in this paper approach, for small r, the classical heteroclinics arising in ordinary differential equations, as stated in Proposition 1.5.

Proof of Proposition 1.5

Let \(u_r\) be as in Theorem 1.1, for a given \(r>0\). Up to a translation, we will suppose that

$$\begin{aligned} u_r(x)<0{ {\text{ for }} \,{\text{ all } }}x<0\,{\hbox { and }}\,u_r(x)\geqslant 0\,{\hbox { for}}\,{\hbox{all }}\,x>0. \end{aligned}$$
(5.1)

Since \(u_r\) is monotone and bounded uniformly in r, and therefore bounded in BV uniformly in r, up to a subsequence we may suppose that \(u_r\) converges to some u a.e. in \({\mathbb {R}}\).

Consequently, from (1.15), for every \(\phi \in C^\infty _0({\mathbb {R}})\),

$$\begin{aligned} 0&= \lim _{r\searrow 0} \int _{\mathbb {R}}\left( \frac{u_r(x+2r)+u_r(x-2r)-2u_r(x)}{r^2}-W'(u_r(x)) \right) \,\phi (x)\,{\mathrm{d}}x\\&= \lim _{r\searrow 0} \frac{1}{r^2}\left( \int _{\mathbb {R}}u_r(x)\,\phi (x-2r)\,{\mathrm{d}}x+ \int _{\mathbb {R}}u_r(x)\,\phi (x+2r)\,{\mathrm{d}}x-2 \int _{\mathbb {R}}u_r(x)\,\phi (x)\,{\mathrm{d}}x\right) -\int _{\mathbb {R}}W'(u(x))\,\phi (x)\,{\mathrm{d}}x\\&= \lim _{r\searrow 0} \int _{\mathbb {R}}u_r(x)\,\left( \frac{\phi (x+2r)+\phi (x-2r)-2\phi (x)}{r^2} \right) \,{\mathrm{d}}x -\int _{\mathbb {R}}W'(u(x))\,\phi (x)\,{\mathrm{d}}x\\ &= 4\int _{\mathbb {R}}u(x)\,\phi ''(x)\,{\mathrm{d}}x -\int _{\mathbb {R}}W'(u(x))\,\phi (x)\,{\mathrm{d}}x. \end{aligned}$$

This gives that

$$\begin{aligned} 4u''=W'(u), \end{aligned}$$

in the distributional sense, and hence in the smooth sense as well, and this proves (1.16).

Also, passing to the limit in (5.1),

$$\begin{aligned} u(x)\leqslant 0\,\,{\text{ for }}\,\,{\hbox {all }}\,\,x<0\,\,{\text{ and }}\,\,u(x)\geqslant 0\,\,{\text{ for }}\,\,{\hbox {all }}\,\,x>0, \end{aligned}$$

which gives that

$$\begin{aligned} 0\geqslant \lim _{x\nearrow 0} u(x)= u(0)=\lim _{x\searrow 0} u(x)\geqslant 0, \end{aligned}$$

and hence (1.17) is established.

Now, in light of (1.12), we can write that

$$\begin{aligned}&\int _{\mathbb {R}}\left[ \frac{1}{2r^2}\Big (u(x+r)-u(x-r)\Big )^2+ W(u_r(x))\right] \,{\mathrm{d}}x = \int _{\mathbb {R}}\left[ \frac{1}{2r^2}\left( {\underset{(x-r,x+r)}\,{{\text {osc}}}}\, u_r\right) ^2+ W(u_r(x))\right] \,{\mathrm{d}}x\\&\quad ={\mathcal {E}}(u_r)\leqslant \min \left\{ \frac{4}{r}, 4+c_W\right\} \leqslant 4+c_W. \end{aligned}$$

Accordingly, using Fatou’s Lemma,

$$\begin{aligned} 4+c_W \geqslant \int _{\mathbb {R}}\liminf _{r\searrow 0}\left[ \frac{\big (u(x+r)-u(x-r)\big )^2}{2r^2}+ W(u_r(x))\right] \,{\mathrm{d}}x= \int _{\mathbb {R}}\left[ 2|u'(x)|^2+ W(u(x))\right] \,{\mathrm{d}}x. \end{aligned}$$
(5.2)

Furthermore, we know that u is monotone nondecreasing and with values in \([-1,1]\), since so is \(u_r\), hence we can define

$$\begin{aligned} \ell _\pm :=\lim _{x\rightarrow \pm \infty } u(x). \end{aligned}$$
(5.3)

We claim that

$$\begin{aligned} \ell _+=1. \end{aligned}$$
(5.4)

Indeed, suppose not, say \(\ell _+<\ell \), for some \(\ell <1\). From (1.17) and the monotonicity of u, we know that \(\ell _+\geqslant u(0)=0\). Therefore, there exists \(X>0\) such that for all \(x\geqslant X\) we have that \(u(x)\in \left[ -\frac{1}{2},\ell \right] \). This and (1.9) give that, for all \(x\geqslant X\),

$$\begin{aligned} W(u(x))\geqslant \inf _{\tau \in [-1/2,\ell ]} W(\tau )>0, \end{aligned}$$

and accordingly

$$\begin{aligned} \int _X^{+\infty } W(u(x))\,{\mathrm{d}}x=+\infty . \end{aligned}$$

This is in contradiction with (5.2), and hence it proves (5.4).

Similarly, one can show that \(\ell _-=-1\). This and (5.4) lead to (1.18), as desired. Finally, since the heteroclinic satisfying (1.16), (1.17), (1.18) is unique, we have full convergence of \(u_r\) to u. □

6 Piecewise constant heteroclinic connections, and proof of Theorem 1.6

In this section, we prove Theorem 1.6. The proof is based on the existence of piecewise constant solutions to the Dirichlet problem (2.1) given in Lemma 4.1.

Proof of Theorem 1.6

By Lemma 4.1, we have that for all \(R>2r\) there exists a monotone solution \(v_R\) to the Dirichlet problem (2.1), which is piecewise constant.

Thus, up to a translation, we can assume that \(v_R(x)<0\) for any \(x<0\) and \(v_R(x)\geqslant 0\) for any \(x>0\).

Recalling the construction in (4.15), we get that there exists \(n(R)\rightarrow +\infty \) as \(R\rightarrow +\infty \) such that

$$\begin{aligned} v_R\,{\hbox { is}}\,{\hbox{constant}}\,{\hbox{in}}\, {\hbox{intervals}}\, {\hbox{of}}\, {\hbox{the}}\, {\hbox{form}}\,[2nr, 2(n+1)r) \,{\hbox { for}}\, {\hbox{all }}-n(R)\leqslant n\leqslant n(R). \end{aligned}$$
(6.1)

Since \(v_R\) is equibounded and has equibounded total variation, by compactness (see [3, Corollary 3.49]) up to extracting a subsequence, we can define

$$\begin{aligned} v(x):=\lim _{R\rightarrow +\infty } v_R(x), \end{aligned}$$
(6.2)

where the limit holds pointwise and locally in \(L^p\) for every \(p\geqslant 1\).

From this (see (2.27)), we also conclude that v is a local minimizer of (1.8), which satisfies (1.11). Finally, by (6.1) and (6.2), we obtain that v is constant on every interval \([2nr, 2(n+1)r)\), for \(n\in {\mathbb {Z}}\). □

7 Nonuniqueness issues, and proofs of Proposition 1.7 and Corollary 1.8

Now, we provide the proof of Proposition 1.7, based on an analogous argument as in the proof of Lemma 4.1, Lemma 2.1 and Theorem 1.1.

Proof of Proposition 1.7

Fixed \(K\in {\mathbb {N}}\), we consider two finite minimization problems. The first one is the following;

$$\begin{aligned} m^{(1)}_K:=\min \left\{ \sum _{j=-K}^K \left( \frac{1}{2r^2} (w_{j+1}-w_{j})^2+ W(w_j)\right) \right\} , \end{aligned}$$
(7.1)

where the class of competitors \((w_j)\) is such that \(w_0=0\), \(w_j=-w_{-j}\) and \(w_{j}=1\) for all \(j\geqslant K\).

We note that, for all \(K>1\),

$$\begin{aligned} m^{(1)}_K\leqslant \frac{1}{r^2}+W(0). \end{aligned}$$
(7.2)

Indeed we choose the competitor \(w_0:=0\) and \(w_j:=1\) for all \(j>0\), and then (7.2) plainly follows from (7.1).

Moreover, by (7.1), we see that

$$\begin{aligned} m_{K+1}^{(1)}\leqslant m_{K}^{(1)}\,\quad{\hbox {for}}\,{\text {all }}\,K>1. \end{aligned}$$

The second finite minimization problem is the following:

$$\begin{aligned} m^{(2)}_K:=\min \left\{ \sum _{j=-K}^K \left( \frac{1}{2r^2} (z_{j+1}-z_{j})^2+ W(z_j)\right) \right\} , \end{aligned}$$
(7.3)

where the class of competitors \((z_j)\) is such that \(z_{j}=-z_{-j-1}\) and \(z_{j}=1\) for all \(j\geqslant K-1\).

Choosing the competitor \(w_j:=1\) for all \(j\geqslant 0\), we get that

$$\begin{aligned} m^{(2)}_K\leqslant \displaystyle \frac{2}{r^2}\,\quad{\hbox {for}}\,{\hbox {all}}\,K>1. \end{aligned}$$

Moreover, we see that

$$\begin{aligned} m_{K+1}^{(2)}\leqslant m_{K}^{(2)}\,\quad{\hbox {for}}\,{\hbox {all}}\,K>1. \end{aligned}$$

Arguing as in the proof of Lemma 2.1, one can show that monotone sequences lower the energy, and therefore, as in Proposition 2.2, one obtains that, for all \(K>2\), there exist monotone nondecreasing solutions \((w_{j}^{K})\) and \((z_{j}^{K}),\) respectively, to the minimization problem (7.1) and (7.3).

Let us now fix \((\phi _{j})\) such that \(\phi _{0}:=0\), \(\phi _{j}=-\phi _{-j}\) and \(\phi _{j}:=0\) for all \(j\geqslant K-1\). So, the sequence \(w_j^K+\delta \phi _j\) is an admissible competitor for the minimization problem (7.1) for all \(\delta \in {\mathbb {R}}\). Therefore, by the minimality of \(w_j^K\), we conclude that

$$\begin{aligned} \sum _{j=-K+1}^{K-1} \left( \frac{1}{r^2} (w^K_{j+1}-2w^K_{j}+w^K_{j-1})- W'(w^K_j) \right) \phi _j=0. \end{aligned}$$
(7.4)

Now, fixed \(j_*\in (0, K-1)\), we choose \(\phi _j\) such that \(\phi _{j_*}:=1\) (and so by assumption \(\phi _{-j_*}=-1\)) and 0 elsewhere. Substituting in (7.4), we thereby get that, for all \(j\in (0, K-1)\),

$$\begin{aligned} \left( w^K_{j+1}-2 w^K_{j}+w^K_{j-1}-r^2 W'(w^k_{ j})\right) - \left( w^K_{- j+1}-2 w^K_{- j}+w^K_{- j-1}-r^2 W'(w^k_{- j})\right) =0. \end{aligned}$$

From this, using the fact that \(w^K_{j}=-w^K_{-j}\) and that \(W'\) is an odd function on \([-1,1]\) by assumption (1.9), we conclude that

$$\begin{aligned} w^K_{j+1}-2 w^K_j+w^K_{j-1}= r^2 W'(w^k_j)\quad \forall j\in (-K+1, K-1). \end{aligned}$$
(7.5)

A similar argument gives that also \(z^K_j\) satisfies (7.5), namely

$$\begin{aligned} z^K_{j+1}-2 z^K_j+z^K_{j-1}= r^2 W'(z^k_j)\quad \forall j\in (-K+1, K-1). \end{aligned}$$
(7.6)

Now, using the monotonicity of \((w^K_j)\) and \((z^K_j)\), we can also take the limit as \(K\rightarrow +\infty \) for the sequences \((w^K_j)\) and \((z^K_j)\). In this way, we obtain two sequences that we denote by \( (\bar{w}_j)\) and \((\bar{z}_j)\), respectively.

We notice that \((\bar{w}_i)\) and \((\bar{z}_i)\) are monotone nondecreasing. Also, they satisfy (1.20) and are odd, in the sense that \(\bar{w}_0=0\) and \(\bar{w}_n=-\bar{w}_{-n}\) for all \(n>0\), whereas \(\bar{z}_n=-\bar{z}_{-n-1}\). Moreover, using (7.5) and (7.6), we get that they are solutions to (1.19). This concludes the proof of Proposition 1.7. □

Remark 7.1

Concerning the proof of Proposition 1.7, we also observe that, arguing as in the proof of Theorem 1.1, we get that \((\bar{w}_j)\) is a solution to the minimization problem

$$\begin{aligned} \min \left\{ \sum _{j=-\infty }^{+\infty } \left( \frac{1}{2r^2} (w_{j+1}-w_{j})^2+ W(w_j)\right) \right\} \end{aligned}$$
(7.7)

among all sequences such that  \(w_j\in [-1,1]\) for all \(j\in {\mathbb {Z}}\), \(w_0=0\), \(w_j=-w_{-j}\) and \(\lim _{j\rightarrow +\infty } w_{j}=1\), whereas \((\bar{z}_j)\) is a solution to the minimization problem

$$\begin{aligned} \min \left\{ \sum _{j=-\infty }^{+\infty } \left( \frac{1}{2r^2} (z_{j+1}-z_{j})^2+ W(z_j)\right) \right\} \end{aligned}$$
(7.8)

among all sequences such that  \(z_j\in [-1,1]\) for all \(j\in {\mathbb {Z}}\), \(z_i=-z_{-i-1}\) for all \(i\geqslant 0\) and \(\lim _{j\rightarrow +\infty } z_{j}=1\).

Now, we prove Corollary 1.8, as a consequence of Proposition 1.7.

Proof of Corollary 1.8

Let \((\bar{w}_n)_n\) and \((\bar{z}_n)_n\) be as in Proposition 1.7. We define

$$\begin{aligned} u(x):=\bar{w}_n\quad {\text{ and } }\quad v(x):=\bar{z}_n\quad {\text{ for }}\,{\hbox {all}}\,x\in [2nr, 2nr+2r). \end{aligned}$$

Then, u and v are monotone nondecreasing, satisfy (1.11) and, in view of (1.19), they are solutions to (1.15), as desired.

We stress that u and v are geometrically different (namely, they are not equal up to a translation). Indeed, if we define \(I_n:=[2nr, 2nr+2r)\), we see that

$$\begin{aligned} u=0\,{\hbox {on}}\, {\hbox {an}}\, {\hbox {odd}}\, {\hbox {number}}\, {\hbox {of}}\, {\hbox {intervals}}\,I_n,\,{\hbox {and}}\,v=0\,{\hbox {on}}\,{\hbox {an}}\,{\hbox {even}}\, {\hbox {number}}\, {\hbox {of}}\, {\hbox {intervals}}\, I_n. \end{aligned}$$
(7.9)

To check this, we first observe that \(u=\bar{w}_0=0\) in \(I_0\). By monotonicity, we can take \(\bar{n}\) to be the greatest n for which \(u=0\) in \(I_n\), and then \(u=0\) in \(I_0\cup \dots I_{\bar{n}}\), with \(u>0\) in \(I_{\bar{n}+1}\). Then, recalling (1.21), it follows that \(u=0\) in \(I_{-1}\cup \dots I_{-\bar{n}}\), with \(u<0\) in \(I_{-\bar{n}-1}\). This says that \(u=0\) in \(I_0\cup I_{\pm 1}\dots I_{\pm \bar{n}}\) and \(u\ne 0\) elsewhere.

Similarly, suppose that \(v=0\) in some interval \(I_j\). From (1.21), we conclude that \(v=0\) also in \(I_{-j-1}\). Since j cannot be equal to \(-j-1\), this argument always provides a couple of intervals on which \(v=0\). The proof of (7.9) is thereby complete. □

8 The Dirichlet problem for \(D_r\), and proofs of Theorem 1.9, and of Corollaries 1.10 and 1.11

In this section, we provide the proofs of Theorem 1.9, of Corollary 1.10 and of Corollary 1.11.

First of all, we observe that uniqueness of solutions to (1.23) is a direct consequence of the following Maximum Principle for the operator \(D_r\).

Lemma 8.1

(Maximum Principle for \(D_r\)) Let \(r>0\), \(a<b\), and \(u\in L^\infty _{\mathrm{{loc}}}({\mathbb {R}})\) be such that

$$\begin{aligned} \left\{ \begin{array}{ll} D_r u\geqslant 0&\quad { \text{ in } }\,(a,b),\\ u\leqslant 0&\quad { \text{ in } }\,[a-r,a],\\ u\leqslant 0&\quad { \text{ in } }\,[b,b+r]. \end{array}\right. \end{aligned}$$
(8.1)

Then \(u\leqslant 0\) almost everywhere in \([a-r,b+r]\).

Proof

By contradiction, let us assume that

$$\begin{aligned} \sigma :=\sup _{ [a-r,b+r] } u >0. \end{aligned}$$

Let

$$\begin{aligned} \begin{aligned} {\mathcal {S}}\,:=\,&\big \{ \bar{x}\in [a-r,b+r]\, {\text{ s.t. }}\,{\hbox {there}}\, {\hbox {exists}}\, {\hbox {a}}\, {\hbox {sequence}} x_k\in [a-r,b+r]\\&{{\text{ such }} {\text{ that }} }x_k\rightarrow \bar{x}, x_k\,{\hbox {are}}\, {\hbox {density}}\, {\hbox {points}}\, {\hbox {for}}\,u, {\hbox {and}}~u(x_k)\rightarrow \sigma \,{\hbox {as}}\,k\rightarrow +\infty \big \}. \end{aligned} \end{aligned}$$
(8.2)

Since \({\mathcal {S}}\subseteq [a-r,b+r]\), we can define

$$\begin{aligned} x^\star :=\sup {\mathcal {S}}\in [a-r,b+r]. \end{aligned}$$
(8.3)

We claim that, in fact, this supremum is attained, and

$$\begin{aligned} x^\star =\max {\mathcal {S}}. \end{aligned}$$
(8.4)

To check this, fix \(m\in {\mathbb {N}}\), to be taken as large as we wish. By (8.3), we know that there exists \(\bar{x}_m\in {\mathcal {S}}\) such that \(|x^\star -\bar{x}_m|\leqslant 1/m\). Then, by (8.2), we know that there exists a sequence \(x_{k,m}\in [a-r,b+r]\) such that

$$\begin{aligned} \lim _{k\rightarrow +\infty } x_{k,m}= \bar{x}_m \quad {\text{ and }}\quad \lim _{k\rightarrow +\infty } u(x_{k,m})=\sigma . \end{aligned}$$

In particular, there exists \(k_m\in {\mathbb {N}}\) such that if \(k\geqslant k_m\) then

$$\begin{aligned} |x_{k,m}- \bar{x}_m|\leqslant \frac{1}{m} \quad {\text{ and }} \quad | u(x_{k,m})-\sigma |\leqslant \frac{1}{m}. \end{aligned}$$

Let now \(x^\star _m:=x_{k_m,m}\). By construction,

$$\begin{aligned} |x^\star _m-x^\star |\leqslant |x_{k_m,m}- \bar{x}_m|+|\bar{x}_m-x^\star |\leqslant \frac{2}{m} \quad {\text{ and }} \quad | u(x^\star _m)-\sigma |\leqslant \frac{1}{m}. \end{aligned}$$

This and (8.2) imply that \(x^\star \in {\mathcal {S}}\), which, combined with (8.3), gives (8.4), as desired.

We also claim that

$$\begin{aligned} x^\star \in (a,b). \end{aligned}$$
(8.5)

To check this, suppose, by contradiction, that \(x^\star \in [a-r, a]\) (the case \(x^\star \in [ b,b+r]\) is similar). Then it must be that

$$\begin{aligned} x^\star =a. \end{aligned}$$
(8.6)

Indeed, if \(x^\star \in [a-r,a)\) and \(x_k\rightarrow x^\star \) as \(k\rightarrow +\infty \), we have that \(x_k\in [a-r,a)\) for large k, and thus

$$\begin{aligned} \sigma =\lim _{k\rightarrow +\infty } u(x_k)\leqslant 0, \end{aligned}$$

which is a contradiction.

Then, in view of (8.6), we can take a sequence \(y_k>a\) such that

$$\begin{aligned} \lim _{k\rightarrow +\infty } y_k=a=x^\star \quad {\text{ and }}\quad \lim _{k\rightarrow +\infty }u(y_k)=\sigma . \end{aligned}$$

So we can exploit (8.1) at the point \(y_k\), for k sufficiently large such that \(y_k-r<a\), and write that

$$\begin{aligned} 0&\leqslant r^2 D_r u(y_k)\\&= u(y_k+r)+u(y_k-r)-2u(y_k)\\&\leqslant u(y_k+r)-2u(y_k)\\&\leqslant \sigma -2u(y_k). \end{aligned}$$

Then, passing to the limit as \(k\rightarrow +\infty \), we obtain that \(0\leqslant \sigma -2\sigma =-\sigma \), which is a contradiction. The proof of (8.5) is thereby complete.

Hence, in light of (8.4) and (8.5), we can take a sequence \(x_k\rightarrow x^\star \) with \(u(x_k)\rightarrow u(x^\star )\) as \(k\rightarrow +\infty \) and exploit (8.1) at the point \(x_k\). In this way, we find that

$$\begin{aligned} 0\leqslant u(x_k+r)+u(x_k-r)-2u(x_k)\leqslant u(x_k+r)+\sigma -2u(x_k), \end{aligned}$$

and therefore

$$\begin{aligned} 0\leqslant \lim _{k\rightarrow +\infty } \Big ( u(x_k+r)+\sigma -2u(x_k) \Big ) =\lim _{k\rightarrow +\infty } u(x_k+r)-\sigma . \end{aligned}$$

Consequently, writing \(\tilde{x}_k:=x_k+r\) and \(\tilde{x}:=x^\star +r>x^\star \), we see that \(\tilde{x}_k\rightarrow \tilde{x}\) and \(u(\tilde{x}_k)\rightarrow \sigma \) as \(k\rightarrow +\infty \). This gives that \(\tilde{x}\in {\mathcal {S}}\), which is in contradiction with (8.4). □

Proof of Theorem 1.9

The uniqueness statement plainly follows from Lemma 8.1, and hence we focus on the proof of the fact that the function in (1.24) is a solution to  (1.23), which is a direct, albeit tricky, computation. To this end, we observe that, by (1.25),

$$\begin{aligned} \begin{aligned}&{\overline{k}}(x+r)={\overline{k}}(x)-1,\qquad {\overline{k}}(x-r)={\overline{k}}(x)+1,\qquad \\ &{\underline{k}}(x+r)={\underline{k}}(x)+1\qquad {\underline{k}}(x-r)={\underline{k}}(x)-1, \end{aligned} \end{aligned}$$
(8.7)

thus

$$\begin{aligned} {\overline{k}}(x\pm r)+{\underline{k}}(x\pm r)={\overline{k}}(x)+{\underline{k}}(x) , \end{aligned}$$
(8.8)

and, moreover,

$$\begin{aligned} \begin{aligned}&{\text{ if }}\, y\in (a-r,a]\,{\hbox { and }}\,z\in [b,b+r),\\&{\text{ then } }\,{\overline{k}}(y),{\underline{k}}(z)\in \left[ \displaystyle \frac{b-a}{r},\,\displaystyle \frac{b-a}{r}+1\right),\,{ \hbox { and }}\,{\underline{k}}(y)=0={\overline{k}}(z). \end{aligned} \end{aligned}$$
(8.9)

Now, to check (1.23), fixed \(x\in (a,b)\), we need to distinguish four cases:

$$\begin{aligned}&x+r\in [b,b+r)\, { \text{ and } }\, x-r\in (a-r,a], \end{aligned}$$
(8.10)
$$\begin{aligned}&x+r\in (a,b) \,{ \text{ and } }\, x-r\in (a-r,a],\end{aligned}$$
(8.11)
$$\begin{aligned}&x+r\in [b,b+r)\, { \text{ and } }\, x-r\in (a,b)\end{aligned}$$
(8.12)
$$\begin{aligned} {\text{ and } }&x+r\in (a,b) \,{ \text{ and } }\, x-r\in (a,b). \end{aligned}$$
(8.13)

We start by taking into account the case in (8.10). Then, by (8.9), we have that \({\underline{k}}(x-r)=0={\overline{k}}(x+r)\), and so, by (8.7), we get that \({\underline{k}}(x)=1={\overline{k}}(x)\), therefore

$$\begin{aligned}&u(x+r)+u(x-r)-2u(x)\\&\quad =\beta (x+r)+\alpha (x-r)-\Bigg ( \alpha (x-r)+ \beta (x+r) -r^2\,f(x)\Bigg )\\&\quad = r^2\,f(x), \end{aligned}$$

which proves (1.23) in this case.

Let us now suppose that (8.11) holds true. Then, by (8.7) and (8.9), we have that \({\underline{k}}(x)=1+ {\underline{k}}(x-r)=1\) and consequently, recalling also (8.8),

$$\begin{aligned}&u(x+r)+u(x-r)-2u(x)\\&\quad = \frac{1}{{\overline{k}}(x)+1}\,\Bigg ( ({\overline{k}}(x)-1)\,\alpha (x-r)+ 2\beta (x+{\overline{k}} (x)r) -r^2({\overline{k}}(x)-1)\,f(x) \\&\qquad -2r^2\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big ) -2r^2({\overline{k}}(x)-1)\,f(x+r)\Bigg ) +\alpha (x-r)\\&\qquad - \frac{2}{{\overline{k}}(x)+1}\,\Bigg ( {\overline{k}}(x)\,\alpha (x-r)+ \beta (x+{\overline{k}} (x)r) -r^2\,\sum _{j=1}^{{\overline{k}}(x)-1} j f\big (x+({\overline{k}}(x)-j)r\big ) -r^2{\overline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{{\overline{k}}(x)+1}\,\Bigg ( -r^2({\overline{k}}(x)-1)\,f(x) -2r^2\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big ) -2r^2({\overline{k}}(x)-1)\,f(x+r)\\&\qquad +2r^2\,\sum _{j=1}^{{\overline{k}}(x)-1} j f\big (x+({\overline{k}}(x)-j)r\big ) +2r^2{\overline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{{\overline{k}}(x)+1}\,\Bigg ( -r^2({\overline{k}}(x)-1)\,f(x) -2r^2({\overline{k}}(x)-1)\,f(x+r) +2r^2({\overline{k}}(x)-1)\,f(x+r) +2r^2{\overline{k}}(x)\,f(x)\Bigg )\\&\quad = r^2\,f(x). \end{aligned}$$

This proves (1.23) in this case, and we now consider the case in (8.12). In this case, by (8.7) and (8.9), we have that \({\overline{k}}(x)=1+ {\overline{k}}(x+r)=1\) and consequently, recalling also (8.8),

$$\begin{aligned}&u(x+r)+u(x-r)-2u(x)\\&\quad =\beta (x+r)+ \frac{1}{1+{\underline{k}}(x)}\,\Bigg ( 2\,\alpha (x-{\underline{k}} (x)r)+ ({\underline{k}}(x)-1)\,\beta (x+r) -2r^2\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big ) \\&\qquad -r^2({\underline{k}}(x)-1)\, f(x) -2r^2\,({\underline{k}}(x)-1)\,f(x-r)\Bigg ) \\&\qquad - \frac{2}{1+{\underline{k}}(x)}\,\Bigg ( \alpha (x-{\underline{k}} (x)r)+ {\underline{k}}(x)\,\beta (x+r) -r^2\,\sum _{j=1}^{{\underline{k}}(x)-1} j f\big (x-({\underline{k}}(x)-j)r\big ) -r^2\,{\underline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{1+{\underline{k}}(x)}\,\Bigg ( -2r^2\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big ) -r^2({\underline{k}}(x)-1)\, f(x) -2r^2\,({\underline{k}}(x)-1)\,f(x-r)\\&\qquad + 2r^2\,\sum _{j=1}^{{\underline{k}}(x)-1} j f\big (x-({\underline{k}}(x)-j)r\big ) +2r^2\,{\underline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{1+{\underline{k}}(x)}\,\Bigg ( -r^2({\underline{k}}(x)-1)\, f(x) -2r^2\,({\underline{k}}(x)-1)\,f(x-r) +2r^2\,({\underline{k}}(x)-1) \,f(x-r) +2r^2\,{\underline{k}}(x)\,f(x)\Bigg )\\&\quad = r^2\,f(x). \end{aligned}$$

This proves (1.23) in this case. So, it only remains to check (8.13). To this end,

$$\begin{aligned}&u(x+r)+u(x-r)-2u(x)\\&\quad = \frac{1}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg ( ({\overline{k}}(x)-1)\,\alpha (x-{\underline{k}} (x)r)+ ({\underline{k}}(x)+1)\,\beta (x+{\overline{k}} (x)r) -r^2({\overline{k}}(x)-1)\,\sum _{j=1}^{{\underline{k}}(x)} j f\big (x-({\underline{k}}(x)-j)r\big )\\&\qquad -r^2({\underline{k}}(x)+1)\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big ) -r^2({\overline{k}}(x)-1)({\underline{k}}(x)+1)\,f(x+r)\Bigg )\\&\qquad + \frac{1}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg ( ({\overline{k}}(x)+1)\,\alpha (x-{\underline{k}} (x)r)+ ({\underline{k}}(x)-1)\,\beta (x+{\overline{k}} (x)r)\\&\qquad -r^2({\overline{k}}(x)+1)\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big ) -r^2({\underline{k}}(x)-1)\,\sum _{j=1}^{{\overline{k}}(x)} j f\big (x+({\overline{k}}(x)-j)r\big ) \\&\qquad -r^2({\overline{k}}(x)+1)({\underline{k}}(x)-1)\,f(x-r)\Bigg )\\&\qquad -\frac{2}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg ( {\overline{k}}(x)\,\alpha (x-{\underline{k}} (x)r)+ {\underline{k}}(x)\,\beta (x+{\overline{k}} (x)r) -r^2{\overline{k}}(x)\,\sum _{j=1}^{{\underline{k}}(x)-1} j f\big (x-({\underline{k}}(x)-j)r\big ) \\&\qquad -r^2{\underline{k}}(x)\,\sum _{j=1}^{{\overline{k}}(x)-1} j f\big (x+({\overline{k}}(x)-j)r\big ) -r^2{\overline{k}}(x)\,{\underline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg ( -r^2({\overline{k}}(x)-1)\,\sum _{j=1}^{{\underline{k}}(x)} j f\big (x-({\underline{k}}(x)-j)r\big )\\&\qquad -r^2({\underline{k}}(x)+1)\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big ) -r^2({\overline{k}}(x)-1)({\underline{k}}(x)+1)\,f(x+r)\\&\qquad -r^2({\overline{k}}(x)+1)\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big ) -r^2({\underline{k}}(x)-1)\,\sum _{j=1}^{{\overline{k}}(x)} j f\big (x+({\overline{k}}(x)-j)r\big ) \\&\qquad -r^2({\overline{k}}(x)+1)({\underline{k}}(x)-1)\,f(x-r) +2r^2{\overline{k}}(x)\,\sum _{j=1}^{{\underline{k}}(x)-1} j f\big (x-({\underline{k}}(x)-j)r\big ) \\&\qquad +2r^2{\underline{k}}(x)\,\sum _{j=1}^{{\overline{k}}(x)-1} j f\big (x+({\overline{k}}(x)-j)r\big ) +2r^2{\overline{k}}(x)\,{\underline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Bigg ( -r^2({\overline{k}}(x)-1)\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big )\\&\qquad -r^2({\overline{k}}(x)-1)({\underline{k}}(x)-1)\, f(x-r) -r^2({\overline{k}}(x)-1)\,{\underline{k}}(x)\,f(x)\\&\qquad -r^2({\underline{k}}(x)+1)\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big ) -r^2({\overline{k}}(x)-1)({\underline{k}}(x)+1)\,f(x+r)\\&\qquad -r^2({\overline{k}}(x)+1)\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big ) -r^2({\underline{k}}(x)-1)\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big )\\&\qquad -r^2({\underline{k}}(x)-1)({\overline{k}}(x)-1)\,f(x+r) -r^2({\underline{k}}(x)-1)\,{\overline{k}}(x)\,f(x)\\&\qquad -r^2({\overline{k}}(x)+1)({\underline{k}}(x)-1)\,f(x-r) +2r^2{\overline{k}}(x)\,\sum _{j=1}^{{\underline{k}}(x)-2} j f\big (x-({\underline{k}}(x)-j)r\big )\\&\qquad +2r^2{\overline{k}}(x)\,({\underline{k}}(x)-1)\, f(x-r) +2r^2{\underline{k}}(x)\,\sum _{j=1}^{{\overline{k}}(x)-2} j f\big (x+({\overline{k}}(x)-j)r\big )\\&\qquad +2r^2{\underline{k}}(x)\,({\overline{k}}(x)-1)\, f(x+r) +2r^2{\overline{k}}(x)\,{\underline{k}}(x)\,f(x)\Bigg )\\&\quad = \frac{1}{{\overline{k}}(x)+{\underline{k}}(x)}\,\Big ( -r^2({\overline{k}}(x)-1)({\underline{k}}(x)-1)\, f(x-r) -r^2({\overline{k}}(x)-1)\,{\underline{k}}(x)\,f(x)\\&\qquad -r^2({\overline{k}}(x)-1)({\underline{k}}(x)+1)\,f(x+r)-r^2({\underline{k}}(x)-1)({\overline{k}}(x)-1)\,f(x+r) -r^2({\underline{k}}(x)-1)\,{\overline{k}}(x)\,f(x)\\&\qquad -r^2({\overline{k}}(x)+1)({\underline{k}}(x)-1)\,f(x-r)+2r^2{\overline{k}}(x)\,({\underline{k}}(x)-1)\, f(x-r) +2r^2{\underline{k}}(x)\,({\overline{k}}(x)-1)\, f(x+r)\\&\qquad +2r^2{\overline{k}}(x)\,{\underline{k}}(x)\,f(x)\Big )\\&\quad = r^2\,f(x), \end{aligned}$$

which completes the proof of (1.23) in this case as well. The proof of Theorem 1.9 is thereby finished. □

Finally, under the assumption that the functions \(\alpha , \beta ,f\) are continuous, we study the regularity of the solution to (1.23) given by Theorem 1.9.

Proof of Corollary 1.10

We start with the proof of (1.26). First of all, if \(x\in [a-r,a]\), then \(u(x)=\alpha (x)\), which obviously fulfills the bound in (1.26). Similarly, if \(x\in [b,b+r]\), we have that \(y:=x+a-b-r\in [a-r,a]\) and we have that

$$\begin{aligned} |u(x)|=|\beta (x)|\leqslant |\alpha (y)|+|\alpha (y)-\beta (x)| =|\alpha (y)|+|\alpha (y)-\beta (y-a+b+r)|, \end{aligned}$$

and the bound in (1.26) also follows in this case. Hence, it remains to prove (1.26) when \(x\in (a,b)\). In this case, we write (1.24) as

$$\begin{aligned} \begin{aligned} u(x)\,&=\alpha (x-{\underline{k}} (x)r)+ \frac{{\underline{k}}(x)}{{\overline{k}}(x)+{\underline{k}}(x)}\, \,\big (\beta (x+{\overline{k}} (x)r) -\alpha (x-{\underline{k}} (x)r)\big ) \\&\quad - \frac{r^2}{{\overline{k}}(x)+{\underline{k}}(x)}\, \left( {\overline{k}}(x)\,\sum _{j=1}^{{\underline{k}}(x)-1} j f\big (x-({\underline{k}}(x)-j)r\big ) +{\underline{k}}(x)\,\sum _{j=1}^{{\overline{k}}(x)-1} j f\big (x+({\overline{k}}(x)-j)r\big ) +{\overline{k}}(x)\,{\underline{k}}(x)\,f(x)\right) \end{aligned} \end{aligned}$$
(8.14)

and therefore

$$\begin{aligned} \begin{aligned} |u(x)|\,&\leqslant \Vert \alpha \Vert _{L^\infty ([a-r,a])}+ \frac{\underline{k}(x)}{{\overline{k}}(x)+{\underline{k}}(x)}\, \mathop {\mathop {\sup }\limits _{{p\in [a-r,a]}}}\limits _{q\in [b,b+r]}|\alpha (p)-\beta (q)|\\&\quad + \frac{r^2}{{\overline{k}}(x)+{\underline{k}}(x)}\Vert f\Vert _{L^\infty ([a,b])} \left( \overline{k}(x) \frac{({\underline{k}}(x)-1)\underline{k}(x)}{2} +\underline{k}(x) \frac{({\overline{k}}(x)-1)\overline{k}(x)}{2}+ \overline{k}(x) \underline{k}(x)\right) \\&\leqslant \Vert \alpha \Vert _{L^\infty ([a-r,a])}+ \mathop {\mathop {\sup }\limits _{{p\in [a-r,a]}}}\limits _{q\in [b,b+r]}|\alpha (p)-\beta (q)| +r^2 \,\Vert f\Vert _{L^\infty ([a,b])}\frac{\overline{k}(x) \underline{k}(x)}{2}. \end{aligned} \end{aligned}$$
(8.15)

We also observe that, by (1.25),

$$\begin{aligned} {\overline{k}}(x)\leqslant \frac{b-x}{r}+1\leqslant \frac{b-a}{r}+1\quad {\text{ and } }\quad {\underline{k}}(x)\leqslant \frac{x-a}{r}+1\leqslant \frac{b-a}{r}+1. \end{aligned}$$
(8.16)

Therefore

$$\begin{aligned} r^2 \frac{\overline{k}(x) \underline{k}(x)}{2}\leqslant \frac{r^2}{2} \left( \frac{b-a+r}{r}\right) ^2\leqslant (b-a)^2+ r^2. \end{aligned}$$

Inserting this into (8.15), we thus obtain the bound in (1.26), as desired.

We also observe that the continuity of u outside \({\mathcal {J}}\) claimed in the statement of Corollary 1.10 follows directly from (1.24) and so, to complete the proof of Corollary 1.10, it only remains to check (1.27). To this end, we observe that, in view of (1.25),

$$\begin{aligned} {\overline{k}}(x)+{\underline{k}}(x)\geqslant \frac{b-x}{r}+\frac{x-a}{r}=\frac{b-a}{r}. \end{aligned}$$

Using this, (8.14) and (8.16), the claim in (1.27) follows by the fact that \({\overline{k}}\) and \({\underline{k}}\) have at most unit jumps. □

Proof of Corollary 1.11

As can be easily checked from (1.24), the solution to (1.23) is given by

$$\begin{aligned} u(x):= \left\{ \begin{array}{ll} 0&\quad { \text{ if } }\,x\in [-r,0], \\ \frac{\underline{k}(x)}{\overline{k}(x)+\underline{k}(x)} &\quad { \text{ if } }\,x\in (0,1), \\ 1&\quad { \text{ if } }\,x\in [1,1+r]. \end{array}\right. \end{aligned}$$
(8.17)

Observe that this function is discontinuous at \(x\in (0,1)\) such that \(x\not \in r{\mathbb {N}}\). Indeed, recalling that \(n=\frac{1}{r}\in {\mathbb {N}}\) and \(x\in (0,1)\), we observe that

$$\begin{aligned}&\underline{k}(x)= \left\lceil \frac{x}{r}\right\rceil = \left\lceil nx\right\rceil \quad { \text{ and }}\\&\overline{k}(x)=\left\lceil \frac{1-x}{r}\right\rceil =\left\lceil n-nx\right\rceil ={\left\{ \begin{array}{ll} n- nx= n-\underline{k}(x)=\frac{1}{r}-\underline{k}(x) &\quad { \text{ if } }\,nx= \frac{x}{r}\in {\mathbb {N}},\\ n-\underline{k}(x)-1=\frac{1}{r}-1-\underline{k}(x) &\quad { \text{ if } }\, nx= \frac{x}{r}\not \in {\mathbb {N}}, \end{array}\right. } \end{aligned}$$

where \(\lceil x\rceil \) denotes the smallest integer z such that \(x\leqslant z\).

As a consequence,

$$\begin{aligned} \underline{k}(x)+\overline{k}(x)= {\left\{ \begin{array}{ll} \frac{1}{r} &\quad { \text{ if } }\, x\in r{\mathbb {N}},\\ \frac{1}{r}-1=\frac{1-r}{r} &\quad { \text{ if } }\, x\not \in r{\mathbb {N}}. \end{array}\right. } \end{aligned}$$

Therefore the function u defined in (8.17) can be written as

$$\begin{aligned} u(x):= {\left\{ \begin{array}{ll} 0&\quad { \text{ if } }\,x\in [-r,0], \\ x &\quad { \text{ if } }\, x\in (0,1)\, { \text{ and } }\,x\in r{\mathbb {N}},\\ \frac{r}{1-r}\left\lceil \frac{x}{r}\right\rceil &\quad { \text{ if } } \,x\in (0,1)\, { \text{ and } }\, x\not \in r{\mathbb {N}},\\ 1&\quad { \text{ if } }\,x\in [1,1+r]. \end{array}\right. } \end{aligned}$$

Note in particular that \(u(x)=0\) for all \(x\in [-r, r)\), \(u(x)=1\) for all \(x\in (1-r, 1+r]\), \(0\leqslant u(x)\leqslant 1\) for all \(x\in [-r, 1+r]\), and u has jump discontinuities at the points of the form \(x=\frac{k}{n}\) with \(k\in \{1,\dots ,n-1\}\). □