Analysis

An ellipse, not a disc

A Taylor series converges on a disc, and the disc's radius is the distance to the nearest singularity. Ask instead how well polynomials can follow a function on an interval, and the answer is an ellipse with the interval's ends as its foci — the largest one the function is smooth inside.

Worth reading first: A denominator that reaches past the radius · The error that keeps coming back to its worst.

The function 1/(1+25x2)1/(1 + 25x^2) is as well behaved on the real line as a function can be: positive, bounded, infinitely differentiable, a smooth bump centred at nought. Its Taylor series at nought converges only for ∣x∣<0.2|x| < 0.2. The reason, found in the radius of convergence, is not on the real line at all: the function has poles at ±i/5\pm i/5 in the complex plane, a fifth of a unit from the centre, and a power series converges on the largest disc that avoids every singularity.

On the interval [−1,1][-1, 1] that is a disaster. The Taylor series covers a fifth of the interval and diverges on the rest. And yet polynomials approximate this function on the whole interval without any difficulty: the best polynomial of degree sixteen is within 0.020.02 of it everywhere, and the error falls steadily as the degree rises. Whatever governs how well polynomials do on an interval, it is not the disc.

The figure below is what governs it. The same two poles, the same small Taylor disc — and an ellipse, with foci at the ends of the interval, passing through the poles. The ellipse contains the whole interval. The size of that ellipse is the interval’s version of the radius of convergence, and this essay is about why.

A disc of radius 0.2 and an ellipse of size 1.22 around the same interval. For 1/(1 + 25x²): the interval from −1 to 1 on the real axis, poles at 0 + 0.2i and 0 − 0.2i, the Taylor disc at 0 of radius 0.20, and the Bernstein ellipse with foci ±1 through the poles, with ρ = 1.2198.
Fig. 1 Runge’s function has poles at ±i/5\pm i/5. The Taylor disc about the middle of the interval stops at them; the Bernstein ellipse with foci at ±1 passes through them and contains the whole interval.

A polynomial on an interval is a cosine series in disguise

The tool is the substitution that made Chebyshev’s points and Chebyshev’s polynomials appear in the first place: x=cos⁡θx = \cos\theta. As θ\theta runs from 00 to π\pi, xx runs from 11 back to −1-1, so a function on the interval becomes a function of an angle. Keep going round and the function of the angle repeats: it is periodic, and even, since cos⁡(−θ)=cos⁡θ\cos(-\theta) = \cos\theta.

|x| on an interval, and the same values as a periodic function of an angle. The graph of |x| on [−1, 1] beside the graph of f(cos θ) for θ from 0 to 4π. The cosine coefficients of the second are the Chebyshev coefficients of the first: 0.637, 0, 0.424, 0, −0.085.
Fig. 2 Left, |x| on [−1, 1]. Right, the same values as a function of the angle θ with x = cos θ, over two full turns: periodic, even, and with its corner at x = 0 repeated at every odd multiple of π/2. The cosine coefficients of the right-hand curve, each computed as an integral over θ, match the Chebyshev coefficients of the left-hand one to six decimal places.

The Chebyshev polynomials are defined so that this substitution turns them into cosines: Tk(cos⁡θ)=cos⁡kθT_k(\cos\theta) = \cos k\theta. So writing a function on [−1,1][-1, 1] as a sum of Chebyshev polynomials,

f(x)=a0+a1T1(x)+a2T2(x)+⋯ ,f(x) = a_0 + a_1 T_1(x) + a_2 T_2(x) + \cdots,

is exactly the same as writing f(cos⁡θ)f(\cos\theta) as a sum of cosines, with the same coefficients. A Chebyshev series is a Fourier series, after a change of variable, and every fact about where Fourier coefficients come from and how fast they fall transfers without alteration.

The substitution is not an arbitrary trick. Equally spaced angles on a semicircle, dropped onto the diameter, are exactly the Chebyshev points, so the natural way to sample a function on an interval — the way that makes interpolation behave — is equally spaced in θ\theta and bunched in xx. Once the function is written in the variable in which its good sample points are evenly spaced, the tools of evenly spaced sampling are available: the discrete cosine transform computes all the coefficients from the samples at once, just as a discrete Fourier transform does for a periodic signal.

That is worth pausing on, because it is the surprising connection this essay rests on. Polynomials on an interval and trigonometric waves on a circle look like different subjects — one is algebra, one is harmonic analysis — and the substitution x=cos⁡θx = \cos\theta makes them one subject. Fourier needed his series to solve the flow of heat; the same series, bent round a semicircle, is how a computer evaluates a function.

Across the whole interval, at once

The Chebyshev series of 1/(1+25x2)1/(1 + 25x^2) converges everywhere on [−1,1][-1, 1], and the convergence is uniform: the partial sums close in on the function across the interval together, not from the centre outward.

Chebyshev sums of degree 4, 12, 24 closing on 1/(1 + 25x²) across the whole interval. The function 1/(1 + 25x²) on [−1, 1] with the partial sums of its Chebyshev series of degrees 4, 12, 24; worst errors 0.3631, 0.0741, 0.0068.
Fig. 3 1/(1+25x2)1/(1 + 25x^2) and the sums of its Chebyshev series to degrees 4, 12 and 24. The degree-four sum is a rough hump; the degree-twelve sum follows the bump but misses its peak; the degree-twenty-four sum is within 0.007 everywhere. The worst error shrinks by close to 1.22 for each degree added.

The worst errors are 0.360.36, 0.0740.074 and 0.00680.0068 at degrees four, twelve and twenty-four. Between twelve and twenty-four the error falls by a factor of eleven in twelve degrees — about 1.221.22 per degree. That number is the heart of the matter. Where does 1.221.22 come from, when the function’s Taylor series has radius 0.20.2?

The ellipse through the poles

Under the substitution x=cos⁡θx = \cos\theta, let θ\theta become complex. The point eiθe^{i\theta} then ranges over the complex plane, and x=cos⁡θ=12(w+1/w)x = \cos\theta = \tfrac12 (w + 1/w) with w=eiθw = e^{i\theta}. That map sends each circle ∣w∣=ρ|w| = \rho, for ρ>1\rho > 1, to an ellipse — with foci at ±1\pm 1, semi-major axis 12(ρ+1/ρ)\tfrac12(\rho + 1/\rho), semi-minor axis 12(ρ−1/ρ)\tfrac12(\rho - 1/\rho) — and it sends the unit circle itself to the interval, traversed twice.

So the Fourier series in θ\theta, whose coefficients decay like ρ−k\rho^{-k} exactly when the periodic function extends analytically into the annulus 1/ρ<∣w∣<ρ1/\rho < |w| < \rho, becomes a Chebyshev series whose coefficients decay like ρ−k\rho^{-k} exactly when ff extends analytically into the ellipse of parameter ρ\rho. That is Sergei Bernstein’s theorem, from 1912: the Chebyshev coefficients of ff fall geometrically at rate ρ\rho, where ρ\rho is the parameter of the largest ellipse with foci ±1\pm 1 inside which ff is analytic, and the best polynomial error at degree nn falls at the same rate.

For 1/(1+25x2)1/(1 + 25x^2) the poles are at ±i/5\pm i/5, and the ellipse through them has ρ=15+1+125=1.2198\rho = \tfrac15 + \sqrt{1 + \tfrac1{25}} = 1.2198. The first figure draws it, and the rate of 1.221.22 per degree measured from the partial sums is the same number, computed a different way.

Chebyshev coefficients fall at the rate an ellipse sets. Log-scale Chebyshev coefficients of 1/(1 + 25x²), 1/(1 + x²), 1/(1.2 − x) on [−1, 1]. Each falls geometrically at the rate ρ of the Bernstein ellipse through its nearest pole: 1/(1 + 25x²) ρ = 1.220; 1/(1 + x²) ρ = 2.414; 1/(1.2 − x) ρ = 1.863.
Fig. 4 The Chebyshev coefficients of three functions on a log scale. Each dashed line falls by the factor ρ of the ellipse through that function’s nearest pole, worked out from the pole’s position alone: 1.2198 for 1/(1+25x2)1/(1 + 25x^2), 2.4142 for 1/(1+x2)1/(1 + x^2), 1.8633 for 1/(1.2−x)1/(1.2 - x). Fitted to the coefficients, the rates agree with the ellipses to four decimal places, until the coefficients reach the floor of double-precision arithmetic near 10⁻¹⁶.

Three functions, three ellipses, three rates. The function 1/(1+x2)1/(1 + x^2) has its poles at ±i\pm i, five times further off, and its ellipse has ρ=1+2≈2.414\rho = 1 + \sqrt 2 \approx 2.414. The function 1/(1.2−x)1/(1.2 - x) has its pole on the real axis just past the interval’s end, at 1.21.2, and its ellipse is squeezed flat, with ρ=1.2+0.44≈1.863\rho = 1.2 + \sqrt{0.44} \approx 1.863. The rates fitted to sixty coefficients agree with the ellipses to four decimal places.

Notice what the ellipse does that the disc could not. A pole at distance 0.20.2 from the middle of the interval gives an ellipse of parameter 1.221.22, and a pole at distance 0.20.2 beyond the end gives 1.861.86 — the second is far easier, though it is just as close to the interval. The ellipse is thin near the ends and fat in the middle, so a singularity opposite the middle of the interval does the most damage and one beyond an end does the least. The disc treats all directions alike, because a power series is about one point; the ellipse knows the interval has ends.

The Runge function, reread

The ellipse also finishes the story of the points that ruined the fit. That essay found that interpolating 1/(1+25x2)1/(1 + 25x^2) at equally spaced points diverges near the ends, and that interpolating at Chebyshev points converges. The Chebyshev half now has its rate: the interpolant at n+1n + 1 Chebyshev points converges at rate ρ=1.22\rho = 1.22 per degree, like the series, because Chebyshev interpolation is nearly the same thing as cutting off the Chebyshev series.

The equally spaced half has a rate too, and it is the reason the failure happens. For equally spaced nodes the relevant curves are not ellipses but the level curves of a different potential, fatter near the ends of the interval, and the level curve through the interval’s ends encloses the poles at ±i/5\pm i/5. So equally spaced interpolation “sees” the poles as lying inside the region where it needs analyticity, and diverges near the ends, where that region is widest. Carl Runge worked this out in 1901. The Chebyshev points are exactly the points whose curves are the Bernstein ellipses, and the ellipses are thinnest at the ends, where the equally spaced curves are widest.

The two failures met so far now have the same shape. A Taylor series fails outside the largest disc free of singularities. An interpolation scheme fails outside the largest level curve free of them. What differs is the family of curves, and the family is decided by where the information comes from: one point, or a spread of points on an interval.

A corner anywhere costs a power

Geometric decay needs analyticity in some ellipse, however thin. A function with a corner, or a jump in some derivative, is not analytic in any neighbourhood of the interval at all, and its coefficients fall only like a power of kk.

A kink anywhere on the interval turns geometric decay into a power law. Log–log plot of the Chebyshev coefficients of |x|, |x|³, √(1 + x); fitted slopes -2.00, -4.01, -2.00.
Fig. 5 Chebyshev coefficients of ∣x∣|x|, ∣x∣3|x|^3 and 1+x\sqrt{1 + x} on a log–log scale, each falling on a straight line. The fitted slopes are −2, −4 and −2: two more derivatives before the corner buy two more powers of k, and the square root at the end of the interval costs no more than the corner in the middle.

The rule is the Fourier rule, carried across by the substitution. ∣x∣|x| has a corner; f(cos⁡θ)=∣cos⁡θ∣f(\cos\theta) = |\cos\theta| has corners too, and the Fourier coefficients of a function with corners fall like 1/k21/k^2 — the same decay that makes a square wave’s ripples fall like 1/k1/k one derivative lower. ∣x∣3|x|^3 has two more continuous derivatives and falls like 1/k41/k^4.

The square root is the instructive case. 1+x\sqrt{1 + x} is worse than ∣x∣|x| in the obvious sense — its derivative is infinite at x=−1x = -1 — and yet its coefficients fall at the same rate, 1/k21/k^2. The substitution explains it: 1+cos⁡θ=2 ∣cos⁡(θ/2)∣\sqrt{1 + \cos\theta} = \sqrt2\,|\cos(\theta/2)|, a function with an ordinary corner. The change of variable stretches the ends of the interval, since x=cos⁡θx = \cos\theta moves slowly near θ=0\theta = 0 and π\pi, and a singularity at an end is smoothed by the stretch into something milder. The same stretch is why Chebyshev points crowd at the ends: the variable θ\theta is the natural one, and in θ\theta the points are evenly spaced.

Nearly the best, for the price of a transform

The error that keeps coming back to its worst found the best polynomial of each degree by an exchange algorithm, iterating until a lower and an upper bound met. Cutting off the Chebyshev series is far cheaper: one cosine transform of the function’s values at Chebyshev points gives every coefficient at once. The question is how much the cheapness costs.

A cut-off Chebyshev series against the best polynomial for 1/(1 + 25x²), degree by degree. Worst errors on [−1, 1] for 1/(1 + 25x²): the truncated Chebyshev series 5.40e-1, 3.63e-1, 2.44e-1, 1.64e-1, 1.10e-1, 7.41e-2, 4.98e-2, 3.35e-2 and the best polynomials 3.23e-1, 2.17e-1, 1.46e-1, 9.81e-2, 6.59e-2, 4.43e-2, 2.98e-2, 2.00e-2 at degrees 2, 4, 6, 8, 10, 12, 14, 16.
Fig. 6 For 1/(1+25x2)1/(1 + 25x^2), at every even degree up to sixteen: the worst error of the Chebyshev series cut off at that degree, and of the best polynomial of that degree, found by exchange. The cut-off series is never more than 1.67 times worse than the best, and the two lines fall at the same rate.

Very little. At every degree up to sixteen, the cut-off series is within a factor of 1.671.67 of the best error, and the two curves are parallel on a log scale, falling at the same rate ρ\rho. In general the ratio is bounded by a constant plus a multiple of log⁡n\log n — the Lebesgue constant of the Chebyshev projection, which grows so slowly that at degree a thousand it is still below eight.

So in practice the best polynomial is almost never computed. A cut-off Chebyshev series, or equivalently the interpolant at Chebyshev points, gives an approximation that is within a digit of the best and costs a fast Fourier transform. The software system Chebfun, begun by Lloyd Trefethen and Zachary Battles in 2004, is built on nothing else: it represents each function as a Chebyshev series cut off where the coefficients reach rounding level, and computes with those series — adding, multiplying, integrating, finding roots — as though they were the functions themselves. The coefficient plots here are what it looks at to decide where to stop.

A point has circles, an interval has ellipses

Why an ellipse, and why these foci? There is a way of seeing it that does not go through Fourier series at all, and it explains the disc in the same breath.

Polynomial approximation of a function near a set is controlled by how quickly a polynomial of degree nn can grow as it moves away from the set, given that it is bounded by one on the set itself. Near a single point, the polynomial xnx^n is the extreme case: it is tiny near nought and grows like rnr^n at distance rr, so the curves of equal growth are circles about the point. Those circles are the discs of Taylor series, and moving the centre moves the circles with it.

Near an interval the extreme polynomial is the Chebyshev polynomial, which is bounded by one on [−1,1][-1, 1] and grows faster off it than any other polynomial of its degree with that bound. Its size at a complex point zz is about ρn/2\rho^n/2, where ρ\rho is the parameter of the ellipse through zz. So the ellipses are the level curves of polynomial growth away from the interval, exactly as circles are for a point. A singularity on the ellipse of parameter ρ\rho limits the approximation to an error that falls like ρ−n\rho^{-n}, for the same reason a singularity at radius rr limits a power series.

In the language of potential theory, the circles and the ellipses are both level curves of the Green’s function of the set — the electrostatic potential of the set when it is a conductor charged to one volt, measured in the plane around it. For a point the potential is log⁡∣z∣\log|z| and its level curves are circles; for a segment it is log⁡∣z+z2−1∣\log|z + \sqrt{z^2 - 1}| and its level curves are the ellipses with foci at the segment’s ends. Every set in the plane has such curves, and polynomial approximation on the set converges geometrically inside the largest one the function is analytic in. The disc and the ellipse are the two simplest cases of one theorem.

Entire functions, and no ellipse too large

A function with no singularities anywhere in the plane — exe^x, sin⁡x\sin x, any polynomial — is analytic inside every ellipse, however large. For such a function Bernstein’s theorem says the coefficients fall faster than any geometric rate, and they do. The Chebyshev coefficients of exe^x are 2Ik(1)2I_k(1), where IkI_k is a modified Bessel function, and they behave like 1/(2k k!)1/(2^k\,k!): at k=10k = 10 the coefficient is about 5×10−105 \times 10^{-10}, and at k=15k = 15 it is about 5×10−175 \times 10^{-17}, at the level of rounding. Sixteen terms give exe^x on [−1,1][-1, 1] to full double precision.

That is the same distinction one point’s worth of information drew between functions with an infinite radius of convergence and functions without, transferred from a point to an interval. And it is why the best degree-three approximation of exe^x in the previous essay was already accurate to half a per cent: an entire function is as easy as a function can be, and the best error falls by a larger factor at each degree than the one before.

The practical rule that falls out of all this is short. On an interval, smoothness buys speed in two currencies: a finite number of derivatives buys a power of nn, and analyticity in an ellipse buys a geometric rate set by the ellipse. Which currency a function pays in is visible at a glance on a plot of its coefficients — a straight line on a log–log plot, or a straight line on a log plot.

Integrating what has been approximated

A Chebyshev series is not only a way to evaluate a function. Each TkT_k has an integral over [−1,1][-1, 1] that can be written down — nought for odd kk, and 2/(1−k2)2/(1 - k^2) for even kk — so integrating the series term by term integrates the function, with an error no larger than the tail of the series. Evaluated from values at Chebyshev points, this is Clenshaw–Curtis quadrature, published in 1960, and its error falls at the rate ρ\rho of the function’s ellipse, exactly like the approximation.

The more famous rule, Gauss’s, chooses its points to integrate polynomials of twice the degree exactly and converges at rate ρ2\rho^2 — twice as many correct digits per point, on paper. In practice the two are close for most functions, a surprise documented by Trefethen in 2008, because both are limited by the same ellipse and the extra exactness of Gauss’s rule is spent on polynomials of high degree that a function analytic in a thin ellipse barely contains. The ellipse, not the rule, sets the pace.

What the coefficient plots cannot show

The coefficients are computed by a cosine transform on 1,024 points (8,192 for the slowly decaying ones), which is exact for polynomials of degree below that and very accurate for the functions drawn. What the plots show is a rate, and a rate is a statement about infinitely many coefficients; sixty or two hundred are evidence for it, and the theorem is what turns the evidence into a fact.

The plots also stop at the floor of the arithmetic. Past about 10−1610^{-16} the computed coefficients are rounding noise, and the rate cannot be read there — which is why the fit uses only the part of each sequence above that floor, and why the figure says where the floor is rather than letting the noise pass for mathematics.

And the ellipse picture assumes the singularities are known. For a rational function they are at the zeros of the denominator, and the figures compute ρ\rho from them directly. For a function given only by its values, the direction is reversed: the rate is measured from the coefficients and the ellipse is inferred, which is how Chebfun can report where a function it has never seen as a formula stops being analytic.

Still open: the nodes that interpolate best

Chebyshev points are nearly optimal for interpolation: the factor by which their interpolant can magnify an error — the Lebesgue constant — grows like 2πlog⁡n\tfrac{2}{\pi}\log n, and no set of nodes can do better than that rate. But they are not exactly optimal. At each degree there is a set of nodes with a slightly smaller constant.

Sergei Bernstein and Paul Erdős conjectured in the 1930s that the optimal nodes are the ones for which the magnification function has equal local maxima between consecutive nodes — the alternation idea once more, applied to the nodes rather than the polynomial. Thomas Kilgore, and independently Carl de Boor and Allan Pinkus, proved it in 1978. What is not known is a formula for those optimal nodes: they are characterised completely and computed numerically, degree by degree, and no closed description of them has been found, even though the Chebyshev points they so nearly equal have one of the simplest descriptions in the subject.

That is where this line of questions ends, for now. A power series lives on a disc, a polynomial approximation on an interval lives on an ellipse, and the best points to sample the interval at are an alternation problem with a known answer and no formula.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

ApproximationChebyshev polynomialComplex planeConvergenceEllipseFourier seriesRadius of convergenceSingularity