How to get the Taylor polynomial arctan with error? We have to find Taylor polynomial $P_2(x)$ of $\arctan(x)$ of grade 2 from point $x = 0$
My answer was
If $f(x) = \arctan(x)$ then $f(0)=0$
And $f'(x)= \frac{1}{1+x^2}$ where $f'(0) = 1$
And $f''(x) = \frac{-2x}{(1+x^2)^2}$ where $f''(0) = 0$
And $P_2(x) = x - \frac{1}{3}x^3 +  \frac{1}{5}x^5$ 
Then we have to use the Taylor theorem to show that $P_2(x) - \frac{1}{3}x^3 < \arctan(x) < P_2(x) + \frac{1}{12}x^3$
when $0 < x ≤ 1$
What should I do to get it? I know to calculate an error we use 
$E_n(x)= \frac{f^{n+1}(s)}{(n+1)}(x-a)^{n+1}$
Where am I wrong exactly?
 A: A simpler approach is as follows. We know that if $f(x) = \arctan(x)$, then $f' = (1 + x^2)^{-1}$. Thus
$$ \arctan(x) = \int_0^x \frac{1}{1 + t^2} dt + C$$
for some constant $C$. As $\arctan(0) = 0$, we even have that $C = 0$.
A Taylor expansion for $(1 + t^2)^{-1}$ is straightforward, as this is a geometric series
$$ \frac{1}{1 + t^2} = 1 - t^2 + t^4 - t^6 + \cdots$$
Thus the Taylor expansion for $\arctan(x)$ centered at $0$ is given by
$$ \arctan(x) = x - x^3/3 + x^5/5 - x^7/7 + \cdots$$
For $x \geq 0$, this is an alternating series. For $0 \leq x < 1$, this is an alternating series with strictly decreasing (in magnitude) terms. Thus consecutive partial sums bound the actual value (as in the alternating series test for convergence).
Thus
$$ x - x^3/3 \leq \arctan(x) \leq x - x^3/3 + x^5/5.\tag{1}$$
This is stronger than the bound you were asked to show.

Nonetheless, you could go from this bound to the prescribed bound (if desired) by noting that for $0 \leq x < 1$, we have that $x^5/5 < x^4/4$, and further that $x^4/4 < x^3/4$, so that
$$\arctan(x) \leq x - x^3/3 + x^5/5 \leq x - x^3/3 + x^4/4 \leq x - x^3/3 + x^3/4$$,
which simplifies to
$$ \arctan(x) \leq x - x^3/12.$$
This is sort of silly, but this shows that the simpler bound in $(1)$ is stronger than the requested bound.
