For a question like finding the fourier series of:
$$f(x) = \begin{cases}
x & 0 \leq x < \pi \\ 0 & -\pi \leq x\leq 0 \\ \frac{\pi}{2} & x = -\pi
\end{cases}
$$
with period $2\pi$, the fourier series is:
$$Sf(x) = \frac{\pi}{4} - \frac{2}{\pi} \sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \cos((2k-1)x) + \sum_{k=1}^{\infty} \frac{(-1)^{k+1}}{k} \sin(kx)$$ ,
I graphed the first 9 terms of each sum, and this is what it looks like:
http://www.wolframalpha.com/input/?i=sketch+y+%3D+pi%2F4+-+2%2Fpi+(cosx+%2B+1%2F9+cos3x+%2B+1%2F25+cos5x+%2B+1%2F49+cos7x+%2B+1%2F64+cos8x+%2B+1%2F81+cos9x)+%2B+(-sinx+%2B+sin2x+%2F2+-+sin3x+%2F3+%2B+sin4x+%2F4+-+sin5x+%2F5+%2B+sin6x+%2F+6)
(sorry about the link!)
Upon sketching the actual function $f$, it really seems that it won't converge towards my series. Namely, the interval $(0,\pi)$.
My function is a straight line from $(0,0)$ to $(\pi,\pi)$. But the fourier series looks like it'd converge towards the line $y=0$ for that interval $(0,\pi)$, whereas this should actually occur for say an interval $(-\pi,0)$.
Can someone clarify why the fourier series doesn't look like it'll converge towards $f$?