# Functions with infinitely many critical points

Does there exist an $f\in C^2(\mathbb{R})$, $f:\mathbb{R}\rightarrow \mathbb{R}$ with infinitely many critical points but finitely many inflection points? (Not a homework question.)

Such $f$ would have $f'$ with infinitely many roots and finitely many critical points. I know how to construct a function with infinitely many roots given any infinite closed set but couldn't thing whether there is a similar construction to obtain a $C^1$ function with finitely many critical points, in order to construct $f'$ and then find such $f$.

I expect that there isn't such function, except the constant functions, but I couldn't thing how to prove or disprove this.

• Between any two roots is a maximum or minimum (so the answer is 'no'). – Thomas Apr 28 '14 at 15:22
• @Thomas Thank you. I really got stuck on this one. – Kal S. Apr 28 '14 at 15:26

Well, I think there is no such function. If $M$ is the set of critical points, then we should be able to find at least one sequence $x_n$ inside $M$, such that $x_n$ is either strictly monotone increasing or decreasing. Assume the $x_n$ is increasing. Since $g:=f'$ is zero in $x_n$ and $x_{n+1}$ and $g\in C^1(\mathbb{R})$, there exists a point $y_n$ in the open interval $(x_n,x_{n+1})$ such that $g'(y_n)=0$. Hence, $y_n$ is an inflection point and therefore the set of inflection points is infinite.