Sequence to find the extreme points of a function?

Mads Frederik Toft shared this question 3 years ago

I have been trying to construct a sequnce which taken a function f(x) and for some integer j scans a set to find the extreme point value.

f(x) = 1 / 2 x³ - 2x² + 2

Sequence(If(f'(j) ≟ 0, j), j, -3, 3, 0.5)

How ever the main problem is that this sequence cannot find the extreme value if its a fraction.

So any surgestions on that I am missing will be welcomed ? :)

p.s. I know there is a build-in function in Geogebra to find the extreme values, but I would to ignore that if possible.

Comments (4)


I can't see a general solution, since each function you enter may have a different domain.

So you should create two different Sequence commands, one for each portion of the domain you want to scan, and Join them in a single list, for a nicer output. (you will need to avoid in the Sequence command the point/points/intervals in which your function is not defined)

I'd also consider to clean up a bit the resulting list, using RemoveUndefined command.

Try e.g. in your file

RemoveUndefined(Sequence(If(f'(j) ≟ 0, j), j, -3, 3, 0.5))


Thank you for your fine answer, and it does work. The main issue is still getting a way for the sequence to see all the extreme points and not only the whole numbers. But my issue is when you talk about a sequence to scan each part of the domain? How large a step do I use for each sequence?





The tip from Michael works fine for me.

But why not just Root() (for f'=0)?

© 2022 International GeoGebra Institute