<s>[INST] How to calculate the series $-\frac12-\frac14+\frac13-\frac16-\frac18+\frac15-\frac{1}{10}...$? $-\frac12-\frac14+\frac13-\frac16-\frac18+\frac15-\frac{1}{10}...$
After rearrangement the series looks like $\sum^{\infty}_{n=2}\frac{(-1)^{n+1}}{n}$.
My way of doing this is using Taylor series of $\ln{(1+x)}=\sum^{\infty}_{n=1}\frac{(-1)^{n+1}x^n}{n}$.
Therefore let $x=1$, $\sum^{\infty}_{n=2}\frac{(-1)^{n+1}}{n}=\sum^{\infty}_{n=1}\frac{(-1)^{n+1}x^n}{n}-\sum^{1}_{n=1}\frac{(-1)^{n+1}x^n}{n}=\ln{2}-\sum^{1}_{n=1}\frac{(-1)^{n+1}x^n}{n}=\ln{2}-1$
Is my solution correct?
 [/INST] You cannot rearrange an infinite series which is not absolutely convergent. We can evaluate it as follows. Your infinite series is
\begin{align}
\sum_{n=1}^{\infty}\left(-\dfrac1{4n-2} - \dfrac1{4n}+\dfrac1{2n+1}\right) & = \sum_{n=1}^{\infty}\left(-\dfrac1{4n-2} - \dfrac1{4n}+ 2\cdot \dfrac1{4n+2}\right)\\
& = \sum_{n=1}^{\infty}\left(-\int_0^1x^{4n-3}dx- \int_0^1x^{4n-1}dx + 2\int_0^1x^{4n+1}dx\right)\\
& = \sum_{n=1}^{\infty}\int_0^1 x^{4n}\left(2x-\dfrac1x - \dfrac1{x^3}\right)dx\\
& = \int_0^1\left(2x-\dfrac1x - \dfrac1{x^3}\right)\left(\sum_{n=1}^{\infty}x^{4n}\right)dx\\
& = \int_0^1\left(2x-\dfrac1x - \dfrac1{x^3}\right) \dfrac{x^4}{1-x^4}dx\\
& = \int_0^1 \left(\dfrac{x}{x^2+1}-2x\right)dx = \dfrac{\ln(2)}2-1
\end{align}

To justify the swapping of the limit and integral, we have
\begin{align}
I_m & = \sum_{n=1}^m \int_0^1 x^{4n}\left(2x-\dfrac1x-\dfrac1{x^3}\right)dx  = \int_0^1 \dfrac{x^4\left(1-x^{4m}\right)}{1-x^4}\left(2x-\dfrac1x-\dfrac1{x^3}\right)dx\\
& = \int_0^1 \left(\dfrac{x}{x^2+1}-2x\right)dx + \int_0^1 \dfrac{x(2x^2+1)}{x^2+1}\cdot x^{4m}dx
\end{align}
Now $$\lim_{m\to\infty} \int_0^1 \dfrac{x(2x^2+1)}{x^2+1}\cdot x^{4m}dx = 0$$
There are multiple ways to prove this. One is to just invoke dominated convergence theorem, since $x^{4m} \leq 1$ and $\displaystyle \int_0^1 \dfrac{x(2x^2+1)}{x^2+1}dx < \infty$. Other is to simply note that $\dfrac{x(2x^2+1)}{x^2+1} \leq \dfrac32$ on $[0,1]$. Hence,
$$\lim_{m\to\infty} \int_0^1 \dfrac{x(2x^2+1)}{x^2+1}\cdot x^{4m}dx \leq \lim_{m\to\infty} \int_0^1 \dfrac32\cdot x^{4m}dx = \lim_{m\to\infty} \dfrac3{2(4m+1)} = 0$$
Hence,
$$\lim_{m \to \infty} I_m = \dfrac{\log(2)}2-1$$
</s>