Collocation and Relaxation Methods
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal additional columns.
Scrollable figure. Use Left and Right arrow keys to inspect hidden content.
Collocation solves a boundary-value problem as one coupled nonlinear system rather than integrating from one end. Unknown values or polynomial coefficients across the entire interval are adjusted until the differential equation and all boundary conditions are satisfied together. This avoids the directional instability of shooting, but introduces new obligations: residuals between collocation points, mesh adequacy, nonlinear branch selection, and matrix conditioning must all be measured.
Required background. Ordinary Differential Equations supplies boundary-value problems, interpolation, Newton iteration, and residuals.
Helpful background. Formulations of General Relativity provides relativistic systems that generate nonlinear radial equations, while Partial Differential Equations and Green Functions supplies separated boundary operators and elliptic intuition.
Global enforcement on a mesh
Section titled “Global enforcement on a mesh”Write a first-order system as with boundary residual . A collocation method represents by piecewise polynomials and imposes the ODE at selected nodes,
together with the boundary equations. Newton or a damped quasi-Newton iteration solves the resulting algebraic system. Relaxation is the same global idea expressed in finite-difference variables: update all mesh values at once from the linearized residual.
Because by construction, the collocation-node residual is not an error estimate. Evaluate on an independent denser grid or integrate a residual norm. Adaptive schemes refine intervals whose defect exceeds a tolerance. Polynomial collocation and higher-order implementations are developed in Ascher, Mattheij, and Russell 1995, Chapter 5 § 5.4, pp. 218–225, and §§ 5.6.2–5.6.4, pp. 247–265; error estimation, adaptive meshes, linear solves, and nonlinear iteration in a concrete solver are described in Ascher, Christiansen, and Russell 1979, §§ 2–7, pp. 662–676.
Bratu’s two branches
Section titled “Bratu’s two branches”Use the nonlinear benchmark
with . An analytic family is
Differentiating this expression gives , while . The parameter relation therefore makes the differential residual vanish, and the evenness of gives both boundary values. This verifies the family without relying on a solver.
For the two positive roots are approximately and . Their central values are approximately and . Initialize the first-order state once with and once with . These guesses distinguish the small and large solutions; a guess peaks at only one and can converge to the lower branch again. A guess is not a guarantee: identify the returned branch by its central value and compare with the exact family. Report the maximum solution error, independently sampled differential residual, boundary residual, Newton iterations, mesh size, and condition estimate. The two-solution test is also illustrated in the SciPy solve_bvp documentation, Examples, Bratu problem.
The branch is part of the input. A nonlinear solver that returns the lower branch from both guesses has not reproduced the upper solution, even if its residual is small. The fold follows from , or : it occurs at and . Ordinary continuation in encounters a singular linearization there. Pseudo-arclength continuation instead augments the equations by a condition on distance along the solution curve, allowing the parameter to turn with the branch.
The figure makes the ambiguity visible: the line intersects the solution curve twice. Follow those two points to the two profiles; both satisfy the same endpoint conditions.
Exact dimensionless Bratu solutions for with . At , the central values are approximately and ; the branches meet at . These curves are evaluated from the analytic family, not fitted to solver output. Their labels make no claim about dynamical stability.
Refinement and independent comparison
Section titled “Refinement and independent comparison”Repeat both branches from uniform initial meshes with 5, 9, and 17 nodes at tolerances , , and , allowing at most 10,000 nodes. Evaluate residuals on a separate uniform 4001-point grid. Refine polynomial order and mesh spacing separately if the software permits it. Convergence requires decreasing solution error and off-grid residual on both branches. Repeat the finest case with at least 100-bit arithmetic to distinguish discretization error from a roundoff plateau.
Compare one branch with multiple shooting using the exact same boundary conditions and norm. Shooting and collocation have different numerical failure mechanisms, so agreement is useful. The directional sensitivity of shooting, against which the global solve is contrasted, is analyzed in Ascher, Mattheij, and Russell 1995, Chapter 3 § 3.4, pp. 110–126. An independent dense-grid substitution of the analytic solution supplies an additional benchmark that does not reuse either solver.
For problems on a compactified or singular domain, vary the domain map and endpoints. A residual weighted by the map Jacobian can hide endpoint contamination if only the computational coordinate is inspected. State which norm is physical and which is computational.
Environment and failure diagnostics
Section titled “Environment and failure diagnostics”Pin the boundary-value library and version, interpolation degree, mesh-adaptation rule, nonlinear solver, Jacobian source, linear solver, arithmetic precision, tolerance definitions, maximum nodes, initial mesh, and initial guess. A clean rerun executes both Bratu branches, exports mesh and polynomial coefficients, evaluates an independent residual grid, and records refinement, precision, and initial-guess sweeps in machine-readable form.
The validity regime assumes a sufficiently smooth solution on each mesh interval and a nonsingular linearization away from the fold. Principal failure modes are maximum-node exhaustion, a singular Jacobian, damping stagnation, branch jumping, and a small node residual paired with a large between-node defect. Also reject apparent convergence when only the boundary residual improves, when the result changes substantially with a domain map, or when the adaptive mesh piles nodes at an unmodeled singularity.
Check your understanding
Section titled “Check your understanding”A Bratu run reports zero residual at every collocation node and satisfies both boundaries, but a dense independent grid finds a residual of between nodes. Has the requested tolerance been met?
Solution
No. The equations used to determine the polynomial vanish at the collocation nodes almost by definition. The off-grid defect shows that the polynomial or mesh is inadequate. Refine the mesh or order, repeat the independent residual norm, and verify convergence to the same analytic branch before accepting the solution.
References
Section titled “References”- Ascher, U. M., Christiansen, J., and Russell, R. D. (1979), “A Collocation Solver for Mixed Order Systems of Boundary Value Problems,” Mathematics of Computation 33, 659–679. DOI.
- Ascher, U. M., Mattheij, R. M. M., and Russell, R. D. (1995), Numerical Solution of Boundary Value Problems for Ordinary Differential Equations, SIAM. DOI.
- SciPy developers (n.d.), “
scipy.integrate.solve_bvp,” SciPy Reference Guide, Examples: Bratu problem. Documentation.
Further reading
Section titled “Further reading”- Virtanen, P., et al. (2020), “SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python,” Nature Methods 17, 261–272. DOI.