The total number of local maxima and local minima of the function
is
For , , vanishing only at without a change of sign, so is increasing on and is not an extremum.
At , and , so is continuous there.
For , , , which is negative on and positive on ; does not exist, but is continuous at .
So increases up to and then decreases: a local maximum at . It decreases on and increases on : a local minimum at .
There is no other change in the sign of , so the total number of local maxima and minima is 2.
Hence, the correct option is (C).
Tagged Optimization word and geometry problems. Machine-assigned, so read it as a strong shortlist rather than a verdict.