# Help me understand how to use a Fourier Series to calculate an Σ sum

So, we're given a function $$f(x) = \begin{cases} 2, &-\pi < x\le 0 \\ 6, &0 < x\le\pi \end{cases}$$, while $$f(x+2π) = f(x)$$ for any $$x\in\Bbb R$$.

Now, I've calculated the Fourier series of $$f(x)$$, which is $$F = 2+\sum_{n=0}^\infty\left(\frac{8\sin(\frac{πn}{2})}{πn}\cos(nx)+\frac{4(1-\cos(\frac{πn}{2}))}{πn}\sin(nx)\right)$$

We're then supposed to use this Fourier series $$F$$, to calculate this sum $$\sum_{k=0}^∞ \frac{(-1)^k}{2k+1}$$.

I've read some other replies here regarding the same subject, but I just cannot understand how to do this. Can someone help me understand what I'm supposed to do?

• The DC term is usually the average which is $4$ here. So, without checking the details, something is off. The denominators should be of the form $2n+1$. – copper.hat Apr 7 at 7:44
• I got the Fourier series as$$f(x)=4+\frac4\pi\sum_{n=1}^\infty\frac{1-\cos(n\pi)}n\sin(nx)$$Since $1-\cos(n\pi)=0$ for even $n$, we can also write$$f(x)=4+\frac8\pi\sum_{n=1}^\infty\frac{\sin((2n-1)x)}{2n-1}$$ – Shubham Johri Apr 7 at 7:47
• @copper.hat $1-\cos(n\pi)=0$ for even $n$ – Shubham Johri Apr 7 at 7:49
• @ShubhamJohri: Seems like an answer to me with the fact that the series converges pointwise except at transition points. – copper.hat Apr 7 at 7:52
• Thanks for the corrections, will need to recheck my calculations. But what about using the Fourier series to find the ∑ sum? – sdds Apr 7 at 7:54

I got the Fourier series as$$f(x)=4+\frac4\pi\sum_{n=1}^\infty\frac{1-\cos(n\pi)}n\sin(nx)$$Since $$1-\cos(n\pi)=0$$ for even $$n$$, we can also write$$f(x)=4+\frac8\pi\sum_{n=0}^\infty\frac{\sin\big((2n+1)x\big)}{2n+1}$$$$x=\pi/2$$ is a point of continuity, so the series converges to $$f(\pi/2)=6$$ at the point.$$\implies6=4+\frac8\pi\sum_{n=0}^\infty\frac{\sin\big((2n+1)\pi/2\big)}{2n+1}\\\implies\frac\pi4=\sum_{n=0}^\infty\frac{(-1)^{n}}{2n+1}$$