For polynomials, the integrals converge iff the degree of $f(x)$ is at least 3. To show this, you remove an interval $(-a,a)$ containing the zeroes of f'(x) (over which the integral trivially converges), and rewrite the remaining integral as \int_{|x| > a} {x \over f'(x)} (f'(x)\sin f(x))\,dx By definition, the integral converges iff the $x > a$ and $x < -a$ parts both converge. We focus on the $x > a$ part as the $x < -a$ part is done the same way. Next, integrate by parts, obtaining -\lim_{a \rightarrow \infty}{a \over f'(a)}\cos(f(a)) + {a \over f'(a)}\cos(f(a)) + \int_a^{\infty}({d \over dx}{x \over f'(x)}) \cos(f(x))\,dx If $f(x)$ is a polynomial of degree $2$ or more, ({d \over dx}{x \over f'(x)}) is a rational function whose denominator exceeds that of the numerator by at least $2$, so that you have an estimate |({d \over dx}{x \over f'(x)})| < C{1 \over x^2} for some constant $C$. Thus the integral converges by comparison with $C{1 \over x^2}$.
If the degree of $f(x)$ is at least three, then the degree of f'(x) is at least $2$, and -$\lim_{a \rightarrow \infty}{a \over f'(a)}\cos(f(a)) = \lim_{a \rightarrow \infty}{a \over f'(a)} = 0$ As a result, if $f(x)$ has degree $3$ or more, the overall integral converges.
If the degree of $f(x)$ is two, then f'(x) has degree $1$ and \lim_{a \rightarrow \infty}{a \over f'(a)} is some nonzero value. Thus the function {a \over f'(a)}\cos(f(a)) oscillates and there is no limit; the original integral diverges.
All that remains is the case where $f(x)$ has degree one. For this it's probably easiest just to show that the integral over a given period diverges as $x$ goes to infinity; it diverges faster than the integral of $\cos(f(x))$ which already diverges.
The above technique can be used for nonpolynomials too, but I don't know any sufficient and necessary conditions for it to work offhand.