I was working on an approximation for the sine function, in which I needed to calculate the maximum error to work on a compensation polynomial. My approximation was this:
$$f(x) = \frac {4} {\pi^2} x (\pi - |x|)$$
Then, obviously the error is found by substracting that from $\sin(x)$. In order to find the x-coordinate of the maximum error I took the derivative and and set it equal to zero.
$$\begin{align*} \mathrm{err}(x) &= \sin(x) -f(x)\\ \mathrm{err}'(x) &= \cos(x) + \frac {8} {\pi^2}|x| - \frac 4 {\pi} \\ \mathrm{err}'(x) &= 0 \rightarrow \cos(x) = \frac 4 \pi - \frac 8 {\pi^2}|x| \end{align*}$$
But I'm only a highschool student and I have no knowledge of the maths required to solve that last equation, if possible. How would one go into solving that last equation exactly?
A small image:

For my particular purpose it would suffice by calculating the value numerically and continue, but just purely for interest I'd like to know the exact value. Not homework.
0.00109worst and0.000505average error with 4 multiplications and 2 additions. – nightcracker Feb 17 '12 at 18:24