# Degree of Chebyshev polynomial off by one

**URL:** <https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627>\
**Category:** Specific Domains\
**Tags:** package, interpolations, polynomials\
**Created:** [April 8, 2026, 9:08pm UTC](https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627 "2026-04-08T21:08:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CFBaptista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cfbaptista/32/9264_2.png) [@CFBaptista](https://discourse.julialang.org/u/CFBaptista)\
**Post date:** [April 8, 2026, 9:08pm UTC](https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627/1 "2026-04-08T21:08:14Z")

</div>

According to Wikipedia pages [Chebyshev polynomials](https://en.wikipedia.org/wiki/Chebyshev_polynomials) and [Chebyshev nodes](https://en.wikipedia.org/wiki/Chebyshev_nodes) a Chebyshev polynomial of the first kind of degree n has n roots.  
However, in `BarycentricInterpolation.jl` I get:

```julia-auto
using BarycentricInterpolation

nodes(Chebyshev1{2}())
3-element Vector{Float64}:
 -0.8660254037844386
  0.0
  0.8660254037844387

```

Which is one root more than I expected.  
I observed the same for other degrees.

According to the first Wikipedia page:

T\_2(x)=2x^2-1.

This should have two roots.

Am I missing or misinterpreting something?  
@dawbarton and @stevengj could you comment on this?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 8, 2026, 9:42pm UTC](https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627/2 "2026-04-08T21:42:59Z")

</div>

I think in that package, the “degree” of the polynomial refers to the degree of the _interpolant_, not of the polynomial whose nodes you are using. With N+1 points you can interpolate a polynomial of degree N.

So, to interpolate a degree 2 polynomial, you need 3 points, which for `Chebyshev1` you get from the roots of the degree-3 first-kind Chebyshev polynomial T\_3(x) = 4x^3 - 3x, which has roots x=0 and x = \pm \sqrt{3}/2 \approx \pm 0.866\cdots.

---

<div class="post-metadata">

**Author:** ![CFBaptista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cfbaptista/32/9264_2.png) [@CFBaptista](https://discourse.julialang.org/u/CFBaptista)\
**Post date:** [April 8, 2026, 9:50pm UTC](https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627/3 "2026-04-08T21:50:35Z")

</div>

This is somewhat confusing in the `README` which talks about N being the degree of the polynomial.  
Maybe it can be updated to be more explicit about what N really refers to.

---

<div class="post-metadata">

**Author:** ![dawbarton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dawbarton/32/215461_2.png) [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Post date:** [April 8, 2026, 9:52pm UTC](https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627/4 "2026-04-08T21:52:55Z")

</div>

In short, it follows the conventions of the paper referenced at the start of the README ([https://doi.org/10.1137/S0036144502417715](https://doi.org/10.1137/S0036144502417715)). But yes, it should probably be clarified in the README.

---

<div class="post-metadata">

**Author:** ![dawbarton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dawbarton/32/215461_2.png) [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Post date:** [April 8, 2026, 10:12pm UTC](https://discourse.julialang.org/t/degree-of-chebyshev-polynomial-off-by-one/136627/6 "2026-04-08T22:12:57Z")

</div>

Now fixed in the README.
