The exact value for \( x = \pi/3 \) is:
$$f(\pi/3) = |\pi/3| - \pi/2 = \pi/3 - \pi/2 = -\pi/6 \approx -0.52359878.$$
Truncation error for a partial sum \( S(x) \) is:
$$E(x) = |S(x) - f(x)|.$$
Table of Partial Sums and Errors:
| Number of non-zero terms | Value of the partial sum | Truncation error |
|---|---|---|
| 1 | $$-\frac{4}{\pi}\cos(\pi/3) \approx -0.63661977$$ | 0.11302100 |
| 2 | $$-\frac{4}{\pi}\cos(\pi/3) - \frac{4}{9\pi}\cos(3\pi/3) \approx -0.49514871$$ | 0.02845006 |
| 3 | $$-0.52061350$$ | 0.00298527 |