chebyshev expansion

41 Views Asked by At

Express First kind Chebyshev polynomial in terms of monomials

I have a function as

(1) $f=\sum_i^n a_iT_i$ ,

where $T_i$ are first kind Chebyshev polynomial of order "i". I want to express $f$ in terms of monomials (powers of x). Hence, I need to write $T_i$ in terms of monomials.This can be done using following recursive formula: $T_0(x)=1; T_1(x)=x; T_{n+1}(x)=2xT_n(x)−T_{n−1}(x)$ for $x \in [-1, 1]$.

So function $f$ in terms of monomials and the original function in (1) should match over $x\in [-1 1]$

However as "i" increases ($i\ge45$), the two functions do not match.

For example, following Matlab plots function $f=T_{50}$ both in monomials space and Chebyshev space.

clc;clear;close all; % f=T_n;

n=50; x=[-pi:0.1:0]; plot(cos(x),cos((n-1)x),'k-')

syms x; Tr(1,1)=1+0*x; Tr(2,1)=x; for i=2:n-1; Tr(i+1,1)= expand(2*x*Tr(i,1)-Tr(i-1,1));end; hold on;for x=-1:0.01:1; plot(x,eval(Tr(end)),'--bo'); end;