I was looking for some help with derivatives of Chebychev polynomials at zero points. The recursive expression,

$$ T_{(j+1)}(x) = 2xT_j(x) - T_{(j-1)}(x) $$

has the derivative $$ T'_{j+1}(x) = 2T_j(x) + 2xT'_j(x) - T'_{j-1}(x) $$

with $T'_0=0$ and $T'_1=1$.

But I was looking at Trefethen's book (Chapter 6, Page 54) where he uses the following code to construct a derivative matrix for Chebychev polynomials at extreme points:

% CHEB compute D = differentiation matrix, x = Chebyshev grid 
function [D,x] = cheb(N) 
if N==0, D=0; x=1; return, end 
x = cos(pi*(0:N)/N)'; 
c = [2; ones(N-1,1); 2].*(-1).^(0:N)'; 
X = repmat(x,1,N+1); 
dX = X-X'; 
D = (c*(1./c)')./(dX+(eye(N+ 1))) ; % off-diagonal entries 
D = D - diag(sum(D')); 

How are these two derivative calculations related? Or is it that the derivatives at extreme points and zero points are calculated differently, as above? Any references I can read to better understand this?

Thank you.

  • $\begingroup$ One is the derivative in physical space, and the other in spectral space. It is quite similar to performing a derivative in Fourier space (with the difference that in your case the derivative operator is not diagonal). $\endgroup$
    – davidhigh
    Apr 6, 2018 at 9:14

1 Answer 1


On p. 53 of the book of Trefethen, you can read "D_{N} contains the derivative of the degree N polynomial interpolant p_j(x) to the delta function supported at x_j [= cos(j*pi/N)], sampled at the grid {x_i}" So the entries of D are the derivatives of the Lagrange interpolatory polynomials and not the Chebyshev polynomials.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.