Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Note that by the real fundamental theorem of algebra, the general case reduces to the case $\deg P\leqslant 2$.
It is well-known. It is even known that you may take $R=(1+x)^m$ for large enough $m$. See, for example,John Scholes's solution to Problem 11 of the 38th IMO 1997 shortlist. Note that by the real fundamental theorem of algebra, the general case reduces to the case $\deg P\leqslant 2$.