# Show that continuous functions with limits equal are neither 1-1 nor onto.

### 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$

• Let the limits bound $f(x)$ for $x < -R$ and $x > R$, and then $f$ must be bounded on the compact interval $[-R, R]$. Therefore, any such $f$ is bounded which implies it's not onto. (Similar argument would work if $\lim_{x\to -\infty} f(x) = \infty$ and $\lim_{x\to \infty} f(x) = \infty$ - in that case, $f$ is bounded below.) – Daniel Schepler Feb 10 '18 at 1:51

The function cannot be onto because it is bounded. And you don't need the limits to be equal, only to exist.

Assume $M=\lim_{x\to-\infty} f(x)$, $L=\lim_{x\to\infty} f(x)$.

Indeed, by the definition of limit there exists $K>0$ such that, for $x>K$, $|f(x)-L|<1$, and for $x<-K$, and $|f(x)-M|<1$.

Then, on $[-K,K]$, the function is bounded, say $|f|\leq R$ because it is continuous on an interval. For $x>K$, $|f(x)|\leq 1+|L|$. For $x<-K$, $|f(x)|\leq 1+|M|$. In the end, $$|f(x)|\leq \max\{R,1+|L|,1+|M|\},\ \ x\in\mathbb R.$$ So $f$ cannot be surjective.

When both limits are $+\infty$, the function will have a minimum (fix $M>0$ and take $K$ such that $|f(x)|\geq M$ outside of $[-K,K]$). Similarly, when both limits are $-\infty$ the function will have a maximum. In both cases, it cannot be surjective.

• This does not deal with the case when the limits are $\pm \infty$. – Benji Altman Feb 14 '18 at 16:12
• You are right. I have added a paragraph on that. – Martin Argerami Feb 14 '18 at 17:38

The answers here have discussed your problem when limits are finite, let me deal with the case when the limits are infinite.

Without loss of generality, let's assume that $\lim_{x \rightarrow \infty} f(x) = \lim_{x \rightarrow -\infty} f(x) = \infty$. Then there exists $a < b \in \mathbb{R}$ such that $f(x) > 1$ for $x < a$ and $x > b$. On $[a, b]$, $f$ attains a minimum, say $k$. $f$ cannot be onto, because it does not take on any value $y < \min\{1, k\}$.

$f$ is not one-one either. Let $f(c) = k$, for $c \in [a, b]$. Note that as $f(a), f(b) \geq 1$, $k \leq 1$. Take $x_0 < a$ with $f(x_0) > 2$ and $x_1 > b$ with $f(x_1) > 2$. Then by the intermediate value property, $f$ attains $\frac{3}{2}$ on $(x_0, c)$ and $(c, x_1)$.

Here is a trick I like:

Let $\phi(x) = f(\tan x)$ for $|x| < {\pi \over 2}$ and $\phi(\pm {\pi \over 2}) = L$.

Note that $\phi:[-{\pi \over 2}, {\pi \over 2}] \to \mathbb{R}$ is continuous and $[-{\pi \over 2}, {\pi \over 2}]$ is compact, hence $\phi([-{\pi \over 2}, {\pi \over 2}]) = f(\mathbb{R})$ is bounded.

If $f$ was injective, then $\phi$ would be injective and hence monotonic on $[-{\pi \over 2}, {\pi \over 2}]$. This would imply that $\phi(x) = L$ for all $x$ and hence $f(x) = L$ for all $x$ which contradicts the assumption of injectivity. Hence $f$ is not injective.

Suppose $g:[a,b] \to \mathbb{R}$ is continuous & injective. Then $g$ is strictly monotonic.

To see this, suppose $g(b) > g(a)$, and $a \le x < y \le b$. Since $g$ is injective, we must have $\phi(y) \notin \phi([a,x])$ and hence $\phi(y) > \phi(x)$.

If $g(b) < g(a)$ then apply the above to $-g$.

• How does injectivitiy imply monotonic for $\phi$? – Benji Altman Feb 12 '18 at 23:11
• @BenjiAltman: I have added an elaboration to my answer. – copper.hat Feb 12 '18 at 23:40

Assume without loss of generality that $L:=\lim_{x\rightarrow\infty}f(x)=\lim_{x\rightarrow-\infty}f(x)>0$, then for large $M$, we have if $|x|>M$, then $f(x)>L/2$. Then on $[-M,M]$, $f$ attains minimum $m$, say, $f(x_{0})=m$, then $f(x)>\min\{L/2,m\}$. Pick an $\alpha<\min\{L/2,m\}$, then there is no $x$ such that $f(x)=\alpha$.

If you toss a bunch of definitions into a bowl and mix with extreme and intermediate value theorems it all falls out.

If $-\infty < \lim_{x\to -\infty} f(x) = \lim_{x\to \infty}f(x) = k < \infty$ then for any $\epsilon> 0$ there are $M_1, M_2$ so that $x \le M_1$, $|f(x)-k|< \epsilon$ an $x \ge M_2$ then $|f(x) -k| < \epsilon$.

By the extreme value theorem there is a max and min on $x \in [M_1, M_2]$. so $f(x) \ge \min(k- \epsilon, \min f([M_1, M_2]))$ for all $x$ and $f(x) \le \max (k + \epsilon, \max f([M_1, M_2]))$. So $f$ is bounded above and below if the equal limits are finite.

If the limits are infinite, $\lim_{x\to \infty} f(x) = \lim_{x\to -\infty} f(x)=\pm \infty$ then for any $K$ there is are $M_1$ and $M_2$ so that $x < M_1$ or $x > M_2$ implies $|f(x)| > K$. But the by EVT there is a max and min on $x \in [M_1, M_2]$ and if the limit is to $-\infty$ then for all $x$, $f(x) < \max f([M-1,M_2])$. If the limit is to $+\infty$ then $f(x) > \min f([M-1,M_2])$.

So either way $f$ is bounded either above or below or both. So $f$ can not be onto.

Now for $1-1$.

If $-\infty < \lim_{x\to -\infty} f(x) = \lim_{x\to \infty}f(x) = k < \infty$, if $f(x) = k$ is a constant function it isn't $1$ to $1$.

If $f(x)$ isn't constant $f(x) = k$ then there is an $x_0$ so that $f(x_0) \ne k$. Wolog, assume $f(x_0) > k$ and that $\epsilon = f(x_0) - k$. Then there are $M_1, M_2$ so that $|f(x_1) - k| < \epsilon$ for any $x_1 < M_1$ and $|f(x_2) - k| < \epsilon$ for any $x_2 > M_2$. So by the Intermediate Value Theorem, for any value $c; \max(f(x_1),f(x_2)) + \epsilon < c < f(x_0)$ there are $x_a$; and $x_b$ with $x_1 < x_a < x_0$ and $x_0 < x_b < x_2$ so that $f(x_a) = f(x_b) = c$.

If limit is infinite, wolog $\lim_{x\to -\infty}f(x) = \lim_{x\to \infty} f(x) = -\neg \infty$, then for any $f(x_0)$ and any $c < f(x_0)$ then by IVT there exist $x_a < x_0$ and $x_b > x_0$ so that $f(x_a)=f(x_b) = c$.

So $f$ is not 1-1\$.

That's inelegant and clunky and I pity the poor grader/student who has to read the ugly thing (sorry, guys) but it's straightforward.