Is there an algorithm that given a function and its derivative gives me all local maxima (in an interval)? All optimization algorithms I know of focus on finding one local or one global maximum. I could run such a traditional optimization algorithm multiple times at different starting points and hope to find all local maxima but this is wasteful and probably incomplete. Thank you.
EDIT: Let's assume that the function, its derivative and its second derivative are all continuous. I am looking for an algorithm that works on any such function, not just on polynomials.