1 Introduction

Numerical verification methods for partial differential equations have been developed in recent decades. Such methods were first proposed in [14, 17] and have been further developed by many researchers (see the recent survey book [15] and the references therein). These approaches are also known as computer-assisted proofs, validated numerics, or verified numerical computations for partial differential equations and have been applied to various problems, including some for which purely analytical methods have failed. One such successful application is to the semilinear elliptic equation

$$\begin{aligned} -\varDelta u(x)=f(u(x)), ~~x \in \varOmega \end{aligned}$$
(1)

with appropriate boundary conditions, where \(\varDelta\) is the Laplacian, \(\varOmega \subset {\mathbb {R}}^{N}\) \((N=2,3,\ldots )\) is a bounded domain with a Lipschitz boundary, and \(f: \mathbb {R} \rightarrow \mathbb {R}\) is a nonlinear map (see, for example, the numerical results in [11, 12, 15, 16, 19, 21, 26]). Further regularity assumptions for \(\varOmega\) and f will be shown later for our setting. Hereafter, \(H^k(\varOmega )\) denotes the k-th order \(L^2\) Sobolev space. We define \(H^1_0(\varOmega ):= \{ u \in H^1(\varOmega ) : u = 0~\text{ on } ~ \partial \varOmega \}\), with the inner product \((u, v)_{H^1_0}:=(\nabla u, \nabla v)_{L^2}\) and norm \(\Vert u \Vert _{H^1_0} := \sqrt{(u, u)_{\smash {H^1_0}}}\).

Numerical verification methods enable us to obtain an explicit ball containing exact solutions of (1). More precisely, for a “good” numerical approximation \({\hat{u}} \in H^1_0(\varOmega )\), they enable us to prove the existence of an exact solution \(u \in H^1_0(\varOmega )\) of (1) that satisfies

$$\begin{aligned} \left\| u-{\hat{u}}\right\| _{H_{0}^{1}} \le \rho \end{aligned}$$
(2)

with an explicit error bound \(\rho >0\). Additionally, under an appropriate condition, we can obtain an \(L^{\infty }\)-estimation

$$\begin{aligned} \left\| u-{\hat{u}}\right\| _{L^{\infty }} \le \sigma \end{aligned}$$
(3)

with bound \(\sigma >0\). For instance, when \(u,{\hat{u}} \in H^2(\varOmega )\), we can evaluate the \(L^{\infty }\)-bound \(\sigma >0\) by considering the embedding \(H^2(\varOmega ) \hookrightarrow L^{\infty }(\varOmega )\); details are discussed later in this section. Thus, this approach has the advantage that quantitative information about the solutions of a target equation is provided accurately in a strict mathematical sense. From the error estimates, we can identify the approximate shapes of solutions. Despite these advantages, information about the sign change of solutions is not guaranteed without additional considerations, irrespective of how small the error bound (\(\rho\) or \(\sigma\)) is. To be more precise, we introduce the following.

Definition 1.1

For \(u: \varOmega \rightarrow {\mathbb {R}}\), the connected components of the open sets

$$\begin{aligned} \{x \in \varOmega ~:~u(x)>0\} ~~and~~ \{x \in \varOmega ~:~u(x)<0\} \end{aligned}$$

are called the nodal domains of u and denoted by N.D.(u). In particular, \(\{x \in \varOmega ~:~u(x)>0\}\) contains the positive nodal domains of u and is denoted by P.N.D.(u), and \(\{x \in \varOmega ~:~u(x)<0\}\) contains the negative nodal domains of u and is denoted by N.N.D.(u).

The zero level-set

$$\begin{aligned} \{x \in \varOmega ~:~u(x)=0\} \end{aligned}$$

is called the nodal line of u.

According to the above definition, nodal lines do not contain the boundary of \(\varOmega\); however, we interpret zero-Dirichlet boundaries as parts of nodal lines when we apply this later to the Allen–Cahn equation (see Subsect. 2.3).

An essential problem is that \(\#\mathrm{N.D.}(u)\) (the number of nodal domains) does not generally coincide with \(\#{\mathrm{N.D.}}({\hat{u}})\) (see Fig. 1). For example, when u is imposed on the homogeneous Dirichlet boundary conditions, it is possible for u to be negative near the boundary \(\partial \varOmega\) even when \({\hat{u}}\) is positive in \(\varOmega\). In previous studies, we developed methods for verifying the positivity of solutions of (4) [23, 25,26,27]. These methods succeeded in verifying the existence of positive solutions with precise error bounds by checking simple conditions, but determining the sign-change structure has been out of scope.

Fig. 1
figure 1

Conceptual figure for the area in which \(({\hat{u}}-\sigma )({\hat{u}}+\sigma )<0\) between the two solid lines. Nodal lines of u lay inside the area and do not exist outside. Regardless of how small \(\sigma >0\) is, we cannot deny the possibility that there exist (small) nodal domains in the area only from the error estimations \(\rho\) and/or \(\sigma\). If the nonexistence of nodal domains inside the area is proved, we can estimate \(\#\mathrm{N.D.}(u)\) and determine the topology of the nodal lines (that is, how the lines intersect)

The main contribution of this paper is a proposed method for verifying the sign-change structure of solutions u of (1) subject to one of the three types of homogeneous boundary value conditions—Dirichlet type, Neumann type and mixed type—while assuming the error estimations (2) and (3). If error bounds are sufficiently precise, our theorems can be applied to the case in which f is a subcritical polynomial

$$\begin{aligned} f(t) = \lambda t + \sum _{i=2}^{n(<p^*)}a_{i}t|t|^{i-1},~~\lambda ,~a_i \in \mathbb {R},~a_i \ne 0 \text { for some } i, \end{aligned}$$

where \(p^*=\infty\) when \(N=2\) and \(p^*=(N+2)/(N-2)\) when \(N\ge 3\). They are also applicable to more general nonlinearities other than polynomials (see Theorems 2.1 and 3.1). In the later sections, we discuss the applicability of our method to the Dirichlet problem

$$\begin{aligned} \left\{ \begin{array}{l l} -\varDelta u(x)=f(u(x)), &{}x \in \varOmega ,\\ u(x)=0, &{}x \in \partial \varOmega ,\\ \end{array}\right. \end{aligned}$$
(4)

the Neumann problem

$$\begin{aligned} \left\{ \begin{array}{l l} -\varDelta u(x)=f(u(x)), &{}x \in \varOmega ,\\ \frac{\partial u}{\partial n}(x)=0, &{}x \in \partial \varOmega ,\\ \end{array}\right. \end{aligned}$$
(5)

and the mixed boundary value problem

$$\begin{aligned} \left\{ \begin{array}{l l} -\varDelta u(x)=f(u(x)), &{}x \in \varOmega ,\\ u(x)=0, &{}x \in \varGamma _D,\\ \frac{\partial u}{\partial n}(x)=0, &{}x \in \varGamma _N,\\ \end{array}\right. \end{aligned}$$
(6)

Here, \(\varGamma _D\) is a relatively open subset of \(\partial \varOmega\) and \(\varGamma _N = \partial \varOmega \backslash \overline{\varGamma _D}\). We allow \(\varGamma _D\) (or \(\varGamma _N\)) to be empty to unify (5) (or (4)) with (6); otherwise, we assume that both \(\varGamma _D\) and \(\varGamma _N\) are connected sets such that \(\overline{\varGamma _D} \cap \overline{\varGamma _N}\) is an \((N-2)\)-dimensional Lipschitz submanifold of \(\partial \varOmega\). Therefore, when \(\varOmega \subset {\mathbb {R}}^2\) is simply connected, the intersection \(\overline{\varGamma _D} \cap \overline{\varGamma _N}\) is composed of two points. This assumption is not essential for our theory but can be weakened (see Remark 3.2).

To our knowledge, \(H^2\)-regularity of solutions u of the above elliptic problems ((4), (5), or (6)) is required for obtaining an \(L^{\infty }\)-bound \(\sigma\) using existing methods. We obtain an explicit bound for embedding \(H^2(\varOmega ) \hookrightarrow L^{\infty }(\varOmega )\) using [18, Theorem 1]. Moreover, we require an explicit bound \(C>0\) that satisfies

$$\begin{aligned} \Vert v_{xx}\Vert _{L^2} \le C\Vert \varDelta v\Vert _{L^2} \end{aligned}$$
(7)

for all \(v \in H^2(\varOmega )\) satisfying the boundary condition in (4), (5), or (6) in the trace sense, where \(v_{xx}\) denotes the Hesse matrix of v. When \(\varOmega\) is a polygonal domain, we have \(\Vert v_{xx}\Vert _{L^2} = \Vert \varDelta v\Vert _{L^2}\) for such v and therefore can set \(C=1\) (see [5]). Combining the ideas from [18, Sect. 4] and [15, Sect. 6.2.7] looks promising to prove inequality (7) for more general domains, including in higher-dimensional cases. The \(L^{\infty }\)-bound \(\sigma\) can be derived by applying the embedding bound for \(H^2(\varOmega ) \hookrightarrow L^{\infty }(\varOmega )\) and inequality (7) to the error \(u-{\hat{u}}\) when \({\hat{u}} \in H^2(\varOmega )\) fulfills the same boundary condition imposed on u. In this way, we obtain an \(L^{\infty }\)-bound \(\sigma\) for the Dirichlet problem of the Allen–Cahn equation in Sect. 2.3. We believe that future methods can be developed to obtain \(L^{\infty }\)-bounds without assuming \(H^2\)-regularity because weak solutions of these three problems always belong to \(L^{\infty }(\varOmega )\) when f is subcritical (see [4, Corollary 6.6]).

We briefly explain some known facts about the \(H^2\)-regularity of solutions of the Poisson problem

$$\begin{aligned} \left\{ \begin{array}{l l} -\varDelta u=h &{}\mathrm {~in}\ \varOmega ,\\ {\mathrm{B.C.}} &{}\mathrm {~on}\ \partial \varOmega \\ \end{array}\right. \end{aligned}$$
(8)

given \(h \in L^2(\varOmega )\) and \(\varOmega \subset {\mathbb {R}}^2\) with corners, where B.C. represents one of the three types of homogeneous boundary value conditions mentioned above. For the zero-Dirichlet or zero-Neumann cases, i.e., when \(\mathrm{B.C.}\) is replaced with \(u=0\) or \(\frac{\partial u}{\partial n}=0\), solutions u of (8) have \(H^2\)-regularity if \(\varOmega\) is convex and has a piecewise \(C^2\)-boundary (see, for example, [5] and [3, Subsect. 5.3]). For the mixed case, i.e., when \(\mathrm{B.C.}\) is replaced with the boundary condition of (6), the opening angle \(\alpha _{x_0}\) at a corner \(x_0 \in \partial \varOmega\) between \(\varGamma _D\) and \(\varGamma _N\) is essential for \(H^2\)-regularity. If \(\alpha _{x_0} \le \frac{\pi }{2}\), solutions u of (8) have \(H^2\)-regularity around \(x_0\) (see [3, Subsect. 5.3] for details).

The remainder of this paper is organized as follows. In Sect. 2, we focus on the Dirichlet problem (4), propose a method to estimate the number of nodal domains of solutions u and discuss the applicability of this method. This section contains numerical applications of the method to the Allen–Cahn equation. For several verified solutions, the number of nodal domains is estimated and then the locations of nodal lines are determined (see Subsect. 2.3). Subsequently, in Sect. 3, we extend our method to the other boundary value conditions: the Neumann type (5) and mixed type (6).

2 Verification for sign-change structure—the Dirichlet case (4)

In this section, we limit our focus to the Dirichlet problem (4). Our scope will be extended in Sect. 3.

We begin by introducing required notation. We denote \(V=H^1_0(\varOmega )\) and \(V^*=\) (the topological dual of V). For two Banach spaces X and Y, the set of bounded linear operators from X to Y is denoted by \({\mathcal L}(X, Y)\) with the usual supremum norm \(\Vert T \Vert _{{\mathcal L}(X, Y)} := \sup \{ \Vert T u \Vert _{Y} / \Vert u \Vert _{X} : {u \in X \setminus \{0\}}\}\) for \(T \in {\mathcal L}(X, Y)\). A norm bound for the embedding \(V\hookrightarrow L^{p+1}\left( \varOmega \right)\) is denoted by \(C_{p+1}(=C_{p+1}(\varOmega ))\); that is, \(C_{p+1}\) is a positive number that satisfies

$$\begin{aligned} \left\| u\right\| _{L^{p+1}(\varOmega )}\le C_{p+1}\left\| u\right\| _{V}~~~{\mathrm{for all}}~u\in V, \end{aligned}$$
(9)

where \(p\in [1,\infty )\) when \(N=2\) and \(p\in [1,p^*]\) when \(N\ge 3\). If no confusion arises, we use the notation \(C_{p+1}\) to represent the embedding constant on the entire domain \(\varOmega\), whereas, in some parts of this paper, we must consider an embedding constant on some subdomain \(\varOmega '\subset \varOmega\). This is denoted by \(C_{p+1}(\varOmega ')\) to avoid confusion. Moreover, \(\lambda _1(\varOmega )\) denotes the first eigenvalue of \(-\varDelta\) imposed on the homogeneous Dirichlet boundary condition. This is characterized by

$$\begin{aligned} \lambda _{1}(\varOmega ) = \inf _{v\in V^\backslash {\{0\}}} \frac{\Vert v\Vert _{V}^2}{\Vert v\Vert _{L^2}^2}. \end{aligned}$$
(10)

Note that, when domains \(\varOmega _1, \varOmega _2 \subset {\mathbb {R}}^N\) satisfy \(\varOmega _1 \subset \varOmega _2\), \(C_{p+1}(\varOmega _2)\) can be used as a bound \(C_{p+1}(\varOmega _1)\) by considering the zero-extension outside \(\varOmega _1\) to \(\varOmega _2\) for \(u \in H^1_0(\varOmega _1) \subset H^1_0(\varOmega _2)\). In the same way, we confirm \(\lambda _1(\varOmega _1)\ge \lambda _1(\varOmega _2)\).

Throughout this paper, we assume that f is a \(C^1\) function that satisfies

$$\begin{aligned}&|f(t)| \le a_0 |t|^p + b_0 \text { for all } t \in \mathbb {R},\\&|f'(t)| \le a_1 |t|^{p-1} + b_1 \text { for all } t \in \mathbb {R} \end{aligned}$$

for some \(a_0,a_1,b_0,b_1\ge 0\) and \(p<p^*\). We define the operator F by

$$\begin{aligned} F : \left\{ \begin{array}{ccc}{u(\cdot )} &{} {\mapsto } &{} {f(u(\cdot ))}, \\ {V} &{} {\rightarrow } &{} {V^{*}}.\end{array}\right. \end{aligned}$$

Moreover, we define another operator \({\mathcal {F}} : V \rightarrow V^{*}\) by \({\mathcal {F}}(u) :=-\varDelta u-F(u)\), which is characterized by

$$\begin{aligned} \left<{\mathcal {F}}(u),v\right> = \left( \nabla u,\nabla v\right) _{L^2} - \left<F(u),v\right> \text { for all } u,v \in V, \end{aligned}$$
(11)

where \(\left<F(u),v\right> = \int _{\varOmega } f(u(x)) v(x) dx\). The Fréchet derivatives of F and \(\mathcal {F}\) at \(\varphi \in V\), denoted by \({F'_{\varphi }}\) and \({\mathcal F'_{\varphi }}\), respectively, are given by

$$\begin{aligned}&\langle F'_{\varphi }u,v\rangle = \int _{\varOmega } f'(\varphi (x))u(x) v(x) dx \text { for all } u,v \in V,\end{aligned}$$
(12)
$$\begin{aligned}&\langle {\mathcal {F}}'_{\varphi }u,v \rangle = \left( \nabla u,\nabla v\right) _{L^2} - \langle F'_{\varphi }u,v \rangle \text { for all } u,v \in V. \end{aligned}$$
(13)

Under the notation and assumptions, we look for solutions \(u \in V\) of

$$\begin{aligned} {\mathcal {F}}(u)=0, \end{aligned}$$
(14)

which corresponds to the weak form of (4). We call this the D-problem to prevent confusion with the other boundary value problems to be discussed in Sect. 3. Recall that the weak solution \(u \in V\) of the D-problem is in \(L^{\infty }(\varOmega )\); see [4, Corollary 6.6]. We assume that some numerical verification method succeeds in proving the existence of a solution \(u \in V \cap L^{\infty }(\varOmega )\) of (14) in the intersection of

$$\begin{aligned}&{\overline{B}}({\hat{u}},\rho ,\Vert \cdot \Vert _V) := \left\{ v\in V : \left\| v-{\hat{u}}\right\| _{V}\le \rho \right\} , \end{aligned}$$
(15)
$$\begin{aligned}&{\overline{B}}({\hat{u}},\sigma ,\Vert \cdot \Vert _{L^{\infty }}) := \left\{ v\in L^{\infty }(\varOmega ) : \left\| v-{\hat{u}}\right\| _{L^{\infty }}\le \sigma \right\} \end{aligned}$$
(16)

given \({\hat{u}} \in V \cap L^{\infty }(\varOmega )\) and \(\rho ,\sigma >0\). Although the regularity assumption for \({\hat{u}}\) (to be in \(\in V \cap L^{\infty }(\varOmega )\)) is theoretically sufficient to obtain the error bounds (15) and (16), we further assume that \({\hat{u}}\) is continuous or piecewise continuous. This assumption impairs little of the flexibility of actual numerical verification methods. Indeed, past verification was implemented with such approximate solutions \({\hat{u}}\); again, see [11, 12, 15, 16, 19, 21, 26]. Then, we use the following notation:

  • \(\varOmega _{+}:=\{x\in \varOmega : {\hat{u}}-\sigma >0\}\) where \(u>0\) therein;

  • \(\varOmega _{-}:=\{x\in \varOmega : {\hat{u}}+\sigma <0\}\) where \(u<0\) therein;

  • \(\varOmega _{0}:= \varOmega \backslash (\varOmega _{+}\cup \varOmega _{-})\).

The subset \(\varOmega _0\) approximates the nodal line of u, and therefore the location of \(\varOmega _0\) is essential for determining the topology of the nodal line. In practice, \(\varOmega _{+}\) and \(\varOmega _{-}\) are set to a subset of \(\{x\in \varOmega : {\hat{u}}-\sigma >0\}\) and \(\{x\in \varOmega : {\hat{u}}+\sigma <0\}\)), respectively, then \(\varOmega _{0}\) is defined as above. This generalization can be applied directly to our theory. We assume the following geometric properties:

  • \(\varOmega _{+}\), \(\varOmega _{-}\), and \({\mathring{\varOmega }}_{0}\) are Lipschitz subdomains composed of a finite number of connected components, where \({\mathring{\varOmega }}_{0}\) denotes the interior of \(\varOmega _{0}\).

  • \(\varOmega _{0}\) is not empty, and satisfies \(\varOmega _{0} = \overline{\mathring{\varOmega }}_{0} \cap \varOmega\).

  • \(\sigma\) is small so that \(\varOmega _{0} \ne \varOmega\).

2.1 Main theorem

The following lemma plays an essential role in our main result.

Lemma 2.1

Let f satisfy

$$\begin{aligned} tf(t)\le \lambda t^2 + \displaystyle \sum _{i=1}^{n}a_{i}|t|^{p_{i}+1} \text { for all }t \in {\mathbb {R}} \end{aligned}$$
(17)

for some \(\lambda < \lambda _1(\varOmega )\), nonnegative coefficients \(a_1,a_2,\ldots ,a_n\), and subcritical exponents \(p_1,p_2,\ldots ,p_n \in (1,p^*)\). If a solution \(u \in V\) of the D-problem (14) satisfies the inequality

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i C_{p_{i}+1}^{2} \left\| u\right\| _{L^{p_{i}+1}}^{p_{i}-1}<1 - \frac{\lambda }{\lambda _1(\varOmega )}, \end{aligned}$$
(18)

then u is the trivial solution \(u\equiv 0\), where \(C_{p_{i}+1}=C_{p_{i}+1}(\varOmega )\).

Remark 2.1

The left-hand side of (18) converges to zero as \(\left\| u\right\| _{L^{p_{i}+1}} \downarrow 0\). Therefore, if the solution u of (14) is sufficiently small to satisfy (18), then u must vanish.

Remark 2.2

The inequality (17) can be reduced to a combination of the following inequalities:

$$\begin{aligned}&f(t)\le \lambda t + \displaystyle \sum _{i=1}^{n}a_{i}t^{p_{i}} \text { for all }t \ge 0,\\&-f(-t)\le \lambda t + \displaystyle \sum _{i=1}^{n}a_{i}t^{p_{i}} \text { for all }t \ge 0. \end{aligned}$$

Therefore, the polynomial \(f(t) = \lambda t + \sum _{i=2}^{n(<p^*)}a_{i}t|t|^{i-1}\) with \(\lambda < \lambda _1(\varOmega )\) and \(a_i \in \mathbb {R}\) obviously satisfies the required inequality (17). Indeed, for the set of subscripts \(\varLambda _{+}\) for which \(a_i \ge 0~(i \in \varLambda _{+})\) and \(a_i < 0\) (otherwise), we have \(f(t)\le \lambda t + \sum _{i \in \varLambda _{+}}a_{i}t^{i}\) and \(-f(-t)\le \lambda t + \sum _{i \in \varLambda _{+}}a_{i}t^{i} \text { for all }t\ge 0\).

2.1.1 Proof of Lemma 2.1

We prove that \(\Vert u\Vert _V = 0\). Because u satisfies

$$\begin{aligned} \left( \nabla u,\nabla v\right) _{L^2}=\left<F(u),v\right>{\mathrm{for all }}v\in V, \end{aligned}$$

by fixing \(v=u\), we have

$$\begin{aligned} \left\| u \right\| _{V}^{2} \le&\displaystyle \int _{\varOmega }\left\{ \lambda \left( u (x)\right) ^{2} +\sum _{i=1}^{n}a_{i} |u (x)|^{p_{i}+1}\right\} dx \nonumber \\ =&\displaystyle \lambda \left\| u \right\| _{L^{2}}^{2}+\sum _{i=1}^{n}a_{i} \left\| u \right\| _{L^{p_{i}+1}}^{p_{i}+1}\nonumber \\ \le&\left\{ \displaystyle \frac{\lambda }{\lambda _{1}(\varOmega )} +\sum _{i=1}^{n}a_{i}C_{p_{i}+1}^{2} \left\| u \right\| _{L^{p_{i}+1}}^{p_{i}-1} \right\} \left\| u \right\| _{V}^{2}. \end{aligned}$$
(19)

Therefore, (18) ensures that \(\Vert u \Vert _V = 0\). \(\square\)

For two sets \(A, B \subset {\mathbb {R}}^N\), we denote by \(\#\text {C.C.}(B;A)\) the number of connected components \(B^i\) \((i=1,2,\ldots )\) of B such that \(A\cap B^i \ne \emptyset\). We simply write \(\#\text {C.C.}(A)\) = \(\#\text {C.C.}(A;A)\), the number of all the connected components of A. Before describing the main theorem (Theorem 2.1), we prepare the following lemma.

Lemma 2.2

Let \(A, B \subset {\mathbb {R}}^N\) be composed of a finite number of connected components \(A^i \subset A\) and \(B^i \subset B\) \((i=1,2,\ldots )\). If \(A \subset B\), each connected component \(B^i\) of B such that \(B^i \cap A \ne \emptyset\) contains a connected component of A, and thus

$$\begin{aligned} \#\text {C.C.}(B;A) \le \#\text {C.C.}(A). \end{aligned}$$
(20)

Proof

When \(B^i \cap A \ne \emptyset\), there exists a connected component \(A^j\) of A such that \(B^i \cap A^j \ne \emptyset\). Let \(x \in B^i \cap A^j\). One confirms that \(B^i\) is the maximal connected subset of B that contains x, and \(A^j\) is a subset in B that contains x. Thus, \(A^j \subset B^i\). \(\square\)

On the basis of Lemmas 2.1 and 2.2 , the following theorem evaluates the number of nodal domains of u from the inclusions (15) and (16) for \({\hat{u}}\).

Theorem 2.1

Let f satisfy (17) for some \(\lambda < \lambda _1({\mathring{\varOmega }}_0)\). We denote \(C_{p_{i}+1} = C_{p_{i}+1}(\varOmega )\). If

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i C_{p_{i}+1}({\mathring{\varOmega }}_0)^{2}\left( \left\| {\hat{u}}\right\| _{L^{p_{i}+1}({\mathring{\varOmega }}_{0})}+C_{p_{i}+1} \rho \right) ^{p_{i}-1}<1 - \frac{\lambda }{\lambda _1({\mathring{\varOmega }}_0)}, \end{aligned}$$
(21)

then a solution \(u \in V \cap L^{\infty }(\varOmega )\) of the D-problem (14) existing in the intersection of the balls (15) and (16) satisfies

$$\begin{aligned}&\#\text {C.C.}(\varOmega _{+}\cup \varOmega _0; \varOmega _{+}) \le \#\text {P.N.D.}(u) \le \#\text {C.C.}(\varOmega _{+}), \end{aligned}$$
(22)
$$\begin{aligned}&\#\text {C.C.}(\varOmega _{-}\cup \varOmega _0; \varOmega _{-}) \le \#\text {N.N.D.}(u) \le \#\text {C.C.}(\varOmega _{-}). \end{aligned}$$
(23)

Note that if \({\mathring{\varOmega }}_0\) is disconnected, (21) is understood as the set of inequalities for all connected components \({\mathring{\varOmega }}_0^j\) \((j=1,2,\ldots )\) of \({\mathring{\varOmega }}_0\).

Remark 2.3

The formula inside the parentheses in (21) converges to 0 as \(\rho \downarrow 0\) and \(|\varOmega _{0}| \downarrow 0\), which is equivalent to \(\sigma \downarrow 0\) when \({\hat{u}}\) is continuous. Therefore, if verification succeeds for a continuous approximation \({\hat{u}}\) with sufficient accuracy, the number of nodal domains of u can be evaluated using Theorem 2.1.

Remark 2.4

The connected components on either side of the inequalities (22) and (23) can be determined only from the information on the approximation \({\hat{u}}\) and the \(L^{\infty }\)-error \(\sigma\) as in (16); see the definitions of \(\varOmega _{+}\), \(\varOmega _{-}\), and \(\varOmega _{0}\) located just before Lemma 2.1.

Remark 2.5

Explicitly estimating a lower bound for \(\lambda _1({\mathring{\varOmega }}_{0})\) and upper bounds for \(C_{p+1} (=C_{p+1}(\varOmega ))\) and \(C_{p+1}({\mathring{\varOmega }}_0)\) is essential for Theorem 2.1. This topic is discussed in Appendix A.

2.1.2 Proof of Theorem 2.1

We first prove that there is no nodal domain of u in \({\mathring{\varOmega }}_{0}\). To achieve this, we confirm that if \(u|_{\varOmega '}\) (the restriction of u over \(\varOmega '\)) can be regarded as a solution of the D-problem (14) for some subdomain \(\varOmega ' \subset {\mathring{\varOmega }}_0\) with the notational replacement \(\varOmega \rightarrow \varOmega '\), then \(u|_{\varOmega '}\) should be a trivial solution that satisfies \(u|_{\varOmega '}\equiv 0\).

Suppose that there exists such a subdomain \(\varOmega '\) so that \(u|_{\varOmega '} \in H^1_0(\varOmega ')~(\subset V)\) is a solution of the D-problem (14) with the replacement \(\varOmega \rightarrow \varOmega '\). We express \(u\in V\) as \(u={\hat{u}}+ \rho \omega\), where \(\omega \in V\) satisfies \(\left\| \omega \right\| _{V}\le 1\). This ensures that, for \(p\in (1,p^*)\),

$$\begin{aligned} \left\| u\right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}}\right\| _{L^{p+1}(\varOmega ')}+ C_{p+1}\rho \end{aligned}$$
(24)

because \(\left\| \omega \right\| _{L^{p+1}(\varOmega ')}\le \left\| \omega \right\| _{L^{p+1}(\varOmega )} \le C_{p+1}\left\| \omega \right\| _{V}\le C_{p+1}\). Therefore, it readily follows from \(\left\| {\hat{u}} \right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}} \right\| _{L^{p+1}({\mathring{\varOmega }}_0)}\) that

$$\begin{aligned} \left\| u \right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}} \right\| _{L^{p+1}({\mathring{\varOmega }}_0)}+ C_{p+1}\rho . \end{aligned}$$
(25)

Therefore, (21) and (25) ensure that

$$\begin{aligned} \sum _{i=1}^{n}a_i C_{p_{i}+1}({\mathring{\varOmega }}_0)^{2} \left\| u|_{\varOmega '}\right\| _{L^{p_{i}+1}(\varOmega ')}^{p_{i}-1} < 1 - \frac{\lambda }{\lambda _1({\mathring{\varOmega }}_0)} \le 1 - \frac{\lambda }{\lambda _1(\varOmega ')}, \end{aligned}$$

where \(\left\| u \right\| _{L^{p_i+1}(\varOmega ')} = \left\| u|_{\varOmega '} \right\| _{L^{p_i+1}(\varOmega ')}\) and \(\lambda _1(\varOmega ')\ge \lambda _1({\mathring{\varOmega }}_0)\). Because \(C_{p+1}({\mathring{\varOmega }}_0)\) can be used as a bound \(C_{p+1}(\varOmega ')\), it follows from Lemma 2.1 that \(u|_{\varOmega '}\equiv 0\). Thus, there is no nodal domain in \({\mathring{\varOmega }}_0\).

In the following, we evaluate the number of nodal domains of u. Let us write \(\varOmega ^{*}_{+}=\{x\in \varOmega :u(x)>0\}\), so that \(\text {C.C.}(\varOmega ^{*}_{+})=\text {P.N.D.}(u)\). Because there is no positive nodal domain in the interior of \(\varOmega _0 \cup \varOmega _{-}\), we have

$$\begin{aligned}&\text {C.C.}(\varOmega ^{*}_{+};\varOmega _{+}) = \text {C.C.}(\varOmega ^{*}_{+}) = \text {P.N.D.}(u). \end{aligned}$$
(26)

Because \(\varOmega _{+}\subset \varOmega ^{*}_{+}\), it follows from Lemma 2.2 that

$$\begin{aligned} \#\text {P.N.D.}(u) = \#\text {C.C.}(\varOmega ^{*}_{+};\varOmega _{+}) \le \#\text {C.C.}(\varOmega _{+}). \end{aligned}$$
(27)

Thus, the right inequality in (22) is proved. Besides, Lemma 2.2 indicates from the inclusion \(\varOmega ^{*}_{+} \subset \varOmega _{+}\cup \varOmega _0\) that

$$\begin{aligned} \#\text {C.C.}(\varOmega _{+}\cup \varOmega _0;\varOmega ^{*}_{+}) \le \#\text {C.C.}(\varOmega ^{*}_{+})~(= \#\text {P.N.D.}(u)). \end{aligned}$$
(28)

Again, from the inclusion \(\varOmega _{+}\subset \varOmega ^{*}_{+}\), we see that \(\#\text {C.C.}(\varOmega _{+}\cup \varOmega _0; \varOmega _{+}) \le \#\text {C.C.}(\varOmega _{+}\cup \varOmega _0;\varOmega ^{*}_{+})\). This ensures the left inequality in (22).

Inequality (23) is ensured in the same way with the notational replacements \(\varOmega _{+} \rightarrow \varOmega _{-}\) and \(\varOmega ^{*}_{+} \rightarrow \varOmega ^{*}_{-} := \{x\in \varOmega :u(x)<0\}\). \(\square\)

2.2 Further discussion on the main theorem

In this subsection, we provide some remarks about Theorem 2.1.

2.2.1 Inequality (17) can be weakened

Assuming the \(L^{\infty }\)-error estimation (3) (or (16)), we ensure that the range of u is taken over \([\min \{{\hat{u}}\}-\sigma ,\max \{{\hat{u}}\}+\sigma ]\). Therefore, the condition (17) imposed on f is replaceable with

$$\begin{aligned} tf(t)\le \lambda t^2 + \displaystyle \sum _{i=1}^{n}a_{i}|t|^{p_{i}+1} \text { for all } t \in [\min \{{\hat{u}}\}-\sigma ,\max \{{\hat{u}}\}+\sigma ] \end{aligned}$$
(29)

because (19) is confirmed in the same manner when the \(L^{\infty }\)-error \(\sigma\) is explicitly estimated.

2.2.2 When assuming only an \(L^{\infty }\)-error

Given \(\sigma\) satisfying (3), u can be written as \(u={\hat{u}} + \sigma \omega\) with \(\omega \in L^{\infty }(\varOmega )\) satisfying \(\Vert \omega \Vert _{L^{\infty }} \le 1\). Therefore, applying the inequality

$$\begin{aligned} \left\| u\right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}}\right\| _{L^{p+1}({\mathring{\varOmega }}_0)}+ \sigma |\varOmega _0|^{\frac{1}{p+1}} \end{aligned}$$
(30)

instead of (25), we have the following similar theorem without assuming an \(H^1_0\)-error \(\rho\) but only an \(L^{\infty }\)-error \(\sigma\).

Theorem 2.2

Let f satisfy (17) for some \(\lambda < \lambda _1({\mathring{\varOmega }}_0)\). If

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i C_{p_{i}+1}({\mathring{\varOmega }}_0)^{2}\left( \left\| {\hat{u}}\right\| _{L^{p_{i} +1}({\mathring{\varOmega }}_0)}+ \sigma |\varOmega _0|^{\frac{1}{p_{i}+1}}\right) ^{p_{i}-1}<1 - \frac{\lambda }{\lambda _1({\mathring{\varOmega }}_0)}, \end{aligned}$$
(31)

then a solution \(u \in V \cap L^{\infty }(\varOmega )\) of the D-problem (14) existing in the ball (16) satisfies (22) and (23).

Note that almost all existing verification methods for the partial differential Eq. (1) estimate an \(L^{\infty }\)-error \(\sigma\) after deriving an \(H^1_0\)-error \(\rho\), as described in Subsect. 2.3 (see, e.g., [15]). However, if \(\sigma\) is obtained directly without computing \(\rho\), Theorem 2.2 becomes useful.

2.2.3 Sufficient conditions for (21)

Because \(C_{p_{i}+1}(\varOmega )\) can be regarded as a bound \(C_{p_{i}+1}({\mathring{\varOmega }}_0)\), the following simplified inequality is sufficient for (21).

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i C_{p_{i}+1}^{2}\left( \left\| {\hat{u}}\right\| _{L^{p_{i}+1}({\mathring{\varOmega }}_{0})}+C_{p_{i}+1} \rho \right) ^{p_{i}-1}<1 - \frac{\lambda }{\lambda _1({\mathring{\varOmega }}_0)}. \end{aligned}$$

If we have \(\lambda < \lambda _1(\varOmega )\), this is further reduced to

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i C_{p_{i}+1}^{2}\left( \left\| {\hat{u}}\right\| _{L^{p_{i}+1}({\mathring{\varOmega }}_{0})}+C_{p_{i}+1} \rho \right) ^{p_{i}-1}<1 - \frac{\lambda }{\lambda _1(\varOmega )} \end{aligned}$$

because \(\lambda _1({\mathring{\varOmega }}_0)\ge \lambda _1(\varOmega )\). Generally, the shape of \(\varOmega _{0}\) tends to be more complicated than \(\varOmega\), which makes the evaluation of \(C_{p_{i}+1}({\mathring{\varOmega }}_0)\) and/or \(\lambda _1({\mathring{\varOmega }}_0)\) difficult. The above sufficient inequalities can be useful in such cases.

2.2.4 Application to specific nonlinearities

We apply Theorem 2.1 to two specific problems in which we are interested. The first problem is (4) with the nonlinearity \(f(t) = \lambda t + t|t|^{p-1}\), \(p\in (1,p^*)\). Adapting Theorem 2.1 to this case, we have the following.

Corollary 2.1

Let \(f(t)= \lambda t + t|t|^{p-1}\), with \(p \in (1,p^*)\). If

$$\begin{aligned} C_{p+1}({\mathring{\varOmega }}_0)^{2}\left( \left\| {\hat{u}}\right\| _{L^{p+1} ({\mathring{\varOmega }}_0)}+C_{p+1}\rho \right) ^{p-1}<1 - \frac{\lambda }{\lambda _1({\mathring{\varOmega }}_0)}, \end{aligned}$$
(32)

then a solution \(u \in V\) of the D-problem (14) in the intersection of the balls (15) and (16) satisfies (22) and (23).

The second problem is the case in which \(f(t)=\varepsilon ^{-2}(t-t^3)\) \((\varepsilon >0)\). We only consider the case where \(\varepsilon ^{-2} \ge \lambda _1(\varOmega )\), because there is no solution of the D-problem (14) other than the trivial solution \(u\equiv 0\) when \(\varepsilon ^{-2} < \lambda _1(\varOmega )\). Indeed, no positive solution is admitted when \(\varepsilon ^{-2} < \lambda _1(\varOmega )\). This can be confirmed by multiplying \(-\varDelta u = \varepsilon ^{-2}(u-u^3)\) with the first eigenfunction of \(-\varDelta\) and integrating both sides. For a sign-changing solution u, let \(\varOmega '\) be a positive nodal domain of u. Note that \(-u\) is also a solution of (14), and therefore, considering only positive nodal domains is sufficient. The restricted function \(u_{\varOmega '}\) is a solution of a zero-Dirichlet problem restricted on \(\varOmega '\) and \(\lambda _1(\varOmega ) \le \lambda _1(\varOmega ')\). Thus, if \(\varepsilon ^{-2} < \lambda _1(\varOmega ) (\le \lambda _1(\varOmega '))\), u is the trivial solution.

Because

$$\begin{aligned} tf(t)\le \varepsilon ^{-2} t^2 \text { for all }t \in {\mathbb {R}}, \end{aligned}$$
(33)

applying Theorem 2.1 to the nonlinearity gives us the following.

Corollary 2.2

Let \(f(t)=\varepsilon ^{-2}(t-t^3)\), with \(\varepsilon ^{-2} \ge \lambda _1(\varOmega )\). If

$$\begin{aligned} \varepsilon ^{-2} < \lambda _1({\mathring{\varOmega }}_0), \end{aligned}$$
(34)

then a solution \(u \in V\) of the D-problem (14) in the intersection of the balls (15) and (16) satisfies (22) and (23).

In the next subsection, Corollary 2.2 is applied to an important problem.

2.3 Numerical example

In this subsection, we consider the stationary problem of the Allen–Cahn equation:

$$\begin{aligned} \left\{ \begin{array}{l l} -\varDelta u(x)=\varepsilon ^{-2}(u(x)-u(x)^3), &{}x \in \varOmega ,\\ u(x)=0, &{}x \in \partial \varOmega \\ \end{array}\right. \end{aligned}$$
(35)

for which Corollary 2.2 can be used. The Allen–Cahn equation was originally proposed as a simplified model for the phase separation process [1]. Because the nodal line of solutions of this equation represents the interface between two coexisting phases, determining its location is important for the problem.

We demonstrated the applicability of our theory to the problem on square \(\varOmega =(0,1)^2\). All computations were implemented on a computer with 2.20 GHz Intel Xeon E7-4830 CPUs \(\times\) 4, 2 TB RAM, and CentOS 7 using MATLAB 2019b with GCC version 6.3.0. All rounding errors were strictly estimated using the toolboxes INTLAB version 11 [20] and kv Library version 0.4.48 [6]. Therefore, the accuracy of all results was guaranteed mathematically. We constructed approximate solutions of (14) for the domain via a Legendre polynomial basis. Specifically, we define a finite-dimensional subspace \(V_M~(\subset V)\) as the tensor product \(V_M = \text {span}\,\{\phi _{1},\phi _{2},\ldots ,\phi _{M}\} \otimes \text {span}\,\{\phi _{1},\phi _{2},\ldots ,\phi _{M}\}\), where each \(\phi _{n}\) (\(n=1,2,3,\ldots\)) is defined as

$$\begin{aligned}&\displaystyle \phi _{n}(x)=\frac{1}{n(n+1)}x(1-x)\frac{dQ_{n}}{dx}(x)\nonumber \\&\text { with } Q_{n}=\displaystyle \frac{(-1)^{n}}{n!}\left( \frac{d}{dx}\right) ^{n}x^{n}(1-x)^{n},~~n=1,2,3,\ldots . \end{aligned}$$
(36)

For a fixed integer \(M_u \ge 1\), we construct \({\hat{u}}\) in \(V_{M_u}\) as

$$\begin{aligned} \displaystyle {\hat{u}}(x,y)=\sum _{i=1}^{M_u}\sum _{j=1}^{M_u}u_{i,j}\phi _{i}(x) \phi _{j}(y),~~u_{i,j}\in {\mathbb {R}}. \end{aligned}$$
(37)

Note that our method does not limit the basis functions that constitute approximate solutions, but can be applied to many bases other than the Legendre polynomial basis, such as the finite element and Fourier bases.

In actual computations to obtain \(H^1_0\)-errors \(\rho\) using the methods proposed in [19, 28], verification was implemented on the solution space V with the generalized inner product and norm

$$\begin{aligned} \left( u,v\right) _{\tau }=\left( \nabla u,\nabla v\right) _{L^{2}}+\tau \left( u,v\right) _{L^{2}},~~~\left\| u \right\| _{\tau }=\sqrt{\left( u,u\right) _{\tau }}, \end{aligned}$$
(38)

where \(\tau\) is a nonnegative number chosen as

$$\begin{aligned} \tau >-f'({\hat{u}}(x)) = \varepsilon ^{-2} (-1 + 3 {\hat{u}}^2) \text { for all } x\in \varOmega . \end{aligned}$$
(39)

However, because the norm \(\left\| \cdot \right\| _{\tau }\) monotonically increases with \(\tau\), the usual norm \(\left\| \cdot \right\| _{V} (= \left\| \nabla \cdot \right\| _{L^{2}})\) is bounded by \(\left\| \cdot \right\| _{\tau }\) for any \(\tau \ge 0\). Therefore, we can use the error bound \(\Vert u-{\hat{u}}\Vert _{\tau }\) as the error bound \(\rho\) in the sense of the usual norm that is desired in Subsect. 2.1, whereas we should allow some overestimation for \(\rho\) (see, Table 1 for estimation results).

We used [7, Theorem 2.3] to obtain an explicit interpolation error constant C(M) (\(M\ge 1\)) satisfying

$$\begin{aligned} \left\| v-P_{M}v\right\| _{V}\le C(M)\left\| \varDelta v\right\| _{L^{2}} \text { for all } v \in V \cap H^2(\varOmega ), \end{aligned}$$
(40)

where the orthogonal projection \(P_M\) from V to \(V_M\) is defined as

$$\begin{aligned} (v- P_M v,v_M)_V = 0 \text { for all } v \in V \text { and } v_M \in V_M. \end{aligned}$$

The interpolation error constant \(C^{\tau }(M)\) (\(M\ge 1\)) corresponding to the generalized norm (38) is defined as

$$\begin{aligned} \left\| v-P^{\tau }_{M}v\right\| _{\tau }\le C^{\tau }(M)\left\| -\varDelta v + \tau v\right\| _{L^{2}} \text { for all } v \in V \cap H^2(\varOmega ), \end{aligned}$$
(41)

where \(P^{\tau }_M\) is the orthogonal projection from V to \(V_M\) corresponding to (38) that satisfies

$$\begin{aligned} (v- P^{\tau }_M v,v_M)_{\tau } = 0 \text { for all } v \in V \text { and } v_M \in V_M. \end{aligned}$$

This generalized constant \(C^{\tau }(M)\) can be estimated from C(M) via

$$\begin{aligned} C^{\tau }(M) \le C(M) \sqrt{1+\tau C(M)^{2}}; \end{aligned}$$
(42)

see [27, Remark A.4].

This constant \(C^{\tau }(M)\) was used to obtain K, a key constant for error estimation introduced below. The lower bounds for \(\lambda (\varOmega _0)\) were estimated using Corollary A.1.

We proved the existence of solutions u of the D-problem (14) (that is, weak solutions of (35)) in \({\overline{B}}({\hat{u}},\rho ,\Vert \cdot \Vert _V)\) and \({\overline{B}}({\hat{u}},\sigma ,\Vert \cdot \Vert _{L^{\infty }})\) given approximate solutions \({\hat{u}}\) constructed as (37). The proof was achieved by combining the methods described in [19] and [28]. On the basis of [19, Theorem 1] , we obtained \(H_{0}^{1}\)-error estimates \(\rho\). The required constants \(\delta\) and K and function g in the theorem were computed as follows:

  • \(\delta\) was evaluated as \(\delta \le C_{2}\Vert \varDelta {\hat{u}}+\varepsilon ^{-2}({\hat{u}}-{\hat{u}}^3)\Vert _{L^{2}}\) with \(C_2 = (2\pi ^2+\tau )^{-\frac{1}{2}}\). This \(L^2\)-norm was computed using a numerical integration method with strict estimation of rounding errors [6].

  • K, the norm of the inverse operator, was computed using the method described in [28], with \(C^{\tau }(M_K)\) defined above given \(M_K \ge 1\).

  • g was taken as \(g(t)=6 \varepsilon ^{-2} C_{4}^{3} t\left( \Vert {\hat{u}}\Vert _{L^{4}(\varOmega )}+C_{4} t\right)\); see [19, Subsect. 4.4] for the construction of g. An upper bound for \(C_4\) was evaluated using the smaller estimation from [26, Corollary A.2] and [19, Lemma 2] (see Corollary A.2 and Theorem A.3). Although [26, Corollary A.2] estimates \(C_4\) in the sense of the usual norm \(\Vert \cdot \Vert _V\), it becomes an upper bound for the embedding constant with the generalized norm (38) because \(\Vert \cdot \Vert _V \le \Vert \cdot \Vert _{\tau }\) for any nonnegative \(\tau\).

The solution \(u \in {\overline{B}}({\hat{u}},\rho ,\Vert \cdot \Vert _V)\) of (35) has \(H^{2}\)-regularity because problem (8) subject to the zero-Dirichlet boundary condition has a unique solution \(u\in H^{2}(\varOmega )\) for each \(h \in L^2(\varOmega )\), such as when \(\varOmega\) is a bounded convex polygonal domain (again, see [5]) . Therefore, to obtain an \(L^{\infty }\)-error \(\sigma\), we used the following bound for the embedding \(H^2(\varOmega ) \hookrightarrow L^{\infty }(\varOmega )\) provided in [18, Theorem 1, Corollary 1].

Theorem 2.3

([18]) There exist constants \(c_0\), \(c_1\), \(c_2\) dependent on \(\varOmega\) such that, for all \(u\in H^{2}\left( \varOmega \right)\),

$$\begin{aligned} \Vert u\Vert _{L^{\infty }}\le c_{0}\Vert u\Vert _{L^2}+c_{1}\Vert \nabla u\Vert _{L^2}+c_{2}\Vert u_{xx}\Vert _{L^2}, \end{aligned}$$

where \(u_{xx}\) denotes the Hesse matrix of u.

Remark 2.6

When \(N=2\), the norm of the Hesse matrix of u is precisely defined by

$$\begin{aligned} \Vert u_{xx}\Vert _{L^2}=\sqrt{\sum _{i,j=1}^{2}\left\| \frac{\partial ^{2}u}{\partial x_{i}\partial x_{j}}\right\| ^{2}_{L^2}}. \end{aligned}$$

Moreover, when \(\varOmega\) is polygonal, we have \(\left\| u_{xx}\right\| _{L^2}=\left\| \varDelta u\right\| _{L^2}\) for all \(u\in H^{2}(\varOmega )\cap V\) (see, for example, [5]).

Explicit values of \(c_0\), \(c_1\), \(c_2\) were provided in [18] for \(N=2,3\). The constants displayed in example set (2) on p. 42 of [18] can be directly used for our case where \(\varOmega =(0,1)^2\). Let us write the solution \(u \in {\overline{B}}({\hat{u}},\rho ,\Vert \cdot \Vert _V)\) as \(u = {\hat{u}} + \rho w\) with some \(w\in V\), \(\Vert w\Vert _V\le 1\). By applying Theorem 2.3 to the error \(\rho w = u-{\hat{u}} \in H^2(\varOmega )\), we have

$$\begin{aligned} \left\| u-{\hat{u}}\right\| _{L^{\infty }}&=\rho \left\| \omega \right\| _{L^{\infty }}\\&\le \rho \left( c_{0}\left\| \omega \right\| _{L^2} +c_{1}\left\| \omega \right\| _{V}+c_{2}\left\| \varDelta \omega \right\| _{L^2}\right) \\&\le \rho \left( c_{0}C_{2}+c_{1}+c_{2}\left\| \varDelta \omega \right\| _{L^2}\right) . \end{aligned}$$

The last term \(\left\| \varDelta \omega \right\| _{L^{2}(\varOmega )}\) is estimated via

$$\begin{aligned} \rho \left\| \varDelta \omega \right\| _{L^{2}} =&\left\| f\left( {\hat{u}}+\rho \omega \right) +\varDelta {\hat{u}}\right\| _{L^{2}}\\ \le&\left\| f\left( {\hat{u}}+\rho \omega \right) -f\left( {\hat{u}}\right) \right\| _{L^{2}} +\left\| \varDelta {\hat{u}}+f\left( {\hat{u}}\right) \right\| _{L^{2}}, \end{aligned}$$

where we write \(f(t)=\varepsilon ^{-2}(t-t^3)\). Then, the left integral is calculated as

$$\begin{aligned} \left\| f\left( {\hat{u}}+\rho \omega \right) -f\left( {\hat{u}}\right) \right\| ^2_{L^{2}} = \varepsilon ^{-4} \rho ^2 \left\| w (1 - 3{\hat{u}}^2 - 3\rho {\hat{u}}w - \rho ^2 w^2) \right\| ^2_{L^{2}}. \end{aligned}$$
(43)

Using Hölder’s inequality, we have

$$\begin{aligned} \left\| f\left( {\hat{u}}+\rho \omega \right) -f\left( {\hat{u}}\right) \right\| ^2_{L^{2}} \le&\varepsilon ^{-4} \rho ^2 \Vert w\Vert ^2_{L^3} \left\| 1 - 3{\hat{u}}^2 - 3\rho {\hat{u}}w - \rho ^2 w^2 \right\| ^2_{L^{6}}\\ \le&\varepsilon ^{-4} \rho ^2 C_3^2 (1 + 3 \Vert {\hat{u}}\Vert ^2_{L^{12}} + 3 \rho C_{12} \Vert {\hat{u}}\Vert _{L^{12}} + \rho ^2 C_{12}^2)^2. \end{aligned}$$

Thus, we have the following \(L^{\infty }\)-estimation

$$\begin{aligned}&\left\| u-{\hat{u}}\right\| _{L^{\infty }}\le c_{0}C_{2}\rho +c_{1}\rho + c_{2}\left( \rho \varepsilon ^{-2}C_{3}\left( 1+3\left\| {\hat{u}}\right\| _{L^{12}}^{2}\right. \right. \nonumber \\ \left. \left. +3\rho C_{12}\left\| {\hat{u}}\right\| _{L^{12}}+\rho ^{2}C_{12}^{2}\right) +\left\| \varDelta {\hat{u}}+\varepsilon ^{-2}({\hat{u}}-{\hat{u}}^{3}) \right\| _{L^{2}}\right) . \end{aligned}$$
(44)

Remark 2.7

Inequality (44) was used in our computations. However, different estimates of the right-side norm of (43) are possible. One such example is to calculate

$$\begin{aligned} \left\| w (1 - 3{\hat{u}}^2 - 3\rho {\hat{u}}w - \rho ^2 w^2) \right\| ^2_{L^{2}} \le \Vert w\Vert ^2_{L^4} \left\| 1 - 3{\hat{u}}^2 - 3\rho {\hat{u}}w - \rho ^2 w^2 \right\| ^2_{L^{4}}. \end{aligned}$$

Other than this, expanding \(w^2 (1 - 3{\hat{u}}^2 - 3\rho {\hat{u}}w - \rho ^2 w^2)^2\) and applying Hölder’s inequality to each term need somewhat tedious calculations but would give a better estimation. In this case, the maximal exponent p required for the embedding constant \(C_p\) is reduced to 6.

Table 1 shows the verification results for the solutions of (35) displayed in Fig. 2. The values in rows \(\tau\), \(C(M_K)\), \(\delta\), K, \(\rho\), \(\sigma\), \(|\varOmega _{0}|\), and \(\varepsilon ^{-2}\) represent strict upper bounds in decimal form; for instance, 6.0e–03 means \(6.0 \times 10^{-3}\). The values in row \(\lambda _{1}(\varOmega _0)\) are lower bounds, which were estimated using Corollary A.1. Integers \(M_u\), \(M_K\), and \(2^m\) are displayed as strict integers. Volumes \(|\varOmega _0|\) were estimated by dividing \(\varOmega\) into \(2^m\) smaller congruent squares and implementing interval arithmetic on them to confirm \(({\hat{u}}+\sigma )({\hat{u}}-\sigma ) \le 0\). Approximate solutions \({\hat{u}}\) and the corresponding defect bounds \(\delta\) were computed in double-double precision using the data type “dd” or “interval< dd >” provided in the kv Library [6]. Although the values in row \(\rho\) represent the error bounds in the sense of the norm (38) for corresponding \(\tau\)’s, these can be regarded as upper bounds for them in the sense of the usual norm \(\Vert \cdot \Vert _V\) required in Subsect. 2.1.

In all cases, Corollary 2.2 estimated the numbers of nodal domains under the condition (34). This indicated that \(\#\text {N.N.D.}(u)\) for type (A) was 1 or 2. The reason why \(\#\text {N.N.D.}(u)\) was not strictly determined is that it is difficult to determine whether the negative nodal domains that appear to be composed of two parts are connected or not through the boundary (see Fig. 3A).

For solutions of type (B), neither \(\#\text {P.N.D.}(u)\) nor \(\#\text {N.N.D.}(u)\) was strictly determined. However, we can determine both \(\#\text {P.N.D.}(u)\) and \(\#\text {N.N.D.}(u)\) to be two by considering the symmetry of the solutions and the topology of nodal lines (that is, “how the lines intersect”) in the following discussion: Let us define \(v(x_1,x_2):=-u(x_2,x_1)\) so that v is also a solution of (35). We define \({\hat{v}}(x_1,x_2):=-{\hat{u}}(x_2,x_1)\) for each approximate solution \({\hat{u}}\) for type (B), assuming that \(\Vert {\hat{v}}+{\hat{u}}\Vert _V \le \eta\) for small \(\eta >0\). Actually, we confirmed this inequality when selecting \(\eta =\)1e-15 in all cases for type (B). Then, we have \(\Vert v-{\hat{u}}\Vert _V \le \rho + \eta\). We again checked the conditions required by [19, Theorem 1] with \(\rho\) replaced by \(\rho + \eta\), thereby proving the uniqueness of the solution u in \({\overline{B}}({\hat{u}},\rho + \eta ,\Vert \cdot \Vert _V)\). Therefore, we concluded \(u=v\) and thus \(u(0.5,0.5)=-u(0.5,0.5)=0\). Similarly, the symmetry of the solutions was confirmed with respect to the lines \(x=0.5\) and \(y=0.5\) by considering the transformed functions \(u(1-x,y)\) and \(u(x,1-y)\), respectively. Hence, by considering the topology of nodal lines, we have confirmed \(\#\text {P.N.D.}(u)=\#\text {N.N.D.}(u)=2\)

Fig. 2
figure 2

Sign-changing solutions of (35) on \(\varOmega =(0,1)^{2}\)

.

For solutions of type (C), Corollary 2.2 strictly determined both \(\#\text {P.N.D.}(u)\) and \(\#\text {N.N.D.}(u)\) without a topological consideration such as that for type (B). These solutions are special because the inner nodal line does not touch the original boundary \(\partial \varOmega\) (see Fig. 3C). In this sense, we can regard the inner nodal line can as a “new” nontrivial Dirichlet boundary. To our knowledge, the existence of such solutions of problem (35) has not been proved. Our method confirmed this existence using the methods in [18, 19, 28] and Corollary 2.2.

Fig. 3
figure 3

Verified nodal lines of the solutions (a), (b), and (c) for \(\varepsilon = 0.08\). These were drawn with rough accuracy by dividing the domain \(\varOmega\) into \(2^{12}\) smaller congruent squares and implementing interval arithmetic on each

From the above verification results, we can determine the location of the nodal line of u. Figure 3 shows verified nodal lines of the solutions (A), (B), and (C) for \(\varepsilon = 0.08\). We confirmed that \(({\hat{u}}+\sigma )({\hat{u}}-\sigma ) \le 0\) on the red squares displayed in Fig. 3. For ease of viewing, these are drawn with rough accuracy by dividing the domain \(\varOmega\) into \(2^{12}\) smaller congruent squares and implementing interval arithmetic on each. In Fig. 4, we display a more accurate nodal line via division into \(2^{16}\) smaller congruent squares. Our method proved the nonexistence of nodal domains of u in the union of the red squares for each solution. Simultaneously, the sign of u is strictly determined in the blanks.

Table 1 Verification results for solutions of (35) displayed in Fig. 2
Fig. 4
figure 4

Accurate inclusion of the nodal line of solution (C) with \(\varepsilon =0.08\) (left), and its magnifications (center and right). These were drawn by dividing the domain \(\varOmega\) into \(2^{16}\) smaller congruent squares and implementing interval arithmetic on each

3 Extension to other boundary value conditions

In this section, we extend the results from Sect. 2 to Neumann (5) and mixed (6) boundary conditions. Because (6) coincides with (5) when \(\varGamma _D = \emptyset\) and \(\varGamma _N = \partial \varOmega\), we discuss the application to (6). The Dirichlet problem (4) is regarded as (5) for the special case \(\varGamma _N = \emptyset\) and \(\varGamma _D = \partial \varOmega\). Therefore, the generalization to (6) is considered as an extension of the method provided in Sect. 2.

We introduce (or replace) some required notation. We extend the solution space V to \(V ~(= V(\varOmega ,\varGamma _D)) := \{ u \in H^1(\varOmega ) : u = 0~\text{ on } ~ \varGamma _D\}\) adapting to the corresponding boundary value condition. The inner product endowed with V should be changed according to the boundary value conditions. When \(\varGamma _D = \emptyset\) (Neumann condition), we endow V with the inner product \((u, v)_{V}=(\nabla u, \nabla v)_{L^2}+(u, v)_{L^2}\); otherwise (Dirichlet or mixed condition), we endow it with \((u, v)_{V}=(\nabla u, \nabla v)_{L^2}\). The norm endowed with V is always \(\Vert u \Vert _{V} = \sqrt{(u, u)_{\smash {V}}}\) regardless of the boundary conditions. Additionally, the topological dual of V is denoted by \(V^*\). In this function space, the weak form of (6) is characterized by the form (14) with the same assumptions for nonlinearity f introduced in Sect. 2. To avoid confusion, we call (14) corresponding to (5) (assuming \(\varGamma _D = \emptyset\) and \(\varGamma _N = \partial \varOmega\)) the N-problem, and call (14) corresponding to (6) (assuming \(\varGamma _D \ne \emptyset\) and \(\varGamma _N \ne \emptyset\)) the M-problem.

We extend the definition of embedding constants. A norm bound for the embedding \(V(\varOmega ,\varGamma _D) \hookrightarrow L^{p+1}(\varOmega )\) is denoted by \(C_{p+1}~(=C_{p+1}(\varOmega ,\varGamma _D))\), which satisfies

$$\begin{aligned} \left\| u\right\| _{L^{p+1}(\varOmega )}\le C_{p+1}\left\| u\right\| _{V(\varOmega ,\varGamma _D)}~~~\mathrm{for~all}~u\in V, \end{aligned}$$
(45)

where \(p\in [1,\infty )\) when \(N=2\) and \(p\in [1,p^*]\) when \(N\ge 3\). In the following definition (46), we assume \(\varGamma _D \ne \emptyset\); considering this case is sufficient for completing the later discussion. The first eigenvalue of \(-\varDelta\) on \(V(\varOmega ,\varGamma _D)\) is denoted by \(\lambda _{1}(\varOmega ,\varGamma _D)\), the definition of which is

$$\begin{aligned} \lambda _{1}(\varOmega ,\varGamma _D) := \inf _{v\in V\backslash {\{0\}}} \frac{\Vert v\Vert _{V(\varOmega ,\varGamma _D)}^2}{\Vert v\Vert _{L^2(\varOmega )}^2}. \end{aligned}$$
(46)

Lemma 3.1

The same argument in Lemma 2.1is true for the M-problem (14) with a nonempty \(\varGamma _D\), where the old notation of eigenvalue \(\lambda _1(\varOmega )\) and embedding constants \(C_{p_{i}+1}(\varOmega )\) is replaced with the new notation \(\lambda _1(\varOmega ,\varGamma _D)\) and \(C_{p_{i}+1}(\varOmega ,\varGamma _D)\), respectively.

Proof

Inequality (19) holds for the notational replacements. \(\square\)

The connected components of \({\mathring{\varOmega }}_0\) are denoted by \({\mathring{\varOmega }}_0^j\) (\(j=1,2,\ldots\)), the number of which is assumed to be finite. Note that \(\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N\) is not empty because \(\partial {\mathring{\varOmega }}_0^j \backslash \partial \varOmega \ne \emptyset\) is ensured from \(\varOmega _{0} \ne \varOmega\).

Moreover, we recall our assumption: some numerical verification method succeeds in proving the existence of a solution \(u \in V \cap L^{\infty }(\varOmega )\) of the D-, N-, or M-problem of (14) in both balls (15) and (16) in this “extended” setting.

Theorem 3.1

Let f satisfy (17) for some \(\lambda < \displaystyle \min _{j} \{\lambda _1({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)\}\). Let \(C_{p_{i}+1}=C_{p_{i}+1}(\varOmega , \varGamma _D)\), \(C_{p_{i}+1}^j=C_{p_{i}+1}({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)\), and \(\lambda _1^j=\lambda _1({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)\). If we have

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i (C_{p_{i}+1}^j)^2\left( \left\| {\hat{u}}\right\| _{L^{p_{i}+1}({\mathring{\varOmega }}_{0}^j)} +C_{p_{i}+1}\rho \right) ^{p_{i}-1}<1 - \frac{\lambda }{\lambda _1^j}, \end{aligned}$$
(47)

for each j, then a solution \(u \in V \cap L^{\infty }(\varOmega )\) of the D-, N-, or M-problem of (14) existing in the intersection of balls (15) and (16) satisfies (22) and (23).

Proof

We prove the nonexistence of nodal domains in \({\mathring{\varOmega }}_0^j\) for every j, as well as in the proof of Theorem 2.1. To achieve this, we consider the following two cases.

3.1 Case 1—when \(V({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)=H^1_0({\mathring{\varOmega }}_0^j)\)

In this case, almost the same discussion as in the proof of Theorem 2.1 can be applied (see \(\varOmega _0^3\) in Fig. 5).

Suppose that there exists a subdomain \(\varOmega ' \subset {\mathring{\varOmega }}_0^j\) such that \(u|_{\varOmega '} \in H^1_0(\varOmega ')~(\subset H^1_0({\mathring{\varOmega }}_0^j))\) is a solution of the D-problem (14) with the replacement \(\varOmega \rightarrow \varOmega '\). We express \(u\in V\,(=V(\varOmega ,\varGamma _D))\) as \(u={\hat{u}}+ \rho \omega\), where \(\omega \in V\) satisfies \(\left\| \omega \right\| _{V}\le 1\). This ensures that, for \(p\in (1,p^*)\),

$$\begin{aligned} \left\| u\right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}}\right\| _{L^{p+1}(\varOmega ')}+ C_{p+1}\rho \end{aligned}$$

because \(\left\| \omega \right\| _{L^{p+1}(\varOmega ')}\le \left\| \omega \right\| _{L^{p+1}(\varOmega )} \le C_{p+1}\left\| \omega \right\| _{V}\le C_{p+1}\), where \(C_{p+1}=C_{p+1}(\varOmega ,\varGamma _D)\). It readily follows from \(\left\| {\hat{u}} \right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}} \right\| _{L^{p+1}({\mathring{\varOmega }}_0^j)}\) that

$$\begin{aligned} \left\| u \right\| _{L^{p+1}(\varOmega ')} \le \left\| {\hat{u}} \right\| _{L^{p+1}({\mathring{\varOmega }}_0^j)}+ C_{p+1}\rho . \end{aligned}$$
(48)

Therefore, (47) and (48) ensure that

$$\begin{aligned} \displaystyle \sum _{i=1}^{n}a_i (C_{p_{i}+1}^j)^{2} \left( \left\| {\hat{u}}\right\| _{L^{p_{i}+1}({\mathring{\varOmega }}_{0}^j)}+C_{p_{i}+1}\rho \right) ^{p_{i}-1}&< 1 - \frac{\lambda }{\lambda _1^j} \le 1 - \frac{\lambda }{\lambda _1(\varOmega ')}, \end{aligned}$$

where \(\lambda _1(\varOmega ')\ge \lambda _1^j\). Because \(C_{p_{i}+1}^j\) can be regarded as \(C_{p_{i}+1}(\varOmega ',\partial \varOmega ')\), it follows from Lemma 2.1 that \(u|_{\varOmega '}\equiv 0\).

3.1.1 Case 2—when \(V({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N) \ne H^1_0({\mathring{\varOmega }}_0^j)\)

The main difference from Theorem 2.1 is the possibility of this case (see \(\varOmega _0^1\) or \(\varOmega _0^2\) in Fig. 5). Let \(\varOmega '\) be an arbitrary subdomain of \({\mathring{\varOmega }}_0^j\). To reach the desired fact (there exists no nodal domain of u inside \({\mathring{\varOmega }}^j_{0}\)), it is necessary to prove that \(u|_{\varOmega '}\) vanishes if it can be considered as a solution of the D- or M-problem of (14) with the notational replacements \(\varOmega \rightarrow \varOmega '\), \(\varGamma _D \rightarrow \varGamma '_D\), and \(\varGamma _N \rightarrow \varGamma '_N\), where \(\varGamma '_N =\partial \varOmega ' \cap \varGamma _N\) (allowed to be empty) and \(\varGamma '_D=\partial \varOmega ' \backslash \overline{\varGamma '_N}\). When \(V(\varOmega ',\varGamma '_D)=H^1_0(\varOmega ')\), u can be considered as a solution of the D-problem on \(\varOmega '\); therefore, the same argument as that in Case 1 is true.

We are left to consider the case in which \(u|_{\varOmega '}\) is a solution of the M-problem where \(V(\varOmega ',\varGamma '_D) \ne H^1_0(\varOmega ')\). Considering the zero extension outside \(\varOmega '\) to \({\mathring{\varOmega }}_0^j\), the restriction \(u|_{\varOmega '}\) can be regarded as a function in \(V({\mathring{\varOmega }}^j_0,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)\); note that \(u|_{\partial \varOmega '}\) can be nonzero only on a subset of \(\varGamma _N\) (again, see \(\varOmega _0^1\) or \(\partial \varOmega _0^2\) in Fig. 5). Therefore, it follows that \(\lambda _1(\varOmega ',\varGamma '_D)\ge \lambda _1({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)\) and \(C_{p+1}({\mathring{\varOmega }}_0^j,\partial {\mathring{\varOmega }}_0^j \backslash \varGamma _N)\) can be used as \(C_{p+1}(\varOmega ',\varGamma '_D)\) for \(p \in (1,p^*)\). Thus, we make the same argument as that in Case 1 combined with Lemma 3.1. \(\square\)

Remark 3.1

Section A discusses explicit estimations for a lower bound of \(\lambda _1^j\) and upper bounds of \(C_{p_{i}+1}\) and \(C_{p_{i}+1}^j\).

Remark 3.2

We have assumed that \(\varGamma _D\) and \(\varGamma _N\) are connected sets to avoid redundant discussion. However, Theorem 3.1 remains true for many other cases, such as when \(\varOmega = (0,1)^2\) and \(\varGamma _D=\{(x,y)\in {\mathbb {R}}^2 : y=0,~ 0<x<1\} \cup \{(x,y)\in {\mathbb {R}}^2 : y=1,~ 0<x<1\}\). Note that, in this case, a solution of (8) with the mixed boundary condition has \(H^2\)-regularity for \(h \in L^2(\varOmega )\) (see [3, Subsect. 5.3]).

Fig. 5
figure 5

Conceptual image of domains \(\varOmega\), \(\varOmega _{+}\), \(\varOmega _{-}\), and \(\varOmega _{0}\). The upper side (black line) is imposed on the Neumann boundary condition. The lower side (green line) is imposed on the Dirichlet boundary condition. The green lines satisfy \(\varOmega _0 = \varOmega _0^1 \cup \varOmega _0^2 \cup \varOmega _0^3\), which includes the part of \({\overline{\varOmega }}\) where \(|{\hat{u}}|\le \sigma\) . These green lines are expected to topologically approximate the nodal lines of u in the sense that no nodal domain exists inside them. Note that \(\partial \varOmega _0^3\) consists of Dirichlet boundaries in their entirety, whereas some parts of \(\partial \varOmega _0^1\) and \(\partial \varOmega _0^2\) are Neumann boundaries located on their “ends”

4 Conclusion

We proposed a rigorous numerical method for analyzing the sign-change structure of solutions of the semilinear elliptic Eq. (1). Given two types of error estimates \(\left\| u-{\hat{u}}\right\| _{H^1_0}\) and \(\left\| u-{\hat{u}}\right\| _{L^{\infty }}\) between an exact solution u and a numerically computed approximate solution \({\hat{u}}\), we provided a method for estimating the number of nodal domains (see Theorems 2.1 and 3.1). The location of the nodal line of u can be determined via the information of \({\hat{u}}\) and a verified \(L^{\infty }\)-error \(\sigma\). Our method was used to analyze the sign-change structure of the Allen–Cahn Eq. (35) subject to the homogeneous Dirichlet boundary condition. In Sect. 3, our method was extended to Neumann and mixed boundary conditions (see Theorem 3.1).