From polynomial interpolation to Chebfunjm/wiki/uploads/LMS/Trefthen-chebfun.pdfBurden & Faires...

Post on 19-Mar-2020

9 views 0 download

Transcript of From polynomial interpolation to Chebfunjm/wiki/uploads/LMS/Trefthen-chebfun.pdfBurden & Faires...

From polynomial interpolation to ChebfunNick Trefethen, University of Oxford

1/24

What's the integral of exp(-x) cos(6x)5 sin(5x)6 from –1 to 1?

Maple or Mathematica can figure out the answer exactly:

To combat the combinatorial explosion we use floating-point arithmetic: as we calculate, we round each number to 16 digits.

CHEBFUN VISION: floating-point arithmetic for functions, not just numbers.Represent functions by (piecewise) polynomial interpolants.

“Computing with symbolic feel and numerical speed”

Through any n+1 data values,there is a unique polynomial interpolant of degree n.

As Chebfun calculates, it chooses each polynomial degree to achieve 16 digits.

• Extend floating-point arithmetic from numbers to functions.• Overload Matlab’s vectors and matrices to functions and operators.

WHAT THE BOOKS SAY ABOUT POLYNOMIAL INTERPOLATION

Dahlquist & Björck (1974): “But there are many functions which are not at all suited for approximation by a single polynomial in the entire interval which is of interest.”

Forsythe, Malcolm & Moler (1977): “Polynomials of high degree can lead to difficult problems associated with roundoff error.”

Fröberg (1985): “Although Lagrangian interpolation is sometimes useful in theoretical investigations, it is rarely used in practical computations.”

Kahaner, Moler & Nash (1989): “Polynomial interpolation is a bad idea.”

Cormen, Leiserson & Rivest (1990): “Interpolation is a notoriously tricky problem from the point of view of numerical stability.”

Stoer & Bulirsch (1993): “While theoretically important, Lagrange's formula is, in general, not as suitable for actual calculations as some other methods to be described below.”

Stewart (1996): “Unfortunately, there are functions for which interpolation at the Chebyshevpoints fails to converge.”

Kincaid & Cheney (2002): “For most continuous functions, the quantity || f −pn ||∞ willnot converge to 0.”

Burden & Faires (2005): “The oscillatory nature of high degree polynomials, and the property that a fluctuation over a small portion of the interval can induce large fluctuations over the entire range, restricts their use.”

Parlett, SIAM Review book review (2010): “You do not want to meet a polynomial of degree 1000 on a dark night.”

.

All this is untrue.

Interpolants in equispaced points are bad, but Chebyshev points are fine.

Some algorithms are numerically unstable,but the barycentric interpolation formula is bulletproof.

.

CHEBYSHEV POINTS IN [−1,1]

xj = cos( j/n), 0 j n . Clustered near the boundaries.

Chebyshev… Bernstein… Lanczos… Clenshaw… Fox… Elliott… Mason… Rivlin… Good… Salzer… Orszag… Geddes…

f = continuous function on [–1,1]

p* = best max-norm degree n polynomial approximation of f

p = degree n interpolant of f in the Chebyshev pts.

|| f – p|| : error in Chebyshev interpolation

|| f – p*|| : smallest possible error among all polynomials

NOTATION FOR FIVE THEOREMSABOUT POLYNOMIAL INTERPOLATION

IN CHEBYSHEV POINTS

Theorem 1. || f − p || [ 2 + (2/) log n ] || f − p*|| .

Theorem 2. If f , f ’ ,…, f (k−1) are absolutely continuous and f (k) has bounded variation, then || f − p|| = O( n−k ) .

Theorem 3. If f is analytic in the closed ellipse in the complex planewith foci 1 and semiaxis lengths summing to ρ , then

|| f − p|| = O( ρ−n ) .

Theorem 4. Barycentric interpolation formula:

p(x) = .

Theorem 5. The barycentric formula is numerically stable.

" (−1) j f (x j ) / ( x − x j )

" (−1) j / ( x − x j )

Ehlich & Zeller 1966

Mastroianni & Szabados 1995

follows from Bernstein 1912

N. J. Higham 2004

M. Riesz 1916Salzer 1972

"NEAR-

BEST"

"SPE

CTRAL A

CCURACY"

BARYCENTRIC I

NTERP.

SIAM 2013

“Chebyshev technology”

Textbook Software

Textbook 2

Exploring ODESTrefethen, Birkisson, and Driscoll

To be published by SIAM in 2018and also freely available online

Demonstration