Can a function $f: \Bbb R \to \Bbb R$ have finitely many local maxima, but infinitely many local minima ? What happens if $f$ is continuous?

92 Views Asked by At

Can a function $f: \Bbb R \to \Bbb R$ have finitely many local maxima, but infinitely many local minima ? What happens if $f$ is continuous ? I am aware of the fact that for a continuous function, between two local maxima, there is a local mimimum

2

There are 2 best solutions below

0
On

If $f$ is allowed to be discontinuous, we can just take $f(x) = x$ when $x$ is not an integer, and $f(x) = x-1$ when $x$ is an integer. Infinitely many local minima, and zero local maxima.

0
On

Not if $f$ is allowed to be discontinuous. Consider $|\sec(x)|$.