# $\sum_{n = 0}^\infty (-1)^n = \frac{1}{2}$ - Where have I gone wrong?

Not sure where I've gone wrong in the following:

Consider the integral $$\int_0^\infty e^{-2x}\:dx = \frac{1}{2}$$ Via some simple manipulation we find: \begin{align} \int_0^\infty e^{-2x}\:dx &= \int_0^\infty e^{-x} e^{-x} \:dx = \int_0^\infty e^{-x} \left[ \sum_{n = 0}^\infty (-1)^n\frac{x^n}{n!} \right] \:dx \\ &= \int_0^\infty \sum_{n = 0}^\infty \frac{(-1)^n}{n!} x^ne^{-x} = \sum_{n = 0}^\infty \frac{(-1)^n}{n!} \int_0^\infty x^ne^{-x} \:dx \\ &= \sum_{n = 0}^\infty \frac{(-1)^n}{n!} \Gamma(n + 1) = \sum_{n = 0}^\infty \frac{(-1)^n}{n!} n! = \sum_{n = 0}^\infty (-1)^n \end{align} And so, $$\sum_{n = 0}^\infty (-1)^n = \frac{1}{2}$$ This is the famous Grandi's Series which is divergent.

My question: Where have I gone wrong here? What rule/axiom/etc have I violated in my work in achieving this 'result'?

• Well, you swapped a sum and an integral. Do you have a theorem to justify that? Feb 21, 2020 at 3:34
• You can't interchange the sum and the integral.
– krc
Feb 21, 2020 at 3:35
• @JohnHughes - The Linearity of continuous integrals Feb 21, 2020 at 3:38
• @DavidGalea which is fine for a finite sum. Interchanging an infinite sum on the other hand requires more justification, just like how interchanging integrals with one another would have required justification, or exchanging a limit inside an integral with outside. Feb 21, 2020 at 3:40
• @DavidGalea Linearity is for finite sums. Using some kind of additional structure, you can extend this to infinite sums in certain circumstances. You have found one of the circumstances where it fails. Feb 21, 2020 at 3:40

This is a great question and illustrates the subtleties in manipulating infinite sums. This interchange of limit and integration has violated Fubini's/Tonelli's theorem [Link] . In particular

$$\sum_{n=0}^\infty |(-1)^n| = \sum_{n=0}^\infty 1$$

is divergent, as is

$$\int_0^\infty \sum_{n=0}^\infty\left|\frac{1}{n!}x^ne^{-x}\right|\,dx = \int_0^\infty \sum_{n=0}^\infty\frac{1}{n!}x^ne^{-x}\,dx$$ Therefore we cannot apply Fubini's/Tonelli's and would need to find some other justification of the interchange. Since we have proved that a divergent series converges, we will not be able to find a theorem justifiying the interchange.

• Thank you Kyle. Feb 21, 2020 at 4:04
• Yes but that shows we can't apply Fubini's theorem. And Fubini's theorem doesn't give us a necessary condition. Feb 21, 2020 at 4:05
• @bjorn93 See the link. Fubini’s is an if and only if statement.
– krc
Feb 21, 2020 at 17:10
• @KyleC The first answer in that link provides an example where the conditions for Fubini's theorem are violated yet the interchange is possible. Feb 21, 2020 at 21:51
• @bjorn93 Sorry, you are correct. Although the fact that we have proved a divergent series converges implies that no such interchange is justified. I have modified my answer to reflect this subtly.
– krc
Feb 21, 2020 at 23:06