The problem is...
Let $m$, $n$ be any positive integers. Prove that for each $m$ and $n$, there always exists a polynomial $P(x)$ of degree $m$ with non-zero real coefficients such that $P(x)=\cos(x)$ has exactly $n$ roots in $\mathbb{R}$ (without counting multiplicities).
I proved it for even $m$ and $n\le\frac{m}{2}$ by letting $P(x)$ be tangent to $(2k\pi,1)$, $(1\le k\le n).$ And I think it is true because it holds for $m=1$, and $P(x)$ can become similar to a linear function by making the coefficient of $x^{k}(k>1)$ very close to 0. But I can't find a solid proof for this. I first tried it with Rolle's theorem. For several tens of minutes, I tried to prove this with Taylor's theorem, but I couldn't find any clue how to prove it because of the error term. I also tried and failed to find the proof on internet.
I would highly appreciate any help for it. Thanks in advance!