For -1 < x < 1, $$\dfrac{1}{1-x} = 1+x+x²+x³+...$$ Then $$\frac{1}{1-(-x²)}= 1-x²+x⁴-x⁶+...$$
Integrating both sides with respect to x from 0 to x we obtain, tan⁻¹x = $$x - \dfrac{x³}{³} + \dfrac{x^⁵}{⁵}+...$$
Now my question is why this series of tan⁻¹x is valid for 1 although our initial series was only valid for -1 < x < 1 ?
The series is convergent at $x=1$. Abel's theorem states that if $$\sum_{n=0}^\infty a_n$$ is convergent, then the function $$f(x)=\sum_{n=0}^\infty a_n x^n$$ is continuous on the set $(-1,1]$. Here, $f(x)=\tan^{-1}x$ and so $$1-\frac13+\frac15-\cdots=\lim_{x\to1^-}\tan^{-1}x=\frac\pi4.$$