Fourier series for $f(x)=(\pi -x)/2$ I need to find the Fourier series for $$f(x)=\frac{\pi -x}{2}, 0<x<2\pi$$
Since the interval isn't symmetric over $0$, I guess I need to consider $f$'s periodic extension to $\mathbb R$. let's call it $g$. Then $$g(x)=\begin{cases}\frac{\pi -x}{2}, \text{ if } 0<x<\pi\\  \frac{-\pi -x}{2}, \text{ if }{-\pi <x<0}\end{cases}$$
Due to $g$ being odd, the fourier coefficients $a_n$ are all $0$.
And $$b_n=\frac{2}{\pi}\int _0^\pi g(x)\sin(nx)dx=\frac{1}{\pi}\int _0^\pi (x-\pi)\sin (nx)dx$$
According to wolfram alpha $b_n=1/n$ so the Fourier series is
$$\sum _{n=1}^{+\infty}\frac{\sin(kx)}{n}$$
But when I check the result of $x=1/2$ I get this which seems to diverge. It also fails for $x=\pi /2$ and a few other $x$'s.
What am I doing wrong?
I just saw this question. it looks like my answer is correct. am I doing anything wrong in my verification?
EDIT: I realised I forgot to divide by $\pi$. I fixed that but it still doesn't work. I also updated the links.
 A: You forgot to divide by $\pi$. WolramAlpha's result is correct, but the coefficients $b_n$ are given by
$$b_n=\frac{1}{n}$$
Your second formula for the series in WolframAlpha is wrong, you should divide by $k$, not multiply. Then everything should be fine: WolframAlpha
A: First of all, you should not extend $f$ if you want the result to have period $2\pi$, which is equal to the domain on which the function definition is given. There is no reason why you would want $f$ to be symmetric over $0$.
What you did to obtain $g$ was not extension. An extension should make the domain bigger while staying unchanged in the given domain.
Edit: I realize there's nothing seriously wrong with the computation. It was the terminology that confused me. The computation just had a minor error, and that was pointed out by Matt in the other answer.
Anyway, integrals in the formulas for coefficients of Fourier series do not need to be symmetric. The domain of integration can start anywhere, as long as it covers one period.
A: How can this be an odd extension if it does not pass through the point f(0)=0? hence not satisfying the property of an odd function f(-0)=f(0)=-f(0)... It doesn't make sense?
