Nov-21-2019, 08:19 AM

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

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.

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.