Estimate the maximum possible error in the approximation - Taylor Polynomials I am given the following example.
Estimate the maximum possible error in the approximation.
$cos(x) = T_{\displaystyle4,\frac{\displaystyle\pi}{\displaystyle2}}$ for $x \in \left[\frac{\displaystyle\pi}{\displaystyle2} -0.2, \frac{\displaystyle\pi}{\displaystyle2} + 0.2\right]$. $\\$
$R_{\displaystyle4,\frac{\pi}{2}}(x) \le \frac{\displaystyle|-\sin(z)|}{\displaystyle5!} |x-\frac{\pi}{2}|^5$ $\\$
$\Rightarrow R_{\displaystyle4,\frac{\displaystyle\pi}{\displaystyle2}}(x) \le \frac{\displaystyle1}{\displaystyle 5!}(0.2)^5 $
I don't understand how the example went from $|x-\frac{\pi}{2}|^5$ to $(0.2)^5$. Please specify the logical reasoning behind this and exactly how it is achieved. Thank you.
 A: We have that 
$$\dfrac{\pi}{2}-0.2\le x\le\dfrac{\pi}{2}+0.2$$
and that
$$  \cos(x)\approx 1-\dfrac{\left(x-\frac{\pi}{2}\right)^2}{4}+\dfrac{\left(x-\frac{\pi}{2}\right)^4}{24}$$
Thus we know that
$$ \dfrac{\pi}{2}-0.2\le x\le\dfrac{\pi}{2}+0.2$$
from which it follows that
$$ -0.2\le x-\dfrac{\pi}{2}\le 0.2$$
One should point out, however, that since this is an alternating series, a better estimation of the error would be to use the next term of the series to get $$ R<\left\vert\dfrac{\left(x-\frac{\pi}{2}\right)^6}{6!}\right\vert\le\dfrac{(0.2)^6}{720} $$
A: Consider the Lagrange form for the remainder. 
There is a value of the independent variable in the interval $\xi$ for which $-sin(\xi)(x−π2)^5\over{5!}$ is equal to the remainder. 
The guarantee is that $\xi\in[a,xEval]$ where a is the "base point", and xEval is the point in which you are approximating the function. 
Therefore, the maximum possible absolute value for the remainder comes from locating the maximum for $|-sin(x)|, x\in [xEval,a]$ and multiplying it by ${|xEval-a|^5}\over{5!}$
The maximum for $|sin(x)|$ is 1.
And $|xEval-a|=0.2$ for "both" intervals considered in your question $[-0.2,\pi/2]$ and $[\pi/2,0.2]$
