Python Forum
Can I evaluate a Chebyshev polynomial using a function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I evaluate a Chebyshev polynomial using a function
#1
Hello everyone. I need to evaluate an arbitrary Chebyshev polynomial of order n at a point x. I have done it manually using their definition as

mt.cos(n*mt.acos(x))
However, I am not satisfied by the numerical precision of this, the results are not exact. I have searched the web for a function that does this in a more efficient way and the closest thing I have found is the Chebyshev module. However, inside of it I cannot find what I am looking for.

The first Chebyshev polynomials are P_0=1, P_1=x,P_2=2x^2-1 and so on. I need a function which output is the polynomial of the selected order evaluated at an arbitrary point. i.e. f(n=1, x=0.6)= 0.6, f(n=2, x=0.5)= 2*(0.5)^2-1 and so on.

Can someone tell me if said function exists?
Thanks.
Reply
#2
Take a look at SymPy module. This is package for symbolic computations and computations with high precision.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Evaluate Calculations yrstruly 0 948 Jun-17-2023, 06:51 PM
Last Post: yrstruly
  Finding out roots of Chebyshev's polynomials player1681 2 2,401 Dec-02-2019, 11:53 PM
Last Post: scidam
  Machine Learning Polynomial Regression braveYug 0 1,686 Nov-13-2019, 11:41 AM
Last Post: braveYug
  Evaluate dataset with logistic regression chisox721 6 3,527 Jun-06-2019, 03:01 PM
Last Post: chisox721
  Confidence intervals over time with polynomial regression jjameson 0 3,279 May-16-2019, 02:22 PM
Last Post: jjameson
  To draw a polynomial solution pianistseb 2 2,908 Nov-13-2018, 01:45 PM
Last Post: pianistseb

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020