Fourier series. Find the sum $\sum_{n=1}^\infty \frac{(-1)^{n+1}}{2n+1}$ I'm given a function $y=x$ and I need to evaluate the following sum $$\sum_{k=1}^\infty \frac{(-1)^{k+1}}{2k+1}$$
What I have already done is the Fourier series of a given function: $$y=x=2\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n} \sin{(nx)}$$
Now I just need to know how to get the $x$ from $\sin{(nx)}=1$ But what I get is $x=\frac{\pi}{2n}$ and that doesn't help me at all. Any ideas?
 A: Your sum can be found using a method that avoids both Fourier series and complex analysis.
If we note that
$$\frac{1}{2n + 1} = \int_0^1 x^{2n} \, dx.$$
the sum can be rewritten as
\begin{align*}
\sum_{n = 1}^\infty \frac{(-1)^{n + 1}}{2n + 1} &= \sum_{n = 1}^\infty (-1)^{n + 1} \int_0^1 x^{2n} \, dx\\
&= \sum_{n = 1}^\infty (-1)^{n + 1} x^{2n} \, dx \tag1\\
&= - \int_0^1 \sum_{n = 1}^\infty (-x^2)^n \, dx\\
&= - \int_0^1 \frac{-x^2}{1 + x^2} \tag2\\
&= \int_0^1 \frac{(1 + x^2) - 1}{1 + x^2} \, dx\\
&= \int_0^1 \left (1 - \frac{1}{1 + x^2} \right ) \, dx\\
&= \Big{[} x - \tan^{-1} x \Big{]}_0^1\\
&= 1 - \frac{\pi}{4}.
\end{align*}
Explanation


*

*Interchanging the sum and integration.

*Summing the series which is geometric.
A: But that does help (because you do not get what you say you do)! Using what you did: remember that $\;\sin\cfrac{\pi n}2=0\;$ for even $\;n\;$ , so you actually sum only over the odd ones....Can you take it from here?
A: Before answering, note that since the series is not absolutely convergent, you can by rearranging terms get any sum you want.  So let's assume that what is wanted is a sum without rearrangement.
Here is a way without Fourier analysis:
Consider the Taylor series about $x=0$ for 
$$
\log(1+x) = 0 + \frac1{1!}(1+x)^{-1}|_{x=0} - \frac1{2!}(1+x)^{-2}|_{x=0} + \frac1{3!}2!(1+x)^{-3}|_{x=0} -\cdots \\=1-\frac12x + \frac13 x^2-\frac14 x^3 +\cdots
$$
Using $x=1$ (which is just at the hairy edge of the region of convergence, of course) this yields
$$
\log(1+1) = \log(2) = 1-\frac12 + \frac13 - \frac14 + \cdots
$$
Using $x=i$ this yields
$$
\log(1+i) = \log(\sqrt{2} \frac{(1+i)}{\sqrt{2}} ) = i+\frac12 - \frac{i}3 - \frac14 + \frac{i}5\cdots
$$
So if we write your desired sum as $1-s$, and group the real and imaginary parts on the right,
$$
\frac12 \log(2) + \log(\frac{1+i}{\sqrt{2}}) = \frac12 - \frac14 +\frac16 +\cdots +is\\
\frac12 \log(2) + i\frac\pi4 = \frac12 \log(2) +is\\s = \frac\pi4
$$
So your sum is $1-\frac\pi4$. (I had earlier forgotten that your sum starts at $\frac13$ rather than at $1$.)
