/ tutorials / laplace-dirichlet
Sign in
tutorials / laplace-dirichlet
laplace-dirichlet / src / chapters / ch04 / text.md
4.0 KBPreviewCodeBlameHistoryRaw

A difference scheme of order pp has an error ChpC h^p: on a log-log plot, a straight line of slope −p-p. Raising pp tilts the line. The question of this chapter is what happens if pp is not fixed at all, but grows with the mesh.

Collocation with a global polynomial#

Let pp be the polynomial of degree NN that takes the unknown values u0,…,uNu_0, \dots, u_N at the N+1N+1 Chebyshev points

xj  =  12(1−cos⁡πjN),j=0,…,N,x_j \;=\; \tfrac{1}{2}\Big(1 - \cos\frac{\pi j}{N}\Big), \qquad j = 0, \dots, N,

and require −p′′(xj)=f(xj)-p''(x_j) = f(x_j) at the N−1N-1 interior points, with pp matching the boundary data at the two ends. Differentiation is linear and the nodes are fixed, so p′p' at the nodes is a matrix times the vector of nodal values. That matrix DD is the Chebyshev differentiation matrix, lp_cheb in the shared library; the discrete operator is −D2-D^2, dense and of size N+1N+1.

Two things are being given up. The matrix is dense, so a solve costs O(N3)O(N^3) rather than O(N)O(N). And the accuracy at a point now depends on the data everywhere, so there is no notion of a local truncation error, and the classical Taylor-series analysis does not apply.

What is bought is the approximation power of polynomials of high degree. For uu analytic in a neighbourhood of [0,1][0,1], the best degree-NN polynomial approximation converges geometrically, like ρ−N\rho^{-N} for some ρ>1\rho > 1 set by the size of that neighbourhood, and the collocation solution inherits that rate. The error is not CN−pC N^{-p} for any pp; on a log-log plot it is not a straight line at all, but a curve that falls away ever more steeply.

The clustering of the nodes near the endpoints is essential rather than cosmetic. Equally spaced points of the same degree produce the Runge phenomenon, and a collocation method built on them is unusable for NN beyond about 20.

Where the curve stops#

On the smooth solution the Chebyshev error falls to 10−1310^{-13} at N=64N = 64, in a fraction of a millisecond. The three-point scheme, given a hundred times as long and 1638416384 intervals, manages 10−710^{-7}. This is the pattern that makes spectral methods worth their inconvenience: when the solution is analytic and the geometry is simple, they are not a little better, they are several orders of magnitude better at the same cost.

The flat tail past N=64N = 64 is the roundoff floor again, and it arrives for the same reason as before. The two-derivative operator D2D^2 has a condition number growing like N4N^4, worse than the N2N^2 of the difference matrices, so a spectral method reaches its floor at a rather small NN. It reaches it at about 10−1310^{-13}, which is close to what double precision permits, and there is nothing to be gained by going further.

Now change the manufactured solution.

The general rule is worth stating plainly, because it survives into two dimensions and into the harder geometries of Part III: the achievable convergence rate is a property of the solution, and a method can only fail to attain it. High-order methods are how one attains it when the solution is smooth. Chapter 9, where the geometry itself forces a singularity into the solution, is about what to do when it is not.

↑↓ move↵openescclose