Ask Your Question

Revision history [back]

Your function is a polynomial of degree 3, so it has no maximum and no minimum over the reals. If you want to find a local maximum/minimum, you can do:

sage: f = (1/9)*x^3-(1/3)*x^2-(8/3)*x+9
sage: f.find_local_minimum(-10,10)
(0.11111111111111072, 4.0000000002219425)
sage: f.find_local_maximum(-10,10)
(12.11111111111111, -2.0000000347236591)

Your function is a polynomial of degree 3, so it has no maximum and no minimum over the reals. If I am not answering your question, but note that if you want to find a local maximum/minimum, you can do:

sage: f = (1/9)*x^3-(1/3)*x^2-(8/3)*x+9
sage: f.find_local_minimum(-10,10)
(0.11111111111111072, 4.0000000002219425)
sage: f.find_local_maximum(-10,10)
(12.11111111111111, -2.0000000347236591)