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?