Introduction
Neural networks (NNs) have achieved remarkable success in artificial intelligence, natural language processing, and image recognition, and their applications have increasingly extended to scientific computing. In particular, NN-based methods have emerged as promising alternatives for the numerical solution of partial differential equations (PDEs) [4 , 6 , 15 , 16 , 31 , 35 ] , with early developments dating back to the 1990s [14 , 23 , 24 ] . One of the main advantages of NN approximations is their ability to adapt to the underlying solution structure through the optimization of network parameters. This feature is particularly attractive for problems exhibiting sharp transitions, boundary layers, or interior layers, where conventional numerical methods on uniform meshes may require a large number of degrees of freedom to achieve satisfactory accuracy.
In one dimension, shallow neural networks with rectified linear unit (ReLU) activation functions admit representations equivalent to free-knot splines (FKS). Unlike conventional splines with prescribed knots, FKS allow the knot locations to be optimized along with the coefficients, potentially achieving substantially improved approximation accuracy with relatively few degrees of freedom (see [5 ] and the discussion in [8 ] ). From this perspective, the optimization of the hidden-layer parameters of a shallow ReLU network corresponds to the adaptive placement of spline knots, while the output-layer parameters determine the coefficients of the spline representation. However, this flexibility comes at the cost of a challenging non-convex optimization problem. Furthermore, the global support of ReLU basis functions generally leads to dense and ill-conditioned algebraic systems [7 ] . Consequently, the development of efficient and robust optimization algorithms is essential for realizing the full potential of shallow NN approximations in the numerical solution of PDEs.
Recently, an efficient shallow Ritz method was developed in [8 , 9 ] for one-dimensional linear diffusion and diffusion-reaction problems. A key ingredient of this approach is a block Newton (BN) method that exploits the distinct roles of the linear and nonlinear network parameters. Following a classical outer-inner iterative strategy, the method alternates between optimizing the output-layer coefficients and updating the hidden-layer parameters, or equivalently, the free-knot locations. Such a separation of linear and nonlinear parameters is natural and has been explored in various contexts [1 , 2 , 11 , 20 , 29 , 30 , 32 ] . Nevertheless, two major computational difficulties remain: the optimization of the linear parameters involves dense, ill-conditioned algebraic systems, while the optimization of the nonlinear parameters requires solving nonlinear equations whose Hessian matrices may be singular. By exploiting the special structure of the shallow ReLU representation, the methods developed in [8 , 9 ] effectively address these difficulties and reduce the computational cost to O ( n ) O(n) O ( n ) in one dimension, where n n n denotes the number of neurons. In addition, a local convergence analysis of the BN method was recently established in [10 ] , providing convergence conditions that can be incorporated into practical implementations.
The objective of this paper is to extend the efficient shallow Ritz method from linear elliptic problems to semi-linear diffusion-reaction equations with cubic nonlinearities and, subsequently, to develop an efficient NN-based time-stepping method for the Allen–Cahn equation. The extension to semi-linear problems introduces several new analytical and computational challenges. First, although the Ritz functional remains convex with respect to the output-layer coefficients for fixed hidden-layer parameters, the corresponding first-order optimality conditions now form a system of nonlinear equations rather than a linear system. Second, the Hessian matrices associated with the optimization of both the linear and nonlinear parameters depend on both sets of parameters, making their efficient evaluation and inversion more involved. Nevertheless, by extending the structural identities and fast inversion techniques developed in [8 , 9 ] , we construct a reduced block Newton (rBN) method that retains the O ( n ) O(n) O ( n ) computational complexity for one-dimensional problems. We also establish a basic error estimate for the shallow Ritz discretization of the semi-linear diffusion-reaction equation.
An important application of the proposed method is the Allen–Cahn equation, originally introduced in [3 ] to describe the motion of antiphase boundaries in crystalline solids. The Allen–Cahn equation has since become a fundamental phase-field model with applications in materials science, interface dynamics, and fluid mechanics (see, e.g., [12 , 19 , 25 , 26 , 36 ] ). In the singularly perturbed regime, its solutions typically exhibit narrow transition layers separating regions corresponding to different stable phases. Accurately resolving these layers is challenging for conventional numerical methods, particularly on fixed uniform meshes, where insufficient spatial resolution may lead to significant errors and spurious oscillations. The adaptive nature of shallow ReLU networks makes them especially suitable for such problems, since the free-knot locations can be concentrated near sharp transitions without requiring a large number of neurons. Indeed, the numerical results in [9 ] have already demonstrated the effectiveness of the shallow Ritz method for singularly perturbed linear elliptic problems. These observations provide a strong motivation for extending the method to the time-dependent, nonlinear Allen–Cahn equation.
For the temporal discretization of the Allen–Cahn equation, convex splitting schemes have been widely studied because of their favorable stability properties [17 , 21 , 18 , 34 ] . In particular, the first-order convex splitting scheme introduced in [17 ] is unconditionally energy stable, preserving a discrete analogue of the energy dissipation property of the continuous problem without imposing a restriction on the time-step size. At each time step, the scheme requires the solution of a semi-linear elliptic problem with a cubic reaction term. This structure provides a natural connection between the convex splitting time discretization and the proposed shallow Ritz method. By combining the two approaches, we develop an efficient time-stepping NN method for the Allen–Cahn equation, in which the semi-linear elliptic problem at each time level is solved using the rBN algorithm. We establish the unconditional energy stability of the convex splitting time discretization and derive an error estimate in the L 2 L^2 L 2 norm.
The main contributions of this paper are summarized as follows:
Shallow Ritz discretization and error analysis for semi-linear problems. We extend the shallow Ritz formulation to one-dimensional semi-linear diffusion-reaction equations with cubic reaction terms and establish a basic error estimate for the resulting NN approximation.
Efficient reduced block Newton method. We develop an rBN algorithm for solving the non-convex optimization problem arising from the shallow Ritz discretization. By exploiting the special algebraic structure of shallow ReLU networks, the method achieves O ( n ) O(n) O ( n ) compu-
tational complexity in one dimension, despite the additional nonlinearities in the first-order optimality conditions and Hessian matrices.
Energy-stable NN time-stepping method for the Allen–Cahn equation. We combine the efficient shallow Ritz method with a first-order convex splitting scheme to obtain a time-stepping NN method for the Allen–Cahn equation. Unconditional energy stability of the time discretization and an L 2 L^2 L 2 -norm error estimate are established.
Accurate resolution of sharp transition layers. Numerical experiments demonstrate that the proposed method accurately resolves interior and boundary layers in singularly perturbed semi-linear diffusion-reaction problems and the Allen–Cahn equation. Compared with the finite element method on fixed uniform meshes, the shallow Ritz method achieves substantially higher accuracy with relatively few degrees of freedom and avoids spurious oscillations near sharp transitions.
The remainder of this paper is organized as follows. In § 2 , we introduce the shallow Ritz discretization for semi-linear diffusion-reaction problems and establish its basic error estimate. In § 3 , we derive the algebraic systems associated with the first-order optimality conditions. In § 4 , we develop the reduced block Newton method and discuss its implementation and local convergence conditions. In § 5 , we present the convex splitting time discretization for the Allen–Cahn equation, establish its energy stability and error estimate, and describe the resulting NN time-stepping method. Numerical experiments illustrating the accuracy, efficiency, and robustness of the proposed approach are reported in § 6 .
Shallow Ritz Method for Semi-Linear Diffusion-Reaction Problems
Consider the following semi-linear diffusion-reaction equation in one dimension:
{ − ( a ( x ) u ′ ( x ) ) ′ + r 1 ( x ) u ( x ) 3 + r 2 ( x ) u ( x ) = f ( x ) , x ∈ I , u ( 0 ) = α , ( a u ′ ) ( 1 ) = β , (1) \begin{cases}
-(a(x)u'(x))' + r_1(x)u(x)^3 + r_2(x)u(x) = f(x), & x \in I,\\
u(0) = \alpha, \qquad(au')(1) = \beta, \tag*{(1)}
\end{cases} { − ( a ( x ) u ′ ( x ) ) ′ + r 1 ( x ) u ( x ) 3 + r 2 ( x ) u ( x ) = f ( x ) , u ( 0 ) = α , ( a u ′ ) ( 1 ) = β , x ∈ I , (1)
where the diffusion coefficient a ( x ) a(x) a ( x ) , the reaction coefficients r 1 ( x ) r_1(x) r 1 ( x ) , r 2 ( x ) r_2(x) r 2 ( x ) , and the right-hand side function f ( x ) f(x) f ( x ) are given real-valued functions defined on I I I . Assume that a ( x ) a(x) a ( x ) , r 1 ( x ) r_1(x) r 1 ( x ) , r 2 ( x ) r_2(x) r 2 ( x ) are in L ∞ ( I ) L^\infty(I) L ∞ ( I ) and bounded below by constants μ 0 > 0 \mu_0 > 0 μ 0 > 0 , μ 1 ≥ 0 \mu_1 \ge0 μ 1 ≥ 0 , and μ 2 ≥ 0 \mu_2 \ge0 μ 2 ≥ 0 , respectively, almost everywhere on I I I . Unless otherwise stated, for simplicity of notation we take I = ( 0 , 1 ) I = (0,1) I = ( 0 , 1 ) ; the method and analysis extend directly to any open bounded interval. Here, we consider an inhomogeneous Neumann boundary condition at x = 1 x = 1 x = 1 ; for the Dirichlet case, we refer the reader to [8 , 9 ] .
The Ritz formulation of problem (1) is to find u ∈ H 1 ( I ) ∩ { u ( 0 ) = α } u \in H^1(I) \cap\{u(0) = \alpha\} u ∈ H 1 ( I ) ∩ { u ( 0 ) = α } such that
J ( u ) = min v ∈ H 1 ( I ) ∩ { v ( 0 ) = α } J ( v ) , (2) J(u) = \min_{v \in H^1(I)\cap\{v(0)=\alpha\}} J(v), \tag*{(2)} J ( u ) = v ∈ H 1 ( I ) ∩ { v ( 0 ) = α } min J ( v ) , (2)
with the energy functional
J ( v ) = 1 2 ∫ 0 1 ( a ( x ) v ′ ( x ) 2 + 1 2 r 1 ( x ) v ( x ) 4 + r 2 ( x ) v ( x ) 2 ) d x − f ( v ) , J(v) = \frac{1}{2}\int_0^1\left(a(x)v'(x)^2+\frac{1}{2}r_1(x)v(x)^4+r_2(x)v(x)^2\right)\,\mathrm{d}x-f(v), J ( v ) = 2 1 ∫ 0 1 ( a ( x ) v ′ ( x ) 2 + 2 1 r 1 ( x ) v ( x ) 4 + r 2 ( x ) v ( x ) 2 ) d x − f ( v ) ,
where v ′ ( x ) 2 = ( v ′ ( x ) ) 2 v'(x)^2=(v'(x))^2 v ′ ( x ) 2 = ( v ′ ( x ) ) 2 and the linear functional is given by
f ( v ) = ∫ 0 1 f ( x ) v ( x ) d x + β v ( 1 ) . f(v)=\int_0^1 f(x)\,v(x)\,\mathrm{d}x+\beta\,v(1). f ( v ) = ∫ 0 1 f ( x ) v ( x ) d x + β v ( 1 ) .
The set of approximating functions generated by the shallow ReLU neural network with n n n interior breakpoints over the domain I I I is denoted by
M n ( I ) = { c − 1 + c 0 x + ∑ i = 1 n c i σ ( x − b i ) : c i ∈ R , 0 = b 0 < b 1 < ⋯ < b n < b n + 1 = 1 } , \mathcal{M}_n(I)=\left\{c_{-1}+c_0x+\sum_{i=1}^{n}c_i\sigma(x-b_i):c_i\in\mathbb{R},\ 0=b_0<b_1<\cdots<b_n<b_{n+1}=1\right\}, M n ( I ) = { c − 1 + c 0 x + i = 1 ∑ n c i σ ( x − b i ) : c i ∈ R , 0 = b 0 < b 1 < ⋯ < b n < b n + 1 = 1 } ,
where σ ( t ) = max { 0 , t } \sigma(t) = \max\{0,t\} σ ( t ) = max { 0 , t } is the ReLU activation function. Let
M n α ( I ) = M n ( I ) ∩ { u n ( 0 ) = α } . \mathcal{M}_{n}^{\alpha}(I)=\mathcal{M}_{n}(I)\cap\{u_{n}(0)=\alpha\}. M n α ( I ) = M n ( I ) ∩ { u n ( 0 ) = α } .
Then, the Ritz neural network approximation is to find u n ∈ M n α ( I ) u_n\in\mathcal{M}_{n}^{\alpha}(I) u n ∈ M n α ( I ) such that
J ( u n ) = min v ∈ M n α ( I ) J ( v ) . (3) J(u_n)=\min_{v\in\mathcal{M}_{n}^{\alpha}(I)}J(v). \tag*{(3)} J ( u n ) = v ∈ M n α ( I ) min J ( v ) . (3)
Next, we establish an error bound similar to Céa’s lemma for the solution u n u_n u n of (3) in the weighted H 1 ( I ) H^1(I) H 1 ( I ) norm defined by
∥ v ∥ a , r 2 2 = ∫ 0 1 ( a ( x ) v ′ ( x ) 2 + r 2 ( x ) v ( x ) 2 ) d x . \lVert v\rVert_{a,r_2}^{2}=\int_{0}^{1}\left(a(x)v'(x)^2+r_2(x)v(x)^2\right)\,dx. ∥ v ∥ a , r 2 2 = ∫ 0 1 ( a ( x ) v ′ ( x ) 2 + r 2 ( x ) v ( x ) 2 ) d x .
This bound is for a nonlinear approximation defined over a subset but not a subspace of H 1 ( I ) H^1(I) H 1 ( I ) .
Lemma 2.1. Let u u u and u n u_n u n be the solutions of problems (2) and (3) , respectively. Then
∥ u − u n ∥ a , r 2 ≤ inf v ∈ M n α ( I ) E ( u − v ; a , r 1 , r 2 ) , (4) \lVert u-u_n\rVert_{a,r_2}\leq\inf_{v\in\mathcal{M}_{n}^{\alpha}(I)}E(u-v;a,r_1,r_2), \tag*{(4)} ∥ u − u n ∥ a , r 2 ≤ v ∈ M n α ( I ) inf E ( u − v ; a , r 1 , r 2 ) , (4) where the square of E ( u − v ; a , r 1 , r 2 ) E(u-v;a,r_1,r_2) E ( u − v ; a , r 1 , r 2 ) is given by
E 2 ( u − v ; a , r 1 , r 2 ) = ∥ u − v ∥ a , r 2 2 + ∥ r 1 1 / 4 ( u − v ) ∥ L 4 ( I ) 4 + 5 ∥ r 1 1 / 4 u ∥ L 4 ( I ) 2 ∥ r 1 1 / 4 ( u − v ) ∥ L 4 ( I ) 2 . E^2(u-v;a,r_1,r_2)=\lVert u-v\rVert_{a,r_2}^{2}+\lVert r_1^{1/4}(u-v)\rVert_{L^4(I)}^{4}+5\lVert r_1^{1/4}u\rVert_{L^4(I)}^{2}\lVert r_1^{1/4}(u-v)\rVert_{L^4(I)}^{2}. E 2 ( u − v ; a , r 1 , r 2 ) = ∥ u − v ∥ a , r 2 2 + ∥ r 1 1/4 ( u − v ) ∥ L 4 ( I ) 4 + 5 ∥ r 1 1/4 u ∥ L 4 ( I ) 2 ∥ r 1 1/4 ( u − v ) ∥ L 4 ( I ) 2 . Proof. First, we show that for any v ∈ M n α ( I ) v\in\mathcal{M}_{n}^{\alpha}(I) v ∈ M n α ( I ) , we have
∥ u − v ∥ a , r 2 2 ≤ 2 ( J ( v ) − J ( u ) ) , (5) \lVert u-v\rVert_{a,r_2}^{2}\leq2(J(v)-J(u)), \tag*{(5)} ∥ u − v ∥ a , r 2 2 ≤ 2 ( J ( v ) − J ( u )) , (5) as in the linear case (see the proof of Theorem 3.2 in [27 ] ). To this end, multiplying (1) by w ∈ { u , v } w\in\{u,v\} w ∈ { u , v } and using integration by parts, we have
f ( w ) = ∫ 0 1 ( a u ′ w ′ + r 1 u 3 w + r 2 u w ) d x + α a ( 0 ) u ′ ( 0 ) , f(w)=\int_{0}^{1}\left(au'w'+r_1u^3w+r_2uw\right)\,dx+\alpha a(0)u'(0), f ( w ) = ∫ 0 1 ( a u ′ w ′ + r 1 u 3 w + r 2 u w ) d x + α a ( 0 ) u ′ ( 0 ) , which implies
f ( v ) − f ( u ) = ∫ 0 1 ( a u ′ ( v ′ − u ′ ) + r 1 u 3 ( v − u ) + r 2 u ( v − u ) ) d x . f(v)-f(u)=\int_{0}^{1}\left(a u'(v'-u')+r_1u^3(v-u)+r_2u(v-u)\right)\,dx. f ( v ) − f ( u ) = ∫ 0 1 ( a u ′ ( v ′ − u ′ ) + r 1 u 3 ( v − u ) + r 2 u ( v − u ) ) d x . A straightforward calculation gives
2 ( J ( v ) − J ( u ) ) = ∥ u − v ∥ a , r 2 2 + 1 2 ∫ 0 1 r 1 ( v 4 + 4 u 3 ( u − v ) − u 4 ) d x , (6) 2(J(v)-J(u))=\lVert u-v\rVert_{a,r_2}^{2}+\frac{1}{2}\int_{0}^{1}r_1\left(v^4+4u^3(u-v)-u^4\right)\,dx, \tag*{(6)} 2 ( J ( v ) − J ( u )) = ∥ u − v ∥ a , r 2 2 + 2 1 ∫ 0 1 r 1 ( v 4 + 4 u 3 ( u − v ) − u 4 ) d x , (6) which, together with the identity
v 4 + 4 u 3 ( u − v ) − u 4 = ( u − v ) 2 [ ( u + v ) 2 + 2 u 2 ] ≥ 0 , (7) v^4+4u^3(u-v)-u^4=(u-v)^2\left[(u+v)^2+2u^2\right]\geq0, \tag*{(7)} v 4 + 4 u 3 ( u − v ) − u 4 = ( u − v ) 2 [ ( u + v ) 2 + 2 u 2 ] ≥ 0 , (7) implies the validity of (5) . To bound J ( v ) − J ( u ) J(v)-J(u) J ( v ) − J ( u ) , first we have
( u + v ) 2 + 2 u 2 ≤ 2 ( u − v ) 2 + 10 u 2 , (u+v)^2+2u^2\leq2(u-v)^2+10u^2, ( u + v ) 2 + 2 u 2 ≤ 2 ( u − v ) 2 + 10 u 2 , which, together with (7) and the Cauchy–Schwarz inequality, implies
∫ 0 1 r 1 ( v 4 + 4 u 3 ( u − v ) − u 4 ) d x ≤ 2 ∥ r 1 1 / 4 ( u − v ) ∥ L 4 ( I ) 4 + 10 ∥ r 1 1 / 4 u ∥ L 4 ( I ) 2 ∥ r 1 1 / 4 ( u − v ) ∥ L 4 ( I ) 2 . \int_{0}^{1}r_1\left(v^4+4u^3(u-v)-u^4\right)\,dx\leq2\lVert r_1^{1/4}(u-v)\rVert_{L^4(I)}^{4}+10\lVert r_1^{1/4}u\rVert_{L^4(I)}^{2}\lVert r_1^{1/4}(u-v)\rVert_{L^4(I)}^{2}. ∫ 0 1 r 1 ( v 4 + 4 u 3 ( u − v ) − u 4 ) d x ≤ 2 ∥ r 1 1/4 ( u − v ) ∥ L 4 ( I ) 4 + 10 ∥ r 1 1/4 u ∥ L 4 ( I ) 2 ∥ r 1 1/4 ( u − v ) ∥ L 4 ( I ) 2 . Now, (4) follows from (5) with v = u n v=u_n v = u n , the fact that J ( u n ) ≤ J ( v ) J(u_n)\leq J(v) J ( u n ) ≤ J ( v ) for all v ∈ M n α ( I ) v\in\mathcal{M}_{n}^{\alpha}(I) v ∈ M n α ( I ) , (6) , and the above inequality. This completes the proof of the lemma.
Remark 2.2. The above proof is independent of dimension, and hence the lemma holds in multiple dimensions.
Optimality Conditions
This section derives systems of algebraic equations arising from the optimality conditions of (3) .
To this end, for any function v ( x ) ∈ M n α ( I ) v(x) \in\mathcal{M}^{\alpha}_{n}(I) v ( x ) ∈ M n α ( I ) , let
v ( x ) = α + ∑ i = 0 n c i σ ( x − b i ) . v(x) = \alpha+ \sum_{i=0}^{n} c_i \sigma(x-b_i). v ( x ) = α + i = 0 ∑ n c i σ ( x − b i ) .
Denote by
c = ( c 0 , … , c n ) T and b = ( b 1 , … , b n ) T \mathbf{c} = (c_0,\ldots,c_n)^T \quad\text{and} \quad\mathbf{b} = (b_1,\ldots,b_n)^T c = ( c 0 , … , c n ) T and b = ( b 1 , … , b n ) T
the respective linear and nonlinear parameters, and denote by θ = ( c , b ) ∈ R 2 n + 1 \boldsymbol{\theta} = (\mathbf{c},\mathbf{b}) \in\mathbb{R}^{2n+1} θ = ( c , b ) ∈ R 2 n + 1 the vector containing all optimizable parameters. If u n ( x ) ∈ M n α ( I ) u_n(x) \in\mathcal{M}^{\alpha}_{n}(I) u n ( x ) ∈ M n α ( I ) is a solution of (3) , then F ( θ ) = J ( u n ( ⋅ ; θ ) ) F(\boldsymbol{\theta}) = J(u_n(\cdot;\boldsymbol{\theta})) F ( θ ) = J ( u n ( ⋅ ; θ )) , as a function of all parameters, satisfies the following first-order optimality conditions
∇ θ F ( θ ) = ( ∇ c F ( θ ) ∇ b F ( θ ) ) = ( 0 0 ) (8) \nabla_{\boldsymbol{\theta}}F(\boldsymbol{\theta}) =
\begin{pmatrix}
\nabla_{\mathbf{c}}F(\boldsymbol{\theta})\\
\nabla_{\mathbf{b}}F(\boldsymbol{\theta})
\end{pmatrix}
=
\begin{pmatrix}
\mathbf{0}\\
\mathbf{0}
\end{pmatrix} \tag*{(8)} ∇ θ F ( θ ) = ( ∇ c F ( θ ) ∇ b F ( θ ) ) = ( 0 0 ) (8)
where ∇ c \nabla_{\mathbf{c}} ∇ c and ∇ b \nabla_{\mathbf{b}} ∇ b denote the gradients with respect to c \mathbf{c} c and b \mathbf{b} b , respectively.
Denote by H ( t ) H(t) H ( t ) and δ ( t ) \delta(t) δ ( t ) the respective Heaviside (unit) step and Dirac delta functions. It is known that they are the respective first and second weak derivatives of σ ( t ) \sigma(t) σ ( t ) , i.e., H ( t ) = σ ′ ( t ) H(t) = \sigma'(t) H ( t ) = σ ′ ( t ) and δ ( t ) = σ ′ ′ ( t ) \delta(t) = \sigma''(t) δ ( t ) = σ ′′ ( t ) . For each i = 0 , 1 , … , n i=0,1,\ldots,n i = 0 , 1 , … , n , let
σ i ( x ) = σ ( x − b i ) , H i ( x ) = H ( x − b i ) , and δ i ( x ) = δ ( x − b i ) . \sigma_i(x) = \sigma(x-b_i), \qquad H_i(x) = H(x-b_i), \qquad\text{and} \qquad\delta_i(x) = \delta(x-b_i). σ i ( x ) = σ ( x − b i ) , H i ( x ) = H ( x − b i ) , and δ i ( x ) = δ ( x − b i ) .
Set
Σ n + 1 ( x ) = ( σ 0 ( x ) σ 1 ( x ) ⋮ σ n ( x ) ) , H n ( x ) = ( H 1 ( x ) ⋮ H n ( x ) ) , H n + 1 ( x ) = ( H 0 ( x ) H 1 ( x ) ⋮ H n ( x ) ) , Λ n ( x ) = ( δ 1 ( x ) ⋮ δ n ( x ) ) . \boldsymbol{\Sigma}_{n+1}(x) =
\begin{pmatrix}
\sigma_0(x)\\
\sigma_1(x)\\
\vdots\\
\sigma_n(x)
\end{pmatrix}, \qquad
\mathbf{H}_{n}(x) =
\begin{pmatrix}
H_1(x)\\
\vdots\\
H_n(x)
\end{pmatrix}, \qquad
\mathbf{H}_{n+1}(x) =
\begin{pmatrix}
H_0(x)\\
H_1(x)\\
\vdots\\
H_n(x)
\end{pmatrix}, \qquad
\boldsymbol{\Lambda}_{n}(x) =
\begin{pmatrix}
\delta_1(x)\\
\vdots\\
\delta_n(x)
\end{pmatrix}. Σ n + 1 ( x ) = σ 0 ( x ) σ 1 ( x ) ⋮ σ n ( x ) , H n ( x ) = H 1 ( x ) ⋮ H n ( x ) , H n + 1 ( x ) = H 0 ( x ) H 1 ( x ) ⋮ H n ( x ) , Λ n ( x ) = δ 1 ( x ) ⋮ δ n ( x ) .
Let r ^ ( x ; θ ) = r 1 u n 3 + r 2 u n \hat{r}(x;\boldsymbol{\theta}) = r_1u_n^3+r_2u_n r ^ ( x ; θ ) = r 1 u n 3 + r 2 u n . From the facts that
u n ( x ) ∈ H 1 ( I ) , ∇ c u n ′ ( x ) = H n + 1 ( x ) , ∇ c u n ( x ) = Σ n + 1 ( x ) , and ∇ c u n ( 1 ) = Σ n + 1 ( 1 ) = d , u_n(x) \in H^1(I), \quad\nabla_{\mathbf{c}}u_n'(x) = \mathbf{H}_{n+1}(x), \quad\nabla_{\mathbf{c}}u_n(x) = \boldsymbol{\Sigma}_{n+1}(x), \quad\text{and} \quad\nabla_{\mathbf{c}}u_n(1) = \boldsymbol{\Sigma}_{n+1}(1) = \mathbf{d}, u n ( x ) ∈ H 1 ( I ) , ∇ c u n ′ ( x ) = H n + 1 ( x ) , ∇ c u n ( x ) = Σ n + 1 ( x ) , and ∇ c u n ( 1 ) = Σ n + 1 ( 1 ) = d ,
the first block in (8) becomes
0 = ∇ c F ( θ ) = ∫ 0 1 [ a u n ′ ∇ c u n ′ + r ^ ( x ; θ ) ∇ c u n ] d x − ∫ 0 1 f ∇ c u n d x − β ∇ c u n ( 1 ) = A n + 1 ( b ; a ) c + ∫ 0 1 r ^ ( x ; θ ) Σ n + 1 d x − f n + 1 ( b ) − β d , (9) \begin{aligned}
\mathbf{0} = \nabla_{\mathbf{c}}F(\boldsymbol{\theta}) = \int_0^1 \left[a u_n' \nabla_{\mathbf{c}}u_n' + \hat{r}(x;\boldsymbol{\theta})\nabla_{\mathbf{c}}u_n\right]\,dx - \int_0^1 f\nabla_{\mathbf{c}}u_n\,dx - \beta\nabla_{\mathbf{c}}u_n(1) \\
&= A_{n+1}(\mathbf{b};a)\mathbf{c} + \int_0^1 \hat{r}(x;\boldsymbol{\theta})\boldsymbol{\Sigma}_{n+1}\,dx - \mathbf{f}_{n+1}(\mathbf{b}) - \beta\mathbf{d}, \tag*{(9)}
\end{aligned} 0 = ∇ c F ( θ ) = ∫ 0 1 [ a u n ′ ∇ c u n ′ + r ^ ( x ; θ ) ∇ c u n ] d x − ∫ 0 1 f ∇ c u n d x − β ∇ c u n ( 1 ) = A n + 1 ( b ; a ) c + ∫ 0 1 r ^ ( x ; θ ) Σ n + 1 d x − f n + 1 ( b ) − β d , (9)
where the matrix A n + 1 ( b ; a ) A_{n+1}(\mathbf{b};a) A n + 1 ( b ; a ) and the vector f n + 1 ( b ) \mathbf{f}_{n+1}(\mathbf{b}) f n + 1 ( b ) are given by
A n + 1 ( b ; a ) = ∫ 0 1 a ( x ) H n + 1 ( x ) H n + 1 ( x ) T d x and f n + 1 ( b ) = ∫ 0 1 f ( x ) Σ n + 1 ( x ) d x , A_{n+1}(\mathbf{b};a) = \int_0^1 a(x)\mathbf{H}_{n+1}(x)\mathbf{H}_{n+1}(x)^T\,dx \quad\text{and} \quad\mathbf{f}_{n+1}(\mathbf{b}) = \int_0^1 f(x)\boldsymbol{\Sigma}_{n+1}(x)\,dx, A n + 1 ( b ; a ) = ∫ 0 1 a ( x ) H n + 1 ( x ) H n + 1 ( x ) T d x and f n + 1 ( b ) = ∫ 0 1 f ( x ) Σ n + 1 ( x ) d x ,
respectively.
Next, to derive the second block in (8) , for j = 1 , … , n j=1,\ldots,n j = 1 , … , n , notice first that (see the proof of Lemma 4.1 in [8 ] )
∂ ∂ b j ∫ 0 1 a ( x ) u n ′ ( x ) 2 d x = − 2 c j a ( b j ) u n ′ ( b j ) , (10) \frac{\partial}{\partial b_j}\int_0^1 a(x)u_n'(x)^2\,dx = -2c_j a(b_j)u_n'(b_j), \tag*{(10)} ∂ b j ∂ ∫ 0 1 a ( x ) u n ′ ( x ) 2 d x = − 2 c j a ( b j ) u n ′ ( b j ) , (10)
where u n ′ ( b j ) = ∑ i = 0 j − 1 c i + c j 2 u_n'(b_j)=\sum_{i=0}^{j-1}c_i+\frac{c_j}{2} u n ′ ( b j ) = ∑ i = 0 j − 1 c i + 2 c j due to the convention that H ( 0 ) = 1 / 2 H(0)=1/2 H ( 0 ) = 1/2 . Let
q j = q j ( θ ) = ∫ b j 1 [ f ( x ) − r ^ ( x ; θ ) ] d x − a ( b j ) u n ′ ( b j ) . (11) q_j=q_j(\theta)=\int_{b_j}^{1}[f(x)-\hat{r}(x;\theta)]\,\mathrm{d}x-a(b_j)u_n'(b_j). \tag*{(11)} q j = q j ( θ ) = ∫ b j 1 [ f ( x ) − r ^ ( x ; θ )] d x − a ( b j ) u n ′ ( b j ) . (11)
Since
∂ u n ( x ) ∂ b j = − c j H ( x − b j ) and ∂ u n ( 1 ) ∂ b j = − c j , \frac{\partial u_n(x)}{\partial b_j}=-c_jH(x-b_j)\quad\text{and}\quad\frac{\partial u_n(1)}{\partial b_j}=-c_j, ∂ b j ∂ u n ( x ) = − c j H ( x − b j ) and ∂ b j ∂ u n ( 1 ) = − c j ,
it follows from (10) that the second block in (8) becomes
0 = ∇ b F ( θ ) = 1 2 ∇ b ∫ 0 1 a ( x ) u n ′ ( x ) 2 d x + ∫ 0 1 ( r ^ ( x ; θ ) − f ) ∇ b u n d x − β ∇ b u n ( 1 ) = D n ( c ^ ) ( q + β 1 ) , (12) \begin{aligned}
0=\nabla_bF(\theta)=\frac{1}{2}\nabla_b\int_0^1a(x)u_n'(x)^2\,\mathrm{d}x+\int_0^1(\hat{r}(x;\theta)-f)\nabla_bu_n\,\mathrm{d}x-\beta\nabla_bu_n(1) \\
&=\mathbf{D}_n(\hat{c})(q+\beta\mathbf{1}), \tag*{(12)}
\end{aligned} 0 = ∇ b F ( θ ) = 2 1 ∇ b ∫ 0 1 a ( x ) u n ′ ( x ) 2 d x + ∫ 0 1 ( r ^ ( x ; θ ) − f ) ∇ b u n d x − β ∇ b u n ( 1 ) = D n ( c ^ ) ( q + β 1 ) , (12)
where D n ( c ^ ) \mathbf{D}_n(\hat{c}) D n ( c ^ ) is an n × n n\times n n × n diagonal matrix with the i t h i^{th} i t h diagonal element c i c_i c i and
c ^ = ( c 1 , … , c n ) T , q = ( q 1 , … , q n ) T , and 1 = ( 1 , … , 1 ) T . \hat{c}=(c_1,\ldots,c_n)^{T},\quad q=(q_1,\ldots,q_n)^{T},\quad\text{and}\quad\mathbf{1}=(1,\ldots,1)^{T}. c ^ = ( c 1 , … , c n ) T , q = ( q 1 , … , q n ) T , and 1 = ( 1 , … , 1 ) T .
Remark 3.1. If c i = 0 c_i=0 c i = 0 , then the i t h i^{th} i t h equation is absent from the optimality condition (12) . Moreover, the i t h i^{th} i t h neuron does not contribute to the approximation u n u_n u n . Such neurons can be removed or redistributed.
Remark 3.2. Equation (9) is no longer a system of linear algebraic equations due to the nonlinearity of the term u n ( x ) 3 u_n(x)^3 u n ( x ) 3 . A possible linearization strategy is as follows: for a given u ^ n ( x ) ∈ M n 1 ( I ) \hat{u}_n(x)\in\mathcal{M}_n^1(I) u ^ n ( x ) ∈ M n 1 ( I ) such that u ^ n ( x ) ≈ u n ( x ) \hat{u}_n(x)\approx u_n(x) u ^ n ( x ) ≈ u n ( x ) , we have
u n ( x ) 3 = ( u n ( x ) 3 − u n ( x ) ) + u n ( x ) ≈ ( u ^ n ( x ) 3 − u ^ n ( x ) ) + u n ( x ) . u_n(x)^3=(u_n(x)^3-u_n(x))+u_n(x)\approx(\hat{u}_n(x)^3-\hat{u}_n(x))+u_n(x). u n ( x ) 3 = ( u n ( x ) 3 − u n ( x )) + u n ( x ) ≈ ( u ^ n ( x ) 3 − u ^ n ( x )) + u n ( x ) .
This strategy was employed in the initialization for the numerical experiments in § 6 .
A Block Newton Method
This section outlines a block Newton (BN) method for solving the system of nonlinear algebraic equations given in (8) with ∇ c F ( θ ) \nabla_cF(\theta) ∇ c F ( θ ) and ∇ b F ( θ ) \nabla_bF(\theta) ∇ b F ( θ ) given in the respective (9) and (12) .
Hessian Matrix
The Hessian matrix of the function F ( θ ) = J ( u n ( ⋅ ; θ ) ) F(\theta)=J(u_n(\cdot;\theta)) F ( θ ) = J ( u n ( ⋅ ; θ )) is denoted by
∇ θ 2 F ( θ ) = H ( θ ) = ( H 11 ( θ ) H 12 ( θ ) H 21 ( θ ) H 22 ( θ ) ) ∈ R ( 2 n + 1 ) × ( 2 n + 1 ) , \nabla_\theta^2F(\theta)=\mathcal{H}(\theta)=\begin{pmatrix}\mathcal{H}_{11}(\theta)&\mathcal{H}_{12}(\theta)\\\mathcal{H}_{21}(\theta)&\mathcal{H}_{22}(\theta)\end{pmatrix}\in\mathbb{R}^{(2n+1)\times(2n+1)}, ∇ θ 2 F ( θ ) = H ( θ ) = ( H 11 ( θ ) H 21 ( θ ) H 12 ( θ ) H 22 ( θ ) ) ∈ R ( 2 n + 1 ) × ( 2 n + 1 ) ,
where the block matrices are given by
H 11 ( θ ) = ∇ c c 2 F ( θ ) , H 12 ( θ ) = ∇ c b 2 F ( θ ) , H 21 ( θ ) = ∇ b c 2 F ( θ ) , and H 22 ( θ ) = ∇ b b 2 F ( θ ) . \mathcal{H}_{11}(\theta)=\nabla_{cc}^2F(\theta),\quad\mathcal{H}_{12}(\theta)=\nabla_{cb}^2F(\theta),\quad\mathcal{H}_{21}(\theta)=\nabla_{bc}^2F(\theta),\quad\text{and}\quad\mathcal{H}_{22}(\theta)=\nabla_{bb}^2F(\theta). H 11 ( θ ) = ∇ cc 2 F ( θ ) , H 12 ( θ ) = ∇ c b 2 F ( θ ) , H 21 ( θ ) = ∇ b c 2 F ( θ ) , and H 22 ( θ ) = ∇ bb 2 F ( θ ) .
First, we derive the principal blocks of the Hessian matrix. Denote the weighted mass matrix by
M n + 1 ( b ; r ) = ∫ 0 1 r ( x ; θ ) Σ n + 1 Σ n + 1 T d x , M_{n+1}(\mathbf{b};r)=\int_0^1r(x;\theta)\boldsymbol{\Sigma}_{n+1}\boldsymbol{\Sigma}_{n+1}^{T}\,\mathrm{d}x, M n + 1 ( b ; r ) = ∫ 0 1 r ( x ; θ ) Σ n + 1 Σ n + 1 T d x ,
where the weight is r ( x ) = r ( x ; θ ) = 3 r 1 ( x ) u n ( x ) 2 + r 2 ( x ) r(x)=r(x;\theta)=3r_1(x)u_n(x)^2+r_2(x) r ( x ) = r ( x ; θ ) = 3 r 1 ( x ) u n ( x ) 2 + r 2 ( x ) . Clearly, we have
∇ c ( A n + 1 ( b ; a ) c ) T = A n + 1 ( b ; a ) and ∇ c ∫ 0 1 [ r 1 u n 3 + r 2 u n ] Σ n + 1 T d x = M n + 1 ( b ; r ) , \nabla_c\bigl(A_{n+1}(\mathbf{b};a)\mathbf{c}\bigr)^T=A_{n+1}(\mathbf{b};a)\quad\text{and}\quad\nabla_c\int_0^1\left[r_1u_n^3+r_2u_n\right]\boldsymbol{\Sigma}_{n+1}^{T}\,\mathrm{d}x=M_{n+1}(\mathbf{b};r), ∇ c ( A n + 1 ( b ; a ) c ) T = A n + 1 ( b ; a ) and ∇ c ∫ 0 1 [ r 1 u n 3 + r 2 u n ] Σ n + 1 T d x = M n + 1 ( b ; r ) ,
which, together with (9) , gives the 1 × 1 1 \times1 1 × 1 block of the Hessian matrix
H 11 ( θ ) = A n + 1 ( b ; a ) + M n + 1 ( b ; r ) . (13) \mathcal{H}_{11}(\theta)=A_{n+1}(\mathbf{b};a)+M_{n+1}(\mathbf{b};r). \tag*{(13)} H 11 ( θ ) = A n + 1 ( b ; a ) + M n + 1 ( b ; r ) . (13)
For i , j = 1 , … , n i,j=1,\ldots,n i , j = 1 , … , n , by (11) , a direct calculation yields
∂ q j ∂ b i = { c i ∫ 0 1 r ( x ; θ ) H i ( x ) 2 d x + g i , i = j , c i ∫ 0 1 r ( x ; θ ) H i ( x ) H j ( x ) d x , i ≠ j . \frac{\partial q_j}{\partial b_i}=
\begin{cases}
c_i\int_0^1 r(x;\theta)H_i(x)^2\,\mathrm{d}x+g_i, & i=j,\\
c_i\int_0^1 r(x;\theta)H_i(x)H_j(x)\,\mathrm{d}x, & i\ne j.
\end{cases} ∂ b i ∂ q j = { c i ∫ 0 1 r ( x ; θ ) H i ( x ) 2 d x + g i , c i ∫ 0 1 r ( x ; θ ) H i ( x ) H j ( x ) d x , i = j , i = j .
where g i g_i g i is given by
g i = g i ( θ ) = r ^ ( b i ; θ ) − f ( b i ) − a ′ ( b i ) w n ′ ( b i ) . (14) g_i=g_i(\theta)=\hat r(b_i;\theta)-f(b_i)-a'(b_i)w_n'(b_i). \tag*{(14)} g i = g i ( θ ) = r ^ ( b i ; θ ) − f ( b i ) − a ′ ( b i ) w n ′ ( b i ) . (14)
Denote by D n ( g ) = diag ( g 1 , … , g n ) \mathbf{D}_n(\mathbf{g})=\operatorname{diag}(g_1,\ldots,g_n) D n ( g ) = diag ( g 1 , … , g n ) the diagonal matrix with entries g 1 , … , g n g_1,\ldots,g_n g 1 , … , g n on the diagonal and by A n ( b ; r ) = ∫ 0 1 r ( x ; θ ) H n H n T d x A_n(\mathbf{b};r)=\int_0^1r(x;\theta)\mathbf{H}_n\mathbf{H}_n^T\,\mathrm{d}x A n ( b ; r ) = ∫ 0 1 r ( x ; θ ) H n H n T d x the stiffness matrix. Then the 2 × 2 2\times2 2 × 2 block of the Hessian matrix has the form
H 22 ( θ ) = D n ( c ^ ) [ A n ( b ; r ) D n ( c ^ ) + D n ( g ) ] . (15) \mathcal{H}_{22}(\theta)=\mathbf{D}_n(\hat{\mathbf{c}})\left[A_n(\mathbf{b};r)\mathbf{D}_n(\hat{\mathbf{c}})+\mathbf{D}_n(\mathbf{g})\right]. \tag*{(15)} H 22 ( θ ) = D n ( c ^ ) [ A n ( b ; r ) D n ( c ^ ) + D n ( g ) ] . (15)
Next, we derive the off-diagonal block H 12 ( θ ) \mathcal{H}_{12}(\theta) H 12 ( θ ) of the Hessian matrix. For i = 0 , 1 , … , n i=0,1,\ldots,n i = 0 , 1 , … , n and j = 1 , … , n j=1,\ldots,n j = 1 , … , n , by (11) we have
∂ q j ∂ c i = − ∫ b j 1 r σ i ( x ) d x − a ( b j ) H i ( b j ) , \frac{\partial q_j}{\partial c_i}=-\int_{b_j}^1r\sigma_i(x)\,\mathrm{d}x-a(b_j)H_i(b_j), ∂ c i ∂ q j = − ∫ b j 1 r σ i ( x ) d x − a ( b j ) H i ( b j ) ,
which, together with (12) , implies
∂ 2 F ( θ ) ∂ c i ∂ b j = δ i j ( q j ( θ ) + β ) − c j ( ∫ b j 1 r ( x ) σ i ( x ) d x + a ( b j ) H i ( b j ) ) = δ i j ( q j ( θ ) + β ) − c j ( ∫ 0 1 r ( x ) σ i ( x ) H j ( x ) d x + ∫ 0 1 a ( x ) H i ( x ) δ j ( x ) d x ) , \begin{aligned}
\frac{\partial^2F(\theta)}{\partial c_i\partial b_j}
=\delta_{ij}(q_j(\theta)+\beta)-c_j\left(\int_{b_j}^1r(x)\sigma_i(x)\,\mathrm{d}x+a(b_j)H_i(b_j)\right) \\
&=\delta_{ij}(q_j(\theta)+\beta)-c_j\left(\int_0^1r(x)\sigma_i(x)H_j(x)\,\mathrm{d}x+\int_0^1a(x)H_i(x)\delta_j(x)\,\mathrm{d}x\right),
\end{aligned} ∂ c i ∂ b j ∂ 2 F ( θ ) = δ ij ( q j ( θ ) + β ) − c j ( ∫ b j 1 r ( x ) σ i ( x ) d x + a ( b j ) H i ( b j ) ) = δ ij ( q j ( θ ) + β ) − c j ( ∫ 0 1 r ( x ) σ i ( x ) H j ( x ) d x + ∫ 0 1 a ( x ) H i ( x ) δ j ( x ) d x ) ,
where δ i j \delta_{ij} δ ij is the Kronecker delta symbol. Then the off-diagonal block H 12 ( θ ) \mathcal{H}_{12}(\theta) H 12 ( θ ) has the form
H 12 ( θ ) = R ( θ ) − [ C ( b ; a ) + B ( b ; r ) ] D n ( c ^ ) , (16) \mathcal{H}_{12}(\theta)=\mathcal{R}(\theta)-\left[C(\mathbf{b};a)+B(\mathbf{b};r)\right]\mathbf{D}_n(\hat{\mathbf{c}}), \tag*{(16)} H 12 ( θ ) = R ( θ ) − [ C ( b ; a ) + B ( b ; r ) ] D n ( c ^ ) , (16)
where R ( θ ) = ( R i j ( θ ) ) ( n + 1 ) × n \mathcal{R}(\theta)=(\mathcal{R}_{ij}(\theta))_{(n+1)\times n} R ( θ ) = ( R ij ( θ ) ) ( n + 1 ) × n with R 0 j ( θ ) = 0 \mathcal{R}_{0j}(\theta)=0 R 0 j ( θ ) = 0 and R i j ( θ ) = ( q i ( θ ) + β ) δ i j \mathcal{R}_{ij}(\theta)=(q_i(\theta)+\beta)\delta_{ij} R ij ( θ ) = ( q i ( θ ) + β ) δ ij for i = 1 , … , n i=1,\ldots,n i = 1 , … , n ; and the matrices B ( b ; r ) B(\mathbf{b};r) B ( b ; r ) and C ( b ; a ) C(\mathbf{b};a) C ( b ; a ) are given by
B ( b ; r ) = ∫ 0 1 r ( x ; θ ) Σ n + 1 H n T d x and C ( b ; a ) = ∫ 0 1 a ( x ) H n + 1 Λ n T d x . B(\mathbf{b};r)=\int_0^1r(x;\theta)\boldsymbol{\Sigma}_{n+1}\mathbf{H}_n^T\,\mathrm{d}x
\quad\text{and}\quad
C(\mathbf{b};a)=\int_0^1a(x)\mathbf{H}_{n+1}\boldsymbol{\Lambda}_n^T\,\mathrm{d}x. B ( b ; r ) = ∫ 0 1 r ( x ; θ ) Σ n + 1 H n T d x and C ( b ; a ) = ∫ 0 1 a ( x ) H n + 1 Λ n T d x .
Define the following 2 × 2 2\times2 2 × 2 block matrices
Π Σ ( θ ) = ( M n + 1 ( b ; r ) − B ( b ; r ) − B T ( b ; r ) A n ( b ; r ) ) , Π Λ ( θ ) = ( A n + 1 ( b ; a ) − C ( b ; a ) − C T ( b ; a ) 0 n × n ) , \mathbf{\Pi}_{\Sigma}(\theta)=
\begin{pmatrix}
M_{n+1}(\mathbf{b};r) & -B(\mathbf{b};r)\\
-B^T(\mathbf{b};r) & A_n(\mathbf{b};r)
\end{pmatrix},
\quad
\mathbf{\Pi}_{\Lambda}(\theta)=
\begin{pmatrix}
A_{n+1}(\mathbf{b};a) & -C(\mathbf{b};a)\\
-C^T(\mathbf{b};a) & \mathbf{0}_{n\times n}
\end{pmatrix}, Π Σ ( θ ) = ( M n + 1 ( b ; r ) − B T ( b ; r ) − B ( b ; r ) A n ( b ; r ) ) , Π Λ ( θ ) = ( A n + 1 ( b ; a ) − C T ( b ; a ) − C ( b ; a ) 0 n × n ) ,
D ( c ^ ) = ( I n + 1 0 0 D n ( c ^ ) ) , D 0 ( θ ) = ( 0 0 0 D n ( c ^ ) D n ( g ) ) , and R ( θ ) = ( 0 R ( θ ) R T ( θ ) 0 ) . \mathcal{D}(\hat{\mathbf{c}})=
\begin{pmatrix}
I_{n+1} & \mathbf{0}\\
\mathbf{0} & \mathbf{D}_n(\hat{\mathbf{c}})
\end{pmatrix},
\quad
\mathcal{D}_0(\theta)=
\begin{pmatrix}
\mathbf{0} & \mathbf{0}\\
\mathbf{0} & \mathbf{D}_n(\hat{\mathbf{c}})\mathbf{D}_n(\mathbf{g})
\end{pmatrix},
\quad
\text{and}\quad
\mathcal{R}(\theta)=
\begin{pmatrix}
\mathbf{0} & \mathcal{R}(\theta)\\
\mathcal{R}^T(\theta) & \mathbf{0}
\end{pmatrix}. D ( c ^ ) = ( I n + 1 0 0 D n ( c ^ ) ) , D 0 ( θ ) = ( 0 0 0 D n ( c ^ ) D n ( g ) ) , and R ( θ ) = ( 0 R T ( θ ) R ( θ ) 0 ) .
Then, by (13) , (15) , and (16) , the Hessian matrix at θ \theta θ has the form
∇ θ 2 F ( θ ) = R ( θ ) + D ( c ^ ) H Σ + Λ ( θ ) D ( c ^ ) + D 0 ( θ ) , \nabla_{\theta}^{2}F(\theta)=\mathbb{R}(\theta)+D(\hat{c})\mathcal{H}_{\Sigma+\Lambda}(\theta)D(\hat{c})+D_{0}(\theta), ∇ θ 2 F ( θ ) = R ( θ ) + D ( c ^ ) H Σ + Λ ( θ ) D ( c ^ ) + D 0 ( θ ) ,
where H Σ + Λ ( θ ) = H Σ ( θ ) + H Λ ( θ ) \mathcal{H}_{\Sigma+\Lambda}(\theta)=\mathcal{H}_{\Sigma}(\theta)+\mathcal{H}_{\Lambda}(\theta) H Σ + Λ ( θ ) = H Σ ( θ ) + H Λ ( θ ) .
Matrix Inversion
The 1 × 1 1 \times1 1 × 1 block of the Hessian matrix, H 11 ( θ ) \mathcal{H}_{11}(\theta) H 11 ( θ ) given in (13) , is symmetric and positive definite (see [9 ] ). This subsection discusses the invertibility of the 2 × 2 2 \times2 2 × 2 block of the Hessian matrix, H 22 ( θ ) \mathcal{H}_{22}(\theta) H 22 ( θ ) given in (15) , as well as how to efficiently compute their inverses.
To examine the invertibility of the matrix H 22 ( θ ) \mathcal{H}_{22}(\theta) H 22 ( θ ) , let h ~ 1 = h 1 \tilde{h}_{1}=h_{1} h ~ 1 = h 1 and let
I i = [ b i , b i + 1 ] , h i = b i + 1 − b i , and h ~ i = min { h i − 1 , h i } . I_i=[b_i,b_{i+1}],\qquad h_i=b_{i+1}-b_i,\qquad\text{and}\qquad\tilde{h}_i=\min\{h_{i-1},h_i\}. I i = [ b i , b i + 1 ] , h i = b i + 1 − b i , and h ~ i = min { h i − 1 , h i } .
Clearly, the matrix H 22 ( θ ) \mathcal{H}_{22}(\theta) H 22 ( θ ) is symmetric. The following lemma provides a sufficient condition for its positive definiteness.
Lemma 4.1. For all i = 1 , … , n i=1,\ldots,n i = 1 , … , n , assume that a ( x ) a(x) a ( x ) is differentiable at b i b_i b i , that c i ≠ 0 c_i\ne0 c i = 0 , and that
g i c i + ( 3 μ 1 min x ∈ [ b i − 1 , b i + 1 ] u n 2 ( x ) + μ 2 ) h ~ i 4 > 0 , (17) \frac{g_i}{c_i}+\left(3\mu_1\min_{x\in[b_{i-1},b_{i+1}]}u_n^2(x)+\mu_2\right)\frac{\tilde{h}_i}{4}>0, \tag*{(17)} c i g i + ( 3 μ 1 x ∈ [ b i − 1 , b i + 1 ] min u n 2 ( x ) + μ 2 ) 4 h ~ i > 0 , (17) then H 22 ( θ ) \mathcal{H}_{22}(\theta) H 22 ( θ ) is positive definite.
Proof. By the assumptions that r i ( x ) ≥ μ i ≥ 0 r_i(x)\ge\mu_i\ge0 r i ( x ) ≥ μ i ≥ 0 for almost all x ∈ I x\in I x ∈ I (i = 1 , 2 i=1,2 i = 1 , 2 ), we have
r ( x ) = 3 r 1 ( x ) u n 2 ( x ) + r 2 ( x ) ≥ 3 μ 1 min x ∈ [ b i − 1 , b i + 1 ] u n 2 ( x ) + μ 2 , for almost all x ∈ [ b i − 1 , b i + 1 ] . (18) r(x)=3r_1(x)u_n^2(x)+r_2(x)\ge3\mu_1\min_{x\in[b_{i-1},b_{i+1}]}u_n^2(x)+\mu_2,\qquad\text{for almost all }x\in[b_{i-1},b_{i+1}]. \tag*{(18)} r ( x ) = 3 r 1 ( x ) u n 2 ( x ) + r 2 ( x ) ≥ 3 μ 1 x ∈ [ b i − 1 , b i + 1 ] min u n 2 ( x ) + μ 2 , for almost all x ∈ [ b i − 1 , b i + 1 ] . (18) Let r ^ i = 3 μ 1 min x ∈ [ b i − 1 , b i + 1 ] u n 2 ( x ) + μ 2 \hat{r}_i=3\mu_1\min_{x\in[b_{i-1},b_{i+1}]}u_n^2(x)+\mu_2 r ^ i = 3 μ 1 min x ∈ [ b i − 1 , b i + 1 ] u n 2 ( x ) + μ 2 . For any vector ξ = ( ξ 1 , … , ξ n ) T ∈ R n \boldsymbol{\xi}=(\xi_1,\ldots,\xi_n)^T\in\mathbb{R}^n ξ = ( ξ 1 , … , ξ n ) T ∈ R n , let
v ( x ) = ξ T D n ( c ^ ) H n ( x ) = ∑ j = 1 n c j ξ j H j ( x ) . v(x)=\boldsymbol{\xi}^{T}D_n(\hat{c})H_n(x)=\sum_{j=1}^{n}c_j\xi_jH_j(x). v ( x ) = ξ T D n ( c ^ ) H n ( x ) = j = 1 ∑ n c j ξ j H j ( x ) . It follows from the triangle inequality, the definitions of h ~ i \tilde{h}_i h ~ i and r ^ i \hat{r}_i r ^ i , the fact that v ( x ) v(x) v ( x ) is piecewise constant, and (18) that
1 2 ∑ i = 1 n h ~ i r ^ i ( c i ξ i ) 2 ≤ ∑ i = 1 n r ^ i ( ∑ j = 1 i c j ξ j ) 2 + ∑ i = 2 n h i − 1 r ^ i ( ∑ j = 1 i − 1 c j ξ j ) 2 \frac{1}{2}\sum_{i=1}^{n}\tilde{h}_i\hat{r}_i(c_i\xi_i)^2\le\sum_{i=1}^{n}\hat{r}_i\left(\sum_{j=1}^{i}c_j\xi_j\right)^2+\sum_{i=2}^{n}h_{i-1}\hat{r}_i\left(\sum_{j=1}^{i-1}c_j\xi_j\right)^2 2 1 i = 1 ∑ n h ~ i r ^ i ( c i ξ i ) 2 ≤ i = 1 ∑ n r ^ i ( j = 1 ∑ i c j ξ j ) 2 + i = 2 ∑ n h i − 1 r ^ i ( j = 1 ∑ i − 1 c j ξ j ) 2 = ∑ i = 1 n r ^ i ∫ b i b i + 1 v 2 ( x ) d x + ∑ i = 2 n r ^ i ∫ b i − 1 b i v 2 ( x ) d x ≤ 2 ∫ 0 1 r ( x ) v 2 ( x ) d x , =\sum_{i=1}^{n}\hat{r}_i\int_{b_i}^{b_{i+1}}v^2(x)\,dx+\sum_{i=2}^{n}\hat{r}_i\int_{b_{i-1}}^{b_i}v^2(x)\,dx\le2\int_{0}^{1}r(x)v^2(x)\,dx, = i = 1 ∑ n r ^ i ∫ b i b i + 1 v 2 ( x ) d x + i = 2 ∑ n r ^ i ∫ b i − 1 b i v 2 ( x ) d x ≤ 2 ∫ 0 1 r ( x ) v 2 ( x ) d x , which, together with (15) , implies
ξ T H 22 ( θ ) ξ = ∫ 0 1 r ( x ) v 2 ( x ) d x + ∑ i = 1 n c i g i ξ i 2 ≥ ∑ i = 1 n c i 2 [ h ~ i r ^ i 4 + g i c i ] ξ i 2 . \boldsymbol{\xi}^{T}\mathcal{H}_{22}(\theta)\boldsymbol{\xi}=\int_{0}^{1}r(x)v^2(x)\,dx+\sum_{i=1}^{n}c_ig_i\xi_i^2\ge\sum_{i=1}^{n}c_i^2\left[\frac{\tilde{h}_i\hat{r}_i}{4}+\frac{g_i}{c_i}\right]\xi_i^2. ξ T H 22 ( θ ) ξ = ∫ 0 1 r ( x ) v 2 ( x ) d x + i = 1 ∑ n c i g i ξ i 2 ≥ i = 1 ∑ n c i 2 [ 4 h ~ i r ^ i + c i g i ] ξ i 2 . Thus, the positive definiteness of H 22 ( θ ) \mathcal{H}_{22}(\theta) H 22 ( θ ) is a direct consequence of the assumptions. This completes the proof of the lemma.
Below, we discuss the three assumptions in Lemma 4.1 . To this end, let
S 1 = { i ∈ { 1 , … , n } : ∣ c i ∣ < τ 1 or b i ∉ I } and S 2 = { i ∈ { 1 , … , n } : a ′ ( b i ) DNE } , (19) S_1=\{i\in\{1,\ldots,n\}:|c_i|<\tau_1\text{ or }b_i\notin I\}\quad\text{and}\quad S_2=\{i\in\{1,\ldots,n\}:a'(b_i)\text{ DNE}\}, \tag*{(19)} S 1 = { i ∈ { 1 , … , n } : ∣ c i ∣ < τ 1 or b i ∈ / I } and S 2 = { i ∈ { 1 , … , n } : a ′ ( b i ) DNE } , (19)
where τ 1 ≥ 0 \tau_1\ge0 τ 1 ≥ 0 is a small tolerance threshold. S 1 S_1 S 1 and S 2 S_2 S 2 are the sets of indices for the respective non-contributing and fixed neurons. If c l = 0 c_l=0 c l = 0 , then the corresponding neuron does not contribute to the current approximation and hence may be removed or redistributed. If a ( x ) a(x) a ( x ) is not differentiable at b l b_l b l , then b l b_l b l is at an interface and hence should remain fixed without further updates. For more details, see [7 , 8 , 9 ] .
Regarding assumption (4.5) of Lemma 4.1 , we justify its validity for all i ∉ S 1 ∪ S 2 i\notin S_1\cup S_2 i ∈ / S 1 ∪ S 2 provided that the approximation u n ( x ) ≈ u ( x ) u_n(x)\approx u(x) u n ( x ) ≈ u ( x ) is sufficiently accurate. To this end, by (14) , we have
g i = r 1 ( b i ) u n ( b i ) 3 + r 2 ( b i ) u n ( b i ) − f ( b i ) − a ′ ( b i ) u n ′ ( b i ) ≈ r 1 ( b i ) u ( b i ) 3 + r 2 ( b i ) u ( b i ) − f ( b i ) − a ′ ( b i ) u ′ ( b i ) = a ( b i ) u ′ ′ ( b i ) . \begin{aligned}
g_i=r_1(b_i)u_n(b_i)^3+r_2(b_i)u_n(b_i)-f(b_i)-a'(b_i)u_n'(b_i) \\
&\approx r_1(b_i)u(b_i)^3+r_2(b_i)u(b_i)-f(b_i)-a'(b_i)u'(b_i)=a(b_i)u''(b_i).
\end{aligned} g i = r 1 ( b i ) u n ( b i ) 3 + r 2 ( b i ) u n ( b i ) − f ( b i ) − a ′ ( b i ) u n ′ ( b i ) ≈ r 1 ( b i ) u ( b i ) 3 + r 2 ( b i ) u ( b i ) − f ( b i ) − a ′ ( b i ) u ′ ( b i ) = a ( b i ) u ′′ ( b i ) .
Since the linear parameter c i = u n ′ ( b i + ) − u n ′ ( b i − ) c_i=u_n'(b_i^+)-u_n'(b_i^-) c i = u n ′ ( b i + ) − u n ′ ( b i − ) represents the derivative jump of u n ( x ) u_n(x) u n ( x ) at b i b_i b i and approximates u ′ ( b i + ) − u ′ ( b i − ) u'(b_i^+)-u'(b_i^-) u ′ ( b i + ) − u ′ ( b i − ) , it generally shares the same sign as u ′ ′ ( b i ) u''(b_i) u ′′ ( b i ) . Hence, we obtain
g i c i ≈ a ( b i ) ∣ u ′ ′ ( b i ) ∣ ∣ c i ∣ > 0 , \frac{g_i}{c_i}\approx\frac{a(b_i)|u''(b_i)|}{|c_i|}>0, c i g i ≈ ∣ c i ∣ a ( b i ) ∣ u ′′ ( b i ) ∣ > 0 ,
which implies the validity of (4.5).
In the remainder of this subsection, we present factorizations of the main blocks of the Hessian matrix in order to compute their inverses in O ( n ) O(n) O ( n ) operations. These factorizations were introduced in Appendix A.2 of [9 ] . To this end, denote by
D n + 1 ( h ) = diag ( h 0 , … , h n ) and D n ( h ) = diag ( h 1 , … , h n ) D_{n+1}(h)=\operatorname{diag}(h_0,\ldots,h_n)\quad\text{and}\quad D_n(h)=\operatorname{diag}(h_1,\ldots,h_n) D n + 1 ( h ) = diag ( h 0 , … , h n ) and D n ( h ) = diag ( h 1 , … , h n )
the diagonal matrices consisting of entries { h i } \{h_i\} { h i } , and denote by
D n + 1 ( w ) = diag ( w 0 , … , w n ) , D n + 1 ( s k ) = diag ( s 0 k , … , s n k ) , and D n ( s k ) = diag ( s 1 k , … , s n k ) D_{n+1}(w)=\operatorname{diag}(w_0,\ldots,w_n),\quad D_{n+1}(s^k)=\operatorname{diag}(s_0^k,\ldots,s_n^k),\quad\text{and}\quad D_n(s^k)=\operatorname{diag}(s_1^k,\ldots,s_n^k) D n + 1 ( w ) = diag ( w 0 , … , w n ) , D n + 1 ( s k ) = diag ( s 0 k , … , s n k ) , and D n ( s k ) = diag ( s 1 k , … , s n k )
the diagonal matrices consisting of the respective entries
w i = ∫ b i b i + 1 a ( x ) d x and s i k = ∫ b i b i + 1 r ( x ) ( x − b i ) k d x . w_i=\int_{b_i}^{b_{i+1}}a(x)\,dx\quad\text{and}\quad s_i^k=\int_{b_i}^{b_{i+1}}r(x)(x-b_i)^k\,dx. w i = ∫ b i b i + 1 a ( x ) d x and s i k = ∫ b i b i + 1 r ( x ) ( x − b i ) k d x .
Let G j G_j G j be the j × j j\times j j × j lower bidiagonal matrix with 1 1 1 on the main diagonal and − 1 -1 − 1 on the subdiagonal, and set
Q j = G j D j ( h ) − 1 G j T for j = n , n + 1. Q_j=G_jD_j(h)^{-1}G_j^T\quad\text{for }j=n,n+1. Q j = G j D j ( h ) − 1 G j T for j = n , n + 1.
Then the Hessian matrices admit the following explicit factorizations:
H 11 ( θ ) = Q n + 1 T T 11 Q n + 1 and H 22 ( θ ) = D n ( c ^ ) Q n T T 22 Q n D n ( c ^ ) + D n ( c ^ ) D n ( g ) , \mathcal{H}_{11}(\theta)=Q_{n+1}^TT_{11}Q_{n+1}\quad\text{and}\quad\mathcal{H}_{22}(\theta)=D_n(\hat{c})Q_n^TT_{22}Q_nD_n(\hat{c})+D_n(\hat{c})D_n(g), H 11 ( θ ) = Q n + 1 T T 11 Q n + 1 and H 22 ( θ ) = D n ( c ^ ) Q n T T 22 Q n D n ( c ^ ) + D n ( c ^ ) D n ( g ) ,
where T 11 = T 1 + T 2 T_{11}=T_1+T_2 T 11 = T 1 + T 2 and T 22 = G n T D n ( h ) − 2 D n ( s 0 ) G n T_{22}=G_n^TD_n(h)^{-2}D_n(s^0)G_n T 22 = G n T D n ( h ) − 2 D n ( s 0 ) G n . Here, T 1 T_1 T 1 and T 2 T_2 T 2 are given by
T 1 = ( I − G n + 1 T ) D n + 1 ( s 0 ) ( I − G n + 1 ) + ( I − G n + 1 T ) D n + 1 ( h ) − 1 D n + 1 ( s 1 ) G n + 1 + G n + 1 T D n + 1 ( h ) − 1 D n + 1 ( s 1 ) ( I − G n + 1 ) + G n + 1 T D n + 1 ( h ) − 2 D n + 1 ( s 2 ) G n + 1 \begin{aligned}
T_1={}&(I-G_{n+1}^T)D_{n+1}(s^0)(I-G_{n+1})+(I-G_{n+1}^T)D_{n+1}(h)^{-1}D_{n+1}(s^1)G_{n+1}\\
&+G_{n+1}^TD_{n+1}(h)^{-1}D_{n+1}(s^1)(I-G_{n+1})+G_{n+1}^TD_{n+1}(h)^{-2}D_{n+1}(s^2)G_{n+1}
\end{aligned} T 1 = ( I − G n + 1 T ) D n + 1 ( s 0 ) ( I − G n + 1 ) + ( I − G n + 1 T ) D n + 1 ( h ) − 1 D n + 1 ( s 1 ) G n + 1 + G n + 1 T D n + 1 ( h ) − 1 D n + 1 ( s 1 ) ( I − G n + 1 ) + G n + 1 T D n + 1 ( h ) − 2 D n + 1 ( s 2 ) G n + 1
and
T 2 = G n + 1 T D n + 1 ( h ) − 2 D n + 1 ( w ) G n + 1 , T_2=G_{n+1}^TD_{n+1}(h)^{-2}D_{n+1}(w)G_{n+1}, T 2 = G n + 1 T D n + 1 ( h ) − 2 D n + 1 ( w ) G n + 1 ,
respectively.
A Block Newton Method
Instead of solving the nonlinear system in (8) using the standard Newton method, we employ a block Newton (BN) method. This approach leverages the physical meanings of the linear (coefficients) and nonlinear (mesh points) parameters, resulting in a lower computational cost per iteration. More importantly, this allows us to remove singularities within the 2 × 2 2 \times2 2 × 2 block. The BN method employs an outer–inner iteration that alternates between the variables c \mathbf{c} c and b \mathbf{b} b . The nonlinear Gauss–Seidel method is used for the outer iteration, while each block is solved with a Newton iteration in the inner step. More precisely, given the current iterate ( c ( k ) , b ( k ) ) (\mathbf{c}^{(k)},\mathbf{b}^{(k)}) ( c ( k ) , b ( k ) ) , the next iterate ( c ( k + 1 ) , b ( k + 1 ) ) (\mathbf{c}^{(k+1)},\mathbf{b}^{(k+1)}) ( c ( k + 1 ) , b ( k + 1 ) ) is obtained by solving the decoupled block linear system
( H 11 ( c ( k ) , b ( k ) ) 0 0 H 22 ( c ( k + 1 ) , b ( k ) ) ) ( Δ c ( k + 1 ) Δ b ( k + 1 ) ) = − ( ∇ c F ( c ( k ) , b ( k ) ) ∇ b F ( c ( k + 1 ) , b ( k ) ) ) (20) \begin{pmatrix}
\mathcal{H}_{11}(\mathbf{c}^{(k)},\mathbf{b}^{(k)}) & 0 \\
0 & \mathcal{H}_{22}(\mathbf{c}^{(k+1)},\mathbf{b}^{(k)})
\end{pmatrix}
\begin{pmatrix}
\Delta\mathbf{c}^{(k+1)} \\
\Delta\mathbf{b}^{(k+1)}
\end{pmatrix}
=
-
\begin{pmatrix}
\nabla_{\mathbf{c}}F(\mathbf{c}^{(k)},\mathbf{b}^{(k)}) \\
\nabla_{\mathbf{b}}F(\mathbf{c}^{(k+1)},\mathbf{b}^{(k)}) \tag*{(20)}
\end{pmatrix} ( H 11 ( c ( k ) , b ( k ) ) 0 0 H 22 ( c ( k + 1 ) , b ( k ) ) ) ( Δ c ( k + 1 ) Δ b ( k + 1 ) ) = − ( ∇ c F ( c ( k ) , b ( k ) ) ∇ b F ( c ( k + 1 ) , b ( k ) ) ) (20)
where Δ c ( k + 1 ) = c ( k + 1 ) − c ( k ) \Delta\mathbf{c}^{(k+1)}=\mathbf{c}^{(k+1)}-\mathbf{c}^{(k)} Δ c ( k + 1 ) = c ( k + 1 ) − c ( k ) and Δ b ( k + 1 ) = b ( k + 1 ) − b ( k ) \Delta\mathbf{b}^{(k+1)}=\mathbf{b}^{(k+1)}-\mathbf{b}^{(k)} Δ b ( k + 1 ) = b ( k + 1 ) − b ( k ) . Other outer iterative methods, such as Jacobi or linear Gauss–Seidel, may also be employed; see the discussion in section 2 of [10 ] .
Set θ ( k ) = ( c ( k ) , b ( k ) ) \boldsymbol{\theta}^{(k)}=(\mathbf{c}^{(k)},\mathbf{b}^{(k)}) θ ( k ) = ( c ( k ) , b ( k ) ) and θ ˉ ( k + 1 ) = ( c ( k + 1 ) , b ( k ) ) \bar{\boldsymbol{\theta}}^{(k+1)}=(\mathbf{c}^{(k+1)},\mathbf{b}^{(k)}) θ ˉ ( k + 1 ) = ( c ( k + 1 ) , b ( k ) ) , and let
r ( k ) ( x ) = r ( x ; θ ( k ) ) and r ˉ ( k ) ( x ) = r ( x ; θ ˉ ( k ) ) . r^{(k)}(x)=r\left(x;\boldsymbol{\theta}^{(k)}\right)
\quad\text{and}\quad
\bar{r}^{(k)}(x)=r\left(x;\bar{\boldsymbol{\theta}}^{(k)}\right). r ( k ) ( x ) = r ( x ; θ ( k ) ) and r ˉ ( k ) ( x ) = r ( x ; θ ˉ ( k ) ) .
By (13) and (15) , the system of linear equations in (20) may be written as
{ ( A n + 1 ( b ( k ) ; a ) + M n + 1 ( b ( k ) ; r ( k ) ) ) Δ c ( k + 1 ) = − ∇ c F ( θ ( k ) ) , ( D n ( c ^ ( k + 1 ) ) A n ( b ( k ) ; r ˉ ( k ) ) D n ( c ^ ( k + 1 ) ) + D n ( c ^ ( k + 1 ) ) D n ( g ˉ ( k ) ) ) Δ b ( k + 1 ) = − ∇ b F ( θ ˉ ( k ) ) , \begin{cases}
\left(A_{n+1}\left(\mathbf{b}^{(k)};a\right)+M_{n+1}\left(\mathbf{b}^{(k)};r^{(k)}\right)\right)\Delta\mathbf{c}^{(k+1)}
=-\nabla_{\mathbf{c}}F\left(\boldsymbol{\theta}^{(k)}\right),\\
\left(D_n\left(\widehat{\mathbf{c}}^{(k+1)}\right)A_n\left(\mathbf{b}^{(k)};\bar{r}^{(k)}\right)D_n\left(\widehat{\mathbf{c}}^{(k+1)}\right)+D_n\left(\widehat{\mathbf{c}}^{(k+1)}\right)D_n\left(\bar{\mathbf{g}}^{(k)}\right)\right)\Delta\mathbf{b}^{(k+1)}
=-\nabla_{\mathbf{b}}F\left(\bar{\boldsymbol{\theta}}^{(k)}\right),
\end{cases} ⎩ ⎨ ⎧ ( A n + 1 ( b ( k ) ; a ) + M n + 1 ( b ( k ) ; r ( k ) ) ) Δ c ( k + 1 ) = − ∇ c F ( θ ( k ) ) , ( D n ( c ( k + 1 ) ) A n ( b ( k ) ; r ˉ ( k ) ) D n ( c ( k + 1 ) ) + D n ( c ( k + 1 ) ) D n ( g ˉ ( k ) ) ) Δ b ( k + 1 ) = − ∇ b F ( θ ˉ ( k ) ) ,
where D n ( g ˉ ( k ) ) = diag ( g 1 ( θ ˉ ( k ) ) , … , g n ( θ ˉ ( k ) ) ) D_n\left(\bar{\mathbf{g}}^{(k)}\right)=\operatorname{diag}\left(g_1\left(\bar{\boldsymbol{\theta}}^{(k)}\right),\ldots,g_n\left(\bar{\boldsymbol{\theta}}^{(k)}\right)\right) D n ( g ˉ ( k ) ) = diag ( g 1 ( θ ˉ ( k ) ) , … , g n ( θ ˉ ( k ) ) ) .
In what follows, we outline the implementation of the BN method using a reduced nonlinear system constructed based on the sets defined in (19) . Denote by
S = { 1 , … , n } ∖ ( S 1 ∪ S 2 ) S=\{1,\ldots,n\}\setminus(S_1\cup S_2) S = { 1 , … , n } ∖ ( S 1 ∪ S 2 )
the set of indices corresponding to the neurons that contribute to the approximation u n u_n u n and do not lie at an interface. Given a vector v ∈ R n \mathbf{v}\in\mathbb{R}^n v ∈ R n , denote by v S ∈ R n − ∣ S c ∣ \mathbf{v}_S\in\mathbb{R}^{n-|S^c|} v S ∈ R n − ∣ S c ∣ the vector obtained by removing the i i i th entry from v \mathbf{v} v for every i ∈ S c = S 1 ∪ S 2 i\in S^c=S_1\cup S_2 i ∈ S c = S 1 ∪ S 2 . Similarly, for a matrix B ∈ R n × n B\in\mathbb{R}^{n\times n} B ∈ R n × n , define B S ∈ R ( n − ∣ S c ∣ ) × ( n − ∣ S c ∣ ) B_S\in\mathbb{R}^{(n-|S^c|)\times(n-|S^c|)} B S ∈ R ( n − ∣ S c ∣ ) × ( n − ∣ S c ∣ ) as the matrix obtained by removing the i i i th row and column of B B B for each i ∈ S c i\in S^c i ∈ S c .
Define the reduced search direction vector for the Newton step as
d R ( θ ) = − ( H 22 ( θ ) S ) − 1 ( ∇ b F ( θ ) ) S (21) \mathbf{d}_R(\boldsymbol{\theta})=-\left(\mathcal{H}_{22}(\boldsymbol{\theta})_S\right)^{-1}\left(\nabla_{\mathbf{b}}F(\boldsymbol{\theta})\right)_S \tag*{(21)} d R ( θ ) = − ( H 22 ( θ ) S ) − 1 ( ∇ b F ( θ ) ) S (21)
Now we are ready to outline the implementation of the reduced block Newton (rBN) method (see Algorithm 4.1 for the pseudocode). Given a current iterate θ ( k ) \boldsymbol{\theta}^{(k)} θ ( k ) , compute the next iterate θ ( k + 1 ) = ( c ( k + 1 ) , b ( k + 1 ) ) \boldsymbol{\theta}^{(k+1)}=(\mathbf{c}^{(k+1)},\mathbf{b}^{(k+1)}) θ ( k + 1 ) = ( c ( k + 1 ) , b ( k + 1 ) ) as follows:
(i) Compute the linear parameters
c ( k + 1 ) = c ( k ) − ( H 11 ( θ ( k ) ) ) − 1 ∇ c F ( θ ( k ) ) . \mathbf{c}^{(k+1)}=\mathbf{c}^{(k)}-\left(\mathcal{H}_{11}\left(\boldsymbol{\theta}^{(k)}\right)\right)^{-1}\nabla_{\mathbf{c}}F\left(\boldsymbol{\theta}^{(k)}\right). c ( k + 1 ) = c ( k ) − ( H 11 ( θ ( k ) ) ) − 1 ∇ c F ( θ ( k ) ) .
(ii) Compute the search direction p ( k ) = ( p 1 ( k ) , … , p n ( k ) ) T \mathbf{p}^{(k)} = \left(p_1^{(k)},\ldots,p_n^{(k)}\right)^{T} p ( k ) = ( p 1 ( k ) , … , p n ( k ) ) T by
( p i ( k ) ) i ∈ S = d R ( θ ~ ( k ) ) and ( p i ( k ) ) i ∉ S = 0 , (22) \left(p_i^{(k)}\right)_{i\in S}=\mathbf{d}_{R}\left(\tilde{\boldsymbol{\theta}}^{(k)}\right)\quad\text{and}\quad\left(p_i^{(k)}\right)_{i\notin S}=\mathbf{0}, \tag*{(22)} ( p i ( k ) ) i ∈ S = d R ( θ ~ ( k ) ) and ( p i ( k ) ) i ∈ / S = 0 , (22)
where d R ( θ ~ ( k ) ) \mathbf{d}_{R}\left(\tilde{\boldsymbol{\theta}}^{(k)}\right) d R ( θ ~ ( k ) ) is the reduced Newton direction vector defined in (21) .
(iii) Compute the nonlinear parameters
b ( k + 1 ) = b ( k ) + p ( k ) . \mathbf{b}^{(k+1)}=\mathbf{b}^{(k)}+\mathbf{p}^{(k)}. b ( k + 1 ) = b ( k ) + p ( k ) .
(iv) Redistribute non-contributing breakpoints b i ( k + 1 ) b_i^{(k+1)} b i ( k + 1 ) for all i ∈ S 1 i\in S_1 i ∈ S 1 and sort b ( k + 1 ) \mathbf{b}^{(k+1)} b ( k + 1 ) .
Algorithm 4.1 Reduced block Newton (rBN) method for (2.3)
Input: Initial network parameters b^(0)
Output: Network parameters c, b
for k = 0, 1, ... do
▷ Linear parameters
c^(k+1) ← c^(k) − H₁₁(θ^(k))⁻¹ ∇cF(θ^(k))
▷ Nonlinear parameters
Compute the search direction p^(k) as in (4.10)
b^(k+1) ← b^(k) + p^(k)
▷ Redistribute non-contributing neurons and sort b^(k+1)
end for
Remark 4.2. For the redistribution used in step (iv) in the numerical experiments reported in § 6 , we followed the procedure described in [8 , 9 ] : for a neuron b l ( k + 1 ) b_l^{(k+1)} b l ( k + 1 ) with l ∈ S 1 l\in S_1 l ∈ S 1 , we set
b l ( k + 1 ) ← b m − 1 ( k + 1 ) + b m ( k + 1 ) 2 , b_l^{(k+1)}\leftarrow\frac{b_{m-1}^{(k+1)}+b_m^{(k+1)}}{2}, b l ( k + 1 ) ← 2 b m − 1 ( k + 1 ) + b m ( k + 1 ) ,
where m ∈ { 1 , … , n + 1 } m\in\{1,\ldots,n+1\} m ∈ { 1 , … , n + 1 } is an integer chosen uniformly at random.
Local Convergence
This subsection establishes a local convergence condition for the BN method applied to the minimization problem in (3) . The condition follows from the following theorem proved in [10 ] . Here, we assume that f ( x ) ∈ C ( I ) f(x)\in C(I) f ( x ) ∈ C ( I ) and that a ( x ) ∈ C 1 ( I ) a(x)\in C^1(I) a ( x ) ∈ C 1 ( I ) .
Theorem 4.3. If ∇ θ 2 F ( θ ∗ ) \nabla_{\boldsymbol{\theta}}^2F(\boldsymbol{\theta}^*) ∇ θ 2 F ( θ ∗ ) is symmetric positive definite (SPD), then the BN method described by (20) converges locally to θ ∗ \boldsymbol{\theta}^* θ ∗ in the norm induced by ∇ θ 2 F ( θ ∗ ) \nabla_{\boldsymbol{\theta}}^2F(\boldsymbol{\theta}^*) ∇ θ 2 F ( θ ∗ ) .
If c j ∗ ≠ 0 c_j^*\ne0 c j ∗ = 0 for all j = 1 , … , n j=1,\ldots,n j = 1 , … , n , it follows from (12) that R j j ( θ ∗ ) R_{jj}(\boldsymbol{\theta}^*) R j j ( θ ∗ ) vanishes at the critical point θ ∗ \boldsymbol{\theta}^* θ ∗ . Consequently, R ( θ ∗ ) = 0 \mathcal{R}(\boldsymbol{\theta}^*)=0 R ( θ ∗ ) = 0 , and the Hessian matrix at θ ∗ \boldsymbol{\theta}^* θ ∗ reduces to the following form:
∇ θ 2 F ( θ ∗ ) = D ( c ∗ ) H Σ + Λ ( θ ∗ ) D ( c ∗ ) + D 0 ( θ ∗ ) . \nabla_{\boldsymbol{\theta}}^2F(\boldsymbol{\theta}^*)=D(\mathbf{c}^*)H_{\Sigma+\Lambda}(\boldsymbol{\theta}^*)D(\mathbf{c}^*)+D_0(\boldsymbol{\theta}^*). ∇ θ 2 F ( θ ∗ ) = D ( c ∗ ) H Σ + Λ ( θ ∗ ) D ( c ∗ ) + D 0 ( θ ∗ ) .
Let r 0 = r 0 ( θ ) = min x ∈ I { 3 r 1 ( x ) ( u n ( x ) ) 2 + r 2 ( x ) } r_0=r_0(\theta)=\min_{x\in I}\{3r_1(x)(u_n(x))^2+r_2(x)\} r 0 = r 0 ( θ ) = min x ∈ I { 3 r 1 ( x ) ( u n ( x ) ) 2 + r 2 ( x )} . The following theorem is obtained in a similar fashion to Theorem 4.4 in [10 ] .
Theorem 4.4. Let θ ∗ = ( c ∗ , b ∗ ) T \boldsymbol{\theta}^*=(\mathbf{c}^*,\mathbf{b}^*)^T θ ∗ = ( c ∗ , b ∗ ) T be a minimizer of problem (3) . For all i = 1 , … , n i=1,\ldots,n i = 1 , … , n , assume that c i ∗ ≠ 0 c_i^*\ne0 c i ∗ = 0 and
g i ∗ c i ∗ + r 0 ∗ h ~ i ∗ 24 > a 2 ( b i ∗ ) 2 μ 0 ( 1 h i − 1 ∗ + 1 h i ∗ ) . \frac{g_i^*}{c_i^*}+\frac{r_0^*\tilde{h}_i^*}{24}>\frac{a^2(b_i^*)}{2\mu_0}\left(\frac{1}{h_{i-1}^*}+\frac{1}{h_i^*}\right). c i ∗ g i ∗ + 24 r 0 ∗ h ~ i ∗ > 2 μ 0 a 2 ( b i ∗ ) ( h i − 1 ∗ 1 + h i ∗ 1 ) .
Then the Hessian matrix at the critical point θ ∗ \boldsymbol{\theta}^{*} θ ∗ , ∇ θ 2 F ( θ ∗ ) = ∇ θ 2 J ( u n ( ⋅ ; θ ∗ ) ) \nabla_{\boldsymbol{\theta}}^{2}F(\boldsymbol{\theta}^{*})=\nabla_{\boldsymbol{\theta}}^{2}J(u_n(\cdot;\boldsymbol{\theta}^{*})) ∇ θ 2 F ( θ ∗ ) = ∇ θ 2 J ( u n ( ⋅ ; θ ∗ )) , is SPD. Moreover, the BN method locally converges to θ ∗ \boldsymbol{\theta}^{*} θ ∗ in the norm induced by ∇ θ 2 F ( θ ∗ ) \nabla_{\boldsymbol{\theta}}^{2}F(\boldsymbol{\theta}^{*}) ∇ θ 2 F ( θ ∗ ) .
Allen–Cahn Equation
Consider the scalar Allen–Cahn equation in one spatial dimension
u t ( x , t ) = − L ( u ) , ( x , t ) ∈ I × [ 0 , T ] (23) u_t(x,t)=-\mathcal{L}(u),\qquad(x,t)\in I\times[0,T] \tag*{(23)} u t ( x , t ) = − L ( u ) , ( x , t ) ∈ I × [ 0 , T ] (23)
with initial and boundary conditions
{ u ( x , 0 ) = u 0 ( x ) , x ∈ I and u ( 0 , t ) = α ( t ) , ε 2 u x ( 1 , t ) = β ( t ) , t ∈ [ 0 , T ] , \begin{cases}
u(x,0)=u_0(x), & x\in I \quad\text{and}\\
u(0,t)=\alpha(t),\quad\varepsilon^2u_x(1,t)=\beta(t), & t\in[0,T],
\end{cases} { u ( x , 0 ) = u 0 ( x ) , u ( 0 , t ) = α ( t ) , ε 2 u x ( 1 , t ) = β ( t ) , x ∈ I and t ∈ [ 0 , T ] ,
respectively, where ε > 0 \varepsilon>0 ε > 0 is a given parameter, T > 0 T>0 T > 0 is the final time, and the semi-linear operator L ( v ) \mathcal{L}(v) L ( v ) is given by
L ( v ) = L 1 ( v ) + L 2 ( v ) with L 1 ( v ) = − ε 2 v x x ( x , t ) + v ( x , t ) 3 and L 2 ( v ) = − v ( x , t ) . \mathcal{L}(v)=\mathcal{L}_1(v)+\mathcal{L}_2(v)\quad\text{with}\quad\mathcal{L}_1(v)=-\varepsilon^2v_{xx}(x,t)+v(x,t)^3\quad\text{and}\quad\mathcal{L}_2(v)=-v(x,t). L ( v ) = L 1 ( v ) + L 2 ( v ) with L 1 ( v ) = − ε 2 v xx ( x , t ) + v ( x , t ) 3 and L 2 ( v ) = − v ( x , t ) .
Equation (23) is the L 2 L^2 L 2 gradient flow of the Ginzburg–Landau free energy [17 ]
E ( v ) = 1 2 ∫ 0 1 ε 2 v ′ ( x ) 2 d x + ∫ 0 1 F ( v ( x ) ) d x , \mathcal{E}(v)=\frac{1}{2}\int_0^1\varepsilon^2v'(x)^2\,dx+\int_0^1\mathcal{F}(v(x))\,dx, E ( v ) = 2 1 ∫ 0 1 ε 2 v ′ ( x ) 2 d x + ∫ 0 1 F ( v ( x )) d x ,
where F ( v ) = 1 4 ( v 2 − 1 ) 2 \mathcal{F}(v)=\frac{1}{4}(v^2-1)^2 F ( v ) = 4 1 ( v 2 − 1 ) 2 is the double-well potential.
Convex-Splitting Shallow Ritz Method
Below, we describe a convex-splitting shallow Ritz method for the semi-linear parabolic partial differential equation in (23) by adopting a convex splitting scheme (CSS) (see [17 ] ) for time discretization and the shallow Ritz approach (see § 2 ) for spatial discretization at each time step. This discretization leads to a non-convex optimization problem at each time step that can be efficiently solved by the block Newton method developed in subsection 4.3.
The double-well potential F ( v ) \mathcal{F}(v) F ( v ) admits the following convex splitting
F ( v ) = F c ( v ) − F e ( v ) with F c ( v ) = 1 4 ( v 4 + 1 ) and F e ( v ) = 1 2 v 2 , \mathcal{F}(v)=\mathcal{F}_c(v)-\mathcal{F}_e(v)\quad\text{with}\quad\mathcal{F}_c(v)=\frac{1}{4}(v^4+1)\quad\text{and}\quad\mathcal{F}_e(v)=\frac{1}{2}v^2, F ( v ) = F c ( v ) − F e ( v ) with F c ( v ) = 4 1 ( v 4 + 1 ) and F e ( v ) = 2 1 v 2 ,
which leads to a convex splitting of the energy functional
E ( v ) = E c ( v ) − E e ( v ) , \mathcal{E}(v)=\mathcal{E}_c(v)-\mathcal{E}_e(v), E ( v ) = E c ( v ) − E e ( v ) ,
where E c ( v ) \mathcal{E}_c(v) E c ( v ) and E e ( v ) \mathcal{E}_e(v) E e ( v ) are convex functionals given by
E c ( v ) = 1 2 ∫ 0 1 ε 2 v ′ ( x ) 2 d x + 1 4 ∫ 0 1 ( v ( x ) 4 + 1 ) d x and E e ( v ) = 1 2 ∫ 0 1 v ( x ) 2 d x , (24) \mathcal{E}_c(v)=\frac{1}{2}\int_0^1\varepsilon^2v'(x)^2\,dx+\frac{1}{4}\int_0^1(v(x)^4+1)\,dx\quad\text{and}\quad\mathcal{E}_e(v)=\frac{1}{2}\int_0^1v(x)^2\,dx, \tag*{(24)} E c ( v ) = 2 1 ∫ 0 1 ε 2 v ′ ( x ) 2 d x + 4 1 ∫ 0 1 ( v ( x ) 4 + 1 ) d x and E e ( v ) = 2 1 ∫ 0 1 v ( x ) 2 d x , (24)
respectively.
To describe a convex splitting scheme, partition the temporal interval [ 0 , T ] [0,T] [ 0 , T ] by
0 = t 0 < t 1 < ⋯ < t N = T . 0=t_0<t_1<\cdots<t_N=T. 0 = t 0 < t 1 < ⋯ < t N = T .
Denote by Δ t m = t m − t m − 1 > 0 \Delta t_m=t_m-t_{m-1}>0 Δ t m = t m − t m − 1 > 0 the time step at time t m t_m t m and by Δ t = max 1 ≤ m ≤ N Δ t m \Delta t=\max_{1\le m\le N}\Delta t_m Δ t = max 1 ≤ m ≤ N Δ t m the largest step size. Let u ( m − 1 ) ( x ) u^{(m-1)}(x) u ( m − 1 ) ( x ) be the approximation of the solution u ( x , t ) u(x,t) u ( x , t ) at time t m − 1 t_{m-1} t m − 1 . The approximation u ( m ) ( x ) u^{(m)}(x) u ( m ) ( x ) at time t m t_m t m by the first-order CSS (see, e.g., [17 , 34 ] ) is the solution of the following semi-linear diffusion-reaction problem
{ u ( m ) ( x ) − u ( m − 1 ) ( x ) Δ t m = − L 1 ( u ( m ) ( x ) ) − L 2 ( u ( m − 1 ) ( x ) ) , x ∈ I , u ( m ) ( 0 ) = α ( t m ) , ε 2 u x ( m ) ( 1 ) = β ( t m ) . (25) \begin{cases}
\dfrac{u^{(m)}(x)-u^{(m-1)}(x)}{\Delta t_m}=-\mathcal{L}_1\left(u^{(m)}(x)\right)-\mathcal{L}_2\left(u^{(m-1)}(x)\right), & x\in I,\\
u^{(m)}(0)=\alpha(t_m),\qquad\varepsilon^2u_x^{(m)}(1)=\beta(t_m). \tag*{(25)}
\end{cases} ⎩ ⎨ ⎧ Δ t m u ( m ) ( x ) − u ( m − 1 ) ( x ) = − L 1 ( u ( m ) ( x ) ) − L 2 ( u ( m − 1 ) ( x ) ) , u ( m ) ( 0 ) = α ( t m ) , ε 2 u x ( m ) ( 1 ) = β ( t m ) . x ∈ I , (25)
This temporal discretization scheme is unconditionally energy stable, i.e., E ( u ( m ) ) ≤ E ( u ( m − 1 ) ) \mathcal{E}(u^{(m)})\leq\mathcal{E}(u^{(m-1)}) E ( u ( m ) ) ≤ E ( u ( m − 1 ) ) for all m = 1 , … , N m=1,\ldots,N m = 1 , … , N .
Remark 5.1. For second-order semi-implicit schemes, one may consider the following second-order BDF scheme:
3 u ( m ) − 4 u ( m − 1 ) + u ( m − 2 ) 2 Δ t = ε 2 u x x ( m ) − 2 F ′ ( u ( m − 1 ) ) + F ′ ( u ( m − 2 ) ) , \frac{3u^{(m)}-4u^{(m-1)}+u^{(m-2)}}{2\Delta t}=\varepsilon^2u_{xx}^{(m)}-2\mathcal{F}'\left(u^{(m-1)}\right)+\mathcal{F}'\left(u^{(m-2)}\right), 2Δ t 3 u ( m ) − 4 u ( m − 1 ) + u ( m − 2 ) = ε 2 u xx ( m ) − 2 F ′ ( u ( m − 1 ) ) + F ′ ( u ( m − 2 ) ) ,
or the stabilized version presented in [34 ] , which can be written in the form of (1) . However, these schemes are neither unconditionally stable nor unconditionally energy stable.
Clearly, (25) can be expressed in the form of (1) with
a ( x ) = ε 2 , r 1 ( x ) = 1 , r 2 ( x ) = 1 Δ t m , and f ( x ) = f ( m ) ( x ) = ( 1 + 1 Δ t m ) u ( m − 1 ) ( x ) . (26) a(x)=\varepsilon^2,\quad r_1(x)=1,\quad r_2(x)=\frac{1}{\Delta t_m},\quad\text{and}\quad f(x)=f^{(m)}(x)=\left(1+\frac{1}{\Delta t_m}\right)u^{(m-1)}(x). \tag*{(26)} a ( x ) = ε 2 , r 1 ( x ) = 1 , r 2 ( x ) = Δ t m 1 , and f ( x ) = f ( m ) ( x ) = ( 1 + Δ t m 1 ) u ( m − 1 ) ( x ) . (26)
Define the energy functional at time t m t_m t m by
J ( m ) ( v ) = 1 2 ∫ 0 1 ( ε 2 v ′ ( x ) 2 + 1 2 v ( x ) 4 + 1 Δ t m v ( x ) 2 ) d x − f ( m ) ( v ) , J^{(m)}(v)=\frac{1}{2}\int_0^1\left(\varepsilon^2v'(x)^2+\frac{1}{2}v(x)^4+\frac{1}{\Delta t_m}v(x)^2\right)\,dx-f^{(m)}(v), J ( m ) ( v ) = 2 1 ∫ 0 1 ( ε 2 v ′ ( x ) 2 + 2 1 v ( x ) 4 + Δ t m 1 v ( x ) 2 ) d x − f ( m ) ( v ) ,
where the linear functional f ( m ) ( ⋅ ) f^{(m)}(\cdot) f ( m ) ( ⋅ ) is given by
f ( m ) ( v ) = ( 1 + 1 Δ t m ) ∫ 0 1 u ( m − 1 ) ( x ) v ( x ) d x + β ( t m ) v ( 1 ) . f^{(m)}(v)=\left(1+\frac{1}{\Delta t_m}\right)\int_0^1u^{(m-1)}(x)v(x)\,dx+\beta(t_m)v(1). f ( m ) ( v ) = ( 1 + Δ t m 1 ) ∫ 0 1 u ( m − 1 ) ( x ) v ( x ) d x + β ( t m ) v ( 1 ) .
With V m = H 1 ( I ) ∩ { v ( 0 ) = α ( t m ) } \mathcal{V}_m=H^1(I)\cap\{v(0)=\alpha(t_m)\} V m = H 1 ( I ) ∩ { v ( 0 ) = α ( t m )} , the minimization formulation of problem (25) is to find u ( m ) ( x ) ∈ V m u^{(m)}(x)\in\mathcal{V}_m u ( m ) ( x ) ∈ V m such that
u ( m ) ( x ) = arg min v ∈ V m J ( m ) ( v ) . (27) u^{(m)}(x)=\underset{v\in\mathcal{V}_m}{\arg\min}\ J^{(m)}(v). \tag*{(27)} u ( m ) ( x ) = v ∈ V m arg min J ( m ) ( v ) . (27)
For spatial discretization, let u n ( 0 ) ( x ) ∈ M n α ( 0 ) ( I ) u_n^{(0)}(x)\in\mathcal{M}_n^{\alpha(0)}(I) u n ( 0 ) ( x ) ∈ M n α ( 0 ) ( I ) be the following least-squares approximation of the initial data u 0 ( x ) u_0(x) u 0 ( x ) :
u n ( 0 ) ( x ) = arg min v ∈ M n α ( 0 ) ( I ) 1 2 ∫ 0 1 ( v ( x ) − u 0 ( x ) ) 2 d x = arg min v ∈ M n α ( 0 ) ( I ) 1 2 ∥ v − u 0 ∥ L 2 ( I ) 2 . (28) u_n^{(0)}(x)=\underset{v\in\mathcal{M}_n^{\alpha(0)}(I)}{\arg\min}\ \frac{1}{2}\int_0^1\left(v(x)-u_0(x)\right)^2\,dx
=\underset{v\in\mathcal{M}_n^{\alpha(0)}(I)}{\arg\min}\ \frac{1}{2}\lVert v-u_0\rVert_{L^2(I)}^2. \tag*{(28)} u n ( 0 ) ( x ) = v ∈ M n α ( 0 ) ( I ) arg min 2 1 ∫ 0 1 ( v ( x ) − u 0 ( x ) ) 2 d x = v ∈ M n α ( 0 ) ( I ) arg min 2 1 ∥ v − u 0 ∥ L 2 ( I ) 2 . (28)
For computing u n ( 0 ) ( x ) u_n^{(0)}(x) u n ( 0 ) ( x ) efficiently, see section 6 in [9 ] . For m = 1 , … , N m=1,\ldots,N m = 1 , … , N , define the functional J n ( m ) ( ⋅ ) J_n^{(m)}(\cdot) J n ( m ) ( ⋅ ) at time t m t_m t m by
J n ( m ) ( v ) = 1 2 ∫ 0 1 ( ε 2 v ′ ( x ) 2 + 1 2 v ( x ) 4 + 1 Δ t m v ( x ) 2 ) d x − f n ( m ) ( v ) , (29) J_n^{(m)}(v)=\frac{1}{2}\int_0^1\left(\varepsilon^2v'(x)^2+\frac{1}{2}v(x)^4+\frac{1}{\Delta t_m}v(x)^2\right)\,dx-f_n^{(m)}(v), \tag*{(29)} J n ( m ) ( v ) = 2 1 ∫ 0 1 ( ε 2 v ′ ( x ) 2 + 2 1 v ( x ) 4 + Δ t m 1 v ( x ) 2 ) d x − f n ( m ) ( v ) , (29)
where f n ( m ) ( v ) f_n^{(m)}(v) f n ( m ) ( v ) is the linear form given by
f n ( m ) ( v ) = ( 1 + 1 Δ t m ) ∫ 0 1 u n ( m − 1 ) ( x ) v ( x ) d x + β ( t m ) v ( 1 ) . f_n^{(m)}(v)=\left(1+\frac{1}{\Delta t_m}\right)\int_0^1u_n^{(m-1)}(x)v(x)\,dx+\beta(t_m)v(1). f n ( m ) ( v ) = ( 1 + Δ t m 1 ) ∫ 0 1 u n ( m − 1 ) ( x ) v ( x ) d x + β ( t m ) v ( 1 ) .
Then the convex-splitting shallow Ritz approximation u n ( m ) ( x ) ∈ M n α ( t m ) ( I ) u_n^{(m)}(x) \in\mathcal{M}_n^{\alpha(t_m)}(I) u n ( m ) ( x ) ∈ M n α ( t m ) ( I ) at time t m t_m t m is obtained by minimizing J n ( m ) ( ⋅ ) J_n^{(m)}(\cdot) J n ( m ) ( ⋅ ) over M n α ( t m ) ( I ) \mathcal{M}_n^{\alpha(t_m)}(I) M n α ( t m ) ( I ) , i.e.,
u n ( m ) ( x ) = arg min v ∈ M n α ( t m ) ( I ) J n ( m ) ( v ) . (30) u_n^{(m)}(x)=\mathop{\arg\min}_{v\in\mathcal{M}_n^{\alpha(t_m)}(I)}J_n^{(m)}(v). \tag*{(30)} u n ( m ) ( x ) = arg min v ∈ M n α ( t m ) ( I ) J n ( m ) ( v ) . (30)
The minimization problem in (30) is non-convex and usually has many solutions and/or many local minima; therefore, it is critical to start with a good initial guess in order to obtain the desired solution. Generally, the approximation at the previous time step u n ( m − 1 ) ( x ) u_n^{(m-1)}(x) u n ( m − 1 ) ( x ) is a good initialization for the current approximation u n ( m ) ( x ) u_n^{(m)}(x) u n ( m ) ( x ) , and so are the corresponding parameters. Pseudocode for the convex-splitting shallow Ritz method is given in Algorithm 5.1.
Algorithm 5.1 Convex-splitting shallow Ritz method for the Allen–Cahn equation
Input: Initial and boundary conditions u 0 ( x ) u_0(x) u 0 ( x ) , α ( t ) \alpha(t) α ( t ) , and β ( t ) \beta(t) β ( t )
Output: Network parameters { ( c m , b m ) } m = 0 N \{(\mathbf{c}_m,\mathbf{b}_m)\}_{m=0}^{N} {( c m , b m ) } m = 0 N
▷ Compute the parameters ( c 0 , b 0 ) (\mathbf{c}_0,\mathbf{b}_0) ( c 0 , b 0 ) by solving
u n ( 0 ) ( x ) = u n ( x ; c 0 , b 0 ) = arg min v ∈ M n α ( 0 ) ( I ) ∥ v − u 0 ∥ L 2 ( I ) u_n^{(0)}(x)=u_n(x;\mathbf{c}_0,\mathbf{b}_0)=\mathop{\arg\min}_{v\in\mathcal{M}_n^{\alpha(0)}(I)}\lVert v-u_0\rVert_{L^2(I)} u n ( 0 ) ( x ) = u n ( x ; c 0 , b 0 ) = arg min v ∈ M n α ( 0 ) ( I ) ∥ v − u 0 ∥ L 2 ( I )
for m = 1 , … , N m=1,\ldots,N m = 1 , … , N do
▷ Compute the parameters ( c m , b m ) (\mathbf{c}_m,\mathbf{b}_m) ( c m , b m ) by solving the minimization problem (30) using the rBN method initialized with ( c m − 1 , b m − 1 ) (\mathbf{c}_{m-1},\mathbf{b}_{m-1}) ( c m − 1 , b m − 1 )
end for
Stability and Error Analysis
This subsection analyzes the stability and error of the convex-splitting shallow Ritz method described in subsection 5.1. For stability and convergence analysis of other convex splitting schemes, we refer the reader to [22 , 34 ] and the references therein. Let ( ⋅ , ⋅ ) (\cdot,\cdot) ( ⋅ , ⋅ ) and ∥ ⋅ ∥ \lVert\cdot\rVert ∥ ⋅ ∥ denote the L 2 ( I ) L^2(I) L 2 ( I ) inner product and norm, respectively. The next lemma will be used to prove an unconditional stability result.
Lemma 5.2. Assume that the boundary data are independent of time, α ( t ) ≡ α \alpha(t)\equiv\alpha α ( t ) ≡ α and β ( t ) ≡ β \beta(t)\equiv\beta β ( t ) ≡ β , and that u n ( m − 1 ) ∈ M n α ( I ) u_n^{(m-1)}\in\mathcal{M}_n^\alpha(I) u n ( m − 1 ) ∈ M n α ( I ) . If v n ∈ M n α ( I ) v_n\in\mathcal{M}_n^\alpha(I) v n ∈ M n α ( I ) satisfies J n ( m ) ( v n ) ≤ J n ( m ) ( u n ( m − 1 ) ) J_n^{(m)}(v_n)\leq J_n^{(m)}(u_n^{(m-1)}) J n ( m ) ( v n ) ≤ J n ( m ) ( u n ( m − 1 ) ) , then
E ( v n ) − E ( u n ( m − 1 ) ) + 1 2 ( 1 + 1 Δ t m ) ∥ v n − u n ( m − 1 ) ∥ 2 ≤ β ( v n ( 1 ) − u n ( m − 1 ) ( 1 ) ) (31) \mathcal{E}(v_n)-\mathcal{E}\left(u_n^{(m-1)}\right)+\frac{1}{2}\left(1+\frac{1}{\Delta t_m}\right)\left\lVert v_n-u_n^{(m-1)}\right\rVert^2\leq\beta\left(v_n(1)-u_n^{(m-1)}(1)\right) \tag*{(31)} E ( v n ) − E ( u n ( m − 1 ) ) + 2 1 ( 1 + Δ t m 1 ) v n − u n ( m − 1 ) 2 ≤ β ( v n ( 1 ) − u n ( m − 1 ) ( 1 ) ) (31) for all m = 1 , … , N m=1,\ldots,N m = 1 , … , N .
Proof. Let
G n ( m ) ( v ) = 1 2 ( 1 + 1 Δ t m ) ( ∫ 0 1 v 2 d x − 2 ∫ 0 1 u n ( m − 1 ) v d x ) . G_n^{(m)}(v)=\frac{1}{2}\left(1+\frac{1}{\Delta t_m}\right)\left(\int_0^1v^2\,dx-2\int_0^1u_n^{(m-1)}v\,dx\right). G n ( m ) ( v ) = 2 1 ( 1 + Δ t m 1 ) ( ∫ 0 1 v 2 d x − 2 ∫ 0 1 u n ( m − 1 ) v d x ) .
Then (24) and (29) give
J n ( m ) ( v ) = E ( v ) + G n ( m ) ( v ) − 1 4 − β v ( 1 ) . J_n^{(m)}(v)=\mathcal{E}(v)+G_n^{(m)}(v)-\frac{1}{4}-\beta v(1). J n ( m ) ( v ) = E ( v ) + G n ( m ) ( v ) − 4 1 − β v ( 1 ) .
Since G n ( m ) ( v n ) − G n ( m ) ( u n ( m − 1 ) ) = 1 2 ( 1 + 1 Δ t m ) ∥ v n − u n ( m − 1 ) ∥ 2 G_n^{(m)}(v_n)-G_n^{(m)}\left(u_n^{(m-1)}\right)=\frac{1}{2}\left(1+\frac{1}{\Delta t_m}\right)\left\lVert v_n-u_n^{(m-1)}\right\rVert^2 G n ( m ) ( v n ) − G n ( m ) ( u n ( m − 1 ) ) = 2 1 ( 1 + Δ t m 1 ) v n − u n ( m − 1 ) 2 , we have
J n ( m ) ( v n ) − J n ( m ) ( u n ( m − 1 ) ) = E ( v n ) − E ( u n ( m − 1 ) ) − β ( v n ( 1 ) − u n ( m − 1 ) ( 1 ) ) + 1 2 ( 1 + 1 Δ t m ) ∥ v n − u n ( m − 1 ) ∥ 2 , J_n^{(m)}(v_n)-J_n^{(m)}\left(u_n^{(m-1)}\right)=\mathcal{E}(v_n)-\mathcal{E}\left(u_n^{(m-1)}\right)-\beta\left(v_n(1)-u_n^{(m-1)}(1)\right)+\frac{1}{2}\left(1+\frac{1}{\Delta t_m}\right)\left\lVert v_n-u_n^{(m-1)}\right\rVert^2, J n ( m ) ( v n ) − J n ( m ) ( u n ( m − 1 ) ) = E ( v n ) − E ( u n ( m − 1 ) ) − β ( v n ( 1 ) − u n ( m − 1 ) ( 1 ) ) + 2 1 ( 1 + Δ t m 1 ) v n − u n ( m − 1 ) 2 ,
which, together with the assumption, implies (31) . This completes the proof of the lemma.
Theorem 5.3. Under the assumptions of Lemma 5.2 , the convex-splitting shallow Ritz approximation u n ( m ) u_n^{(m)} u n ( m ) defined in (30) satisfies
E ( u n ( N ) ) + 1 2 ∑ m = 1 N ( 1 + 1 Δ t m ) ∥ u n ( m ) − u n ( m − 1 ) ∥ 2 ≤ E ( u n ( 0 ) ) + β ( u n ( 0 ) ( 1 ) − u n ( 0 ) ( 1 ) ) . (32) \mathcal{E}(u_n^{(N)})+\frac{1}{2}\sum_{m=1}^{N}\left(1+\frac{1}{\Delta t_m}\right)\left\|u_n^{(m)}-u_n^{(m-1)}\right\|^2\leq\mathcal{E}(u_n^{(0)})+\beta\left(u_n^{(0)}(1)-u_n^{(0)}(1)\right). \tag*{(32)} E ( u n ( N ) ) + 2 1 m = 1 ∑ N ( 1 + Δ t m 1 ) u n ( m ) − u n ( m − 1 ) 2 ≤ E ( u n ( 0 ) ) + β ( u n ( 0 ) ( 1 ) − u n ( 0 ) ( 1 ) ) . (32) Moreover, if β = 0 \beta=0 β = 0 , then the method is unconditionally energy stable, i.e.,
E ( u n ( N ) ) ≤ E ( u n ( 0 ) ) , (33) \mathcal{E}(u_n^{(N)})\leq\mathcal{E}(u_n^{(0)}), \tag*{(33)} E ( u n ( N ) ) ≤ E ( u n ( 0 ) ) , (33) and unconditionally stable in the following measures
ε ∣ u n ( N ) ∣ H 1 ( I ) ≤ 2 E ( u n ( 0 ) ) and ∥ u n ( N ) ∥ L ∞ ( I ) ≤ ∣ α ∣ + 1 ε 2 E ( u n ( 0 ) ) . (34) \varepsilon\left\lvert u_n^{(N)}\right\rvert_{H^1(I)}\leq\sqrt{2\mathcal{E}(u_n^{(0)})}\quad\text{and}\quad\left\|u_n^{(N)}\right\|_{L^\infty(I)}\leq\lvert\alpha\rvert+\frac{1}{\varepsilon}\sqrt{2\mathcal{E}(u_n^{(0)})}. \tag*{(34)} ε u n ( N ) H 1 ( I ) ≤ 2 E ( u n ( 0 ) ) and u n ( N ) L ∞ ( I ) ≤ ∣ α ∣ + ε 1 2 E ( u n ( 0 ) ) . (34)
Proof. (32) follows directly from the summation of (31) with v n = u n ( m ) v_n=u_n^{(m)} v n = u n ( m ) over m m m from 1 to N N N , and (33) is a direct consequence of (32) and the assumption that β = 0 \beta=0 β = 0 . The first inequality in (34) follows from (33) and the fact that
ε 2 2 ∣ v ∣ H 1 ( I ) 2 ≤ E ( v ) ∀ v ∈ H 1 ( I ) . \frac{\varepsilon^2}{2}\lvert v\rvert_{H^1(I)}^2\leq\mathcal{E}(v)\quad\forall\,v\in H^1(I). 2 ε 2 ∣ v ∣ H 1 ( I ) 2 ≤ E ( v ) ∀ v ∈ H 1 ( I ) .
Finally, using u n ( N ) ( 0 ) = α u_n^{(N)}(0)=\alpha u n ( N ) ( 0 ) = α , the fundamental theorem of calculus, and the Cauchy–Schwarz inequality, we have
∣ u n ( N ) ( x ) ∣ ≤ ∣ α ∣ + ∫ 0 x ∣ ( u n ( N ) ) ′ ( s ) ∣ d s ≤ ∣ α ∣ + ∣ u n ( N ) ∣ H 1 ( I ) , \left\lvert u_n^{(N)}(x)\right\rvert\leq\lvert\alpha\rvert+\int_0^x\left\lvert\left(u_n^{(N)}\right)'(s)\right\rvert\,\mathrm{d}s\leq\lvert\alpha\rvert+\left\lvert u_n^{(N)}\right\rvert_{H^1(I)}, u n ( N ) ( x ) ≤ ∣ α ∣ + ∫ 0 x ( u n ( N ) ) ′ ( s ) d s ≤ ∣ α ∣ + u n ( N ) H 1 ( I ) ,
for all x ∈ I x\in I x ∈ I , which, combined with the first inequality in (34) , gives the validity of the second inequality. This completes the proof of the theorem. □
The next lemma shows that the CSS is first-order accurate in time and makes explicit the dependence of the constant on the solution.
Lemma 5.4. Let u ( x , t ) u(x,t) u ( x , t ) and u ( m ) ( x ) u^{(m)}(x) u ( m ) ( x ) be the solutions of (23) and (27) with u ( 0 ) = u 0 u^{(0)}=u_0 u ( 0 ) = u 0 , respectively. Assume that Δ t ≤ 1 / 4 \Delta t\leq1/4 Δ t ≤ 1/4 and that u t ( x , t ) , u t t ( x , t ) ∈ L ∞ ( 0 , T ; L 2 ( I ) ) u_t(x,t),u_{tt}(x,t)\in L^\infty(0,T;L^2(I)) u t ( x , t ) , u tt ( x , t ) ∈ L ∞ ( 0 , T ; L 2 ( I )) . Then
∥ u ( ⋅ , T ) − u ( N ) ∥ ≤ C T Δ t , (35) \left\|u(\cdot,T)-u^{(N)}\right\|\leq C_T\Delta t, \tag*{(35)} u ( ⋅ , T ) − u ( N ) ≤ C T Δ t , (35) where Δ t \Delta t Δ t is the largest step size and C T C_T C T is a constant given by
C T = 2 T e 3 T ( ∥ u t ∥ L ∞ ( 0 , T ; L 2 ( I ) ) + 1 2 ∥ u t t ∥ L ∞ ( 0 , T ; L 2 ( I ) ) ) . C_T=\sqrt{2T}e^{3T}\left(\left\|u_t\right\|_{L^\infty(0,T;L^2(I))}+\frac{1}{2}\left\|u_{tt}\right\|_{L^\infty(0,T;L^2(I))}\right). C T = 2 T e 3 T ( ∥ u t ∥ L ∞ ( 0 , T ; L 2 ( I )) + 2 1 ∥ u tt ∥ L ∞ ( 0 , T ; L 2 ( I )) ) . Proof. The exact solution u ( x , t ) u(x,t) u ( x , t ) at time t m t_m t m satisfies the following equation
u ( x , t m ) − u ( x , t m − 1 ) Δ t m = − L 1 ( u ( x , t m ) ) − L 2 ( u ( x , t m − 1 ) ) + R ( m ) ( x ) , (36) \frac{u(x,t_m)-u(x,t_{m-1})}{\Delta t_m}=-\mathcal{L}_1\left(u(x,t_m)\right)-\mathcal{L}_2\left(u(x,t_{m-1})\right)+R^{(m)}(x), \tag*{(36)} Δ t m u ( x , t m ) − u ( x , t m − 1 ) = − L 1 ( u ( x , t m ) ) − L 2 ( u ( x , t m − 1 ) ) + R ( m ) ( x ) , (36) where
R ( m ) ( x ) = u ( x , t m ) − u ( x , t m − 1 ) Δ t m + L 1 ( u ( x , t m ) ) + L 2 ( u ( x , t m − 1 ) ) R^{(m)}(x)=\frac{u(x,t_m)-u(x,t_{m-1})}{\Delta t_m}+\mathcal{L}_1\left(u(x,t_m)\right)+\mathcal{L}_2\left(u(x,t_{m-1})\right) R ( m ) ( x ) = Δ t m u ( x , t m ) − u ( x , t m − 1 ) + L 1 ( u ( x , t m ) ) + L 2 ( u ( x , t m − 1 ) ) = ( u ( x , t m ) − u ( x , t m − 1 ) Δ t m − u t ( x , t m ) ) + ( L 2 ( u ( x , t m − 1 ) ) − L 2 ( u ( x , t m ) ) ) =\left(\frac{u(x,t_m)-u(x,t_{m-1})}{\Delta t_m}-u_t(x,t_m)\right)+\left(\mathcal{L}_2\left(u(x,t_{m-1})\right)-\mathcal{L}_2\left(u(x,t_m)\right)\right) = ( Δ t m u ( x , t m ) − u ( x , t m − 1 ) − u t ( x , t m ) ) + ( L 2 ( u ( x , t m − 1 ) ) − L 2 ( u ( x , t m ) ) ) = − 1 Δ t m ∫ t m − 1 t m ( t − t m − 1 ) u t t ( x , t ) d t + ∫ t m − 1 t m u t ( x , t ) d t . =-\frac{1}{\Delta t_m}\int_{t_{m-1}}^{t_m}(t-t_{m-1})u_{tt}(x,t)\,\mathrm{d}t+\int_{t_{m-1}}^{t_m}u_t(x,t)\,\mathrm{d}t. = − Δ t m 1 ∫ t m − 1 t m ( t − t m − 1 ) u tt ( x , t ) d t + ∫ t m − 1 t m u t ( x , t ) d t .
where the second equality uses (23) and the third uses Taylor’s expansion with an integral remainder. Therefore,
∥ R ( m ) ∥ ≤ Δ t m ( ∥ u t ∥ L ∞ ( 0 , T ; L 2 ( I ) ) + 1 2 ∥ u t t ∥ L ∞ ( 0 , T ; L 2 ( I ) ) ) . (37) \lVert R^{(m)}\rVert\leq\Delta t_m\left(\lVert u_t\rVert_{L^\infty(0,T;L^2(I))}+\frac{1}{2}\lVert u_{tt}\rVert_{L^\infty(0,T;L^2(I))}\right). \tag*{(37)} ∥ R ( m ) ∥ ≤ Δ t m ( ∥ u t ∥ L ∞ ( 0 , T ; L 2 ( I )) + 2 1 ∥ u tt ∥ L ∞ ( 0 , T ; L 2 ( I )) ) . (37)
For m = 0 , 1 , … , N m=0,1,\ldots,N m = 0 , 1 , … , N , denote by η ( m ) ( x ) = u ( x , t m ) − u ( m ) ( x ) \eta^{(m)}(x)=u(x,t_m)-u^{(m)}(x) η ( m ) ( x ) = u ( x , t m ) − u ( m ) ( x ) the error of temporal discretization. The difference of (36) and (25) yields the error equation
η ( m ) ( x ) − η ( m − 1 ) ( x ) Δ t m = − ( L 1 ( u ( x , t m ) ) − L 1 ( u ( m ) ( x ) ) ) + η ( m − 1 ) ( x ) + R ( m ) ( x ) . (38) \frac{\eta^{(m)}(x)-\eta^{(m-1)}(x)}{\Delta t_m}=-\left(\mathcal{L}_1(u(x,t_m))-\mathcal{L}_1\left(u^{(m)}(x)\right)\right)+\eta^{(m-1)}(x)+R^{(m)}(x). \tag*{(38)} Δ t m η ( m ) ( x ) − η ( m − 1 ) ( x ) = − ( L 1 ( u ( x , t m )) − L 1 ( u ( m ) ( x ) ) ) + η ( m − 1 ) ( x ) + R ( m ) ( x ) . (38)
For all x ∈ I x\in I x ∈ I , notice that
2 ( η ( m ) − η ( m − 1 ) ) η ( m ) = ( η ( m ) ) 2 − ( η ( m − 1 ) ) 2 + ( η ( m ) − η ( m − 1 ) ) 2 ≥ ( η ( m ) ) 2 − ( η ( m − 1 ) ) 2 2\left(\eta^{(m)}-\eta^{(m-1)}\right)\eta^{(m)}=\left(\eta^{(m)}\right)^2-\left(\eta^{(m-1)}\right)^2+\left(\eta^{(m)}-\eta^{(m-1)}\right)^2\geq\left(\eta^{(m)}\right)^2-\left(\eta^{(m-1)}\right)^2 2 ( η ( m ) − η ( m − 1 ) ) η ( m ) = ( η ( m ) ) 2 − ( η ( m − 1 ) ) 2 + ( η ( m ) − η ( m − 1 ) ) 2 ≥ ( η ( m ) ) 2 − ( η ( m − 1 ) ) 2
and that
( u ( x , t m ) 3 − u ( m ) ( x ) 3 ) η ( m ) ( x ) = ( u ( x , t m ) 2 + u ( x , t m ) u ( m ) ( x ) + u ( m ) ( x ) 2 ) ( η ( m ) ( x ) ) 2 ≥ 1 2 ( u ( x , t m ) 2 + u ( m ) ( x ) 2 ) ( η ( m ) ( x ) ) 2 ≥ 0. (39) \begin{aligned}
\left(u(x,t_m)^3-u^{(m)}(x)^3\right)\eta^{(m)}(x)=\left(u(x,t_m)^2+u(x,t_m)u^{(m)}(x)+u^{(m)}(x)^2\right)\left(\eta^{(m)}(x)\right)^2 \\
&\geq\frac{1}{2}\left(u(x,t_m)^2+u^{(m)}(x)^2\right)\left(\eta^{(m)}(x)\right)^2\geq0. \tag*{(39)}
\end{aligned} ( u ( x , t m ) 3 − u ( m ) ( x ) 3 ) η ( m ) ( x ) = ( u ( x , t m ) 2 + u ( x , t m ) u ( m ) ( x ) + u ( m ) ( x ) 2 ) ( η ( m ) ( x ) ) 2 ≥ 2 1 ( u ( x , t m ) 2 + u ( m ) ( x ) 2 ) ( η ( m ) ( x ) ) 2 ≥ 0. (39)
Multiplying (38) by η ( m ) \eta^{(m)} η ( m ) , integrating by parts over I I I , and using the above two inequalities, we have
1 2 Δ t m ( ∥ η ( m ) ∥ 2 − ∥ η ( m − 1 ) ∥ 2 ) ≤ − ε 2 ∥ η ( m ) ∥ H 1 ( I ) 2 + ( η ( m − 1 ) , η ( m ) ) + ( R ( m ) , η ( m ) ) ≤ 1 2 ∥ η ( m − 1 ) ∥ 2 + ∥ η ( m ) ∥ 2 + 1 2 ∥ R ( m ) ∥ 2 , \begin{aligned}
\frac{1}{2\Delta t_m}\left(\lVert\eta^{(m)}\rVert^2-\lVert\eta^{(m-1)}\rVert^2\right)\leq-\varepsilon^2\lVert\eta^{(m)}\rVert_{H^1(I)}^2+\left(\eta^{(m-1)},\eta^{(m)}\right)+\left(R^{(m)},\eta^{(m)}\right) \\
&\leq\frac{1}{2}\lVert\eta^{(m-1)}\rVert^2+\lVert\eta^{(m)}\rVert^2+\frac{1}{2}\lVert R^{(m)}\rVert^2,
\end{aligned} 2Δ t m 1 ( ∥ η ( m ) ∥ 2 − ∥ η ( m − 1 ) ∥ 2 ) ≤ − ε 2 ∥ η ( m ) ∥ H 1 ( I ) 2 + ( η ( m − 1 ) , η ( m ) ) + ( R ( m ) , η ( m ) ) ≤ 2 1 ∥ η ( m − 1 ) ∥ 2 + ∥ η ( m ) ∥ 2 + 2 1 ∥ R ( m ) ∥ 2 ,
which, together with the assumption that Δ t m ≤ 1 / 4 \Delta t_m\leq1/4 Δ t m ≤ 1/4 and the fact that η ( 0 ) ( x ) = 0 \eta^{(0)}(x)=0 η ( 0 ) ( x ) = 0 , implies
∥ η ( m ) ∥ 2 ≤ 1 + Δ t m 1 − 2 Δ t m ∥ η ( m − 1 ) ∥ 2 + Δ t m 1 − 2 Δ t m ∥ R ( m ) ∥ 2 ≤ ( 1 + 6 Δ t m ) ∥ η ( m − 1 ) ∥ 2 + 2 Δ t m ∥ R ( m ) ∥ 2 \lVert\eta^{(m)}\rVert^2\leq\frac{1+\Delta t_m}{1-2\Delta t_m}\lVert\eta^{(m-1)}\rVert^2+\frac{\Delta t_m}{1-2\Delta t_m}\lVert R^{(m)}\rVert^2\leq(1+6\Delta t_m)\lVert\eta^{(m-1)}\rVert^2+2\Delta t_m\lVert R^{(m)}\rVert^2 ∥ η ( m ) ∥ 2 ≤ 1 − 2Δ t m 1 + Δ t m ∥ η ( m − 1 ) ∥ 2 + 1 − 2Δ t m Δ t m ∥ R ( m ) ∥ 2 ≤ ( 1 + 6Δ t m ) ∥ η ( m − 1 ) ∥ 2 + 2Δ t m ∥ R ( m ) ∥ 2
≤ 2 ∑ k = 0 m − 1 ∏ l = 1 k ( 1 + 6 Δ t m + 1 − l ) Δ t m − k ∥ R ( m − k ) ∥ 2 ≤ 2 ∏ i = 1 m ( 1 + 6 Δ t i ) ∑ k = 1 m Δ t k ∥ R ( k ) ∥ 2 \leq2\sum_{k=0}^{m-1}\prod_{l=1}^{k}(1+6\Delta t_{m+1-l})\Delta t_{m-k}\lVert R^{(m-k)}\rVert^2\leq2\prod_{i=1}^{m}(1+6\Delta t_i)\sum_{k=1}^{m}\Delta t_k\lVert R^{(k)}\rVert^2 ≤ 2 k = 0 ∑ m − 1 l = 1 ∏ k ( 1 + 6Δ t m + 1 − l ) Δ t m − k ∥ R ( m − k ) ∥ 2 ≤ 2 i = 1 ∏ m ( 1 + 6Δ t i ) k = 1 ∑ m Δ t k ∥ R ( k ) ∥ 2
≤ 2 t m exp ( 6 ∑ i = 1 m Δ t i ) max 1 ≤ i ≤ m ∥ R ( i ) ∥ 2 = 2 t m e 6 t m max 1 ≤ i ≤ m ∥ R ( i ) ∥ 2 . \leq2t_m\exp\left(6\sum_{i=1}^{m}\Delta t_i\right)\max_{1\leq i\leq m}\lVert R^{(i)}\rVert^2=2t_m e^{6t_m}\max_{1\leq i\leq m}\lVert R^{(i)}\rVert^2. ≤ 2 t m exp ( 6 i = 1 ∑ m Δ t i ) 1 ≤ i ≤ m max ∥ R ( i ) ∥ 2 = 2 t m e 6 t m 1 ≤ i ≤ m max ∥ R ( i ) ∥ 2 .
Now, (35) follows from the above inequality with m = N m=N m = N , the equality t N = T t_N=T t N = T , and the bound in (37) . This completes the proof of the lemma.
Next, for each time step we estimate the error between the solutions of the minimization problems in (27) and (30) .
Lemma 5.5. Let u ( m ) ( x ) u^{(m)}(x) u ( m ) ( x ) and u n ( m ) ( x ) u_n^{(m)}(x) u n ( m ) ( x ) be the solutions of (27) and (30) , respectively. Let
ϱ n , m = inf v ∈ M n α ( t m ) ( I ) E ( u ˉ ( m ) − v ; ε 2 , 1 , 1 / Δ t m ) , \varrho_{n,m}=\inf_{v\in\mathcal{M}_{n}^{\alpha(t_m)}(I)}E(\bar{u}^{(m)}-v;\varepsilon^2,1,1/\Delta t_m), ϱ n , m = v ∈ M n α ( t m ) ( I ) inf E ( u ˉ ( m ) − v ; ε 2 , 1 , 1/Δ t m ) , where u ˉ ( m ) ∈ V m \bar{u}^{(m)}\in V_m u ˉ ( m ) ∈ V m is the minimizer of the functional J n ( m ) ( ⋅ ) J_n^{(m)}(\cdot) J n ( m ) ( ⋅ ) over V m V_m V m , i.e.,
u ˉ ( m ) ( x ) = arg min v ∈ V m J n ( m ) ( v ) . (40) \bar{u}^{(m)}(x)=\underset{v\in V_m}{\operatorname{arg\,min}}\,J_n^{(m)}(v). \tag*{(40)} u ˉ ( m ) ( x ) = v ∈ V m arg min J n ( m ) ( v ) . (40)
Then for each m = 1 , … , N m=1,\ldots,N m = 1 , … , N , we have that
∥ u ( m ) − u n ( m ) ∥ ≤ ( 1 + Δ t m ) ∥ u ( m − 1 ) − u n ( m − 1 ) ∥ + Δ t m ϱ n , m , (41) \left\|u^{(m)}-u_n^{(m)}\right\| \le\left(1+\Delta t_m\right)\left\|u^{(m-1)}-u_n^{(m-1)}\right\|+\sqrt{\Delta t_m}\,\varrho_{n,m}, \tag*{(41)} u ( m ) − u n ( m ) ≤ ( 1 + Δ t m ) u ( m − 1 ) − u n ( m − 1 ) + Δ t m ϱ n , m , (41)
and that
∥ u ( N ) − u n ( N ) ∥ ≤ e T ∥ u 0 − u n ( 0 ) ∥ + ∑ m = 1 N e T − t m Δ t m ϱ n , m . (42) \left\|u^{(N)}-u_n^{(N)}\right\| \le e^T\left\|u_0-u_n^{(0)}\right\|+\sum_{m=1}^{N}e^{T-t_m}\sqrt{\Delta t_m}\,\varrho_{n,m}. \tag*{(42)} u ( N ) − u n ( N ) ≤ e T u 0 − u n ( 0 ) + m = 1 ∑ N e T − t m Δ t m ϱ n , m . (42)
Proof. Similar to (26) , u ˉ ( m ) \bar{u}^{(m)} u ˉ ( m ) is the solution of (1) with
a ( x ) = ε 2 , r 1 ( x ) = 1 , r 2 ( x ) = 1 Δ t m , and f ( x ) = f n ( m ) ( x ) = ( 1 + 1 Δ t m ) u n ( m − 1 ) ( x ) . a(x)=\varepsilon^2,\quad r_1(x)=1,\quad r_2(x)=\frac{1}{\Delta t_m},\quad\text{and}\quad f(x)=f_n^{(m)}(x)=\left(1+\frac{1}{\Delta t_m}\right)u_n^{(m-1)}(x). a ( x ) = ε 2 , r 1 ( x ) = 1 , r 2 ( x ) = Δ t m 1 , and f ( x ) = f n ( m ) ( x ) = ( 1 + Δ t m 1 ) u n ( m − 1 ) ( x ) .
Hence, ξ ( m ) = u ( m ) − u ˉ ( m ) \xi^{(m)}=u^{(m)}-\bar{u}^{(m)} ξ ( m ) = u ( m ) − u ˉ ( m ) satisfies
− ε 2 ( ξ ( m ) ) x x + ( ( u ( m ) ) 3 − ( u ˉ ( m ) ) 3 ) + 1 Δ t m ξ ( m ) = ( 1 + 1 Δ t m ) ( u ( m − 1 ) − u n ( m − 1 ) ) -\varepsilon^2\left(\xi^{(m)}\right)_{xx}+\left(\left(u^{(m)}\right)^3-\left(\bar{u}^{(m)}\right)^3\right)+\frac{1}{\Delta t_m}\xi^{(m)}=\left(1+\frac{1}{\Delta t_m}\right)\left(u^{(m-1)}-u_n^{(m-1)}\right) − ε 2 ( ξ ( m ) ) xx + ( ( u ( m ) ) 3 − ( u ˉ ( m ) ) 3 ) + Δ t m 1 ξ ( m ) = ( 1 + Δ t m 1 ) ( u ( m − 1 ) − u n ( m − 1 ) )
with the homogeneous boundary conditions. Using its variational form with the test function v = ξ ( m ) v=\xi^{(m)} v = ξ ( m ) , an inequality similar to (39) , and the Cauchy–Schwarz inequality, we have
1 Δ t m ∥ ξ ( m ) ∥ 2 ≤ ε 2 ∣ ξ ( m ) ∣ H 1 ( I ) 2 + ( ( u ( m ) ) 3 − ( u ˉ ( m ) ) 3 , ξ ( m ) ) + 1 Δ t m ∥ ξ ( m ) ∥ 2 = ( 1 + 1 Δ t m ) ( u ( m − 1 ) − u n ( m − 1 ) , ξ ( m ) ) ≤ ( 1 + 1 Δ t m ) ∥ u ( m − 1 ) − u n ( m − 1 ) ∥ ∥ ξ ( m ) ∥ , \begin{aligned}
\frac{1}{\Delta t_m}\left\|\xi^{(m)}\right\|^2\le\varepsilon^2\left|\xi^{(m)}\right|_{H^1(I)}^2+\left(\left(u^{(m)}\right)^3-\left(\bar{u}^{(m)}\right)^3,\xi^{(m)}\right)+\frac{1}{\Delta t_m}\left\|\xi^{(m)}\right\|^2 \\
&=\left(1+\frac{1}{\Delta t_m}\right)\left(u^{(m-1)}-u_n^{(m-1)},\xi^{(m)}\right)\le\left(1+\frac{1}{\Delta t_m}\right)\left\|u^{(m-1)}-u_n^{(m-1)}\right\|\left\|\xi^{(m)}\right\|,
\end{aligned} Δ t m 1 ξ ( m ) 2 ≤ ε 2 ξ ( m ) H 1 ( I ) 2 + ( ( u ( m ) ) 3 − ( u ˉ ( m ) ) 3 , ξ ( m ) ) + Δ t m 1 ξ ( m ) 2 = ( 1 + Δ t m 1 ) ( u ( m − 1 ) − u n ( m − 1 ) , ξ ( m ) ) ≤ ( 1 + Δ t m 1 ) u ( m − 1 ) − u n ( m − 1 ) ξ ( m ) ,
which implies
∥ ξ ( m ) ∥ ≤ ( 1 + Δ t m ) ∥ u ( m − 1 ) − u n ( m − 1 ) ∥ . \left\|\xi^{(m)}\right\|\le\left(1+\Delta t_m\right)\left\|u^{(m-1)}-u_n^{(m-1)}\right\|. ξ ( m ) ≤ ( 1 + Δ t m ) u ( m − 1 ) − u n ( m − 1 ) .
By the triangle inequality
∥ u ( m ) − u n ( m ) ∥ ≤ ∥ ξ ( m ) ∥ + ∥ u ˉ ( m ) − u n ( m ) ∥ , \left\|u^{(m)}-u_n^{(m)}\right\|\le\left\|\xi^{(m)}\right\|+\left\|\bar{u}^{(m)}-u_n^{(m)}\right\|, u ( m ) − u n ( m ) ≤ ξ ( m ) + u ˉ ( m ) − u n ( m ) ,
the bound in (41) follows from Lemma 2.1 and
∥ u ˉ ( m ) − u n ( m ) ∥ ≤ Δ t m ∥ u ˉ ( m ) − u n ( m ) ∥ ε 2 , 1 / Δ t m ≤ Δ t m inf v ∈ M n α m ( I ) E ( u ˉ ( m ) − v ; ε 2 , 1 , 1 / Δ t m ) . \left\|\bar{u}^{(m)}-u_n^{(m)}\right\|\le\sqrt{\Delta t_m}\left\|\bar{u}^{(m)}-u_n^{(m)}\right\|_{\varepsilon^2,1/\Delta t_m}\le\sqrt{\Delta t_m}\inf_{v\in\mathcal{M}_{n}^{\alpha_m}(I)}E\left(\bar{u}^{(m)}-v;\varepsilon^2,1,1/\Delta t_m\right). u ˉ ( m ) − u n ( m ) ≤ Δ t m u ˉ ( m ) − u n ( m ) ε 2 , 1/Δ t m ≤ Δ t m v ∈ M n α m ( I ) inf E ( u ˉ ( m ) − v ; ε 2 , 1 , 1/Δ t m ) .
Applying (41) successively for m = 1 , … , N m=1,\ldots,N m = 1 , … , N and using u ( 0 ) = u 0 u^{(0)}=u_0 u ( 0 ) = u 0 yields
∥ u ( N ) − u n ( N ) ∥ ≤ ( ∏ j = 1 N ( 1 + Δ t j ) ) ∥ u 0 − u n ( 0 ) ∥ + ∑ m = 1 N ( ∏ j = m + 1 N ( 1 + Δ t j ) ) Δ t m ϱ n , m , \left\|u^{(N)}-u_n^{(N)}\right\|\le\left(\prod_{j=1}^{N}(1+\Delta t_j)\right)\left\|u_0-u_n^{(0)}\right\|+\sum_{m=1}^{N}\left(\prod_{j=m+1}^{N}(1+\Delta t_j)\right)\sqrt{\Delta t_m}\,\varrho_{n,m}, u ( N ) − u n ( N ) ≤ ( j = 1 ∏ N ( 1 + Δ t j ) ) u 0 − u n ( 0 ) + m = 1 ∑ N ( j = m + 1 ∏ N ( 1 + Δ t j ) ) Δ t m ϱ n , m ,
where ∏ j = N + 1 N ( 1 + Δ t j ) = 1 \prod_{j=N+1}^{N}(1+\Delta t_j)=1 ∏ j = N + 1 N ( 1 + Δ t j ) = 1 by convention. Now, (42) is a direct consequence of the inequality
∏ j = m + 1 N ( 1 + Δ t j ) ≤ e T − t m . \prod_{j=m+1}^{N}(1+\Delta t_j)\le e^{T-t_m}. j = m + 1 ∏ N ( 1 + Δ t j ) ≤ e T − t m .
This completes the proof of the lemma. □ \square □
The error estimate of the convex-splitting shallow Ritz method at the final time is given below.
Theorem 5.6. Under the assumptions of Lemma 5.4, we have
∥ u ( ⋅ , T ) − u n ( N ) ∥ ≤ C T Δ t + e T ∥ u 0 − u n ( 0 ) ∥ + ∑ m = 1 N e T − t m Δ t m ϱ n , m . (43) \left\|u(\cdot,T)-u_n^{(N)}\right\|\le C_T\Delta t+e^T\left\|u_0-u_n^{(0)}\right\|+\sum_{m=1}^{N}e^{T-t_m}\sqrt{\Delta t_m}\,\varrho_{n,m}. \tag*{(43)} u ( ⋅ , T ) − u n ( N ) ≤ C T Δ t + e T u 0 − u n ( 0 ) + m = 1 ∑ N e T − t m Δ t m ϱ n , m . (43)
Proof. (43) is a direct consequence of the triangle inequality, (35) , and (42) .
Remark 5.7. Recall that the set M n ( I ) \mathcal{M}_n(I) M n ( I ) is a class of approximating functions equivalent to the free-knot linear splines (see [5 ] and the discussion in section 1 of [8 ] ). From the definition in (40) , we obtain that u ‾ ( m ) ∈ H 2 ( I ) \overline{u}^{(m)} \in H^2(I) u ( m ) ∈ H 2 ( I ) . Therefore,
inf v ∈ M n α ( t m ) ( I ) ∥ u ‾ ( m ) − v ∥ ε 2 , 1 / Δ t m ≤ C ( u ‾ ( m ) ) ( ε + 1 Δ t m ) 1 n \inf_{v\in\mathcal{M}_n^{\alpha(t_m)}(I)} \left\|\overline{u}^{(m)}-v\right\|_{\varepsilon^2,1/\Delta t_m} \leq C(\overline{u}^{(m)})\left(\varepsilon+\frac{1}{\sqrt{\Delta t_m}}\right)\frac{1}{n} v ∈ M n α ( t m ) ( I ) inf u ( m ) − v ε 2 , 1/Δ t m ≤ C ( u ( m ) ) ( ε + Δ t m 1 ) n 1
for each m = 1 , … , N m=1,\ldots,N m = 1 , … , N , and hence
ϱ n , m ≤ C ( u ‾ ( m ) ) n ( ε + 1 Δ t m + ∥ u ‾ ( m ) ∥ L 4 ( I ) ) . \varrho_{n,m}\leq\frac{C(\overline{u}^{(m)})}{n}\left(\varepsilon+\frac{1}{\sqrt{\Delta t_m}}+\left\|\overline{u}^{(m)}\right\|_{L^4(I)}\right). ϱ n , m ≤ n C ( u ( m ) ) ( ε + Δ t m 1 + u ( m ) L 4 ( I ) ) .
Moreover, if u 0 u_0 u 0 has certain smoothness (see [13 , 33 ] ), for example, u 0 ∈ H 2 ( I ) u_0\in H^2(I) u 0 ∈ H 2 ( I ) , then for u n ( 0 ) u_n^{(0)} u n ( 0 ) defined as in (28) , we also have first-order convergence and therefore
∥ u ( ⋅ , T ) − u n ( N ) ∥ ≤ C T Δ t + ε T C ( u 0 ) n + C N n , \left\|u(\cdot,T)-u_n^{(N)}\right\|\leq C_T\Delta t+\frac{\varepsilon^T C(u_0)}{n}+\frac{C_N}{n}, u ( ⋅ , T ) − u n ( N ) ≤ C T Δ t + n ε T C ( u 0 ) + n C N ,
where C N = ∑ m = 1 N e T − t m C ( u ‾ ( m ) ) ( 1 + Δ t m ( ε + ∥ u ‾ ( m ) ∥ L 4 ( I ) ) ) C_N=\sum_{m=1}^{N}e^{T-t_m}C\left(\overline{u}^{(m)}\right)\left(1+\sqrt{\Delta t_m}\left(\varepsilon+\left\|\overline{u}^{(m)}\right\|_{L^4(I)}\right)\right) C N = ∑ m = 1 N e T − t m C ( u ( m ) ) ( 1 + Δ t m ( ε + u ( m ) L 4 ( I ) ) ) .
Numerical Experiments
This section presents numerical results of the shallow Ritz and convex-splitting shallow Ritz methods for solving the semi-linear diffusion-reaction problem in (1) and the Allen–Cahn equation described in § 5 , respectively. The shallow Ritz approximations are obtained by using the rBN method when solving the respective (3) and (30) .
Both problems are non-convex optimization problems, and hence a good initialization is crucial. For the stationary problem in (1) , as in [28 , 8 ] , the nonlinear parameters b \mathbf{b} b , which represent the breakpoints partitioning the interval I I I , are initialized as the uniform partition of I I I . The linear parameters c \mathbf{c} c in problem (3) are then obtained by a Newton method until the residual is smaller than 10 − 12 10^{-12} 1 0 − 12 . This Newton method starts with an initial guess by solving a linearized system of (9) described in Remark 3.2, where u ^ n ( x ) \hat{u}_n(x) u ^ n ( x ) is chosen as the neural network with b \mathbf{b} b corresponding to the uniform partition and c = 0 \mathbf{c}=\mathbf{0} c = 0 .
For the time-dependent problem in (30) , the least-squares NN approximation u n ( 0 ) ( x ) u_n^{(0)}(x) u n ( 0 ) ( x ) to the initial data u 0 ( x ) u_0(x) u 0 ( x ) in Algorithm 5.1 is computed by the rBN method with the stopping criteria: the residual falls below 10 − 6 10^{-6} 1 0 − 6 or a maximum of 500 iterations is reached. The NN approximation u n ( m − 1 ) ( x ) u_n^{(m-1)}(x) u n ( m − 1 ) ( x ) at the previous time step serves as the initial guess at the current time t m t_m t m .
Singularly Perturbed Diffusion-Reaction Equation
The first test problem is the semi-linear diffusion-reaction equation in (1) with a ( x ) = ε 2 a(x)=\varepsilon^2 a ( x ) = ε 2 , r 1 ( x ) = r 2 ( x ) = 1 r_1(x)=r_2(x)=1 r 1 ( x ) = r 2 ( x ) = 1 , I = ( − 1 , 1 ) I=(-1,1) I = ( − 1 , 1 ) , and the exact solution
u ( x ) = tanh ( x 2 − 1 / 4 ε ) − tanh ( 3 4 ε ) + 1. u(x)=\tanh\left(\frac{x^2-1/4}{\varepsilon}\right)-\tanh\left(\frac{3}{4\varepsilon}\right)+1. u ( x ) = tanh ( ε x 2 − 1/4 ) − tanh ( 4 ε 3 ) + 1.
For small a = ε 2 a=\varepsilon^2 a = ε 2 , the problem has sharp interior layers of width ε \varepsilon ε . Traditional mesh-based approaches such as the finite element method often result in overshooting and/or oscillations on relatively coarse uniform meshes as shown in Figure 1 (a) for a = 10 − 7 a=10^{-7} a = 1 0 − 7 and 20 uniform mesh points (the mesh size h = 2 / 21 h=2/21 h = 2/21 ). A shallow Ritz approximation using 20 breakpoints is depicted in Figure 1 (b); clearly, there is no overshooting and no oscillation. This approximation is obtained by 300 rBN iterations with the initial breakpoints uniformly partitioning the interval I I I . Table 1 reports the relative errors in the H 1 H^1 H 1 seminorm ε n = ∥ u − u n ∥ H 1 ( I ) / ∥ u ∥ H 1 ( I ) \varepsilon_n=\left\|u-u_n\right\|_{H^1(I)}/\left\|u\right\|_{H^1(I)} ε n = ∥ u − u n ∥ H 1 ( I ) / ∥ u ∥ H 1 ( I ) for various values of n n n . For a relatively small increase in n n n , Table 1 shows that the shallow Ritz method improves accuracy significantly while the improvement of the finite element approximation is negligible.
Figure 1. (a) finite element and (b) shallow Ritz approximations for a = 10 − 7 a = 10^{-7} a = 1 0 − 7 .
Table 1. Relative errors e n e_n e n for a = 10 − 7 a = 10^{-7} a = 1 0 − 7 with fixed and moving (300 rBN iterations) breakpoints.
For n = 20 , 40 n = 20, 40 n = 20 , 40 with fixed and moving breakpoints, Table 2 reports the relative errors in the H 1 H^1 H 1 seminorm for various values of a = ε 2 a = \varepsilon^2 a = ε 2 . Again, the shallow Ritz approximations are obtained by using 300 rBN iterations. As expected, the finite element approximation deteriorates as the value of a a a decreases. For each a a a and n n n , the shallow Ritz method with rBN substantially improves the initial approximation, and the approximation accuracy is relatively robust with respect to a a a . Similar behavior was observed in [9 ] for the linear diffusion-reaction problem.
Table 2. Relative errors for n = 20 , 40 n = 20, 40 n = 20 , 40 and various a a a with fixed and moving (300 rBN iterations) breakpoints.
Allen–Cahn Equation
For the Allen–Cahn equation in § 5 , we present numerical results for two test problems. One has a manufactured solution with an interior layer, and the other has two interior layers with an unknown solution. Because the aim here is to evaluate the NN approximation within the spatial domain, a fixed time step of Δ t = 10 − 2 \Delta t = 10^{-2} Δ t = 1 0 − 2 is used for both experiments. To measure errors, we use the relative discrete ℓ 2 \ell^2 ℓ 2 and ℓ ∞ \ell^\infty ℓ ∞ errors at the final time T T T defined respectively by
e n ( 2 ) = ∥ u n ( N ) − u ( ⋅ , T ) ∥ ℓ 2 ∥ u ( ⋅ , T ) ∥ ℓ 2 and e n ( ∞ ) = ∥ u n ( N ) − u ( ⋅ , T ) ∥ ℓ ∞ ∥ u ( ⋅ , T ) ∥ ℓ ∞ . e_n^{(2)} = \frac{\lVert u^{(N)}_n-u(\cdot,T)\rVert_{\ell^2}}{\lVert u(\cdot,T)\rVert_{\ell^2}}
\qquad\text{and}\qquad
e_n^{(\infty)} = \frac{\lVert u^{(N)}_n-u(\cdot,T)\rVert_{\ell^\infty}}{\lVert u(\cdot,T)\rVert_{\ell^\infty}}. e n ( 2 ) = ∥ u ( ⋅ , T ) ∥ ℓ 2 ∥ u n ( N ) − u ( ⋅ , T ) ∥ ℓ 2 and e n ( ∞ ) = ∥ u ( ⋅ , T ) ∥ ℓ ∞ ∥ u n ( N ) − u ( ⋅ , T ) ∥ ℓ ∞ .
One Interior Layer
The first test problem for the Allen–Cahn equation is a traveling wave solution
u ( x , t ) = 1 2 − 1 2 tanh ( x − 0.5 − s t 2 2 ε ) . u(x,t)=\frac{1}{2}-\frac{1}{2}\tanh\left(\frac{x-0.5-st}{2\sqrt{2}\varepsilon}\right). u ( x , t ) = 2 1 − 2 1 tanh ( 2 2 ε x − 0.5 − s t ) .
where s = 3 ε / 2 s=3\varepsilon/\sqrt{2} s = 3 ε / 2 denotes the wave speed and ε = 10 − 2.5 \varepsilon=10^{-2.5} ε = 1 0 − 2.5 . Table 3 reports the relative H 1 H^1 H 1 seminorm errors at time T = 1 T=1 T = 1 for various values of n n n with fixed uniform and moving breakpoints. This test demonstrates that moving the mesh yields significantly more accurate approximations with fewer degrees of freedom than fixing the mesh.
Table 3. Relative errors e n e_n e n for ε = 10 − 2.5 \varepsilon=10^{-2.5} ε = 1 0 − 2.5 with fixed uniform and moving breakpoints.
Figure 2 (a) depicts the convex-splitting linear finite element approximation with n = 30 n=30 n = 30 uniform mesh points at time T = 1 T=1 T = 1 , exhibiting the usual overshooting and oscillations. A significantly improved approximation by the convex-splitting shallow Ritz method is illustrated in Figure 2 (b), where 50 rBN iterations are performed at each time step. Figure 3 plots the exact solution and numerical approximations in space and time.
Figure 2. For ε = 10 − 2.5 \varepsilon= 10^{-2.5} ε = 1 0 − 2.5 and T = 1 T = 1 T = 1 : (a) optimized NN model with 30 fixed uniform breakpoints, e n = 6.1 × 10 − 1 e_n = 6.1 \times10^{-1} e n = 6.1 × 1 0 − 1 ; (b) optimized NN model with 30 moving breakpoints, e n = 1.0 × 10 − 1 e_n = 1.0 \times10^{-1} e n = 1.0 × 1 0 − 1 .
Figure 3. Neural network approximations on fixed and moving meshes for ε = 10 − 2.5 \varepsilon= 10^{-2.5} ε = 1 0 − 2.5 and n = 30 n = 30 n = 30 .
Two Interior Layers
The second problem for the Allen–Cahn equation has periodic boundary conditions and the following initial condition
u ( x , 0 ) = tanh ( x − 1 4 2 ε ) − tanh ( x − 3 4 2 ε ) − 1 + 0.1 sin ( 2 π x ) . u(x,0)=\tanh\left(\frac{x-\frac{1}{4}}{\sqrt{2}\varepsilon}\right)-\tanh\left(\frac{x-\frac{3}{4}}{\sqrt{2}\varepsilon}\right)-1+0.1\sin(2\pi x). u ( x , 0 ) = tanh ( 2 ε x − 4 1 ) − tanh ( 2 ε x − 4 3 ) − 1 + 0.1 sin ( 2 π x ) .
Since the solution at x = 0 x=0 x = 0 and x = 1 x=1 x = 1 for t ∈ [ 0 , 1.5 ] t\in[0,1.5] t ∈ [ 0 , 1.5 ] remains close to − 1 -1 − 1 , the neural network approximation was obtained by replacing the periodic boundary condition with the Dirichlet condition u ( 0 , t ) = u ( 1 , t ) = − 1 u(0,t)=u(1,t)=-1 u ( 0 , t ) = u ( 1 , t ) = − 1 . For comparison, a reference solution is computed by a Fourier spectral method on 10 4 10^4 1 0 4 spatial points and a second-order BDF scheme [34 ] with 10 6 10^6 1 0 6 time steps for the respective spatial and temporal discretizations.
For n = 25 n=25 n = 25 , the least-squares NN approximations to u ( x , 0 ) u(x,0) u ( x , 0 ) for ε = 10 − 3 \varepsilon=10^{-3} ε = 1 0 − 3 using uniform and moving meshes are shown in Figure 4 , and the numerical solutions at T = 1.5 T=1.5 T = 1.5 for ε = 10 − 3.5 \varepsilon=10^{-3.5} ε = 1 0 − 3.5 in Figure 5 . The space-time graphs of the reference and numerical solutions are depicted in Figure 6 . We observe that the moving mesh avoids the oscillations present in the uniform mesh approximation and yields a smaller relative error e n ( ∞ ) e_n^{(\infty)} e n ( ∞ ) .
Figure 4. For ε = 10 − 3 \varepsilon= 10^{-3} ε = 1 0 − 3 and 25 breakpoints, NN approximations at the initial time t = 0 t = 0 t = 0 : (a) fixed, relative L 2 L^2 L 2 error 1.5 × 10 − 1 1.5 \times10^{-1} 1.5 × 1 0 − 1 ; (b) moving, relative L 2 L^2 L 2 error 1.7 × 10 − 3 1.7 \times10^{-3} 1.7 × 1 0 − 3 .
Figure 5. For ε = 10 − 3.5 \varepsilon= 10^{-3.5} ε = 1 0 − 3.5 and 25 breakpoints, NN approximations at the final time T = 1.5 T = 1.5 T = 1.5 : (a) fixed, e n ( ∞ ) = 9.3 × 10 − 1 e_n^{(\infty)} = 9.3 \times10^{-1} e n ( ∞ ) = 9.3 × 1 0 − 1 ; (b) moving, e n ( ∞ ) = 3.47 × 10 − 2 e_n^{(\infty)} = 3.47 \times10^{-2} e n ( ∞ ) = 3.47 × 1 0 − 2 .
Figure 6. Neural network approximations on fixed and moving meshes for ε = 10 − 3.5 \varepsilon= 10^{-3.5} ε = 1 0 − 3.5 and n = 25 n = 25 n = 25 .
Let u I ( x ) u^I(x) u I ( x ) denote the piecewise linear interpolant of the reference solution u ( ⋅ , T ) u(\cdot,T) u ( ⋅ , T ) at the final time T T T . The relative H 1 H^1 H 1 seminorm error with respect to this interpolant is defined by
e n I = ∣ u n ( N ) − u I ∣ H 1 ( I ) ∣ u I ∣ H 1 ( I ) . e_n^I = \frac{\lvert u_n^{(N)} - u^I\rvert_{H^1(I)}}{\lvert u^I\rvert_{H^1(I)}}. e n I = ∣ u I ∣ H 1 ( I ) ∣ u n ( N ) − u I ∣ H 1 ( I ) .
At the final time T = 1.5 T = 1.5 T = 1.5 , Table 4 reports the NN approximation errors for different values of ε \varepsilon ε . The results show clear improvements with the moving mesh, while the error levels remain fairly consistent across the tested values of ε \varepsilon ε .
Table 4. Relative errors for n = 25 n = 25 n = 25 and Δ t = 10 − 2 \Delta t = 10^{-2} Δ t = 1 0 − 2 with uniform and moving breakpoints.
Discussion and Conclusion
The efficient shallow Ritz method developed in [8 , 9 ] for linear diffusion-reaction problems was extended to a nonlinear problem with a cubic reaction term. A basic error estimate of the shallow Ritz method for this nonlinear problem was established in Lemma 2.1 . The lemma is similar to Céa’s lemma and holds for multi-dimensional problems (see Remark 2.2).
A reduced block Newton (rBN) method was developed for the resulting finite-dimensional non-convex optimization problem. At each iteration, a nonlinear block Gauss–Seidel method was adopted based on blocks of the linear and nonlinear parameters, and each block was solved by Newton’s method. A major contribution of rBN is to remove possible singularities of the corresponding Hessian matrix for the nonlinear parameter block when neurons do not contribute to the approximation or arrive at nearly optimal positions. Although the corresponding Hessian matrices can be inverted in O ( n ) O(n) O ( n ) operations in one dimension, an efficient solver is not yet available in multiple dimensions.
Combining the shallow Ritz method with a convex splitting scheme, we developed the convexsplitting shallow Ritz method for the Allen–Cahn equation. The method inherits the unconditional energy stability of the time discretization (see Theorem 5.3 ). An error estimate at the final time T T T in the L 2 L^2 L 2 norm was established in Theorem 5.6 . Numerical experiments confirm that the proposed approach produces stable and accurate solutions while significantly reducing errors compared to uniform mesh discretizations.
Acknowledgments. The authors gratefully acknowledge Dr. Jie Shen for providing the code used to compute the reference solution for the test problem in subsection 6.2.2. The introduction was rewritten by ChatGPT based on a draft by the authors.
References