<s>[INST] Long division of polynomial I am reading a math history book which says:

"Gregory could have learned in Italy that the area under the curve $y=1 / (1+x^2)$, from
  $x=0$ to $x=x$, is arctan x, and a simple long division converts $
1 / (1+x^2)$ to  $1 - x^2 + x^4 - x^6+...$"

Can someone please explain how is
$1/(1+x^2)  = 1 - x^2 + x^4 - x^6+...$
And
How do you perform long divison of this kind?
Thanks.
 [/INST] $$(1+x^2)(1-x^2+x^4+\dots)$$
$$=(1-x^2+x^4+\dots)$$
$$+x^2(1-x^2+x^4+\dots)$$
$$=(1-x^2+x^4+\dots)$$
$$+(x^2-x^4+x^6+\dots)$$
$$=1$$
</s>