Suppose that we wish to calculate values of the function \(g,\) where
$$
g(x)=\sum_{n=1}^{\infty} \frac{(2 n-1)}{1+(2 n-1)^{2}} \sin (2 n-1) \pi x
$$
It is possible to show that this series converges, albeit rather slowly.
However, observe that
for large \(n\) the terms in the series (i) are approximately equal to \([\sin (2
n-1) \pi x] /(2 n-1)\) and that the latter terms are similar to those in the
example in the text, Eq. (6).
(a) Show that
$$
\sum_{n=1}^{\infty}[\sin (2 n-1) \pi x] /(2 n-1)=(\pi /
2)\left[f(x)-\frac{1}{2}\right]
$$
where \(f\) is the square wave in the example with \(L=1\)
(b) Subtract Eq. (ii) from Eq. (i) and show that
$$
g(x)=\frac{\pi}{2}\left[f(x)-\frac{1}{2}\right]-\sum_{n=1}^{\infty} \frac{\sin
(2 n-1) \pi x}{(2 n-1)\left[1+(2 n-1)^{2}\right]}
$$
The series (iii) converges much faster than the series (i) and thus provides a
better way to
calculate values of \(g(x) .\)