I am totally new to Fourier series. Here I try to compute the Fourier series for the function $f(x)=x$ over the interval $-\pi\leq x \leq\pi$.
Since $f(x)$ is an odd function:
$a_n=0$ (why is this the case?), $$b_n=\frac{1}{\pi}\int_{-\pi}^\pi f(x)\sin(nx)dx=\frac{1}{\pi}\int_{-\pi}^\pi x\sin(nx)dx$$.
Which means $${ -\dfrac{x\cos(nx)}{n}+\dfrac{\sin(nx)}{n^2}}$$ (There should be a evaluate sign here but I don't know how to type it in latex)
What should I do next?
I am just tracing the steps from this website: http://www.sosmath.com/fourier/fourier1/fourier1.html
I know the end result should be $2(\sin(x)-\dfrac{\sin(2x)}{2}+\dfrac{\sin(3x)}{3}$...)
What next? We evaluate at those endpoints $\pi$ and $-\pi$. What is $\sin(n\pi)$ for integer $n$? What is $\cos(n\pi)$? Don't be afraid to write down a few to get a sense for the pattern.
Also, look closer at that antiderivative. Make sure of the signs.