# The equations of the pre-defined Chebyshev polynomials

**URL:** <https://root-forum.cern.ch/t/the-equations-of-the-pre-defined-chebyshev-polynomials/53629>\
**Category:** Newbie\
**Created:** [February 14, 2023, 11:50pm UTC](https://root-forum.cern.ch/t/the-equations-of-the-pre-defined-chebyshev-polynomials/53629 "2023-02-14T23:50:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jackhammer0102](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@Jackhammer0102](https://root-forum.cern.ch/u/Jackhammer0102)\
**Post date:** [February 14, 2023, 11:50pm UTC](https://root-forum.cern.ch/t/the-equations-of-the-pre-defined-chebyshev-polynomials/53629/1 "2023-02-14T23:50:07Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [February 15, 2023, 6:50am UTC](https://root-forum.cern.ch/t/the-equations-of-the-pre-defined-chebyshev-polynomials/53629/2 "2023-02-15T06:50:02Z")

</div>

From [here](https://root.cern/doc/master/namespaceROOT_1_1Math.html#a1783c3cbf9ba04d2e5354bac3a78a250) you can go to the implementation and find out the following:

```auto
    // 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 }

```
