1020. Find the series expansion of the function $\operatorname{arctg} x$, starting from its expression as an integral: $\operatorname{arctg} x=\int_{0}^{x} \frac{d t}{1+t^{2}}$, by expanding the integrand in a Maclaurin series and integrating it term by term.
Solution. Transform the integrand $\frac{1}{1+t^{2}}=$ $=\left(1+t^{2}\right)^{-1}$ and expand it into a binomial series (B), setting $x=t^{2}, m=-1$:

$$
\left(1+t^{2}\right)^{-1}=1-t^{2}+t^{4}-t^{6}+\ldots+(-1)^{n-1} t^{2 n-2}+\ldots
$$

Integrating within the limits from 0 to $x$, we obtain the desired series

$$
\operatorname{arctg} x=x-\frac{x^{3}}{3}+\frac{x^{5}}{5}-\frac{x^{7}}{7}+\ldots+(-1)^{n-1} \frac{x^{2 n-1}}{2 n-1}+\ldots
$$

which converges to $\operatorname{arctg} x$ in the interval $(-1 ; 1)$, since the expansion of the integrand into a binomial series is valid in this interval. It can be proven that the obtained series converges to $\operatorname{arctg} x$ at the boundaries of this interval when $x= \pm 1$.