# Local maxima and local minima

Let $f$ be a continuous function of one variable. Show that if $f$ has two local maxima, then $f$ must also have a local minimum.

Let $x_1,x_2$ be the points where $f$ attains the maxima; If $x_1<x_2$, suppose that $f(x_1)<f(x_2)$. Since $f$ is continuous there must exist a point $c$,between $x_1$ and $x_2$, such that $f(c)=f(x_1)$. By Rolle's theorem there is a point(between $x_1$ and $c$), say $x_3$, such that $f'(x_3)=0$; So how could I show that $f''(x_3)>0$?

• Is this homework? – rewritten Oct 28 '14 at 16:06
• yes it is...I need a rigorous proof – user188014 Oct 28 '14 at 16:07
• Welcome to Math SE! what have you tried? – user171358 Oct 28 '14 at 16:08
• I edited my friend – user188014 Oct 28 '14 at 16:18

Let $x_0$ and $x_1$ two points where $f$ attains a local maximum. Consider now the closed interval $I = [x_0, x_1]$ which is bounded and thus compact. Any continuous function maps compacts to compacts, so the image $J$ is compact, so it has a minimum. This minimum can't be attained at either $x_0$ or $x_1$, as they are local maxima, so there are points in $I$ where $f$ is less than both of these maxima.
Any preimage of the minimum of $J$ is the locus of a minimum for $f$.