# The equations of the pre-defined Chebyshev polynomials

Hi, ROOT experts,

If I were to show people, in a presentation, the equations of pre-defined functions cheb0, cheb1, cheb2, cheb3, …, and cheb9, what would be the equations?

Thank you!

From here you can go to the implementation and find out the following:

``````    // implementation of Chebyshev polynomials using all coefficients
56      // needed for creating TF1 functions
57      inline double Chebyshev0(double , double c0) {
58         return c0;
59      }
60      inline double Chebyshev1(double x, double c0, double c1) {
61         return c0 + c1*x;
62      }
63      inline double Chebyshev2(double x, double c0, double c1, double c2) {
64         return c0 + c1*x + c2*(2.0*x*x - 1.0);
65      }
66      inline double Chebyshev3(double x, double c0, double c1, double c2, double c3) {
67         return c3*Chebyshev::T<3>(x) + Chebyshev2(x,c0,c1,c2);
68      }
69      inline double Chebyshev4(double x, double c0, double c1, double c2, double c3, double c4) {
70         return c4*Chebyshev::T<4>(x) + Chebyshev3(x,c0,c1,c2,c3);
71      }
72      inline double Chebyshev5(double x, double c0, double c1, double c2, double c3, double c4, double c5) {
73         return c5*Chebyshev::T<5>(x) + Chebyshev4(x,c0,c1,c2,c3,c4);
74      }
75      inline double Chebyshev6(double x, double c0, double c1, double c2, double c3, double c4, double c5, double c6) {
76         return c6*Chebyshev::T<6>(x) + Chebyshev5(x,c0,c1,c2,c3,c4,c5);
77      }
78      inline double Chebyshev7(double x, double c0, double c1, double c2, double c3, double c4, double c5, double c6, double c7) {
79         return c7*Chebyshev::T<7>(x) + Chebyshev6(x,c0,c1,c2,c3,c4,c5,c6);
80      }
81      inline double Chebyshev8(double x, double c0, double c1, double c2, double c3, double c4, double c5, double c6, double c7, double c8) {
82         return c8*Chebyshev::T<8>(x) + Chebyshev7(x,c0,c1,c2,c3,c4,c5,c6,c7);
83      }
84      inline double Chebyshev9(double x, double c0, double c1, double c2, double c3, double c4, double c5, double c6, double c7, double c8, double c9) {
85         return c9*Chebyshev::T<9>(x) + Chebyshev8(x,c0,c1,c2,c3,c4,c5,c6,c7,c8);
86      }
87      inline double Chebyshev10(double x, double c0, double c1, double c2, double c3, double c4, double c5, double c6, double c7, double c8, double c9, double c10) {
88         return c10*Chebyshev::T<10>(x) + Chebyshev9(x,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9);
89      }
``````