Discrete Chebyshev transform

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In applied mathematics, a discrete Chebyshev transform (abbreviated DCT, DChT, or DTT) is an analog of the discrete Fourier transform for a function of a real interval, converting in either direction between function values at a set of Chebyshev nodes and coefficients of a function in Chebyshev polynomial basis. Like the Chebyshev polynomials, it is named after Pafnuty Chebyshev.

The two most common types of discrete Chebyshev transforms use the grid of Chebyshev zeros, the zeros of the Chebyshev polynomials of the first kind Tn(x) and the grid of Chebyshev extrema, the extrema of the Chebyshev polynomials of the first kind, which are also the zeros of the Chebyshev polynomials of the second kind Un(x). Both of these transforms result in coefficients of Chebyshev polynomials of the first kind.

Other discrete Chebyshev transforms involve related grids and coefficients of Chebyshev polynomials of the second, third, or fourth kinds.

Roots grid

[edit | edit source]

The discrete Chebyshev transform of u(x) at the points xn is given by:

am=pmNn=0N1u(xn)Tm(xn),

where

xn=cos(n+12)πN,
am=pmNn=0N1u(xn)cos(mcos1(xn)),

with pm=1 if and only if m=0 and pm=2 otherwise.

Using the definition of xn,

am=pmNn=0N1u(xn)cosm(N+n+12)πN=pmNn=0N1u(xn)(1)mcosm(n+12)πN.

The inverse transform is

un=m=0N1amTm(xn)=m=0N1am(1)mcosm(n+12)πN.

(This is the standard Chebyshev series evaluated on the roots grid.)

This discrete Chebyshev transform can be computed by manipulating the input arguments to a discrete cosine transform, for example, using the following MATLAB code:

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

MATLAB's built-in dct (discrete cosine transform) function is implemented using the fast Fourier transform.

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

[edit | edit source]

This transform uses the grid:

xn=cosnπN
Tn(xm)=cos(mnπN+nπ)=(1)ncosmnπN

This extrema grid is more widely used.

In this case the transform and its inverse are

u(xn)=un=m=0NamTm(xn),
am=pmN(12(u0(1)m+uN)+n=1N1unTm(xn)),

where pm=1 if and only if m=0 or m=N and pm=2 otherwise.

Usage and implementations

[edit | edit source]

The primary uses of the discrete Chebyshev transform are numerical integration, interpolation, and stable numerical differentiation.[1] An implementation which provides these features is given in the C++ library Boost.[2]

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).