MVT/Rolle's Theorem on twice differentiable function. Suppose $ f : \mathbb R\to\mathbb R$ is differentiable two times (so both $f$ and $f′$ are differentiable on $\mathbb R$ ) and $f′′(x)$ > 0 for all $x ∈ \mathbb R$. 
Show that for any $y ∈ \mathbb R$ there exist at most two distinct values $x_1,x_2 ∈ \mathbb R$ such that $f(x_1) = f(x_2) = y$
I believe you have to use MVT/Rolle's Theorem to try and obtain a contradiction somewhere but I am struggling to figure out how. Help would be very much appreciated.
 A: Assume $x_{1}<x_{2}<x_{3}$ are such that $f(x_{1})=f(x_{2})=f(x_{3})$. Then from $x_{1}<x_{2}$, there is some $\xi_{1}\in(x_{1},x_{2})$ such that $f'(\xi_{1})=0$. Similarly, $f(\xi_{2})=0$ for some $\xi_{2}\in(x_{2},x_{3})$. From $(\xi_{1},\xi_{2})$, there is some $\xi_{3}\in(\xi_{1},\xi_{2})$ such that $f''(\xi_{3})=0$, a contradiction.
A: I may provide a slightly different proof - trying to avoid contradiction.
Since $f''(x)>0$ for every $x\in\mathbb{R}$ we get that $f'$ is strictly increasing on $\mathbb{R}$. Now, consider the following cases:


*

*If there exists an $a\in\mathbb{R}$ such that $f'(a)=0$, then, due to $f'$'s monotonicity, we take that:
$$f'(x)>0\ \forall x>a\text{ and } f'(x)<0\ \forall x<a$$
which gives that $f$ is strictly increasing on $(a,+\infty)$ and strictly decreasing on $(-\infty,a)$ and also attains a global minimum at $x_0=a$. So, let $y\in\mathbb{R}$. If $y<f(a)$, then there exists no $x\in\mathbb{R}$ such that $f(x)=y$, since $f(a)$ is a global minimum. If $y=f(a)$ then, only $x_0$ has the property that $f(x_0)=y$ and, if $y>f(a)$, there exist exactly two numbers $x_1,x_2\in\mathbb{R}$ - IMVT and $f$'s monotonicity in each of the intervals $(-\infty,a)$ and $(a,+\infty)$ gives this result - such that $f(x_1)=f(x_2)=y$.

*If there exists no such $a\in\mathbb{R}$, then, either $f'(x)>0$ $\forall x\in\mathbb{R}$ or $f'(x)<0$ $\forall x\in\mathbb{R}$. WLOG, consider the first case. Then, we take immediately that $f$ is strictly indreasing, thus $1-1$, so, it takes every real value $y\in\mathbb{R}$ at most once.



Comments


*

*I still consider the proof already provided by @Tiago Siller and @user284331 shorter and more adequate for a test or, in general, for a textbook etc. However, I think the abovementioned proof gives a much more clear "vision" of what this situation is about and makes a strong use of intuition, which is what I, personally, find more helpful in teaching, rather than just making this short and elegant argument leading to a contraditcion.

*This proof makes, as well, use of the MVT strongly, since, in order to prove that $$f'(x)>0\Rightarrow f:\uparrow$$ one uses MVT, so, Albert B's suspicion and intial thought was correct.

*Allright, this proof does not entirely avoid contradiction, since, to prove- easily- that $$(f\neq0)\land (f\text{ is continuous})\Rightarrow f\text{ maintains sign}$$
one may use a contradiction argument. 

A: Suppose that there are $x_1< x_2< x_3\in\mathbb{R}$ such that $f(x_1)=f(x_2)=f(x_3) = y$.
By Rolle's Theorem, there are $a\in(x_1, x_2)$ and $b\in(x_2, x_3)$ with $f'(a)=f'(b)=0$
So, by Rolle's Theorem again, there is $c\in(a,b)$ such that $f''(c)=0$. Contradiction!
Therefore there exists at most two values such image is $y$.
