Spivak: How do we divide $1$ by $1+t^2$, to obtain $\frac{1}{1+t^2}=1-t^2+t^4-t^6+...+(-1)^nt^{2n}+\frac{(-1)^{n+1}t^{2n+2}}{1+t^2}$? In Chapter 20, "Approximation by Polynomial Functions" in Spivak's Calculus, there is the following snippet on page $420$

The equation
$$\arctan{x}=\int_0^x \frac{1}{1+t^2}dt$$
suggests a promising method of finding a polynomial close to $\arctan$

*

*divide $1$ by $1+t^2$, to obtain a polynomial plus a remainder:

$$\frac{1}{1+t^2}=1-t^2+t^4-t^6+...+(-1)^nt^{2n}+\frac{(-1)^{n+1}t^{2n+2}}{1+t^2}\tag{1}$$

How exactly do we perform this division of $1$ by $1+t^2$ to obtain $(1)$?

I haven't read the book but if the author has already introduced polynomial long division or synthetic division, then either one can be used to evaluate even "weird-looking" fractions like
$$\frac 1{1+t^2}$$
For division of polynomials where the denominator has a degree greater than one, then we neglect the highest order term and invert the signs of the lower order terms all the way down to the constant. That is, since the denominator in this instance is $t^2+1$, ignore the highest order term $t^2$ and invert the signs, meaning our vertical column will be $0$ (coefficient of $t$) and $-1$ (constant term).
To synthetically divide the two terms, we first rewrite the numerator in terms of higher order powers. Since there is only a constant term, this becomes really trivial.
$$1=1+\sum\limits_{k=0}^n0t^k=1+0t+0t^2+0t^3+\cdots+0t^n$$
Our numerator goes in the top row of our division table and our denominator along the left-hand side. For this example, I will use the case of $n=8$ but you can easily extend this to any $n$ by adding more zeros in the numerator.
\begin{array}{c|ccccccccc} & t^0 & t & t^2 & t^3 & t^4 & t^5 & t^6 & t^7 & t^8\\ & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & & & & & & & & & &\\-1 & & & & & & & & & &\\\hline\end{array}
The first step is to bring down the first term from our numerator like so
\begin{array}{c|ccccccccc} & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\color{blue}{0} & & \color{blue}{\star} & & & & & & & &\\-1 & & & & & & & & & &\\\hline & \color{blue}{1}\end{array}
Next, multiply the two blue terms together and put the result where the $\color{blue}{\star}$ is positioned (second column). Finally, sum the second column vertically and write the sum in the second position. Your table should now look like
\begin{array}{c|ccccccccc} & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\color{blue}{0} & & 0 & \color{blue}{\star} & & & & &\\\color{red}{-1} & & & \color{red}{\star} & & & & & &\\\hline & \color{red}{1} & \color{blue}{0}\end{array}
In a similar manner as before, multiply the two blue numbers together and place the result in the third column where $\color{blue}{\star}$ is, and repeat with the red numbers and $\color{red}{\star}$. Sum the third column and write the result in the third column below the horizontal line.
\begin{array}{c|ccccccccc} & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\color{blue}{0} & & 0 & 0 & \color{blue}{\star} & & & &\\\color{red}{-1} & & & -1 & \color{red}{\star} & & & & &\\\hline & 1 & \color{red}{0} & \color{blue}{-1}\end{array}
Continue this process until you reach the end. The final result should look something like this:
\begin{array}{c|ccccccccc} & t^0 & t & t^2 & t^3 & t^4 & t^5 & t^6 & t^7 & t^8\\ & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\-1 & & & -1 & 0 & 1 & 0 & -1 & 0 & 1\\\hline & 1 & 0 & -1 & 0 & 1 & 0 & -1 & 0 & \color{red}{1}\end{array}
The bottom row of numbers is the quotient, starting off with the constant term and increasing in power as we move across towards the right. The final term highlighted in red is the remainder of the division. In this case, we have that
$$\frac 1{1+t^2}=1-t^2+t^4-t^6+\frac {t^8}{1+t^2}$$
If we continue, then for a general $n$, it seems that
$$\frac 1{1+t^2}=1-t^2+t^4-t^6+\cdots+\frac {(-1)^{n+1}t^{2n+2}}{1+t^2}$$
Next step would be to use induction to prove that this formula holds true for all $n$.
