Taylor series of arctan(x) (Spivak) At p. 388 of Calculus, Spivak gives a formula:
$$\frac{1}{1+t^2} = 1 - t^2 + t^4 - ... + (-1)^nt^{2n} + \frac{(-1)^{n+1}t^{2n+2}}{1+t^2}$$
Which can be integrated to find $\arctan(x)$.
I don't understand where this formula comes from, but I found it up to $(-1)^nt^{2n}$ by considering the geometric series for $\frac{1}{1-x}$ and replacing $x$ by $-x^2$ to get the series for $\frac{1}{1+x^2}$. I don't see the term $\frac{(-1)^{n+1}x^{2n+2}}{1+x^2}$ though, because the series I got this way is $\frac{1}{1+x^2} = \sum_{n=0}^{\infty}(-1)^nx^{2n}$.
 A: Consider
$$
1+x+x^2+\dots+x^n=\frac{1-x^{n+1}}{1-x}=\frac{1}{1-x}-\frac{x^{n+1}}{1-x}
$$
that can also be written
$$
\frac{1}{1-x}=1+x+x^2+\dots+x^n+\frac{x^{n+1}}{1-x}
$$
Now substitute $x=-t^2$, that gives
$$
\frac{1}{1+t^2}=1+(-t^2)+(-t^2)^2+\dots+(-t^2)^n+\frac{(-t^2)^{n+1}}{1+t^2}
$$
and not it's just a matter of observing that $(-t^2)^k=(-1)^kt^{2k}$.
A: The term $(-x^2)^{n+1}/(1+x^2)$ is just the rest term:
$${1\over 1 - (-x^2)} = \sum_0^\infty (-x^2)^k = \sum_0^n (-x^2)^k + \sum_{n+1}^\infty (-x^2)^k$$
where
$$\sum_{n+1}^\infty (-x^2)^k = (-x^2)^{n+1} \sum_0^\infty (-x^2)^k = {(-x^2)^k\over1 - (-x^2)}$$
Alternately you can do it the other way from the RHS and use the formula for geometric series (so you won't have to resort to infinite series):
$$\sum_0^n(-x^2)^k + {(-x^2)^{n+1}\over 1 - (-x^2)} = {1 - (-x^2)^{n+1}\over 1- (-x^2)} + {(-x^2)^{n+1}\over 1 - (-x^2)} = {1\over 1+x^2}$$
A: This is a finite geometric sum:
$$
\sum_{k=0}^n (-1)^k t^{2k} = \sum_{k=0}^n (-t^2)^k = \frac{1-(-1)^{n+1}t^{2n+2}}{1-(-t^2)}
$$
