<s>[INST] Proof of Leibniz $\pi$ formula I found the following proof online for Leibniz's formula for $\pi$:
$$\frac{1}{1-y}=1+y+y^2+y^3+\ldots$$
Substitute $y=-x^2$:
$$\frac{1}{1+x^2}=1-x^2+x^4-x^6+\ldots$$
Integrate both sides: 
$$\arctan(x)=x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\ldots$$
Now plug in $1$ for $x$: 
$$\frac{\pi}{4}=1-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\ldots$$
The thing I am confused about is that the Taylor expansion for $\frac{1}{1-y}$ only works for $-1<y<1$. Why is this still a legitimate proof? At the end, we compute the integral of both sides to $y=-1$. 
 [/INST] Yes, you need an extra step.  You need to know this: If
$$
\arctan(x)=x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\ldots
$$
holds for $-1 < x < 1$ and the series on the right side converges at $x=1$, then the equation also holds at $x=1$.  
Arthur beat me to doing it.
</s>