<s>[INST] 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.
 [/INST] 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.
</s>