### Context:

So I am given the problem, "*Show that $f:\mathbb R\to\mathbb R$ is neither 1-1 nor onto when $f$ is defined as $f(x) = x^2+ax+b$*." I can do this easily enough using some tricks from basic calculus and whatnot, but it got me thinking that this **neither 1-1 nor onto** was something that should be true for quite a lot more functions.

---

### Question

Now my idea is that for any function continuous $f:\mathbb R\to\mathbb R$ for which $$\lim\_{x\to-\infty}f(x) = \lim\_{x\to\infty}f(x)$$ then $f$ should be **neither 1-1 nor onto**.

This seems straightforward enough, but I am not sure how to go about proving such a thing. I'm pretty certain that I can show that it isn't 1-1 with some fancy use of the intermediate value theorem, but I'm fairly stumped on surjectivity, in fact I'm wondering if the function could do something odd where it keeps bouncing up and down in some weird way if it's able to cover all values in $\mathbb R$ in a finite space.

### Note:

$\lim\_{x\to-\infty}f(x) = \lim\_{x\to\infty}f(x)$ is intended to imply that both these limits exist, or are $\pm\infty$