Interchange of sum and integral (particular case). Why is valid the interchange of sum and integral in the following case?:
$$\sum_{n=0}^\infty (-1)^n \int_{0}^1 x^{3n+1}dx = \int_{0}^1 x \sum_{n=0}^\infty (-x^3)^n dx.$$
Let's define the function $f_n (x) \equiv (-1)^n x^{3n+1}.$ Since in genral $f_n \not \ge 0 $, the non-negativity condition required by the Monotone Convergence Theorem, (MCT) is not met. Isn't this theorem a necessary and sufficient condition for the exchange of sum and integral?
EDIT 01 -----------------------------=oOo=-----------------------------
Inspired by the idea of Paul, (thank you very much, Paul!) I present this version of the solution using the MCT, which seems to me to be easier to understand and operationally more economical.
The series $ \sum_{n=0}^\infty (-x^3)^n$ is of alternating terms; therefore, in principle, the MCT is not applicable because it does not meet the condition of non-negativity. However, developing this series in a few of its first terms, straightforwardly, it is seen that when grouped by pairs (+, -) all these pairs turn out to be positive, since for $0 < x < 1, m > n \implies x^m < x^n$:
$$ \sum_{n=0}^\infty (-x^3)^n = 1 - x^3 + x^6 - x^9 + x^{12} - x^{15} + \cdots = \{1 - x^3\} + \{x^6 - x^9\} + \{x^{12} - x^{15}\} \cdots,$$
that can be writen as,
$$ \sum_{n=0}^\infty (-x^3)^n =  (1 - x^3) + x^6(1 - x^3) + x^{12}(1 - x^3) + \cdots $$
So, defining $ g_n(x) = x^{6n} (1 - x^3) $, we have,
$$ \sum_{n=0}^\infty (-x^3)^n \equiv \sum_{n=0}^\infty g_n(x), $$
and $g_n(x) > 0, \forall x \in (0, 1), n \in \mathbb {N} $, so that the MCT can be applied, and it guarantees us that the exchange of sum and integral is lawful.
 A: The theorem is a sufficient condition but is not a necessary condition.
To prove the exchange you can do this trick
$$\int_0^1{x \sum_{n=0}^{\infty}{(-x^3)^n} dx} = \int_0^1{x\sum_{n=0}^{\infty}{(x^{6n} - x^{6n +3})}dx}$$
Now note that whenever $x \in (0,1)$ you have $x^{6n} - x ^{6n + 3} > 0$ so now you can use the monotone convergence theorem and you get
$$\int_0^1{x \sum_{n=0}^{\infty}{(-x^3)^n} dx} = \int_0^1{x\sum_{n=0}^{\infty}{(x^{6n} - x^{6n +3})}dx} = \sum_{n = 0}^{\infty}{\bigg(\int_0^1{x^{6n + 1} dx} - \int_0^1{x^{6n+4} dx} \bigg)} = \sum_{n = 0}^{\infty}{ \int_0^1{x (-x)^{3n} dx } }$$
The last equality is not completely trivial but is not hard to prove, do it!
q.e.d
(This in fact proves that the monotone convergence theorem is not necessary for the exchange of integrals)
A: For $x \in [0,1]$, we have $$0 \leqslant S_n(x) = \sum_{k=0}^n (-1)^k x^{3k+1} = x - (x^4 - x^7) - (x^9 - x^{13}) - \ldots \leqslant x$$ Since $x \mapsto  x$ is integrable on $[0,1]$, the Dominated Convergence Theorem applies and
$$\sum_{n=0}^\infty (-1)^n\int_0^1 x^{3n+1} \, dx=\lim_{n \to \infty}\int_0^1 S_n(x) \, dx = \int_0^1 \lim_{n \to \infty}S_n(x) \, dx = \int_0^1 \sum_{n = 0}^\infty (-1)^n x^{3n+1}$$
A: The following two observations regarding power series will come handy:

*

*Suppose a power series $ f(x) = \sum_{n=0}^{\infty} a_n x^n$ has radius of convergence $R > 0$. By the Weierstrass M-test, the power series converges locally uniformly over the region $|x| < R$. So it follows that
$$ F(x) = \int_{0}^{x} \sum_{n=0}^{\infty} a_n t^n \, \mathrm{d}t
= \sum_{n=0}^{\infty} \int_{0}^{x} a_n t^n \, \mathrm{d}t $$
holds for $|x| < R$. Also, the resulting power series $F(x)$ has the same radius of convergence as the original $f(x)$.


*Suppose $r > 0$ and the series $ \sum_{n=0}^{\infty} b_n R^n $ converges. Then $ g(x) = \sum_{n=0}^{\infty} b_n x^n $ has radius of convergence at least as large as $ r$, and  Abel's theorem ensures that
$$ \lim_{x \to r^-} g(x) = g(r). $$
Since the series $f(x) = \sum_{n=0}^{\infty} (-1)^n x^{3n+1}$ has radius of convergence $1$, these two observations show that
\begin{align*}
\sum_{n=0}^{\infty} (-1)^n \int_{0}^{1} t^{3n+1} \, \mathrm{d}t
&= \lim_{x \to 1^-} \sum_{n=0}^{\infty} (-1)^n \int_{0}^{x} t^{3n+1} \, \mathrm{d}t \\
&= \lim_{x \to 1^-} \int_{0}^{x} \sum_{n=0}^{\infty} (-1)^n t^{3n+1} \, \mathrm{d}t \\
&= \int_{0}^{1} \sum_{n=0}^{\infty} (-1)^n t^{3n+1} \, \mathrm{d}t.
\end{align*}
A: Let $S_n(x)=x\sum_{k=0}^n(-x^3)^k$ and $S(x)=x\sum_{k=0}^\infty(-x^3)^k$.
On $[0,1]$, $S_{2n-1}\le S\le S_{2n}$ and $\int_0^1(S_{2n}-S_{2n-1})=\frac1{6n+2}\to0$
hence $\int_0^1S=\lim\int_0^1S_n$.
