# Assume that $f$ continuous at $[a,b]$ and differentiable at $(a,b)$. Prove that if $f''(x) \neq 0$ then $f$ gets every value at $[a,b]$ twice,at most

Assume that $f$ is continuous at $[a,b]$ and differentiable at $(a,b)$. Prove that if $f''(x) \neq 0$ for every $x \in (a,b)$ then $f$ gets every value at $[a,b]$ twice, at most.

I tried to prove it by assuming that there exist $x_1 > x_2 > x_3$ such that $f(x_1) = f(x_2) = f(x_3)$. but can not really understand how to use the assumption that $f''(x) \neq 0$ for every $x \in (a,b)$

I suppose you need to use Rolle's theorem but I didn't get there just yet.

• Draw the graph of such a function as you suppose. Do you see how there must be a critical point between $x_1$ and $x_2$, and another between $x_2$ and $x_3$? And between those critical points there's an inflection point? – Matthew Leingang Sep 22 '17 at 8:53

Let's use your assumption with $x1 > x2 > x3$.
Because $f$ is continuous over $[x2, x1]$,differentiable over $]x2, x1[$ and $f(x_2)=f(x_1)$,
$$\exists c_1 \in ]x2, x1[, f'(c_1) = 0$$
$$\exists c_2 \in ]x3, x2[, f'(c_2) = 0$$
Do you think it will be possible to apply Rolle's theorem on $f'$ over $[c2, c1]$?