# Mean value theorem question: A function with $3$ roots has at least $2$ horizontal tangent lines?

If the graph of an everywhere differentiable function has three $x$-intercepts, then it must have at least two horizontal tangent lines, is this true? I think no because a cube root function can have three equal roots at $x=0$, any ideas?

Another question I have is: if you have a global maximum is it always a local maximum?

-

If it has three equal roots, it has only one x-intercept. The function $f(x) = \sqrt[3]{x}$ has only one root, at $x = 0$.

The statement is true, by Rolle's Theorem (which is really a more specific version of the Mean Value Theorem). Say $a, b, c$ are roots of the function, then $f(a) = f(b)$ and $f(b) = f(c)$. Threfore, there are points $i \in (a, b)$ and $j \in (b, c)$ where $f'(x) = 0$, i.e., the function's slope is $0$.

As for your second question, I think yes, but I'm not sure. Wikipedia's definition of local maxima seems to include global maxima as a special case (you can think of it as taking $\epsilon = \infty$), so I'm going to go with yes.

-
The answer to your second question is yes; more precisely, if $f$ attains its global maximum at $a$ and is differentiable at $a$, $f'(a) = 0$. One way to see this is to note that $f(a) \geq f(a+\epsilon)$ and $f(a) \geq f(a-\epsilon)$ for any $\epsilon$. Thus $$\lim_{\epsilon\to 0^+} \frac{f(a+\epsilon)-f(a)}{\epsilon} \leq 0$$ and $$\lim_{\epsilon\to 0^-} \frac{f(a+\epsilon)-f(a)}{\epsilon} \geq 0.$$ Since these both exist and are equal, they must be zero.