Why differentiate an interpolating polynomial?
A finite-difference formula estimates a derivative using a small group of nearby values. A polynomial spectral method takes a different route: construct one polynomial through all the values, differentiate that polynomial exactly, and evaluate its derivative at the original nodes. The resulting formula still multiplies a vector of values by a matrix. Its entries are usually dense because each interpolating basis polynomial depends on the whole grid.
The phrase “differentiate exactly” needs an object. We differentiate the interpolant exactly in exact arithmetic. Its derivative need not equal the derivative of the function that supplied the samples. A high-degree polynomial, an unresolved oscillation, or small measurement errors can produce quite different derivatives from the same apparently accurate values. We will prove the algebraic statement first, then identify additional assumptions that justify derivative approximation.
All data and functions in this note are real-valued. We work first on . Write for the polynomials of degree at most . The previous note used interior Gauss nodes and an interpolant in . Here means the degree bound: there are Lobatto nodes, including both endpoints. These two grids and their coefficient formulas must not be interchanged.
The grid, the interpolant, and the matrix definition
Definition 6.2.1
(Endpoint-including grid and differentiation matrix)
Fix an integer and set
Thus . Given a vector , let be its unique interpolant: . Let be the cardinal polynomial satisfying , so that . Define
The nodes are distinct because cosine decreases strictly on . Existence follows from the Lagrange formula, and uniqueness follows because a nonzero polynomial in cannot have distinct zeros. The definition of therefore makes sense for every vector, without assuming that it came from a smooth function.
Before computing any entries, linearity already gives the central identity:
Our task is to turn this definition into explicit entries, including the diagonal. The denominator signs will be determined by the stated decreasing order of the nodes.
Deriving the off-diagonal entries
Recall . For , differentiation gives
Consequently vanishes at the interior nodes . Its endpoint values, obtained by taking limits, are
These statements also hold when , when there are no interior nodes. The nodal polynomial can therefore be chosen as
It has degree and exactly the distinct zeros . Indeed, has degree , so its listed interior zeros exhaust its zeros and are simple, while . The endpoint factors supply the remaining two simple zeros. Its leading coefficient is irrelevant: multiplying by a nonzero constant leaves the following cardinal formula unchanged:
The apparent singularity at is removable. Dividing by produces a polynomial, whose value at is .
To evaluate at the nodes, we need the Chebyshev differential equation. Twice applying the chain rule to gives
Initially this holds for . Both sides are polynomials, so it holds everywhere. At an interior node , and (1) yields
At the endpoints, instead gives and . Define and for . We have proved the single formula
For , differentiating the cardinal formula and using now gives
Equivalently, barycentric interpolation weights are proportional to , and (3) is .
Common mistake
(Inverting the endpoint weight ratio)
The factor in (3) is , that is, the ratio , not its reciprocal. Writing changes only entries in an endpoint row or column, so it is easy to miss. For it would give instead of , and row would sum to . The identity proved below exposes the error at once: every row of the correct matrix sums to zero.
The diagonal and the endpoint signs
At a simple root , Taylor expansion of the cardinal formula gives
For an interior node, differentiate (1):
Since , equations (5) and imply . Inserting this and into (4) yields . Division by is valid: (2) says , and .
For , evaluate (5) at to obtain
Thus , and (4), with , gives . Reflection gives the opposite sign at . Indeed, by cardinal uniqueness, so .
Theorem 6.2.2
(Chebyshev–Lobatto differentiation matrix)
For the grid with , the matrix defined by cardinal differentiation has off-diagonal entries (3) and diagonal entries
It satisfies . For every ,
Proof
(Exactness and the zero row sum)
Equations (3)–(6) were derived above from the defining cardinal polynomials. If the vector consists of samples of , uniqueness says its interpolant is itself; differentiating that polynomial identity proves (7). Taking proves . In particular the diagonal can also be calculated from
This is an identity, not a separate approximation.
Proof X-ray
Why exact interpolation proves exact differentiation
The proof has one move: it replaces a statement about numbers by an identity of polynomials. The hypothesis is used exactly once, when uniqueness identifies the interpolant of the samples with itself. After that, the derivatives agree everywhere, in particular at the nodes, and (7) is the core identity read for this . The row-sum identity is the case and needs no separate computation. Without the hypothesis the identification fails: agreement at points does not make two functions equal, and finitely many equalities cannot be differentiated. On the grid, and have the same samples but different endpoint derivatives. What survives is only that returns the derivative of the interpolant.
The smallest grid already tests every sign in (3) and (6).
Worked example 6.2.3
(The two-node grid as an edge case)
For there are no interior nodes and . On the nodes , equations (3) and (6) give
Each row sums to zero, as requires. The samples of are , and matches at both nodes. Since and span , these two checks verify (7) completely on this grid.
Common mistake
(Negating the matrix when the nodes are reversed)
If the nodes are stored in increasing order, reverse both the rows and the columns: the new matrix is for the reversal permutation . No extra minus sign appears, because differentiation is still with respect to . For , the increasing nodes give , which maps the samples of to . A negated matrix would return the derivative .
A complete small example and a boundary equation
Worked example 6.2.4
(Three nodes, first derivatives, and a Dirichlet problem)
For , the nodes are . Equations (3) and (6) give
For , its value vector is . Direct multiplication gives and , matching and .
Now use the same grid to collocate on with . Set the endpoint entries to zero and impose the differential equation at the one interior node. The equation is
Thus . Its interpolant is exactly , the solution of this particular boundary problem. The exact solution lies in , so its samples satisfy the collocation equations, and this one-unknown system has the unique solution . These facts explain exact recovery here; they are not a general error estimate for collocation.
Repeated differentiation is valid because . The interpolant of its derivative samples is therefore itself. Induction gives for every integer . Here is the identity. In exact arithmetic , since the st derivative of every polynomial in vanishes. This algebraic fact does not make repeated floating-point matrix products harmless.
Concept lensAlgebraic
The same operator in the Chebyshev coefficient basis
In the nodal basis is dense. Write and let be the matrix with entries , so that ; uniqueness of interpolation makes invertible. Each is a combination of the with and odd, so differentiation acts on coefficient vectors by a strictly upper-triangular matrix . Hence
The similarity explains at once why and why every eigenvalue of is zero in exact arithmetic: both are visible in . For , and , and reproduces the two-node matrix above.
For a general interval , with , use . Differentiation with respect to is represented by , and the second derivative by . The mapped nodes still run from down to . The scaling factor is positive.
Counterexample mode
Restricting first and squaring loses boundary information
It is tempting to remove the endpoint rows and columns from and then square the remaining matrix to approximate the second derivative with zero boundary values. For that interior matrix is , whose square is still . But the interior entry of is , exactly the coefficient needed in the example. The first derivative at the endpoints of is not zero. Removing those intermediate derivative values discards a contribution to the second derivative. Form the full second-derivative operator first, then eliminate prescribed values from the second-order equations. Prescribed values of do not prescribe the values of .
Aliasing and a sufficient convergence hypothesis
Let denote the Lobatto interpolant of in . At the grid angles, . For an integer , write with and define
Then , so uniqueness gives
Unlike the interior Gauss grid in the previous note, this grid folds indices without an extra minus sign. In particular . The matrix applied to its sampled values therefore returns zero, whereas . This is a failure to resolve the source, not a failure of polynomial exactness at degree at most .
A convergence argument needs control of the unresolved terms and of their derivatives. One precise sufficient condition follows directly from (9).
Theorem 6.2.5
(Derivative convergence from a weighted coefficient tail)
Suppose
The series defines a continuously differentiable function on , with one-sided derivatives at the endpoints, and
Consequently the values returned by converge to the true derivatives on their respective grids under (10).
Proof
(Coefficient-tail bound for the derivative error)
The bound follows from the derivative formula and . For example, the latter inequality follows by factoring as and applying the triangle inequality. Continuity extends the derivative bound to the endpoints. Thus both the series of values and the series of derivatives converge uniformly under (10). To justify differentiation, integrate the uniformly convergent derivative series from a fixed point; the fundamental theorem of calculus and convergence at that point identify the integral with . This proves the stated differentiability, including the continuous limiting derivatives at the endpoints.
For fixed , interpolation is a finite linear combination of point evaluations and cardinal polynomials. Uniformly convergent series can therefore be interpolated and differentiated term by term through this fixed operator. Using (9), and noting that for , gives
Since in this tail, its uniform norm is bounded by . The tail tends to zero because the weighted series converges. Finally (7), applied to the interpolant, identifies applied to the samples of with the nodal values of .
Proof X-ray
What the weight k squared pays for
The weight in (10) is matched to and is spent twice: once to differentiate the series for term by term, once to bound the tail. The key move is that is a fixed linear combination of point evaluations, so it passes through the convergent sum; the aliasing rule (9) then sends each tail term to some with , whose derivative is no larger, which gives the factor two. Terms with cancel exactly. Only would control values, not derivatives.
Condition (10) is sufficient, not necessary. It is stronger than absolute summability of the value coefficients. A bound for the interpolation error in values alone does not automatically give a derivative bound. In particular, one must not differentiate the usual interpolation remainder while treating its unspecified intermediate point as a constant. Derivative convergence requires its own argument, such as the coefficient-tail proof above.
Noise and finite precision
Suppose the measured vector is , with . Even if the matrix multiplication were exact, the derivative error caused by these data errors would be , and every row satisfies
At , each off-diagonal entry has sign , because . The diagonal is positive. As , exactness for gives
Reflection gives the same row sum at . The endpoint bound is attained by the admissible perturbation , whose interpolant is . Thus endpoint differentiation can amplify bounded value errors quadratically in . A constant perturbation has zero derivative, so this is a worst-case statement, not a prediction for every error sequence.
Worked example 6.2.6
(Endpoint amplification on three nodes)
For , row of is , whose absolute values sum to ; the middle row has absolute sum . Take , the samples of . Then
which agrees with at the nodes. Both endpoint rows attain the bound from (12), while the interior error is zero, below its row bound . The constant perturbation , of the same size, gives .
There are also errors in forming and applying . Endpoint clustering means is of order , so directly subtracting rounded cosines near can lose relative accuracy. The identity
avoids that particular subtraction, though its evaluation still needs finite-precision care. Computing the diagonal by (8) enforces the constant-function identity at the construction stage; the later dot product may still have a rounding residual. An equivalent exact-arithmetic application is
This form makes the cancellation of constant data explicit. None of these rearrangements removes the data sensitivity proved in (12), and this note does not establish a backward-error bound for an implementation. Refinement must balance the approximation tail, data errors, and arithmetic errors.
Practice
Exercise 6.2.7
(On the grid, apply the displayed matrix to the samples of . Compare the result with the true derivative at all three nodes, and identify the interpolant.)
Foundation
Solution(3)
- 1
Identify the interpolant from the samples
The samples of are , which are also the samples of . Thus .
- 2
Apply the matrix
, the derivative of at the three nodes.
- 3
Compare with the true derivative
The true derivative vector is , so the discrepancy at the nodes is . Sampling cannot distinguish these two source polynomials; only one has degree at most two.
Exercise 6.2.8
(Prove that for every . Compute the difference between the true derivative and the interpolant derivative at .)
Core
Solution(2)
- 1
Fold the index at the grid angles
Key step
Since , its cosine equals . Thus and take the same values at every node, and uniqueness of the interpolant gives .
- 2
Compare the derivatives at the endpoint
At , the derivative difference is . For this is zero, as it must be: the source is then and lies in the represented space.
Exercise 6.2.9
(For on with , use the mapped grid and impose the equation only at its interior node. Find the collocation polynomial. Compare it with the exact solution and explain why their node values agree despite unequal derivatives.)
Core
Solution(5)
- 1
Map the grid
The mapped nodes are , and , so the displayed applies to derivatives.
- 2
Solve the interior collocation equation
With endpoint values zero, the interior equation is , giving . The interpolating polynomial is , which has and therefore satisfies the equation at .
- 3
Find the exact solution
Integrating twice and imposing the endpoints gives . It also takes the values on the grid, but while .
- 4
Explain the agreement of the node values
Key step
The centered second difference , with spacing one, equals the exact second derivative at for every cubic; check and use linearity. Hence the samples of the cubic solution satisfy the same interior equation and boundary values, and uniqueness for the one-unknown system forces the node values to agree.
- 5
Separate values from derivatives
Equivalently, vanishes at all three nodes, while its derivative need not vanish there. The quadratic collocation polynomial does not satisfy the differential equation at every point.
Exercise 6.2.10
(Suppose has the series representation in (10) and for , with and . Verify weighted summability and derive an explicit power bound from (11). Separately, choose bounded nodal errors that attain endpoint derivative error .)
Synthesis
Solution(4)
- 1
Check the weighted summability hypothesis
The coefficient assumption gives , so (10) applies.
Because: The series converges exactly when .
- 2
Compare the tail with an integral
Since is decreasing and integrable on ,
This bounds the derivative error of the exact-data interpolant.
- 3
Construct the extremal data error
Key step
Take . Each magnitude is , while .
- 4
Keep the two error sources apart
The first estimate does not include measurement error; the approximation tail and the data error must be accounted for separately.
Further reading within these notes
The preceding Chebyshev note develops the cosine change of variables, continuous coefficients, and the different aliasing rule for interior Gauss nodes. The finite-element notes provide a contrasting route from boundary equations to finite-dimensional systems. The present note covers a particular polynomial differentiation construction and a simple collocation example. General spectral boundary-value stability, multidimensional operators, analytic-function rates, and a floating-point stability analysis require further work.