Fundamentals / Numerical mathematics / Approximation and quadrature

Summing a Chebyshev series by working backwards

Derive a stable evaluation scheme directly from a three-term polynomial identity and diagnose the failure that occurs when a fitted law is used outside its calibrated interval.

From cosines to a polynomial recurrence

Set \(x=\cos\theta\) and \(T_k(x)=\cos(k\theta)\). The angle-addition formula gives

\[T_{k+1}=2xT_k-T_{k-1},\]

with \(T_0=1,T_1=x\). Consider \(p=\sum_{k=0}^n c_k T_k\) with the constant coefficient included in full. We could generate all the polynomials forward. Clenshaw evaluation instead gathers their weighted coefficients from the high end, without converting to monomials.

Set \(b_{n+1}=b_{n+2}=0\) and \(b_k=c_k+2xb_{k+1}-b_{k+2}\) for \(k=n,\ldots,1\). Substitute \(c_k=b_k-2xb_{k+1}+b_{k+2}\) into the original sum. Every interior \(b_j\) multiplies \(T_j-2xT_{j-1}+T_{j-2}=0\). Only two boundary terms survive:

\[p(x)=c_0+xb_1-b_2.\]

The derivation also identifies a common convention error. If the source defines its zeroth coefficient with a half-weight then it must be halved once before using this formula.

Two useful arithmetic checks

For coefficients \((1,2,3)\) at \(x=0.5\), \(b_2=3\), \(b_1=2+2(0.5)3=5\). The answer is

\[1+0.5(5)-3=0.5.\]

Independently \(T_2(0.5)=-0.5\), giving \(1+1-1.5=0.5\).

On the calibration interval each \(|T_k|\le1\), so an isolated coefficient error of 0.001 changes the value by at most 0.001. At \(x=1.2\), \(T_{10}(1.2)=\cosh(10\operatorname{arcosh}(1.2))\) is around 252. The same tiny coefficient error now changes a prediction by roughly a quarter of a unit. Accurate summation does not make extrapolation reliable.

Follow one uncertain coefficient

A simple calibration \(1+0.4x\) has an uncertain extra coefficient at a selectable order. Find the extreme differences inside the interval, then inspect the growth just beyond the right endpoint. The calculation uses the backward recurrence at every position.

Tutorial on mapping a laboratory interval

A calibration covers \(10\le T\le50\) °C. Which coordinate should enter the recurrence and what does \(T=54\) correspond to?

Worked solution

Centre at 30 and divide by the half-width 20, so \(x=(T-30)/20\). At 54 °C this gives 1.2, already outside the bounded Chebyshev interval.

Give a computable uniform error bound if three stored coefficients have errors no larger than 0.002 each.

Worked solution

For \(|x|\le1\), the triangle inequality and \(|T_k|\le1\) give 0.006. Exact values may cancel at some positions; this bound does not rely on such cancellation.

Read the university treatment

Compare coefficient decay inside the approximation interval with sensitivity to extrapolation beyond it. Lloyd N. Trefethen · Approximation Theory and Approximation Practice

Study the full derivation

Integrating cosine interpolants on nested grids · Function approximation and numerical integration

Chebyshev points turn polynomial interpolation into a cosine series. Derive the exact moments of each basis polynomial, explain aliasing and find a case where two consecutive quadrature grids confidently agree on the wrong answer.