Fourier series for $f(x) = x^2 - \pi x + \frac{\pi^2}{6}$

121 Views Asked by At

So, I need to find the Fourier series for the following function: $f(x) = x^2 - \pi x + \frac{\pi^2}{6}$. This is what I did thus far: $$a_0 = \int^{\frac{\pi}{2}}_{-\frac{\pi}{2}}(x^2 - \pi x + \frac{\pi^2}{6})dx = \left. \frac{1}{3}x^3-\frac{\pi}{2}x^2 +\frac{\pi^2x}{6}\right|^{\frac{\pi}{2}}_{-\frac{\pi}{2}}=2\left(\frac{1}{3}\frac{\pi^3}{8}-\frac{\pi}{2}\frac{\pi^2}{4}+\frac{\pi^3}{24}\right) = -\frac{\pi^3}{12}$$

The, when looking at the second coefficient, it looks like if I am doing it in the usual way there will be partial integration multiple times for each $\cos(2n x )$ multiplication with the term of the function. So, is it done in the ordinary way by doing partial integration numerous times or is there another method?