Discrete Chebyshev transform
In applied mathematics, the discrete Chebyshev transform, named after Pafnuty Chebyshev, is of either of two main varieties: the discrete Chebyshev transform on the 'roots' grid of the Chebyshev polynomials of the first kind , and the discrete Chebyshev transform on the 'extrema' grid of the Chebyshev polynomials of the first kind.
The DCT on the 'roots' grid
where:
where and
otherwise.
Using the definition of ,
and its inverse transform:
(This so happens to the standard Chebyshev series evaluated on the roots grid.)
This can readily be obtained by using manipulating the input arguments to a discrete cosine transform.
To show that this can be easy done the following MATLAB code is presented to demonstrate this.
function a=fct(f,l)
%x=-cos(pi/N*((0:N-1)'+1/2));
f=f(end:-1:1,:);
A=size(f); N=A(1);
if exist('A(3)','var') && A(3)~=1
for i=1:A(3)
a(:,:,i)=sqrt(2/N)*dct(f(:,:,i));
a(1,:,i)=a(1,:,i)/sqrt(2);
end
else
a=sqrt(2/N)*dct(f(:,:,i));
a(1,:)=a(1,:)/sqrt(2);
end
It should be noted that the discrete cosine transform (dct) is in fact computed using a fast fourier transform algorithm in MATLAB.
And the inverse transform is given by the MATLAB code:
function f=ifct(a,l)
%x=-cos(pi/N*((0:N-1)'+1/2))
k=size(a); N=k(1);
a=idct(sqrt(N/2)*[a(1,:)*sqrt(2); a(2:end,:)]);
end
Extrema grid
This transform uses the grid:
This transform is more difficult to implement by use of a Fast Fourier Transform (FFT). However it is more widely used because it is on the extrema grid which tends to be most useful for boundary value problems. Mostly because it is easier to apply boundary conditions on this grid.
There is a discrete (and in fact fast because it performs the dct by using a fast fourier transform) available at the MATLAB file exchange that was created by Greg von Winckel. So it is omitted here.
In this case the transform and its inverse are
where is as it was in the last section.