Can a first derivative of a function have more roots than the original function?

This is a general question. Function is to be considered differentiable on some domain.

More specifically, I am given a function $f(x)$ which is twice differentiable and has three distinct real roots. Is the statement

$f '(x)$ has at most three real distinct roots

true?

EDIT: I'm sorry, I meant to ask a question for only those functions that do have roots. For example, $f(x)$ has $n$ roots, can $f'(x)$ have more than $n$ roots (again function is to be considered differentiable and roots are real and all distinct).

• The function $y=x^2(x^2-1)^2$ has three zeroes and 5 maxima/minima where the derivative vanishes. – Andrea Mori Oct 28 '14 at 17:53
• By Rolle's theorem the derivative must have at least $n-1$ roots. It may have exactly $n-1$ roots (e.g. $x^2-1$), exactly $n$ roots (e.g. $xe^{-x}$), or many more (e.g. $x+2\sin x$). – Rahul Oct 28 '14 at 17:59
• Do you only want to consider polynomials? – JHance Oct 28 '14 at 17:59
• Not necessarily only polynomials. I'm just a bit baffled by the proposition that f '(x) has at most 3 roots. I know how the downward limit of number of zeros is estimated by Rolle's and MVT theorems, but this proposition is dealing with upward limit. – eyedropper Oct 28 '14 at 18:03

Take $f(x)=3x^2-3$ and let be $g(x)$ a primitive of $f$, for example $x^3-3x+C$. If $C$ is large enough, $g$ will have only a root and its derivative (namely $f$) has two.

EDIT: With $C>2$, $g$ has only one real root.

$f(x)=5+\sin x$ has no roots, and its derivative has infinitely many.

• Sorry for making confusion, I edited my question. – eyedropper Oct 28 '14 at 17:53
• @eye, in the same vein: $x + \sin x$ has 1 root, but its derivative has infinitely many. – JHance Oct 28 '14 at 17:59

The answer is affirmative even for polynomial functions, e.g. $y=1+x^2$.

• Sorry for making confusion, I edited my question. – eyedropper Oct 28 '14 at 17:53
• See my comment above – Andrea Mori Oct 28 '14 at 17:54