How to compute $\lim\limits_{x\to 0} (-1)^{n+1} \frac{\int_0^x \frac{t^{2n+2}}{1+t^2}dt}{x^{2n+1}}$? Consider the function
$$f(x)=(-1)^{n+1} \frac{\int_0^x \frac{t^{2n+2}}{1+t^2}dt}{x^{2n+1}}$$
How do we compute $\lim\limits_{x\to 0} f(x)$?
Here is my attempt
If $t\geq 0$ then $\frac{t^{2n+2}}{1+t^2} \leq t^{2n+2}$ and if $t\leq 0$ then $t^{2n+2}\leq\frac{t^{2n+2}}{1+t^2}$. That is, for any $t$
$$-|t|^{2n+2}\leq\frac{t^{2n+2}}{1+t^2}\leq |t|^{2n+2}$$
Thus
$$-\int_0^x|t|^{2n+2}\leq\int_0^x\frac{t^{2n+2}}{1+t^2}\leq \int_0^x|t|^{2n+2}$$
$$-\frac{|x|^{2n+3}}{2n+3}\leq\int_0^x\frac{t^{2n+2}}{1+t^2}\leq \frac{|x|^{2n+3}}{2n+3}$$
$$-\lim\limits_{x\to 0}\frac{|x|^{2n+3}}{2n+3}\leq\lim\limits_{x\to 0}\int_0^x\frac{t^{2n+2}}{1+t^2}\leq \lim\limits_{x\to 0}\frac{|x|^{2n+3}}{2n+3}$$
$$0\leq\lim\limits_{x\to 0}\int_0^x\frac{t^{2n+2}}{1+t^2}\leq 0$$
$$\lim\limits_{x\to 0}\int_0^x\frac{t^{2n+2}}{1+t^2}=0$$
With this result in hand, we go back to the original limit.
$$\lim\limits_{x\to 0}(-1)^{n+1} \frac{\int_0^x \frac{t^{2n+2}}{1+t^2}dt}{x^{2n+1}}$$
$$=(-1)^{n+1}\lim\limits_{x\to 0}\frac{\int_0^x \frac{t^{2n+2}}{1+t^2}dt}{x^{2n+1}}$$
$$=\frac{0}{0}$$
By L'Hopital's Rule
$$=(-1)^{n+1}\lim\limits_{x\to 0}\frac{\frac{x^{2n+2}}{1+x^2}}{(2n+1)x^{2n}}$$
$$=(-1)^{n+1}\lim\limits_{x\to 0} \frac{x^2}{(2n+1)(1+x^2)}$$
$$=0$$
is this calculation correct? I know the result is correct, but I am interested in the steps.
For context, $f(x)$ is the remainder in a Taylor Polynomial of the $\arctan$ function. The book I am reading (Spivak's Calculus) skipped over the details of this calculation.
 A: You can expand ${1\over 1+t^2}$ as a geometric series as $x \rightarrow 0$.
$$\lim_{x \rightarrow 0} {1\over x^{2n+1}}{\int_{0}^{x}{t^{2n+2} \over {1+t^2}}dt}\space =\space\lim_{x \rightarrow 0} {1\over x^{2n+1}}\sum_{k=0}^{\infty}{(-1)^k}\int_{0}^{x}{t^{2n+2k+2}dt}$$
$$\lim_{x \rightarrow 0} {1\over x^{2n+1}}\sum_{k=0}^{\infty}{(-1)^k\cdot x^{2n+2k+3}\over(2n+2k+3)}=\space\lim_{x \rightarrow 0} \sum_{k=0}^{\infty}{(-1)^k\cdot x^{2k+2}\over(2n+2k+3)}=0$$
A: Too much advanced but this is just for your curiosity.
Sonner or later, you will learns that
$$\int \frac{t^{2n+2}}{1+t^2}\,dt=\frac{t^{2 n+1} }{2 n+1}\left(1-\,
   _2F_1\left(1,n+\frac{1}{2};n+\frac{3}{2};-t^2\right)\right)$$ where appears the Gaussian hypergeometric function.
$$\int_0^x \frac{t^{2n+2}}{1+t^2}\,dt=\frac{x^{2 n+1} }{2 n+1}\left(\,
   _2F_1\left(1,n+\frac{1}{2};n+\frac{3}{2};-x^2\right)-1\right)$$
$$R=\frac{\int_0^x \frac{t^{2n+2}}{1+t^2}\,dt }{x^{2n+1}}=\frac{1 }{2 n+1}\left(\,
   _2F_1\left(1,n+\frac{1}{2};n+\frac{3}{2};-x^2\right)-1\right)$$ Developed as a series around $x=0$ gives
$$R=\sum_{p=1}^\infty (-1)^p\frac{ x^{2 p}}{2 n+2 p+1}=-\frac {x^2}{2n+3}+O(x^4)$$
Not truncated, $R$ is another special function.
