Fourier series for $f(x)=(\pi -x)/2$

Solution 1:

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