C++ Functions to Evaluate Chebyshev Polynomials

Here’s some C++ functions which evaluate Chebyshev polynomials:

Chebyshev Polynomials of the first kind:
T0(x):
    template <class T> T T0(const T& x);

T1(x):
    template <class T> T T1(const T& x);

T2(x):
    template <class T> T T2(const T& x);

Tn(x):
    template <class T> T Tn(unsigned int n, const T& x);

Chebyshev Polynomials of the second kind:
U0(x):
    template <class T> T U0(const T& x);

U1(x):
    template <class T> T U1(const T& x);

U2(x):
    template <class T> T U2(const T& x);

Un(x):
    template <class T> T Un(unsigned int n, const T& x);


These are inline functions defined in the header file, chebyshev.h:

Here’s a sample program:

UPDATE: 2014-10-01:>
This project can now be found on GitHub:
Chebyshev-polynomials
– HTTPS Clone URL: https://github.com/jachappell/Chebyshev-polynomials.git
– Download ZIP

4 thoughts on “C++ Functions to Evaluate Chebyshev Polynomials”

  1. I don’t understand your program, however, i have a question for you. “How do you use a struct data type to create a function that evaluates polynomial addition, subtraction and synthetic division?” I would appreciate any help from you. Thanx.

  2. I dont get your program,i have a problem with using struct data to create,input,display,adding,subtracting,dividing ,multiplying,deleting a polynomial of exponents in an array.Please I highly need your help.That will be my pleasure if i get your assistance

Leave a Reply to Tshidi Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.