Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!rpi!wrf
From: wrf@mab.ecse.rpi.edu (Wm Randolph Franklin)
Newsgroups: comp.dsp
Subject: Re: Taylor vs. Chebyshev polynomials
Keywords: Taylor vs. Chebyshev polynomials
Message-ID: <1989Oct3.184811.27778@rpi.edu>
Date: 3 Oct 89 18:48:11 GMT
References: <2421@radio.oakhill.UUCP> <1989Sep28.161516.10353@rpi.edu> <3811@deimos.cis.ksu.edu>
Organization: Rensselaer Polytechnic Institute, Troy NY
Lines: 93


You're right that my calling Taylor series wimps  is excessive.  This is
especially  so for  sin(x) which  is  one of  the functions  that Taylor
series are best  suited for  since sin  is smooth  and defined  over the
whole complex plane with  no singularities, and  the Taylor coefficients
shrink fast.

However,  even  here Chebyshev polynomials are  better, and the relative
difference increases as the order increases.

I scaled sin to that [0,Pi] was mapped to [-1,1]  and expanded about the
new  0 (for Taylor)   or over the interval  (for   Chebyshev).  This  is
probably the interval you would want to approximate.

N	abs(Coef of x^n) in Taylor	 	
                   abs(Coef of T(N,x)) in Cheb
0	.7        .6   
1	.55	  .5   
2	.22	  .1   
3	.06	  .01  
4	.01	  .001 
5	.002	  .0001
6	.0002	  7e-6 
7	.00002	  3e-7 
8	3e-6	  2e-8 
9	2e-7	  9e-10
10	2e-8	  3e-11
11	1e-9	  1e-12
12	8e-11	  4e-14
13	5e-12     1e-15
14	3e-13	  3e-17
15	1e-14	  9e-19

Note: 

1. Truncating the Chebyshev series when it is still expressed  in T(n,x)
is equivalent (almost) to truncating the Taylor series expressed in x^n.
In either case, the error from stopping at any term is usually less than
the first unused coefficient.  (Picky note to Chebyshev hackers: this is
why  it is more  useful to  look  at the   coefficients of T rather than
convert to a power basis.)

2. Although I only retyped 1 or 2  digits for this  note, the calcs were
done to 20 significant digits to avoid roundoff.

3. The Taylor to the 15th  degree is  between the 12th  and  13th degree
Chebyshev -- which is more than one term.


Well,  maybe  you think that   the interval   favored Chebyshev. So try
another interval [-Pi,Pi], scaled to [-1,1].  Note the function is odd.

N Taylor   Cheb
1  3      1     
3  5      1.6   
5  3      .2    
7  .6     .01   
9  .08    .0005 
11 .007   .00001
13 .0004  2e-7  
15 .00002 2e-9  

The Taylor to x^15 worse than the Chebyshev to x^11.

----------------

In all the  above I'm using  about the best   possible function for  the
Taylor.   In fact Chebyshev   can do a  wide class  of  functions Taylor
can't:

- functions with a complex singularity nearby, such as 1/(x^2+.1).

-  functions  which are  only differentiable  a  small number  of times.
Taylor requires N for N-th degree, Chebyshev requires only 1st order.

Admittedly Chebyshev will converge much more slowly in these cases.  But
it WILL converge, and Taylor WON'T.

----------------

(Now  I'm really getting on my  hobby-horse).   There's  something often
much better than  Chebyshev --  a Pade-Chebyshev expansion,  which  is a
Chebyshev  converted to  a rational  fraction.  Its  relative betterness
also increases with N.  However it requires one divide to evaluate.  The
problem is that Pade expressions are not  in the textbooks yet, and even
if they were are more complicated to calculate.  Also  I can't get Maple
to do it right now.

-- 
						   Wm. Randolph Franklin
Internet: wrf@ecse.rpi.edu (or @cs.rpi.edu)    Bitnet: Wrfrankl@Rpitsmts
Telephone: (518) 276-6077;  Telex: 6716050 RPI TROU; Fax: (518) 276-6261
Paper: ECSE Dept., 6026 JEC, Rensselaer Polytechnic Inst, Troy NY, 12180