Evaluating an alternating sum using contour integrals Evaluate:
$$\sum_{n=1}^{\infty} \frac{(-1)^n}{3n-1}$$
Using contour integration. 
Normally I would use $\pi\csc(\pi z)f(z)$ and evaluate the residue multiply by (-1) and divide by $2$ if the function $f(n)$ were even, in this case it is not even.
I was wondering if I could use contour integration here. 
I converted it into an integral. 
Without showing the working, (well it was mostly integration and division)
$$\sum_{n=1}^{\infty} \frac{(-1)^n}{3n-1} = \int_{0}^{1} \frac{1}{1+x^3}dx$$
I considered a contour $C$ quarter circle, radius $1$ the y-axis is the imaginary axis.

into section $A,B,D$
With the quad formula, I found three roots.
$x = ${$ \displaystyle \frac{1 + \sqrt{3}}{2}, \frac{1 - \sqrt{3}}{2}, -1   $}
Let the poles be called $a,b,c$ respectively, we will only consider $a$ since its the only one in the contour, the radius $R = 1$.
$$\oint_{C} f(z) dz = \int_{0}^{1} f(x) dx + \int_{B} f(z) dz - \int_{0}^{1} f(iy) d(iy)$$
By the residue theorem I got:
$$\oint_{C} f(z) dz = \frac{4\pi i}{3 + \sqrt{3}i}$$
But I am not sure what to do next.

$$\begin{align}\int_{0}^{1} \frac{1}{1+x^3}dx&=\frac13\int_0^1\left(\frac1{x+1}-\frac{x-2}{x^2-x+1}\right)dx\\&=\frac13\int_0^1\left(\frac1{x+1}-\frac12\frac{2(x-1/2)}{(x-1/2)^2+3/4}-\frac{3/2}{(x-1/2)^2+3/4}\right)dx\\
&=\frac13\left(\ln|x+1|-\frac12\ln|(x-1/2)^2+3/4|-\frac32\frac1{\sqrt{3/4}}\arctan\frac{x-1/2}{\sqrt{3/4}}\right)_0^1\\
&=\frac13\left(\ln2-\frac12\ln\frac11-{\sqrt3}\left(\frac{\pi}6-\left(-\frac{\pi}6\right)\right)\right)\\
&=\frac13\left(\ln2-\frac{\pi}{\sqrt3}\right)=\frac19\left(3\ln2-3\frac{\pi}{\sqrt3}\right)=\frac19\left(\ln8-\sqrt3\pi\right)
\end{align}$$
