Register to reply 
Evaluating highdegree polynomials 
Share this thread: 
#1
Nov912, 07:45 AM

P: 94

Hi all. I am trying to evaluate highdegree Chebyshev polynomials of the first kind. It is well known that for each Chebyshev polynomial [itex]T_n[/itex], if [tex]1\le x\le1[/tex] then
[tex]1\le T_n(x)\le 1[/tex] However, when I try to evaluate a Chebyshev polynomial of a high degree, such as [itex]T_{60}[/itex], MATLAB gives results that do not stay within these bounds. I assume this is due to a lack of precision. Any suggestions? As an example, try



#2
Nov912, 10:56 AM

P: 218

First off, that file isn't from the Mathworks; it's a user submission to the Matlab File Exchange. As you've learned, anything you get from there should be treated with suspicion until it's known to be good.
You're also correct that this is a precision issue. The first few terms in the 60degree polynomial are [tex]1  1800 x^2 + 539400 x^4  64440320 x^6 + \cdots[/tex] That Matlab file, however, thinks that there are lots of vanishing coefficients where in fact there shouldn't be. You can see this for yourself by running
You could try writing the routine yourself; a look at numerical recipes suggests it isn't that hard. 


#3
Nov912, 12:33 PM

P: 94

Thanks for the response, coalquay404. I think the command you meant to use was



#4
Nov1012, 04:24 AM

Sci Advisor
P: 2,751

Evaluating highdegree polynomials
You'll probably get "ok" results (correct to several significant digits) if the coefficients don't exceed about the +/ 10^12 range. I just checked T35 for example, and the coefficients extend to about +/ 2.4x10^12 and got the following results. Matlab polyval(T35,0.9) returned 0.99689, while cos(35*acos(0.9)) returned 0.99696, which agrees, but only to 3 (nearly 4) significant digits. 


#5
Nov1012, 04:25 PM

P: 94

Thanks uart. Through what you said I have realized that it would far far easier to simply evaluate the polynomials using the cosinearcosine property, rather than evaluating the polynomials directly. Thanks!



Register to reply 
Related Discussions  
Subspaces of polynomials with degree <= 2  Calculus & Beyond Homework  4  
Set of degree 2 polynomials a subspace  Calculus & Beyond Homework  2  
Subspace of Polynomials of degree 2  Linear & Abstract Algebra  11  
Evaluating polynomials in Matlab  Math & Science Software  0  
Irreducible Polynomials p 5 degree 4  Linear & Abstract Algebra  1 