By defining an appropriate periodic extension of the function illustrated in Figure 23.24, find the half-range cosine series representation.
The function illustrated in Figure 23.24 is given by the formula f(t)=t \text { for } 0<t<\pi and is undefined outside this interval. Since the cosine series is required an even periodic extension must be formed. This is illustrated in Figure 23.25. Taking T = 2π in Equations (23.8) and (23.9), we find a_0\ and\ a_n.
\begin{aligned} & a_0=\frac{4}{T} \int_0^{T / 2} f(t) \mathrm{d} t \quad (23.8)\\ & a_n=\frac{4}{T} \int_0^{T / 2} f(t) \cos \frac{2 n \pi t}{T} \mathrm{~d} t \quad \text { for } n \text { a positive integer }\quad (23.9) \end{aligned}.
Now \cos n \pi=(-1)^n, so that
a_n=\frac{2}{\pi}\left(\frac{(-1)^n}{n^2}-\frac{1}{n^2}\right) \quad n=1,2, \ldotsOf course, all the b_n are zero. Therefore the half-range cosine series is
f(t)=\frac{\pi}{2}-\frac{4}{\pi} \cos t-\frac{4}{9 \pi} \cos 3 t \ldotsand this series converges to the given function within the interval 0 < t <π.