TITLE: $f(x)=\sin x$, $f$ polynomial
QUESTION [7 upvotes]: $f$ is a polynomial and suppose that $f(x)=\sin x$ has infinitely many solutions. Prove that $f$ is a constant between -1 and 1.

I get the problem intuitively, but how would I prove this formally?
Can anyone give me any hints?

REPLY [2 votes]: This one is tricky to handle and does require the use of Taylor's Theorem, but strictly we don't need anything from complex analysis.

Let $g(x) = f(x) - \sin x$ where $f(x)$ is a polynomial. Clearly if we differentiate $g(x)$ multiple times, the part related to $f(x)$ will vanish ($(n + 1)^{\text{th}}$ derivative of a polynomial of degree $n$ is $0$) and the part related to $\sin x$ will take one of the four forms $\pm\cos x , \pm\sin x$ alternately. It thus follows that for any specific $x$ there will be a positive integer $n$ for which $g^{(n)}(x) \neq 0$.
Now consider a root $\alpha$ of $g$ so that $g(\alpha) = 0$. From the preceding argument it is obvious that there is a least positive integer $n$ such that $g^{(n)}(\alpha) \neq 0$ (so that $g(\alpha) = g'(\alpha) = \cdots = g^{(n - 1)}(\alpha) = 0$. By Taylor's Theorem we have $$g(\alpha + h) = \frac{h^{n}}{n!}g^{(n)}(\alpha) + o(h^{n})$$ and hence $g(\alpha + h) \neq 0$ for all sufficiently small values of $h$. Thus there is a neighborhood of $\alpha$ in which $g$ does not have any root other than $\alpha$.
Next we observe that if $f(x)$ is a polynomial of positive degree then as $x \to \infty$ or $x \to -\infty$ the polynomial $f(x)$ will also tend to $\pm\infty$ and $\sin x$ will remain bounded. Thus if there are any roots of $g(x) = f(x) - \sin x$ they necessarily lie in some bounded interval of type $[a, b]$. If there are infinitely many roots of $g$ lying in $[a, b]$ then by Bolzano Weierstrass Theorem the set $A$ of roots of $g$ has an accumulation point $\beta \in [a, b]$. So there is a sequence of roots $\alpha_{n}$ of $g$ such that $\alpha_{n} \to \beta$ as $n \to \infty$. Then by continuity of $g$ we have $$g(\beta) = g(\lim_{n \to \infty}\alpha_{n}) = \lim_{n \to \infty}g(\alpha_{n}) = 0$$ so that $\beta$ is also a root of $g$. But then we reach a contradiction because we have proved earlier that each root of $g$ has a neighborhood in which there are no other roots of $g$ and $\beta$ being an accumulation point of roots of $g$ is such that every neighborhood of $\beta$ contains a root of $g$ other than $\beta$.
Hence the polynomial $f(x)$ must be of zero degree i.e $f$ is a constant. Now clearly $\sin x = f(x)$ implies that $f$ must be a constant between $-1$ and $1$ (both inclusive).