Evaluation of the error of the $\arctan(x)$ function I was wondering about the following problem: is it possible to find the best estimation possible of the remainder between the function $\arctan(x)$ and its Taylor polynomial?
I was thinking about expressing the $(n+1)$-th derivative of the $\arctan(x)$ function. I came up with this:
$$\dfrac{\text{d}^n}{\text{d}x^n} \arctan(x) = \dfrac{(-1)^{n-1}(n-1)!}{(1+x^2)^{n/2}}\sin\left(n\arcsin\left(\dfrac{1}{\sqrt{1+x^2}}\right)\right)$$
Then the idea could be another derivative and then useing the integral remainder but this idea seems impracticable.
The Taylor polynomial was easy to compute, but I believe that neither the Lagrange remainder nor the integral remainder are good ideas.
Is there some deeper or more useful ways to evaluate this difference?

For any $N\geq 0$ and real $t$, we have
$$
\frac{1}{{1 + t^2 }} = \sum\limits_{k = 0}^{N - 1} {( - 1)^k t^{2k} }  + ( - 1)^N \frac{{t^{2N} }}{{1 + t^2 }}.
$$
Integrating both sides form $0$ to $x$ ($x$ being real), we find
\begin{align*}
\arctan x & = \sum\limits_{k = 0}^{N - 1} {( - 1)^k \frac{{x^{2k + 1} }}{{2k + 1}}}  + ( - 1)^N \int_0^x {\frac{{t^{2N} }}{{1 + t^2 }}dt} 
\\ &
 = \sum\limits_{k = 0}^{N - 1} {( - 1)^k \frac{{x^{2k + 1} }}{{2k + 1}}}  + ( - 1)^N x^{2N + 1} \int_0^1 {\frac{{s^{2N} }}{{1 + x^2 s^2 }}ds} .
\end{align*}
Thus, for example,
\begin{align*}
\left| {( - 1)^N x^{2N + 1} \int_0^1 {\frac{{s^{2N} }}{{1 + x^2 s^2 }}ds} } \right| & = \left| x \right|^{2N + 1}  \int_0^1 {\frac{{s^{2N} }}{{1 + x^2 s^2 }}ds}  \\ & \le \left| x \right|^{2N + 1} \int_0^1 {s^{2N} ds}  = \frac{{\left| x \right|^{2N + 1} }}{{2N + 1}}
\end{align*}
and
\begin{align*}
\left| {( - 1)^N x^{2N + 1} \int_0^1 {\frac{{s^{2N} }}{{1 + x^2 s^2 }}ds} } \right| & = \left| x \right|^{2N + 1}  \int_0^1 {\frac{{s^{2N} }}{{1 + x^2 s^2 }}ds}  \\ & \ge \frac{\left| x \right|^{2N + 1}}{1+x^2} \int_0^1 {s^{2N} ds}  = \frac{{\left| x \right|^{2N + 1} }}{{(1+x^2)(2N + 1)}},
\end{align*}
for any $N\ge 0$ and real $x$.
The remainder can also be represented in the form
$$
( - 1)^N \frac{{x^{2N + 1} }}{{2N + 1}}C_N (x),
$$
where
$$
C_N (x) = (2N + 1)\int_0^1 {\frac{{s^{2N} }}{{1 + x^2 s^2 }}ds}  = (2N + 1)\int_0^{ + \infty } {\frac{{e^{ - (2N + 1)t} }}{{1 + x^2 e^{ - 2t} }}dt} .
$$
Watson's lemma then leads to the asymptotic expansion
\begin{align*}
C_N (x) & \sim \sum\limits_{k = 0}^\infty  {\frac{{(2x^2 )^k A_k ( - 1/x^2 )}}{{(1 + x^2 )^{k + 1} }}\frac{1}{{(2N + 1)^k }}}
\\ & =
\frac{1}{{1 + x^2 }} - \frac{{x^2 }}{{1 + x^2 }}\sum\limits_{k = 1}^\infty  {( - 1)^k \frac{{2^k A_k ( - x^2 )}}{{(1 + x^2 )^k }}\frac{1}{{(2N + 1)^k }}} 
\end{align*}
as $N\to +\infty$ uniformly on compact subsets of $\mathbb R$. Here $A_k$ denotes the $k$th Eulerian polynomial. At leading order
$$
C_N (x) \sim \frac{1}{{1 + x^2 }},
$$
showing that the lower bound above is sharp for sufficiently large $N$.
