Image of $[0,\infty)$ under $x\cos x$ 
$f(x)=x\cos x$. What is the image of $[0,\infty)$ under $f$?

I think the answer is $\Bbb R$ but I've got some difficulties trying to prove it. We can't determine $\lim_{x\to\infty}\cos x$, right?
 A: We have
$f$ is continuous at $[0,+\infty)$, so
$f([0,+\infty))$ is an interval.
but
$\lim_{n\to +\infty}f(2n\pi)=+\infty$
and
$\lim_{n\to+\infty}f((2n+1)\pi)=-\infty$
thus
$f([0,+\infty))=(-\infty,+\infty)$.
A: Hints. Find two sequences $(a_n)$ and $(b_n)$ such that $f(a_n)$ and $f(b_n)$ tend to $-\infty$ and $+\infty$, respectively. Since the function $f$ is continuous, we can conclude.
A: Using Intermediate Value Theorem, you only have to prove
$$ \inf_{x \in [0,\rightarrow]} f(x) = -\infty,\sup_{x \in [0,\rightarrow]} f(x) = \infty
$$
A: To prove the range is $\mathbb{R}$, it suffices to show that given any real number $a\in \mathbb{R}$, there exists a number $x\in [0,\infty)$ such that $f(x)=a$.
Suppose $a\neq 0$ (otherwise $x=0$, the trivial case). You want to find $x$ satisfying $f(x)=x\cos x=a$, equivalently, you want to find the root of 
$$G(x):= \cos x-\frac{a}{x}.$$ You can always find the suitable $x_1, x_2>0$ such that $G(x_1)=\cos x_1-\frac{a}{x_1}>0$ (for large $x_1$) and $G(x_2)=\cos x_2-\frac{a}{x_2}<0$ (for small $x_2$). Since $G(x)$ is a continuous function on $(0, \infty)$, by the Mean Value Theorem, there exists a root of $G(x)$ between $x_1$ and $x_2$, and we complete the proof.
