Evaluating high-degree polynomials

  • Thread starter Undoubtedly0
  • Start date
  • Tags
    Polynomials
In summary, the high-degree Chebyshev polynomials of the first kind can be evaluated using the cosine-arcosine property, but this is much easier said than done.
  • #1
Undoubtedly0
98
0
Hi all. I am trying to evaluate high-degree 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

Code:
>> x = 0.9;
>> p60 = ChebyshevPoly(60);
>> polyval(p60,x)

ans =

  -1.4447e+04

where ChebyshevPoly() comes from mathworks.com.
 
Physics news on Phys.org
  • #2
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 60-degree 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
Code:
ChebyshevPoly(60) < eps
and looking for the zeros.

You could try writing the routine yourself; a look at numerical recipes suggests it isn't that hard.
 
  • #3
Thanks for the response, coalquay404. I think the command you meant to use was

Code:
abs(ChebyshevPoly(60)) < eps

I have previously written my own coefficient generator, but achieved only the same bad results. Any thoughts?
 
  • #4
Undoubtedly0 said:
Thanks for the response, coalquay404. I think the command you meant to use was

Code:
abs(ChebyshevPoly(60)) < eps

I have previously written my own coefficient generator, but achieved only the same bad results. Any thoughts?

Yes, that's what I'd expect. Take a look at the coefficients of [itex]T_{60}[/itex] and you'll see they go as high as ~3x10^21 (and as low as -3x10^21). Evaluating the polynomial will involve differences of very large numbers of this sort of magnitude, so with double precision only extending to about 15 significant figures, it's not surprising that you're getting erratic results.

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
Thanks uart. Through what you said I have realized that it would far far easier to simply evaluate the polynomials using the cosine-arcosine property, rather than evaluating the polynomials directly. Thanks!
 

1. What is a high-degree polynomial?

A high-degree polynomial is a mathematical function that contains multiple terms, with each term having a variable raised to a power. The degree of a polynomial is determined by the highest power of the variable in the function. For example, a polynomial with the term x^3 would be considered a third-degree polynomial.

2. How do you evaluate a high-degree polynomial?

To evaluate a high-degree polynomial, you must substitute a value for the variable in the function and then perform the necessary calculations. This will result in a single numerical value as the output.

3. What is the purpose of evaluating high-degree polynomials?

Evaluating high-degree polynomials is important in many areas of science and mathematics, as it allows us to solve complex problems and model real-world situations. It can also help us understand the behavior and patterns of functions.

4. What are some strategies for evaluating high-degree polynomials?

Some strategies for evaluating high-degree polynomials include using the distributive property, combining like terms, and applying the rules of exponents. It can also be helpful to break down the polynomial into smaller parts and evaluate each part separately.

5. Are there any challenges or limitations to evaluating high-degree polynomials?

Yes, there are some challenges and limitations when evaluating high-degree polynomials. One challenge is that as the degree of the polynomial increases, the complexity of the calculations also increases. This can make it more difficult to accurately evaluate the polynomial. Additionally, some polynomials may not have real-number solutions, which can limit their use in certain situations.

Similar threads

  • Linear and Abstract Algebra
Replies
2
Views
975
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • General Math
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
27
Views
3K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
6
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
Back
Top