# Show that the integral of this rational function is equal to an infinite alternating harmonic series

One of my friends gave me the following question from his review, I have little experience to dealing with these types of questions in Analysis so if you could help us just to get started it would be quite helpful.

Rigorously justify the following: $$\int_{0}^{1} \frac{dx}{1+x^2} = \lim_{N \to \infty} \sum_{n=0}^{N} \frac{(-1)^n}{2n+1}$$

-
@Argon , you should write down your comment as an answer. +1 – DonAntonio Aug 30 '12 at 2:50
@DonAntonio Done, thanks. – Argon Aug 30 '12 at 23:28

Hint: A geometric series gives $${1\over 1+x^2}={1\over 1-(-x^2)}=\lim_N \sum_{n=0}^N (-x^2)^n.$$

To be more precise, for the alternating series show $$\sum_{n=0}^{2N+1} (-x^2)^n\leq {1\over 1+x^2}\leq \sum_{n=0}^{2N} (-x^2)^n,\tag1$$ then integrate through (1).

-
Since the above works when $|x|<1$, then we integrate to obtain, $\int_0^1 \frac{1}{1+x^2}dx=\int_0^1\lim_N\sum_{n=0}^N(-x^2)^n$, so if we manage to interchange the limit and the sum we are game, but I am very rusty at analysis, and I dont remember why this interchange is allowed. – Daniel Montealegre Aug 30 '12 at 2:49
@DanielMontealegre I've added another step that might help. – Byron Schmuland Aug 30 '12 at 2:57
Thanks. I got it! – Daniel Montealegre Aug 30 '12 at 3:23

$$\arctan(a)=\int_0^a \frac{dx}{x^2+1} = \sum_{n=0}^\infty \frac {(-1)^n a^{2n+1}} {2n+1}$$

so

$$\arctan(1) = \int_0^1 \frac{dx}{x^2+1} = \sum_{n=0}^\infty \frac {(-1)^n} {2n+1} = \frac{\pi}{4}$$

-