I had a question that goes like this:
Let $m$ be the number of local minima and $M$ be the number of local maxima. Can you create a function where$M > m + 2$ ? Graph.
I tried graphing it using piecewise function and I improvised it by doing 3 parabolas opening downward and 1 parabola opening upward with each horizontal line separating them.
I was just wondering if there is an easier way in creating a graph given such condition?
$\endgroup$2 Answers
$\begingroup$Such a function is not possible if you want a continuous function, because between 2 local minumums has to be a local maximum, and vice versa. So local minumums and maximums always alternate (if you exclude cases where $f(x)$ is constant on an interval).
If you allow discontinuous functions, you can use
$$f(x) = \lfloor x\rfloor -x$$
It has a local maximum at each integer ($f(x) = 0, \forall x \in \mathbb Z$), but no local minimum at all: for a given $x_0 \in \mathbb R$ with $\lfloor x_0\rfloor = k$, choose any $x \in (x_0, k+1): f(x_0) = k - x_0 > k - x = f(x)$, so $x_0$ can't be a local minimum.
$\endgroup$ 1 $\begingroup$Because we need a local maxima and minima, we can choose a third degree polynomial because its derivative has two roots So can't we create a function that has two roots then take its antiderivative? Let y and z be roots of the function. $z < M-2$. So lets get $z=M-3. f(x)=(x-M)*(x-(M-3)). f(x)=x²+3x-xM-xM-3M+M² =x²+3x-2xM-3M+M².$ antiderivative$(x²+3x-2xM-3M+M²)=(x³/3)+(3x²/2)-Mx²-3Mx+M²x + C$. I need help! First time using this, don't know how to set up equations.
$\endgroup$ 3