# Numerical analysis: Chebyshev coefficient representation error

If $x_k$ are the Chebyshev nodes, that is for $n \in \mathbb{N}^*$, we have $x_k = \cos(\pi \frac{2k + 1}{n})$. Now suppose you have approximated values of $x_k$ and $x_{k'}$ for $k,k' \leq n$. In the worst case, what is the number of significant values we may loose when we calculate $x_{k'} - x_k$?

Now, taking into account the fact that each real is represented as $x \approx m \times b^e$, we then have a formula that for $x'$ the approximated value of $x$ and $y'$ approximated value of $y$, $\Delta (x' + y') \leq \epsilon(\Delta| x| + \Delta |y| + |x| + |y|)$ where $\epsilon = b^{1-N}$, where $N$ is there number of significant numbers after the comma.

So for a fixed $N \in \mathbb{N}^*$ we have $\Delta (x_{k'}' - x_k') \leq \epsilon (\Delta |x_{k'}| + \Delta |x_k| + |x_{k'}| + |x_k| ) \leq 4 \epsilon$

Thus in worst case we have a loss of precision of $\frac{4}{b^{N-1}}$. Thus we lose one significant term?

• as an aside: when working in floating point arithmetic, don't use the formula $x_k = \cos(\frac{(2k+1)\pi}{n})$ to calculate the Chebyshev points. rather, use the mathematically equivalent symmetric formula $x_m = \sin \left(\frac{\pi (-m:2:m)}{2m} \right)$, with $m=n-1$ (source: Trefethen's ATAP book, chapter 2, exercise 2.2) – GoHokies Mar 29 '18 at 14:16