Using the points \(x_{i} = i \frac{\pi}{4}\) for \(i=0,1,2,\ldots,8\) leads to the polynomial that can be written:
\begin{equation*}
\begin{aligned}\widehat{P}_{8}(x)\amp ={\frac{8x}{315\pi^{7}}}\biggl( 1280\,\sqrt{2}{x}^{6}-8960\,\sqrt{ 2}{x}^{5}\pi +24752\,\sqrt{2}{x}^{4}{\pi }^{2}\\\amp \qquad -34160\,\sqrt{2}{x}^{3 }{\pi }^{3}+24500\,\sqrt{2}{x}^{2}{\pi }^{4}-8540\,\sqrt{2}x{\pi }^{ 5}\\\amp \qquad +1128\,{\pi }^{6}\sqrt{2}-1792\,{x}^{6}+12544\,{x}^{5}\pi -34720\,{ x}^{4}{\pi }^{2}\\\amp \qquad +48160\,{x}^{3}{\pi }^{3}-34783\,{x}^{2}{\pi }^{4}+ 12061\,x{\pi }^{5}-1470\,{\pi }^{6}\biggr).\end{aligned}
\end{equation*}
To find the polynomial that passes through the Chebyshev points, we build a table of
\(t_{j}\) from (eq:cheby:pts:[a,b]) and
\(f(t_{j})\text{.}\)
| \(j\) |
\(t_{j}\) |
\(f(t_{j})\) |
| 1 |
6.23545745567117 |
-0.0477097333130245 |
| 2 |
5.86229169995749 |
-0.408576233017198 |
| 3 |
5.16096948600951 |
-0.901063626090171 |
| 4 |
4.21608062324342 |
-0.879346445795841 |
| 5 |
3.14159265358397 |
0 |
| 6 |
2.06710468392645 |
0.879346445800469 |
| 7 |
1.12221582116592 |
0.901063626088372 |
| 8 |
0.420893607226473 |
0.408576233021196 |
| 9 |
0.0477278515232653 |
0.0477097333278532 |
|
The interpolating polynomial that passes through these points is:
\begin{equation*}
\begin{aligned}p_{8}(x)\amp = 0.0001448292x^{7}-0.0031849587x^{6}+0.0220637455x^{5} \\\amp \qquad -0.0322337298x^{4}-.1255921078x^{3}-0.0257364715x^{2} \\\amp \qquad +1.0061352440x-0.00002385113\end{aligned}
\end{equation*}
The plots of the sine function and the interpolates are nearly identical. The following shows the differences
\(|\sin x - p_{8}(x)|\) and
\(|\sin x - P_{0,\ldots, 8}(x)|\text{,}\)
where the solid line is
\(p_{8}(x)\text{,}\) with the Chebyshev nodes and the dashed line is
\(\widehat{P}_{8}(x)\text{,}\) where the equally-spaced nodes have been used. The maximum error using
\(\widehat{P}_{8}(x)\) is about 5 times larger than the maximum error with
\(p_{8}(x)\text{.}\) Also, as we have seen earlier, the error
\(|p_{8}(x)-f(x)|\) is distributed uniformly across the interval.