Proving a noninvertible function is onto?

How do I prove that $f:\mathbb R\longrightarrow\mathbb R, \;f(x) = x^3 - 3x$ is onto? Is it always necessary to find an inverse function? I guess there is some way to restrict such a function's domain so it's outside the overlapping parts $x < -\sqrt{3}$ or $x \ge \sqrt{3}$, but how do I express this mathematically? Or is there some other way to do this?

-
What is your domain? codomain? $\mathbb{R}$? – Bill Cook Jan 24 '12 at 15:41
Yes, it's $f:\mathbb{R} \rightarrow \mathbb{R}$. – Matt Gregory Jan 24 '12 at 15:44
The proof is essentially: $\lim_{x \to \infty} f(x)=\infty$ and $\lim_{x \to -\infty} f(x)=-\infty$. Since $f$ is continuous the intermediate value theorem guarantees the range is $(-\infty,\infty)$ (everything). Thus onto. – Bill Cook Jan 24 '12 at 15:51
Oh, I like this one even better! Thanks! – Matt Gregory Jan 24 '12 at 15:55
I think the takeaway here is: whenever you see a function $f:\mathbb{R} \rightarrow \mathbb{R}$, don't forget about calculus! – Matt Gregory Jan 24 '12 at 16:18

We want to prove that for any real number $b$, there is an $x$ such that $x^3-3x=b$. If $x$ is large enough negative, $x^3-3x$ is for sure $<b$. So there is a number $L$ such that $L^3-3L<b$.

If $x$ is large enough positive, then $x^3-3x>b$. So there is a number $M>L$ such that $M^3-3M>b$.

Since the function $x^3-3x$ is continuous, by the Intermediate Value Theorem, there is an $x$ such that $L<x<M$ and $x^3-3x=b$.

Or else let $f(x)=x^3-3x-b$. By what was written above, there is an $L$ such that $f(L)<0$, and there is an $M>L$ such that $f(M)>0$. So (again by the Intermediate Value Theorem) there is an $x$ between $L$ and $M$ such that $f(x)=0$, maning that $x^3-3x=b$. More informally, the function is negative somewhere, positive somewhere, so the graph of $y=f(x)$ must cross the $x$-axis, so by continuity $f(x)$ must be $0$ somewhere.

Comment: There is an old ($16$-th century) complicated but explicit formula, called the Cardano Formula, for the roots of a cubic. Unfortunately, at least for some values of $b$ (those for which $f(x)$ has $3$ distinct real roots) the formula is very difficult to work with.

-
That makes sense to me. Thanks! – Matt Gregory Jan 24 '12 at 15:54
@Matt Gregory: Good. I was afraid that you might not have met the Intermediate Value Theorem. If it is not entirely familiar, you can find information on Wikipedia, or in almost any calculus book. – André Nicolas Jan 24 '12 at 16:08
Yeah, a few days ago, in fact, I spent quite a bit of time trying to derive Cardano's cubic formula. It's amazing to me how much complexity there is in these little polynomials that seem so simple. – Matt Gregory Jan 24 '12 at 16:11
I've taken tons of calculus, I'm just slow, I guess. My brain's not working this morning. – Matt Gregory Jan 24 '12 at 16:12
@Matt Gregory: About Cardano's formula, there is a further complication. When there are $3$ real roots (the casus irreducibilis) then cube roots of non-real numbers are unavoidable, even though the ultimate answers are real! – André Nicolas Jan 24 '12 at 17:22

There is no need to restrict the domain. You need only show that for any $y$ in the range of your function (I'll assume it's $\Bbb R$), that the equation $$f(x)=y$$ has a solution. That, is you need to show that any element in the range is actually an output value of the function.

Here, you'd fix $y\in\Bbb R$ and consider the equation $$x^3-3x=y.$$ Or $$x^3-3x-y=0.$$ Since this is a polynomial equation of degree 3, it does have a real solution (by the Fundamental Theorem of Algebra; you could also take a Calculus approach to show this). If you call this solution $a_y$, then $f(a_y)=y$. Thus $f$ is onto.

-