Calculus 2: Series Integration I do not understand how$\int \sum_{n=0}^\infty (-1)^nx^{2n}dx = \sum_{n=0}^\infty  (\frac{(-1)^nx^{2n+1}}{2n+1})+C$. Here are my steps:
$$\int \sum_{n=0}^\infty  (-1)^nx^{2n}dx$$
$$=\sum_{n=0}^\infty  (-1)^n\int x^{2n}dx$$
$$=\sum_{n=0}^\infty  (-1)^n(\frac{x^{2n+1}}{2n+1}+K)$$
$$=\sum_{n=0}^\infty  (\frac{(-1)^nx^{2n+1}}{2n+1}+C)$$
The constant $C$ cannot be separated from the series. It is a part of the sequence that makes up the series.

There are three ways to fix this.
Perhaps the easiest and most direct one is to use a definite integral from $0$ to $y$ instead of the indefinite integral, then relabel $y$ to $x$.
Alternatively, if you want to stick with the indefinite integral: As pointed out in a comment, each of the integrations has its own integration constant $K_n$. Let $a_N=\int\sum_{n=0}^N(-1)^nx^{2n}$ be the partial sums of the original series, $b_N=\sum_{n=0}^N(-1)^n\frac{(-1)^nx^{2n+1}}{2n+1}$ the partial sums of the integrated series and $c_N=\sum_{n=0}^NK_n$ the partial sums of the integration constants. Then $a_N=b_N+c_N$, so $c_N=a_N-b_N$. Both $a_N$ and $b_N$ converge for $x\in(-1,1)$; hence $c_N$ converges. Denote its limit by $C$.
Or, think about what the indefinite integral actually means. It represents a class of functions that are antiderivatives of the function being integrated and differ by an additive constant. When you swap summation and indefinite integration, you're using the fact that summing any sequence of representatives of the infinitely many classes of antiderivatives on the right-hand side will yield an antiderivative of the integrand on the left-hand side, as long as you choose them so that the sum converges at all. So if you properly formulate a theorem that allows you to swap summation and indefinite integration, it would already be part of that theorem that a single additive constant appears on either side of the equation.
