Abstract: We describe a framework for solving a broad class of infinite-dimensional linear equations, consisting of almost banded operators, which can be used to represent linear ordinary differential equations with general boundary conditions. The framework contains a data structure on which row operations can be performed, allowing for the solution of linear equations by the adaptive QR approach. The algorithm achieves $O(n^{\rm opt})$ complexity, where $n^{\rm opt}$ is the number of degrees of freedom required to achieve a desired accuracy, which is determined adaptively. In addition, special tensor product equations, such as partial differential equations on rectangles, can be solved by truncating the operator in the $y$-direction with $n_y$ degrees of freedom and using a generalized Schur decomposition to upper triangularize, before applying the adaptive QR approach to the $x$-direction, requiring $O(n_y^2 n_x^{\rm opt})$ operations. The framework is implemented in the ApproxFun package written in the Julia programming language, which achieves highly competitive computational costs by exploiting unique features of Julia.
1. Introduction
In classical numerical analysis, solving a linear differential equation typically follows a "discretize-then-solve" workflow. This involves approximating a continuous operator with a finite $N \times N$ matrix using methods like finite elements or collocation. However, this approach requires deciding on the resolution $N$ before solving, which often leads to either wasted computation or insufficient accuracy.
This paper introduces a framework that treats operators as truly infinite-dimensional objects. By utilizing lazy evaluation and adaptive QR factorizations, the system determines the necessary resolution automatically as the solver progresses, achieving optimal $O(n)$ complexity and machine-precision accuracy.
2. Methods
The core of the framework is a software architecture implemented in the Julia programming language (the ApproxFun package). It relies on several key technical components:
2.1 Lazy Evaluation and Operator Algebra
Operators, such as differentiation ($\mathcal{D}$) or multiplication by a function, are represented as data structures where entries of $\infty \times \infty$ matrices are only computed when requested. The framework allows users to build complex operators using standard algebraic syntax (e.g., $A + B$ or $A * B$), creating a tree of operators that the solver traverses lazily.
2.2 Adaptive QR Approach
To solve the system $Au = f$, the framework uses Givens rotations to perform an infinite-dimensional QR factorization. It processes the matrix column-by-column until the coefficients of the solution $u$ decay below a target tolerance. This ensures the algorithm converges to the "minimal solution"—the one where coefficients decay the fastest, corresponding to the physically meaningful solution in functional analysis.
3. Key Results
The framework demonstrates high performance and optimal scaling across standard mathematical benchmarks, such as linear ODEs and the Helmholtz equation.
3.1 Computational Complexity and Scaling
The solver achieves $O(n^{\text{opt}})$ complexity for ODEs, where $n^{\text{opt}}$ is the minimum number of degrees of freedom required for the desired accuracy. For PDEs on rectangles, the computational time scales linearly with the number of degrees of freedom in the $x$-direction ($n_x$), as shown in experimental performance plots.
3.2 Performance Benchmarks
By leveraging Julia’s multiple dispatch and just-in-time (JIT) compilation, the framework generates highly optimized machine code. In practice, the system solved a Helmholtz PDE with 2.5 million unknowns in less than 4 seconds on standard hardware.
4. Conclusion
This infinite-dimensional approach provides a practical and efficient alternative to traditional discretization methods. While currently optimized for rectangular domains, future work involves extending the framework to complex geometries and non-linear differential equations, as well as developing infinite-dimensional variants of the QL algorithm for spectral analysis.
Summary updated