Approximating error using Taylors theorem I have used a Maclaurin series for the function $f(x) = \cos(2x)$
and have successfully produced:
$\dfrac{2^n cos(\frac{n\pi}2)x^n}{n!}$
Now I want to estimate the error in approximating $\cos(2x)$ by $1-2x^2 + \frac23 x^4$ on the interval $[-\frac12,\frac12]$
How can I do this?
 A: We use the Lagrange form of the remainder. This says that if we truncate at the term in $(x-a)^n$, then the error is exactly equal to 
$$\frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1},$$
where $\xi=\xi_x$ is a number between $a$ and $x$. 
In our case, we have $a=0$. It is useful to note that our degree $4$ polynomial is actually the sum of the terms up to $n=5$, since the term in $x^5$ is equal to $0$. 
So we can take $n=5$. The sixth derivative at $\xi$ is $-2^6\cos(2\xi)$. It has absolute value $\le 2^6$. So as $x$ ranges over the interval $-1/2\le x\le 1/2$, we can say that the absolute value of $\frac{f^(6)(\xi)}{6!}x^6$ is $\le \frac{1}{6!}$. 
Remark: If infinite series have already been covered, the estimate that the error has absolute value $\le \frac{1}{6!}$ over our interval follows from the fact that in this interval the Taylor series has terms that alternate in sign and decrease in absolute value. So the truncation error is less in absolute value than the absolute value of the first "neglected" term. 
