WorksMathematics
A fast automatically adaptive integral equation solver for nonlinear two-point boundary value systems
Abstract
We present a fast, high-order, automatically adaptive integral-equation solver for nonlinear two-point boundary value systems. The method builds on the fast direct solver for linear second-kind integral equations and completes the mathematical formulation needed for general boundary conditions, including cases in which the simplest background Green's function is singular and cases with genuinely rank-deficient boundary conditions. Nonlinear problems are written as nonlinear second-kind integral equations and are solved by combining this fast adaptive linear solver with Newton iteration and user-specified continuation. In this way the nonlinear solver inherits the full strengths of the linear integral-equation method: a fast direct solver, arbitrary order accuracy, and automatic adaptive resolution with only a small overhead over a solve on the final mesh. The resulting algorithm is particularly effective for problems with localized or multiscale structure, including boundary layers, dense oscillations, transition regions, hypersensitive optimal-control systems, and singular perturbations. The same framework also provides a computational foundation for future studies of bifurcation and solution-branch exploration.
Introduction
Many problems in science and engineering require the numerical solution of two-point boundary value problems for systems of ordinary differential equations, which take the form of
where is in , is smooth, , and . Such systems arise after rewriting high-order scalar equations, singular perturbation problems, optimal-control problems, and travelling-wave or bifurcation equations. We focus on linear boundary conditions, which already cover a large class of applications. More general nonlinear boundary conditions can in principle be handled by applying the same linearization idea to the boundary equations, but this extension is not pursued here.
The difficult regimes for two-point BVPs are often governed by local structure: boundary layers, internal transition regions, dense oscillations, and hypersensitive dynamics may occupy only a small part of the interval. Direct discretization of the differential operator must then resolve these small scales while also solving the resulting linear systems inside Newton or continuation iterations. Moreover, discretized differential operators inherit mesh-dependent conditioning; refining the mesh to resolve a layer can make the algebraic problem substantially more ill-conditioned than
Integral formulation and boundary preprocessing
the underlying continuous BVP. Continuation methods encounter the same issue repeatedly: as a parameter varies, layers and transition regions may appear or move, forcing standard differential-discretization approaches to combine path following with careful mesh adaptation and, in difficult regimes, problem-specific treatment [2, 7, 1].
Integral-equation formulations address this issue at its source. By using a background Green’s function, the BVP is converted to a second-kind integral equation, so the conditioning of the discrete system respects the conditioning of the underlying continuous problem rather than the mesh spacing. Greengard and Rokhlin developed this idea for scalar two-point BVPs [6], Lee and Greengard built an automatic adaptive solver for stiff scalar problems [8], and Leeb and Rokhlin later treated fourth-order scalar equations [9]. Starr and Rokhlin formulated and solved the first-order system case [11]: Special structure of the Green’s function gives a hierarchically off-diagonal low-rank representation, and the resulting continuous-level fast solver has linear complexity. This can be viewed as a special case of fast direct solvers, where a compressed representation of the system’s matrix is constructed once and then applied efficiently to one or many right-hand sides [10].
The system formulation of Starr and Rokhlin, however, imposed an artificial restriction in order to use the simplest background Green’s function: the matrix had to be nonsingular. This is not a solvability condition for the original BVP. The authors proposed using a manually constructed linear transform to convert a user’s boundary conditions into this form, but that requirement limits the black-box use of the algorithm. More importantly, an arbitrary manual transform may introduce artificial ill conditioning and thereby compromise the principal advantage of the integral-equation formulation.
Our first contribution is to complete the mathematical formulation for general linear boundary conditions. We give an explicit, well-conditioned-by-construction boundary transform whenever the boundary conditions are nondegenerate. When the boundary conditions themselves are truly rank deficient, we first test compatibility and then complete the boundary conditions, reducing the problem to a family of full-rank problems. In the linear case this yields the full affine solution space: a particular solution together with basis solutions for the missing boundary data. Because the Starr–Rokhlin algorithm is a fast direct solver, this solution-space computation is naturally organized as a multiple-right-hand-side solve; the expensive factorization is shared and the extra basis functions are obtained at marginal cost.
Our second contribution is to extend this completed linear solver to nonlinear systems. We formulate the nonlinear BVP as a nonlinear second-kind integral equation and use the fast adaptive linear solver as the computational kernel for Newton corrections and user-specified continuation. In this way we have coupled the fast direct solver, boundary-condition preprocessing, Newton iteration, continuation, and automatic adaptivity into a nonlinear BVP solver which inherits the essential advantages of the linear integral-equation method: well-conditioned discretizations, arbitrary order accuracy, linear complexity, and automatic adaptivity. These properties are especially valuable for nonlinear problems with localized or multiscale structure, where continuation and Newton iterations repeatedly require reliable linearized solves on evolving meshes.
The rest of the paper is organized as follows. § 2 develops the integral-equation formulation and gives the explicit boundary-condition preprocessing, including the treatment of truly degenerate boundary conditions. § 2.5 summarizes the fast direct solver and high-order Nyström discretization used for the linearized problems. § 3 and § 4 describe Newton iteration and user-specified continuation for the nonlinear integral equation, and Section 6 gives the adaptive strategy. Section 7 presents a sequence of challenging numerical examples designed to test the formulation, accuracy, scaling, adaptive efficiency, behavior on nonlinear problems with multiple solutions, and performance on singularly perturbed systems. Section 8 concludes with the role of the method in future bifurcation computations.
Integral formulation and boundary preprocessing
In this section, we develop the second-kind integral-equation formulation for two-point boundary value systems. The linear formulation serves as the computational kernel for the nonlinear solver of later sections.
Linear equations
We start with definitions and notation.
Definition 2.1 (Linear TPBVP). A linear TPBVP has the form
The equation is referred to as homogeneous if :
and the boundary condition is referred to as homogeneous if .
Definition 2.2 (Green’s function). A continuous function is referred to as the Green’s function for the BVP problem (5)(4) if:
is continuous except at .
for all .
for all , .
for all .
Remark 2.3. Assume that is the fundamental matrix of (5)(4). If is nonsingular, then the Green’s function exists and is unique [3]. Moreover, there is an unique solution for the inhomogeneous problem (5)(2):
For most variable-coefficient boundary value problems, the exact Green’s function is unavailable. We instead introduce a background problem for which the fundamental matrix and Green’s function are known. This converts the original equation with homogeneous boundary conditions into a second-kind integral equation. The construction follows [6, 11].
Definition 2.4. The background equation is a homogeneous equation with homogeneous boundary equations
with the fundamental matrix and Green’s function , satisfying is nonsingular.
Theorem 2.5. Consider the BVP
If it has a fundamental matrix such that is nonsingular, then the unique solution can be represented as
where is the solution of the second-kind integral equation
The reduction of inhomogeneous boundary data to homogeneous form depends on the processed boundary condition matrices; it is deferred to § 2.4 after the boundary-condition preprocessing.
Background equations and the artificial restriction in the simplest formulation
The simplest background equation is obtained by taking . Then the Green’s function is
and Theorem 2.5 reduces to the following corollary.
Corollary 2.6. If and is nonsingular, where is the fundamental matrix of (4) (5). Then the unique solution of (2) (5) is
where is the solution of the integral equation
Two different issues must be separated. The condition is only the condition that makes the particular background Green’s function (11) well defined; it is not a solvability condition for the original BVP. Thus an otherwise well-posed problem may be excluded for a purely artificial reason. This occurs, for example, when a second-order scalar equation with separated Dirichlet data is rewritten as a first-order system: the boundary matrices select the first component at opposite endpoints and is singular. Higher-order scalar equations with separated boundary data lead to the same phenomenon. In contrast, the condition means that the boundary conditions themselves are rank deficient. The former difficulty should be removed by a well-conditioned transform; the latter requires a compatibility check and a completion of the missing boundary data.
This distinction is essential for nonlinear problems. Newton and continuation methods repeatedly solve linearized boundary value systems with the same boundary matrices. A nonlinear solver built on the integral formulation is therefore only as general as its linear correction solver. Completing the boundary-condition formulation is what makes the fast direct linear solver a reliable kernel for the nonlinear method.
Automatic preprocessing for the case
We now give a constructive treatment of the case . This is not merely an implementation device; it completes the integral-equation formulation for general nondegenerate boundary conditions. The background problem with is attractive because its Green’s function is explicit, cheap to evaluate and leads to a well conditioned integral equation, but it is usable only when the transformed boundary matrix is invertible. The following change of variables supplies this missing ingredient.
Let
The transformed equation and boundary condition are
Thus the transformed problem can be paired with the simplest background Green’s function (11) as soon as
The following theorem shows that, except for the genuinely rank-deficient boundary conditions discussed in the next subsection, such a transformation always exists and can be constructed explicitly.
Theorem 2.7 (construction of an admissible boundary transform). Let . There exists a function such that
if and only if
or equivalently
Moreover, may be chosen as a smooth path from the identity matrix to the product of a signed permutation matrix and a nonsingular diagonal matrix.
Proof. We first prove necessity. If there exists a nonzero vector , then
for every choice of and . Hence cannot be nonsingular. Therefore an admissible transform implies (20), which is equivalent to (19) by elementary linear algebra.
For sufficiency, write the columns of and as
Condition (19) means that the columns span . Therefore there are index sets
such that
are linearly independent. Choose a permutation such that
We look for a transform satisfying and , where is the permutation matrix associated with and is diagonal. Then
Choose a scalar and set
The signs of the may be chosen arbitrarily, or chosen to improve the conditioning of the resulting matrix. With this convention,
where is the th diagonal entry of . After scaling the columns indexed by by and the columns indexed by by , the limit as is a matrix whose columns are, up to signs, the independent set
Therefore is not identically zero as a function of , and there exists a finite value of for which (17) holds. It remains to connect to inside . Decompose into transpositions,
If swaps the coordinate directions and , replace it by a smooth rotation path that is the identity on all other coordinates and has the two-dimensional block
At , this realizes the transposition up to a sign change, which can be absorbed into the diagonal matrix. Let
For the diagonal part, choose a path
where , , and never crosses zero. For positive , one may simply take
For negative , the sign can first be moved into the signed permutation part, leaving a positive diagonal path. Finally set
Then , up to the prescribed signs, is nonsingular for every , and (17) holds.
Remark 2.8. The theorem separates two issues that are often conflated. The condition means only that the particular background Green’s function (11) is not directly available. It does not indicate a defect in the boundary value problem. In contrast, failure of (19) means that the boundary condition itself is rank deficient for arbitrary boundary data. That genuinely degenerate case is treated separately in § 2.3.
Remark 2.9. The construction of in (27) uses a limiting argument. Numerically, it is unnecessary to take large in advance. We start from and double it until is nonsingular and has acceptable conditioning. In practice boundary conditions arising from physical problems are far from arbitrary, and the procedure above terminates with moderate values of in all cases we have examined; a fully general bounded construction of is straightforward should it ever be needed.
The proof is constructive and gives the preprocessing algorithm below. This step is performed once for a given pair and then reused throughout Newton iteration and continuation.
| Algorithm 2.1 Boundary-condition preprocessing for |
| Require: Boundary matrices and satisfying ; interval endpoints ; conditioning threshold . |
| Ensure: path such that . |
| 1: Select index sets and such that is a basis of . |
| 2: Choose such that . |
| 3: Decompose into transpositions . |
| 4: Replace each transposition by the rotation path (31), absorbing endpoint signs into the diagonal matrix to obtain . |
| 5: Set . |
| 6: repeat |
| 7: Form according to (27). |
| 8: Set . |
| 9: If is singular or , set . |
| 10: until is nonsingular and |
| 11: Construct by (33) and set . |
| 12: return . |
Table 2.1.
After Algorithm 2.1, the transformed problem (15)–(16) satisfies the nondegeneracy condition for the simplest background Green’s function. The integral equation formulation (12)–(13) then readily applies.
Remark 2.10. The transform not only restores the black-box property, it also preserves conditioning. Writing the linearized operator as , the second-kind equation contains , so a poor transform or background Green’s function
Truly degenerate boundary conditions
can by itself degrade conditioning. Since , , and are uniformly bounded, the original and transformed operators differ only by bounded pre- and post-composition; their condition numbers therefore differ by a constant depending on these bounds, which the construction keeps moderate.
Truly degenerate boundary conditions
The discussion above assumes . This is the regime in which arbitrary boundary data are consistent and the boundary-condition defect is only the artificial singularity of in the background Green’s function. There is also the genuinely rank-deficient case in which
In that case the boundary condition itself does not impose independent conditions on arbitrary boundary data. The original problem may be inconsistent, or it may possess a family of solutions. Examples of this category include incompletely specified endpoint data in optimal-control problems and certain free-boundary reductions. We describe a boundary-completion procedure that reduces this case to the full-rank case treated above.
Let
The boundary condition is consistent only if
Equivalently, if is an orthonormal basis of , then
Let be an orthonormal basis of . Then the effective boundary conditions are precisely
The missing boundary constraints may be supplied by an artificial completion. Choose matrices such that
has rank . Define
Then , and for each fixed artificial boundary datum , the completed boundary condition
falls into the full-rank framework of the previous subsection.
Theorem 2.11 (boundary completion for rank-deficient boundary conditions). Assume and . Let and be defined as above, with . Then a function satisfies the original boundary condition
if and only if there exists an artificial datum such that
Consequently, if denotes the solution set of the original boundary value problem and denotes the solution set of the completed problem with artificial datum , then
In particular, choosing one value of selects one representative problem from the family, while varying parametrizes the boundary degrees of freedom left unspecified by the original rank-deficient boundary condition.
Corollary 2.12 (multiple right-hand sides for the completed problem). Consider the linear boundary value problem
and assume that the compatibility condition (38) holds. Let be the number of missing boundary conditions and assume that, for the completed boundary condition , the completed BVP is uniquely solvable for each artificial datum . Let solve
and, for , let solve
where is the standard basis of . Then the solution family of the original rank-deficient boundary condition is
Equivalently, after one fast direct factorization for the completed boundary condition, the whole family is obtained by applying the solver to right-hand sides.
The multiple-right-hand-side form is not only a convenient mathematical description; it is also the fast version of the algorithm. The direct solver constructs an operator-dependent compressed representation on the adaptive tree. This representation depends on the coefficient matrix and on the completed boundary condition, but not on the particular boundary-data right-hand side. Thus the particular solve and the auxiliary homogeneous solves in Corollary 2.12 can share the same factorized operator. The additional right-hand sides are applied as a standard multiple-right-hand-side direct solve, so the dominant factorization cost is paid once and the marginal cost of the missing-boundary-data basis functions is small. The implementation of this multiple-right-hand-side solve inside the fast algorithm is described in § 2.5.
Remark 2.13. The artificial rows are not unique. A stable default is obtained by an SVD row completion. Let
and compute an orthonormal basis for the orthogonal complement of the row space of . Choose rows from to form , preferably so that is well conditioned, and split . This guarantees full boundary rank, although the completed BVP conditioning still depends on the differential equation through . The completed problem may still have , but it satisfies and can therefore be handled by Theorem 2.7.
Remark 2.14 (nonlinear rank-deficient boundary conditions). For each fixed artificial datum , the completed boundary condition defines an ordinary full-rank nonlinear BVP, and the Newton–fast-solver machinery described below applies without change. The present implementation solves a selected completed representative, by default the case , and reports the rank defect. At any fixed nonlinear iterate, however, the linearized correction problem is a linear BVP, so the affine correction space associated with the missing boundary data can be computed by the same multiple-right-hand-side machinery as in Corollary 2.12. Exploiting these affine linearized spaces to trace or parameterize the full nonlinear solution manifold is a natural subject for subsequent bifurcation and branch-following work, but is not part of the solver interface studied in this paper.
The previous cases can be summarized as a single preprocessing stage for boundary conditions.
Reduction of inhomogeneous boundary data
After the preprocessing steps above, including completion and the optional transformation , the boundary condition has the form
The inhomogeneous boundary data can then be removed exactly as in the original Starr–Rokhlin formulation. Set
Then , and writing reduces the boundary condition to
For a linear equation , this only changes the right-hand side to
For a nonlinear equation , one obtains the homogeneous-boundary problem
Algorithm 2.2 Unified boundary-condition preprocessing
Require: Boundary matrices and boundary data .
Ensure: A family of full-rank completed boundary conditions and, when needed, an admissible transform for the simplest background Green’s function.
Form and compute .
if then
Compute orthonormal bases of and of .
Check compatibility: if , report that the boundary condition is inconsistent.
Set and compute an SVD basis for .
Choose rows from to form , preferably minimizing the condition number of .
Set with artificial datum .
end if
if then
Nonlinear equations
We now turn to the nonlinear TPBVP in (1). In view of Section 2.5, it suffices to state the homogeneous-boundary case. A similar integral equation can then be established.
Corollary 2.15. Assume that the fixed linear boundary conditions have been preprocessed as above and that the inhomogeneous boundary data have been lifted out, so that the simplest background Green’s function in (11) is available. If is smooth, then solves the nonlinear equation
if and only if
where is the solution of the integral equation
The important point is that the unknown density satisfies a nonlinear second-kind equation: identity plus a compact nonlinear operator. This is the formulation on which Newton iteration, continuation, and adaptivity are built.
Fast linear solver and high-order discretization
Every Newton correction and every continuation correction in this paper reduces to a linear second-kind integral equation of the form
where is either the coefficient of a linear problem or the Jacobian of the nonlinear right-hand side along the current iterate. We solve (60) by the fast direct solver of Starr and Rokhlin for systems of two-point boundary value problems [11], together with the adaptive high-order discretization philosophy of Lee and Greengard [8]. We summarize the parts of the construction needed for the present nonlinear solver.
Let
Away from the diagonal the Green’s function can be written in rank- factorized form . Hence, if the interval is split into two adjacent subintervals, the off-diagonal restrictions of have rank at most , while the two diagonal restrictions are again integral operators of the same type on the child intervals. Thus the matrix obtained after discretization has a hierarchically off-diagonal low-rank structure, which can be exploited directly at the operator level.
Consider first a single interval bisected into two halves. A block elimination of the resulting integral equation, together with the Sherman–Morrison–Woodbury formula for its rank- off-diagonal blocks, shows that the problem decouples: the unknown on each half satisfies a local integral equation of exactly the same form as (60), and the two local solutions are then joined through a small set of coupling coefficients. The global solve on the interval therefore reduces to two independent problems of the same type, at half the size.
Applying this reduction recursively yields the fast algorithm. Let the interval be partitioned into subintervals, obtained for simplicity by recursive bisection, so that they are the leaves of a binary tree. On each leaf the local integral equation is solved independently. The coupling coefficients obey parent–child recursion relations: they are obtained by computing a few inner products of the local solutions at the leaves, followed by one upward and one downward sweep over the tree, after which the density is recovered on every leaf from its local solution and its coefficients. Concrete formulas are given in [11].
The same recursions extend to multiple right-hand sides. In the local solve stage the factorization of each leaf matrix is shared and simply applied to every right-hand side, so the dominant cost is unchanged; in the coefficient-passing stage the coupling vectors are augmented to matrices whose extra columns carry the right-hand sides and are advanced by the same parent–child relations. This gives a fast direct solver for multiple right-hand sides at minimal extra cost—precisely what the completion of § 2.3 requires.
We now describe the discretization of the local problems in this hierarchy. It is high order and naturally compatible with adaptivity. On each leaf interval we use a -point Chebyshev representation and a Nyström discretization based on Clenshaw–Curtis quadrature. Enforcing the local integral equation at the Chebyshev nodes and applying the Clenshaw–Curtis rule to the integral term yields the local dense system
where is the quadrature approximation of the Green’s-function operator on . For fixed and , both the data stored per tree node and the cost of combining two children are bounded independently of the number of active nodes; consequently the total work scales as and storage as for discretization nodes.
Increasing gives arbitrary order accuracy for smooth data, and the adaptive strategy of § 5 changes by refining only the intervals where the local error indicator is large.
Finally, the dominant cost is the solution of the local equations at the leaves, and these equations are decoupled. After a refinement or coarsening step only the modified leaves require new local solves, while the rest of the tree is reused unchanged; adaptivity is therefore naturally inexpensive.
Newton’s iteration
Assume that is continuously differentiable with respect to its first argument. After the boundary preprocessing and the reduction to homogeneous boundary conditions, the nonlinear BVP is written in density form as
The associated solution is . The Fréchet derivative of at is
Thus Newton’s method computes the density correction from
and updates
Equation (65) is again a linear second-kind integral equation of the form (60), with , where denotes the Jacobian of with respect to its first argument. It is solved by the fast direct solver of § 2.5.
Equivalently, with , equation (65) is the Newton correction for the differential residual,
The numerical method nonetheless solves the density equation (65): on each leaf it is discretized by the same local system (62), now with , rather than by discretizing the differential operator (67) directly.
The standard Newton–Kantorovich theory applies to (63); see, for example, [2, 7, 5]. In particular, if is a solution, is invertible, and the initial density is sufficiently close to , then the iterates remain in a neighborhood of and converge quadratically. In practice, this local nature of Newton’s method motivates the continuation strategy described in the next section.
Continuation strategy
Newton’s method is a local method: its fast convergence is obtained once the iterate lies in the basin of attraction of the desired solution. We therefore use continuation as a practical outer strategy: a difficult target problem is reached through a sequence of easier nearby BVPs, and the solution from one stage supplies the initial guess for the next. Let
denote the target nonlinear integral equation. A user-specified homotopy is a family of nonlinear equations
such that the problem at is easy to solve and
Typical choices include continuation in a physical parameter, continuation in boundary data, continuation in the forcing term, or continuation in the strength of the nonlinear term.
Strategy for adaptivity
The local mathematical justification is the standard implicit function theorem; see, e.g., [2, 1]. If there exists a smooth solution path and the linearized operator is invertible along the path, then the solution can be continued locally in . At each step, a predictor provides an initial guess at the next parameter value and Newton’s method is used as a corrector. Each Newton correction has the same second-kind integral form as (65) and is solved by the fast adaptive direct linear solver described in § 2.5.
For boundary value problems, continuation often creates or reveals multiscale structure: as varies, boundary layers, transition layers, and oscillatory regimes may appear even when the starting problem is benign [2, 1]. In collocation or finite-difference methods this couples the continuation step size strongly to mesh adaptation. In the integral formulation every correction equation remains a second-kind equation and the adaptive tree refines and coarsens only where necessary, so the mesh tracks the evolving solution without accumulating refinement; the mechanism is described in § 5.
In the implementation used for the numerical examples, the continuation schedule is supplied by the user. If , then the solution at is used as the initial guess for Newton iteration at . A simple version of the procedure is given in Algorithm 5.1.
Algorithm 5.1 User-specified continuation with Newton correction
Require: Homotopy , parameter values , initial solution at .
for do
Set the initial guess at to be the solution at .
repeat
Form the Newton correction equation for .
Solve the resulting linear second-kind integral equation by the fast adaptive solver.
Update the density and the corresponding solution.
until the nonlinear residual or Newton correction is below tolerance
end for
return the solution at .
The fast adaptive integral-equation solver described here is the computational kernel that carries out the Newton and continuation corrections. Its well-conditioned formulation, linear complexity, arbitrary order accuracy, and automatic adaptivity are properties of the integral-equation substrate, and they are inherited without change by any outer continuation or bifurcation algorithm built on top of it: pseudo-arclength continuation, fold detection, nullspace computation, and branch switching add outer control logic without altering the kernel or its cost. The kernel and the outer continuation framework therefore operate at distinct levels, making the present contribution orthogonal to, and directly compatible with, techniques such as those in AUTO.
Strategy for adaptivity
The adaptive strategy follows the philosophy of Lee and Greengard [8] but is extended to the nonlinear case: local polynomial representations are inspected a posteriori, and the interval tree is refined or coarsened until local solutions on all leaf intervals are resolved. On each leaf interval , each component of the density or solution is represented in a Chebyshev basis of order ,
For smooth functions, the decay of the Chebyshev coefficients provides a sharp and inexpensive resolution indicator; see, for example, the approximation theory viewpoint in [12]. In the implementation we use the Lee–Greengard tail quantity componentwise. If
then the monitor for component on interval is
For systems, refinement is triggered if any component exceeds its threshold, and coarsening is accepted when all component monitors are small. The tail monitor is more than a refinement heuristic: the following theorem shows that resolvedness of the density implies accuracy.
Theorem 6.1 (resolvedness implies accuracy, after [8]). Represent the density on each leaf by a Chebyshev expansion of order with coefficients , and suppose that, for every leaf ,
Then the computed density satisfies the relative error bound
where is the condition number of the integral operator .
Remark 6.2. Theorem 6.1 shows that local resolvedness is a sufficient condition for accuracy, so the tail monitor of (73) inherits the same status. The estimate uses the fact that is a compact perturbation of the identity; it is not readily available when the differential operator is discretized directly, because that operator is unbounded. The same perturbation argument applies componentwise to systems and yields the analogous bound.
Numerical results
For linear problems, this is the direct system analogue of the Lee–Greengard adaptivity criterion. One could in principle maintain separate trees for different components of the vector solution, but this only changes the number of discretization points by a constant factor. For simplicity, we use a single tree and require all components to be resolved on every leaf. If one of the component monitors is too large, the interval is bisected. Coarsening is applied by merging sibling leaves when the merged representation is also resolved by the same tail criterion. The result may retain a small amount of over-refinement, but it avoids oscillatory refine–coarsen behavior and has been robust in the examples.
For nonlinear problems, adaptivity is inherited from the linear correction solver but is applied to the nonlinear state. At each Newton step, and at each continuation parameter value, the terminal mesh of the previous solve is used as the initial mesh for the next correction equation. Since the Newton update is , the quantity that must be resolved is the updated density , not the correction alone. The monitors are therefore computed from using the same componentwise Lee–Greengard tail criterion, and refinement and coarsening are applied by the two-sided rule above. The outer adaptivity control stops when two consecutive resolved approximations agree in the mixed relative norm
with a fallback to when the denominator is small. In contrast with the final mesh-doubling check used in some purely linear adaptive solvers, the nonlinear correction solve does not automatically double the terminal mesh after local convergence, which would propagate unnecessary refinement through Newton and continuation steps. Instead, the local Chebyshev tail monitors drive the mesh as the nonlinear iteration proceeds.
The resulting strategy is automatic: no a priori information is supplied by the user. The mesh is concentrated in physically active regions and remains coarse where the solution is smooth or nearly constant. A schematic version is given in Algorithm 6.1.
Algorithm 6.1 Adaptive refinement by Chebyshev tail estimates
Require: Current interval tree, Chebyshev order , tolerance .
repeat
Solve the current correction equation on the active tree.
Form the quantity to be resolved: the density for a linear problem, or for a nonlinear correction.
for all leaf intervals do
Compute Chebyshev coefficients and component monitors from (73).
if any component monitor exceeds its threshold then
Mark for bisection.
end if
end for
Bisect all marked leaves and update the tree data.
Merge sibling leaves whose combined representation is resolved by the same criterion.
until the mixed relative change (76) is below and no leaf is marked for refinement
Numerical results
We now illustrate the performance of the method on a sequence of examples designed to test different aspects of the solver: adaptive resolution of boundary layers, robustness on long intervals, continuation through multiple solution branches, and singularly perturbed nonlinear behavior. Unless otherwise stated, the discretization order is fixed and the adaptive tree is generated automatically.
Shock-wave boundary layer and adaptive fast scaling
The first example is the viscous shock-wave problem used by Lee and Greengard [8] to illustrate adaptive refinement for a stiff scalar BVP,
with . The exact solution is
Introducing the usual first-order variables
we obtain the system
This separated Dirichlet boundary condition is a simple but important case in which the matrix for the simplest background Green’s function is singular. The preprocessing step constructs an admissible boundary transform automatically. For this example the transform is especially benign: sampling on the interval gives in our diagnostic, so the preprocessing removes the artificial singularity of without degrading the conditioning of the problem.
We first test the fixed-mesh direct solver. Starting from the two intervals and , we manually bisect the two intervals adjacent to the layer at and feed the resulting boundary-layer mesh to the nonadaptive system solver. The number of bisections ranges from 3 to 7. Table 7.1 reports the total number of discretization nodes , the total time , the fraction of time spent in the local leaf solves, and the maximum error against the exact solution.
| bisections | intervals | (s) | local fraction | max error | |
| 3 | 8 | 128 | 0.013466 | 0.489 | |
| 4 | 10 | 160 | 0.013345 | 0.598 | |
| 5 | 12 | 192 | 0.015501 | 0.613 | |
| 6 | 14 | 224 | 0.016577 | 0.674 | |
| 7 | 16 | 256 | 0.018132 | 0.699 |
Table 7.1. Fixed-mesh nonadaptive shock-wave solves. The local fraction is included explicitly because this stage is the dominant cost as the mesh is refined.
Figure 7.1 plots against . The measured time is approximately linear over this range, as expected for the direct solver with fixed system size and fixed Chebyshev order.
Figure 7.1. Fixed-mesh shock-wave solve time versus the number of discretization nodes. The dashed curve is a least-squares linear fit through the origin.
We next test the adaptive solver. Starting from only the two initial intervals and , the adaptive run produces a final mesh with 28 intervals and maximum error . The adaptive run takes seconds. Running the nonadaptive solver once on this final adaptive mesh takes seconds and gives the same error. Thus the ratio between the fully adaptive calculation and the direct solve on the final mesh is approximately
This is the expected behavior for an efficient adaptive strategy: the code finds the resolving mesh automatically at a cost only a small constant factor larger than a single solve on the final mesh, while requiring no a priori knowledge of the layer width.
A truly degenerate boundary condition
The next example isolates the completion procedure for genuinely rank-deficient boundary conditions while keeping the differential equation elementary. Consider the four-dimensional homogeneous system
with only two independent boundary conditions,
Thus . The exact solution set is the two-parameter affine family
The full-space interface first completes the boundary condition, solves the particular problem and the two auxiliary homogeneous problems using a shared multiple-right-hand-side direct solve, and returns a particular solution together with two basis functions. We compare this with a non-shared implementation which applies the completed boundary conditions and calls the single-RHS solver independently for the particular datum and the two auxiliary data. The results are shown in Table 7.2. Both approaches recover the exact affine family to roundoff accuracy, but the shared multiple-RHS version is almost five times faster for this small test.
| quantity | value |
| nullity of boundary condition | 2 |
| fast full-space time | |
| independent single-RHS time | |
| time ratio | 4.76 |
| solution-space error | |
| free-component basis determinant | 1 |
Table 7.2. Truly degenerate boundary condition example. The fast full-space interface shares the direct-solver factorization across the particular and auxiliary right-hand sides.
This confirms the practical value of the completion formulation in § 2.3: the solver can automatically process a rank-deficient boundary condition, return the affine solution space in the linear case, and exploit the direct solver’s multiple-right-hand-side structure rather than solving each completed problem independently.
Nonlinear mass-spring optimal control
The third example is a nonlinear optimal-control problem for a spring-mass system. It tests two features of the solver which are absent from the preceding linear examples: the use of Newton corrections for a genuinely nonlinear system, and automatic mesh refinement for a solution with sharp endpoint transitions on long time intervals. The spring force is
where is the unstretched position, and the scalar control force is denoted by . The control problem is to minimize
subject to
With adjoint variables and , the Hamiltonian is
Eliminating the control by the optimality condition gives the first-order BVP
This is the system solved by the code, with the control recovered from the optimality condition inside the right-hand side evaluation.
The solution develops rapid transitions near the endpoints while remaining nearly flat over much of a long interval. We use order and the simple initial guess . The resulting solution and adaptive mesh are shown in Figure 7.2. For , the final mesh contains 30 subintervals, with refinement concentrated near the endpoint transition regions.

Figure 7.2. Solution of the nonlinear optimal-control BVP (89). Green vertical lines indicate adaptive subintervals.
The same algorithm also applies on much longer time intervals. We tested intervals from to ; mesh counts and run times are reported in Table 7.3. The mesh count grows slowly compared with the length of the interval because most of the interior remains smooth and nearly constant.
| interval | mesh intervals | runtime (s) |
| 47 | 13.87 | |
| 38 | 9.406 | |
| 36 | 6.984 | |
| 30 | 5.609 | |
| 15 | 3.594 |
Table 7.3. Mesh counts and run times for the nonlinear mass-spring optimal-control problem on increasingly long time intervals.
Since no closed-form solution is available for this optimal-control system, we use a self-convergence check for the longest interval reported in the figure, . The baseline computation starts from the two-interval initial mesh. We then take the adaptive terminal mesh, manually double every final subinterval once, and rerun the solver on this refined mesh. Comparing the two solutions on the same target grid gives
The maximum differential residual on the target grid is , and the boundary residual is . Thus the adaptive nonlinear solve is self-converged and satisfies the differential and boundary equations to near machine precision.
With the default merge safety factor, the mesh can retain mild over-refinement. In Figure 7.2, for instance, the solution is nearly zero on a long interior interval, yet a few subintervals remain from earlier Newton refinements. This has little effect on the total cost in the present examples, but more aggressive coarsening is a possible improvement.
Elliptic Jacobi problem
This system was used in [11] to demonstrate the effectiveness of integral equation methods for systems. We revisit it here for a different purpose: the problem has multiple solution branches, and Newton iteration can be sensitive to the initial guess and mesh resolution. It therefore provides a useful test of the continuation and adaptive components of the present solver. Jacobi elliptic functions arise in, for example, the motion of a pendulum and satisfy the system
where is fixed to be in our experiments, and is the complete elliptic integral of the first kind,
is an even number.
Following [11], one natural initial guess is obtained from the case , namely , , and . With this initial guess, the present method solves (91) with to about accuracy; see Figure 7.4(a),(b). For larger , Newton’s method may fail if the initial mesh is too coarse. This sensitivity is related to multiple solution branches and a complicated basin of attraction. To see the source of nonuniqueness, consider the initial value problem

Figure 7.4. (a) Fine initial guess, . (b) Fine initial guess, . (c) Newton method, , . (d) Continuation method, , . (e) First continuation scheme, . (f) Second continuation scheme, . Numerical solutions for (91). All solved in precision. (a): Solution with fine initial guess, ; (b): Solution with fine initial guess, ; (c): Solution for without continuation, ; (d): Solution for under continuation method, ; (e): Solution for under the first continuation scheme; (f) Solution for under the second continuation scheme.
Its solution can be expressed as , , and , with . Such a solution also satisfies the boundary value problem precisely when the boundary condition on is met. Numerically, additional solutions appear as grows; see Figure 7.3.

Figure 7.3. The plot has on the horizontal axis and on the vertical axis. A solution to the boundary value problem corresponds to a point where . Solutions for and are displayed in the figure.
We use continuation both to reduce the dependence on the initial guess and to probe different solution branches. In the experiments below, and . For , the direct Newton iteration, the continuation method, and the trigonometric initial guess converge to different solutions, as shown in Figure 7.4(a),(c),(d). We do not attempt an exhaustive enumeration of all branches; the point is that different initial guesses and continuation paths can lie in different basins of attraction and therefore lead to distinct solutions, while the adaptive integral-equation solver can still resolve the resulting branches to high accuracy. This example illustrates why a reliable fast solver for the linearized correction equations is a useful computational foundation for subsequent bifurcation and branch-following calculations.
For , the trivial initial guess does not converge without continuation. To obtain solutions for , we tested two continuation schemes:
In the first approach, is continued from an initial value of 0 to 0.5 while holding fixed at ;
In the second approach, the same continuation on is performed with varying, .
Results are shown in Figure 7.4, (e) and (f).
Troesch equation
7.5. Troesch equation. Troesch’s problem is a classical nonlinear two-point boundary value problem with a sharp right boundary layer for large positive :
We use the first-order formulation
The large-parameter regime is a demanding test for nonlinear BVP solvers. The regular solution develops an increasingly thin layer near , and direct use of standard collocation solvers such as MATLAB’s bvp4c with simple initial guesses is not reliable in this regime. Large-parameter Troesch computations are therefore often treated with carefully designed continuation, mesh selection, or problem-specific techniques; see, for example, [4, 13, 14].
Troesch equation
For this problem an analytic representation in terms of elliptic functions is available and can be evaluated to high precision. Let , , and . The first integral is
The regular branch is given by
where and is the elliptic parameter. The boundary condition determines through
where is the incomplete elliptic integral of the first kind. In the numerical comparisons below this scalar equation is solved in , and the reference solution is evaluated with mpmath using 100 decimal digits of working precision. Recomputing selected values at higher precision confirms at least 50 correct digits in the reference data.
Nonlinear Singularly Perturbed BVP
Let denote the numerical solution and the high-precision reference. For or and or , we report
The maximum in the mixed norm is sampled on 10,000 equally spaced points; the term avoids an artificial blow-up where the exact solution is small. We also report the absolute derivative error at the left endpoint and the relative derivative error at the right endpoint,
where is the second component of the computed first-order state.
We first compare direct Newton iteration at with a simple continuation path , using tolerance throughout. Both runs satisfy the internal Newton stopping criterion, but only the continuation run reaches the high-precision reference to nearly full accuracy; see Table 7.4.
| Method | ||||||
| Direct Newton | ||||||
Table 7.4. Effect of continuation for with tolerance . Maximum errors use the 10,000-point grid in (98); endpoint errors are defined in (99).
The direct run no longer behaves reliably when the tolerance is tightened to , indicating convergence to a nearby numerical profile rather than to the regular branch at the requested accuracy. The continuation path supplies a more accurate initial state for the target parameter and removes this failure.
Table 7.5 reports the four tests on , , , and . We use direct Newton at and continuation on others; each sequence uses the target tolerance listed in the table at every stage.
| Tolerance | |||||||
| 10 | |||||||
| 20 | |||||||
| 30 | |||||||
| 40 |
Table 7.5. Reference-solution errors for the four Troesch tests. The derivative approximation is the second physical state component . The last two columns give the absolute derivative error at and relative derivative error at .
For and , the final adaptive meshes contain 162 and 1727 subintervals, respectively, with smallest lengths approximately and . The hardest case therefore drives the finest spacing close to the limits of double precision. The deterioration of the forward error in this regime is consistent with the severe conditioning of the large-parameter Troesch problem rather than with a failure to resolve the boundary layer.
Nonlinear Singularly Perturbed BVP
The final example is a nonlinear singularly perturbed BVP with boundary layers near both endpoints. The scalar equation is
We write it as the first-order system
with boundary condition . As decreases, the solution develops increasingly sharp endpoint transitions. Starting Newton’s method from the zero initial guess fails for small , so we use continuation in . Figure 7.5 shows the solutions for , computed sequentially to a tolerance of . The vertical lines show the adaptive mesh for one representative continuation stage; Table 7.6 reports the terminal grid after each continuation solve in the current run.

Figure 7.5. Solutions of the nonlinear singularly perturbed problem (101) for different values of , computed by continuation.
| continuation stage | intervals | ||
| 1 | 4 | ||
| 2 | 6 | ||
| 3 | 10 | ||
| 4 | 14 |
Table 7.6. Evolution of the terminal adaptive mesh along the continuation path for the nonlinear singular perturbation example. The largest interval remains in these runs, while the smallest interval decreases as the endpoint layers sharpen.
This example also illustrates the interaction between continuation and adaptivity. Continuation reduces the number of Newton iterations required to reach the final state and therefore avoids the accumulation of unnecessary refinements from poor intermediate iterates. In this sense, a suitable continuation path improves both nonlinear convergence and mesh selection.
Conclusion
In this paper, we have presented a fast automatically adaptive solver for nonlinear two-point boundary value systems. The main idea is to formulate
Conclusion
the nonlinear problem as a nonlinear second-kind integral equation and to solve each Newton or continuation correction with a fast direct solver for the corresponding linear second-kind equation. A central message is that progress on fast direct integral-equation solvers for linear BVPs is not confined to linear problems: once the boundary formulation is completed and the linear solver is embedded in Newton, continuation, and adaptive refinement loops, its favorable properties are inherited by a nonlinear solver. The resulting method retains the well-conditioned nature of integral equations, high-order local Chebyshev discretization, linear complexity in the number of mesh points for fixed system dimension and local order, and automatic concentration of degrees of freedom near localized features.
The method is designed for the difficult regimes that motivate adaptive BVP solvers: boundary layers, rapid oscillations, long intervals with localized dynamics, singular perturbations, hypersensitive optimal-control systems, and problems whose boundary conditions are degenerate for the simplest background Green’s function. The boundary-condition preprocessing makes the formulation applicable to general first-order systems, including high-order scalar equations after conversion to system form. The numerical examples demonstrate high accuracy with strongly nonuniform meshes selected automatically.
The next step is to use the solver as a computational kernel for bifurcation and solution-branch exploration. The continuation framework already separates the path-following logic from the fast linearized solves, which makes it suitable for detecting multiple solutions and following branches through parameter space. Further work will focus on robust Newton globalization, branch switching, and eventually a fast robust method for the computation of folds and solution branches.
Acknowledgements. We would like to thank Leslie Greengard, Charles Epstein, and Manas Rachh for many helpful discussions. The authors were supported in part by National Key Research and Development Program of China under grant 2023YFA1008902, and in part by the National Natural Science Foundation of China under grant 12301515.
References
- [1]Eugene L. Allgower and Kurt Georg. Introduction to Numerical Continuation Methods. Society for Industrial and Applied Mathematics, 2003.DOI
- [2]Uri M. Ascher, Robert M. M. Mattheij, and Robert D. Russell. Numerical Solution of Boundary Value Problems for Ordinary Differential Equations. Society for Industrial and Applied Mathematics, 1995.DOI
- [3]G. A. Bliss. A boundary value problem for a system of ordinary linear differential equations of the first order. Transactions of the American Mathematical Society, 28:561–589, 1926.
- [4]Shih-Hsiang Chang. A variational iteration method for solving troesch’s problem. Journal of Computational and Applied Mathematics, 234(10):3043–3047, 2010.DOI
- [5]Philippe G. Ciarlet and Cristinel Mardare. On the newton–kantorovich theorem. Analysis and Applications, 10(03):249–269, 2012.DOI
- [6]L. Greengard and V. Rokhlin. On the numerical solution of two-point boundary value problems. Communications on Pure and Applied Mathematics, 44(4):419–452, June 1991.
- [7]Herbert B. Keller. Numerical Solution of Two Point Boundary Value Problems. Society for Industrial and Applied Mathematics, 1976.
- [8]J. Y. Lee and L. Greengard. A fast adaptive numerical method for stiff two-point boundary value problems. SIAM Journal on Scientific Computing, 18(2), 03 1997.DOI
- [9]William Leeb and Vladimir Rokhlin. On the numerical solution of fourth-order linear two-point boundary value problems. SIAM Journal on Scientific Computing, 42(3):A1505–A1531, 2020.arxiv.org/abs/1711.05354
- [10]Per-Gunnar Martinsson and Vladimir Rokhlin. A fast direct solver for boundary integral equations in two dimensions. Journal of Computational Physics, 205(1):1–23, 2005.
- [11]Page Starr and Vladimir Rokhlin. On the numerical solution of two-point boundary value problems ii. Communications on Pure and Applied Mathematics, 47:1117–1159, 1994.DOI
- [12]Lloyd N. Trefethen. Approximation Theory and Approximation Practice. Society for Industrial and Applied Mathematics, 2013.
- [13]Hector Vazquez-Leal, Yasir Khan, Guillermo Fernandez Anaya, Agustin Herrera-May, Arturo Sarmiento-Reyes, Uriel F. UrielFobello-Nino, Victor-M. Jimenez-Fernandez, and Dennis Pereyra Diaz. A general solution for troesch’s problem. Mathematical Problems in Engineering, 2012, 2012.
- [14]Maha Youssef and Gerd Baumann. Troesch’s problem solved by sinc methods. Mathematics and Computers in Simulation, 162:31–44, 2019.DOI
