FS3
From Exampleproblems
Find the Fourier series for
on ![[-\pi,\pi]\,](/wiki/images/math/f/8/9/f8978aafad62d13d1217c9f991d4ab08.png)
The general Fourier series on
is:



The n = 0 case is not needed since the integrand in the formula for
is
.
In the present problem,
But since the right hand side is not defined if n = 0, the 0 index for a will have to be calculated seperately.
![a_0 = \frac{1}{\pi}\int_{-\pi}^\pi (1+x)\,dx = \frac{1}{\pi}\left[x+\frac{1}{2}x^2\right]_{-\pi}^\pi = 2, \,\,\,\,](/wiki/images/math/7/f/a/7fa69fc854272c4356303f1eb0a59cd3.png)
![b_n = \frac{1}{\pi}\int_{-\pi}^\pi (1+x) \sin(nx)\,dx = \frac{1}{\pi}\left(-\,\frac{1}{n}\left[(1+x)\cos(nx)\right]_{-\pi}^\pi + \int_{-\pi}^\pi \frac{\cos(nx)}{n}\,dx\right)\,](/wiki/images/math/b/f/5/bf54b25a485463021a9f88db45b49aa6.png)
![= \frac{1}{\pi}\left(-\,\frac{1}{n}(1+\pi-1+\pi)\cos(nx) + \left[\frac{\sin(nx)}{n^2}\right]_{-\pi}^\pi\right) = \frac{2 (-1)^{n+1}}{n}\,](/wiki/images/math/a/d/a/ada726cb353eac3a6879f531d679ea5e.png)
So the Fourier series is
for ![[-\pi,\pi]\,](/wiki/images/math/f/8/9/f8978aafad62d13d1217c9f991d4ab08.png)