# Does there exist a polynomial $P$ such that $|P(x) − \cos x| \le10^{-6}$ for all (real) x?

Does there exist a polynomial $$P$$ such that $$|P(x) − \cos x| \le10^{-6}$$ for all (real) x?

I am struggling to understand how to even start with this question, as it is not clear to me what this really means. Obviously $$-1\le \cos x\le 1$$, so maybe there is a way to use that, or maybe use the small angle approximations?

I am really not too sure, any help would be much appreciated.

• This is not possible because any polynomial is unbounded over the reals and so this quantity is also unbounded. May 10, 2020 at 12:18

The polynomial has to be positive at even multiples of $$\pi$$ where the cosine is $$+1$$, negative at odd multiples of $$\pi$$ where the cosine is $$-1$$. Therefore infinitely many zeroes. And we're having a bad day.
Yes, the fact that $$\cos x$$ is bounded implies that it can't be approximated by any polynomial $$P(x)$$. Consider the largest power of $$x$$ involved in the polynomial. For $$x$$ sufficiently large, this term will be much bigger than all others combined, so if this term has a positive coefficient $$P(x)$$ will be large and positive for $$x$$ sufficiently large, and if it has a negative coefficient then $$P(x)$$ will be large and negative.
• Is the condition satisfied for all real values of $x$? This does not seem to answer the question. May 10, 2020 at 14:58
• @sammygerbil I don't understand your comment. We can't have a polynomial satisfying $-2<P(x)<2$ for all real values of $x$, so the stronger condition asked for certainly can't be satisfied. May 10, 2020 at 15:42
On any finite interval that would be possible but every non-constant polynomial $$P(x)$$ diverges to $$\pm{\infty}$$ as x goes to $$\pm{\infty}$$ making it impossible.