$\text{Determine the sum of the Fourier series of $f(x)=x\sin(x)$ on $[-\pi,\pi]$ all |x| $\leq$ $\pi$}$
I found that the Fourier series was:
$$1-\frac{1}{2}\cos(x)+2\sum_{n=2}^{\infty} \frac{(-1)^{n+1}}{n^2-1}\cos(nx)$$
Do I just take the average of the right and left endpoints? $f(x)$ and $f'(x)$ is both convergent on $[-\pi,\pi]%$ so I would just think I average $f(x)$ at the endpoints.
That gives me a sum of $0$ though. I'm not sure if that's right...
The $2\pi$-periodic function $f$, which restriction to $[-\pi,\pi]$ is $x \mapsto x \sin x$ is continuous. Also, it has right and left derivatives everywhere. Thus, the Dirichlet conditions are satisfied. The Fourier series of $f$ converges pointwise towards $f$, i.e. for all $x$, $$ a_0 + \sum_{n=1}^\infty a_n \cos (nx) + b_n \sin (nx) = f (x) \, , $$ where $a_n$ and $b_n$ are the Fourier coefficients of $f$. In particular, this equality holds on $[-\pi,\pi]$.