Find the Fourier series representation of the function with period 2π defined by
f (t) = t² ,0 < t ≤ 2π.
As usual we sketch f (t), as shown in Figure 23.16. Here T = 2π and we shall integrate, for convenience, over the interval [0, 2π]. Using Equation (23.3) we find
a_0=\frac{1}{\pi} \int_0^{2 \pi} t^2 \mathrm{~d} t=\frac{1}{\pi}\left[\frac{t^3}{3}\right]_0^{2 \pi}=\frac{8 \pi^2}{3}Using Equation (23.4) we have
a_n=\frac{2}{T} \int_0^T f(t) \cos \frac{2 n \pi t}{T} \mathrm{~d} t \quad \text { for } n \text { a positive integer } (23.4)
Integrating by parts, we find
\begin{aligned} a_n & =\frac{1}{\pi}\left(\left[t^2 \frac{\sin n t}{n}\right]_0^{2 \pi}-\int_0^{2 \pi} 2 t \frac{\sin n t}{n} \mathrm{~d} t\right) \\ & =-\frac{2}{n \pi} \int_0^{2 \pi} t \sin n t \mathrm{~d} t \\ & =-\frac{2}{n \pi}\left(\left[-t \frac{\cos n t}{n}\right]_0^{2 \pi}+\int_0^{2 \pi} \frac{\cos n t}{n} \mathrm{~d} t\right) \\ & =-\frac{2}{n \pi}\left(\frac{-2 \pi \cos 2 n \pi}{n}+\left[\frac{\sin n t}{n^2}\right]_0^{2 \pi}\right) \\ & =\frac{4}{n^2} \end{aligned}Hence a_1=4, a_2=1, a_3=\frac{4}{9}, \ldots Similarly,
\begin{aligned} b_n & =\frac{1}{\pi} \int_0^{2 \pi} t^2 \sin n t \mathrm{~d} t \\ & =\frac{1}{\pi}\left(\left[-t^2 \frac{\cos n t}{n}\right]_0^{2 \pi}+\int_0^{2 \pi} 2 t \frac{\cos n t}{n} \mathrm{~d} t\right) \\ & =\frac{1}{\pi}\left(-\frac{4 \pi^2}{n} \cos 2 n \pi+\frac{2}{n} \int_0^{2 \pi} t \cos n t \mathrm{~d} t\right) \\ & =\frac{1}{\pi}\left(-\frac{4 \pi^2}{n}+\frac{2}{n}\left(\left[\frac{t \sin n t}{n}\right]_0^{2 \pi}-\int_0^{2 \pi} \frac{\sin n t}{n} \mathrm{~d} t\right)\right) \\ & =\frac{1}{\pi}\left(-\frac{4 \pi^2}{n}-\frac{2}{n^2}\left[-\frac{\cos n t}{n}\right]_0^{2 \pi}\right) \\ & =-\frac{4 \pi}{n} \end{aligned}Thus b_1=-4 \pi, b_2=-2 \pi, \ldots . Finally, the required Fourier series representation is given by
\begin{aligned} f(t)= & \frac{4 \pi^2}{3}+\left(4 \cos t+\cos 2 t+\frac{4}{9} \cos 3 t+\cdots\right) \\ & -\pi\left(4 \sin t+2 \sin 2 t+\frac{4 \sin 3 t}{3}+\cdots\right) \end{aligned}