Series equal to an integral If I have
\begin{eqnarray*}
S = \sum_{n\geq 0}{\frac{(-1)^{n}}{3n+1}}.
\end{eqnarray*}
Prove that
\begin{eqnarray*}
S = \int_{0}^{1}{\frac{1}{1+x^{3}}}\,\mathrm{d}x.
\end{eqnarray*}
I know that serie is convergent but I don't know how to prove this, I think in some theorem of uniformly convergence and integration where
\begin{eqnarray*}
f(x)=\sum_{n=1}^{\infty}{f_{n}(x)}
\end{eqnarray*}
but I don't know how to do this. Can you give me some advice to prove it? Thank you.
 A: The only difficulty here is justifying switching the order of integration and the summation in
$$\int_0^1 \frac{dx}{1+x^3} = \int_0^1 \sum_{n=0}^\infty (-x^3)^n\, dx = \sum_{n=0}^\infty \int_0^1 (-x^3)^n\, dx = \sum_{n=0}^\infty  \frac{(-1)^n}{3n+1}$$
We don't have uniform convergence of the series on the interval $[0,1]$ since the series diverges at $x=1$.
One way to justify is to note that
$$\sum_{n=0}^N(-x^3)^n = \frac{1 - (-x^3)^{N+1}}{1+x^3},$$
and
$$\int_0^1\sum_{n=0}^N(-x^3)^n\, dx  - \int_0^1 \frac{dx}{1+x^3} = (-1)^{N+2}\int_0^1 \frac{x^{3N+3}}{1+x^3}\, dx$$
Since we can switch the integral and a finite sum , we have
$$\int_0^1\sum_{n=0}^N(-x^3)^n\, dx =\sum_{n=0}^N \int_0^1(-x^3)^n\, dx = \sum_{n=0}^N \frac{(-1)^n}{3n+1},$$
and it follows that
$$\left|\sum_{n=0}^N \frac{(-1)^n}{3n+1}- \int_0^1 \frac{dx}{1+x^3}\right| = \int_0^1 \frac{x^{3N+3}}{1+x^3}\, dx \leqslant \int_0^1 x^{3N+3}\, dx \\= \frac{1}{3N+4} \underset{N \to \infty}\longrightarrow 0$$
Thus,
$$\lim_{N \to \infty}\sum_{n=0}^N \frac{(-1)^n}{3n+1} = \int_0^1 \frac{dx}{1+x^3}$$
A: We find $$\int_0^1 \frac{1}{1+x^3} dx = \int_0^1  \sum_{n \ge 0} (-x)^{3n} \ dx = \sum_{n \ge 0} (-1)^n \int_0^1 x^{3n} dx = \sum_{n \ge 0} \frac{(-1)^n}{3n+1}.$$
