Runge's phenomenon

From HandWiki
Short description: Failure of convergence in interpolation
The Runge function (red, highest central peak); the 5th-order interpolating polynomial with equally spaced interpolating points (blue, lowest central peak); and the 9th-order interpolating polynomial with equally spaced interpolating points (green, medium central peak). The oscillations at the interval boundaries increase with higher polynomial order.

In the mathematical field of numerical analysis, Runge's phenomenon (German: [ˈʁʊŋə]) is a problem of oscillation at the edges of an interval that occurs when using polynomial interpolation with polynomials of high degree over a set of equispaced interpolation points. It was discovered by Carl David Tolmé Runge (1901) when exploring the behavior of errors when using polynomial interpolation to approximate certain functions.[1] The discovery shows that going to higher degrees does not always improve accuracy. The phenomenon is similar to the Gibbs phenomenon in Fourier series approximations.

Introduction

The Weierstrass approximation theorem states that for every continuous function f(x) defined on an interval [a,b], there exists a set of polynomial functions Pn(x) for n=0, 1, 2, ..., each of degree at most n, that approximates f(x) with uniform convergence over [a,b] as n tends to infinity, that is,

[math]\displaystyle{ \lim_{n \rightarrow \infty} \left( \sup_{a \leq x \leq b} \left| f(x) -P_n(x)\right| \right) = 0. }[/math]

Consider the case where one desires to interpolate through n+1 equispaced points of a function f(x) using the n-degree polynomial Pn(x) that passes through those points. Naturally, one might expect from Weierstrass' theorem that using more points would lead to a more accurate reconstruction of f(x). However, this particular set of polynomial functions Pn(x) is not guaranteed to have the property of uniform convergence; the theorem only states that a set of polynomial functions exists, without providing a general method of finding one.

The Pn(x) produced in this manner may in fact diverge away from f(x) as n increases; this typically occurs in an oscillating pattern that magnifies near the ends of the interpolation points. The discovery of this phenomenon is attributed to Runge.[2]

Problem

Consider the Runge function

[math]\displaystyle{ f(x) = \frac{1}{1+25x^2}\, }[/math]

(a scaled version of the Witch of Agnesi). Runge found that if this function is interpolated at equidistant points xi between −1 and 1 such that:

[math]\displaystyle{ x_i = \frac{2i}{n} - 1,\quad i \in \left\{ 0, 1, \dots, n \right\} }[/math]

with a polynomial Pn(x) of degree ≤ n, the resulting interpolation oscillates toward the end of the interval, i.e. close to −1 and 1. It can even be proven that the interpolation error increases (without bound) when the degree of the polynomial is increased:

[math]\displaystyle{ \lim_{n \rightarrow \infty} \left( \sup_{-1 \leq x \leq 1} | f(x) -P_n(x)| \right) = \infty. }[/math]

This shows that high-degree polynomial interpolation at equidistant points can be troublesome.

Reason

Runge's phenomenon is the consequence of two properties of this problem.

  • The magnitude of the n-th order derivatives of this particular function grows quickly when n increases.
  • The equidistance between points leads to a Lebesgue constant that increases quickly when n increases.

The phenomenon is graphically obvious because both properties combine to increase the magnitude of the oscillations.

The error between the generating function and the interpolating polynomial of order n is given by

[math]\displaystyle{ f(x) - P_n(x) = \frac{f^{(n + 1)}(\xi)}{(n + 1)!} \prod_{i=0}^{n} (x - x_i) }[/math]

for some [math]\displaystyle{ \xi }[/math] in (−1, 1). Thus,

[math]\displaystyle{ \max_{-1 \leq x \leq 1} |f(x) - P_n(x)| \leq \max_{-1 \leq x \leq 1} \frac{\left|f^{(n + 1)}(x)\right|}{(n + 1)!} \max_{-1 \leq x \leq 1} \prod_{i=0}^n |x - x_i| }[/math].

Denote by [math]\displaystyle{ w_n(x) }[/math] the nodal function

[math]\displaystyle{ w_n(x) = (x - x_0)(x - x_1)\cdots(x - x_n) }[/math]

and let [math]\displaystyle{ W_n }[/math] be the maximum of the magnitude of the [math]\displaystyle{ w_n }[/math] function:

[math]\displaystyle{ W_n=\max_{-1 \leq x \leq 1} |w_n(x)| }[/math].

It is elementary to prove that with equidistant nodes

[math]\displaystyle{ W_n \leq n!h^{n+1} }[/math]

where [math]\displaystyle{ h=2/n }[/math] is the step size.

Moreover, assume that the (n+1)-th derivative of [math]\displaystyle{ f }[/math] is bounded, i.e.

[math]\displaystyle{ \max_{-1 \leq x \leq 1} |f^{(n+1)}(x)| \leq M_{n+1} }[/math].

Therefore,

[math]\displaystyle{ \max_{-1 \leq x \leq 1} |f(x) - P_{n}(x)| \leq M_{n+1} \frac{h^{n+1}}{(n+1)} }[/math].

But the magnitude of the (n+1)-th derivative of Runge's function increases when n increases. The consequence is that the resulting upper bound tends to infinity when n tends to infinity.

Although often used to explain the Runge phenomenon, the fact that the upper bound of the error goes to infinity does not necessarily imply, of course, that the error itself also diverges with n.

Mitigations

Change of interpolation points

The oscillation can be minimized by using nodes that are distributed more densely towards the edges of the interval, specifically, with asymptotic density (on the interval [−1, 1]) given by the formula[3] [math]\displaystyle{ \frac{1}{\sqrt{1-x^2}} }[/math]. A standard example of such a set of nodes is Chebyshev nodes, for which the maximum error in approximating the Runge function is guaranteed to diminish with increasing polynomial order.

S-Runge algorithm without resampling

When equidistant samples must be used because resampling on well-behaved sets of nodes is not feasible, the S-Runge algorithm can be considered.[4] In this approach, the original set of nodes is mapped on the set of Chebyshev nodes, providing a stable polynomial reconstruction. The peculiarity of this method is that there is no need of resampling at the mapped nodes, which are also called fake nodes. A Python implementation of this procedure can be found here.

Use of piecewise polynomials

The problem can be avoided by using spline curves which are piecewise polynomials. When trying to decrease the interpolation error one can increase the number of polynomial pieces which are used to construct the spline instead of increasing the degree of the polynomials used.

Constrained minimization

One can also fit a polynomial of higher degree (for instance, with [math]\displaystyle{ n }[/math] points use a polynomial of order [math]\displaystyle{ N = n^2 }[/math] instead of [math]\displaystyle{ n + 1 }[/math]), and fit an interpolating polynomial whose first (or second) derivative has minimal [math]\displaystyle{ L^2 }[/math] norm.

A similar approach is to minimize a constrained version of the [math]\displaystyle{ L^p }[/math] distance between the polynomial's [math]\displaystyle{ m }[/math]-th derivative and the mean value of its [math]\displaystyle{ m }[/math]-th derivative. Explicitly, to minimize

[math]\displaystyle{ V_p = \int_a^b \left|\frac{\mathrm{d}^m P_N(x)}{\mathrm{d} x^m} - \frac{1}{b-a} \int_a^b \frac{\mathrm{d}^m P_N(z)}{\mathrm{d} z^m} \mathrm{d}z\right|^p \mathrm{d} x - \sum_{i=1}^n \lambda_i \, \left(P_N(x_i) - f(x_i)\right), }[/math]

where [math]\displaystyle{ N \ge n - 1 }[/math] and [math]\displaystyle{ m \lt N }[/math], with respect to the polynomial coefficients and the Lagrange multipliers, [math]\displaystyle{ \lambda_i }[/math]. When [math]\displaystyle{ N = n - 1 }[/math], the constraint equations generated by the Lagrange multipliers reduce [math]\displaystyle{ P_N(x) }[/math] to the minimum polynomial that passes through all [math]\displaystyle{ n }[/math] points. At the opposite end, [math]\displaystyle{ \lim_{N \to \infty} P_N(x) }[/math] will approach a form very similar to a piecewise polynomials approximation. When [math]\displaystyle{ m=1 }[/math], in particular, [math]\displaystyle{ \lim_{N \to \infty} P_N(x) }[/math] approaches the linear piecewise polynomials, i.e. connecting the interpolation points with straight lines.

The role played by [math]\displaystyle{ p }[/math] in the process of minimizing [math]\displaystyle{ V_p }[/math] is to control the importance of the size of the fluctuations away from the mean value. The larger [math]\displaystyle{ p }[/math] is, the more large fluctuations are penalized compared to small ones. The greatest advantage of the Euclidean norm, [math]\displaystyle{ p=2 }[/math], is that it allows for analytic solutions and it guarantees that [math]\displaystyle{ V_p }[/math] will only have a single minimum. When [math]\displaystyle{ p\neq 2 }[/math] there can be multiple minima in [math]\displaystyle{ V_p }[/math], making it difficult to ensure that a particular minimum found will be the global minimum instead of a local one.

Least squares fitting

Another method is fitting a polynomial of lower degree using the method of least squares. Generally, when using [math]\displaystyle{ m }[/math] equidistant points, if [math]\displaystyle{ N \lt 2\sqrt{m} }[/math] then least squares approximation [math]\displaystyle{ P_N(x) }[/math] is well-conditioned.[5]

Bernstein polynomial

Using Bernstein polynomials, one can uniformly approximate every continuous function in a closed interval, although this method is rather computationally expensive.[citation needed]

External fake constraints interpolation

This method proposes to optimally stack a dense distribution of constraints of the type P″(x) = 0 on nodes positioned externally near the endpoints of each side of the interpolation interval, where P"(x) is the second derivative of the interpolation polynomial. Those constraints are called External Fake Constraints as they do not belong to the interpolation interval and they do not match the behaviour of the Runge function. The method has demonstrated that it has a better interpolation performance than Piecewise polynomials (splines) to mitigate the Runge phenomenon.[6]

Related statements from the approximation theory

For every predefined table of interpolation nodes there is a continuous function for which the sequence of interpolation polynomials on those nodes diverges.[7] For every continuous function there is a table of nodes on which the interpolation process converges.[citation needed] Chebyshev interpolation (i.e., on Chebyshev nodes) converges uniformly for every absolutely continuous function.

See also

References

  1. Runge, Carl (1901), "Über empirische Funktionen und die Interpolation zwischen äquidistanten Ordinaten", Zeitschrift für Mathematik und Physik 46: 224–243.  available at www.archive.org
  2. Epperson, James (1987). "On the Runge example". Amer. Math. Monthly 94: 329–341. doi:10.2307/2323093. http://www.maa.org/programs/maa-awards/writing-awards/on-the-runge-example. 
  3. Berrut, Jean-Paul; Trefethen, Lloyd N. (2004), "Barycentric Lagrange interpolation", SIAM Review 46 (3): 501–517, doi:10.1137/S0036144502417715, ISSN 1095-7200 
  4. De Marchi, Stefano; Marchetti, Francesco; Perracchione, Emma; Poggiali, Davide (2020), "Polynomial interpolation via mapped bases without resampling", J. Comput. Appl. Math. 364, doi:10.1016/j.cam.2019.112347, ISSN 0377-0427 
  5. Dahlquist, Germund; Björk, Åke (1974), "4.3.4. Equidistant Interpolation and the Runge Phenomenon", Numerical Methods, pp. 101–103, ISBN 0-13-627315-7, https://archive.org/details/numericalmethods00dahl/page/101 
  6. Belanger, Nicolas (2017), External Fake Constraints Interpolation: the end of Runge phenomenon with high degree polynomials relying on equispaced nodes – Application to aerial robotics motion planning, Proceedings of the 5th Institute of Mathematics and its Applications Conference on Mathematics in Defence, https://cdn.ima.org.uk/wp/wp-content/uploads/2017/03/Belanger-paper.pdf 
  7. Cheney, Ward; Light, Will (2000), A Course in Approximation Theory, Brooks/Cole, p. 19, ISBN 0-534-36224-9, http://www.ams.org/bookstore-getitem/item=gsm-101 

de:Polynominterpolation#Runges Phänomen