Perhaps this is the kind of thing you want?

sage: var('x')
sage: f = -x^4 + 9*x^3 - 23*x^2 + 31*x - 15
sage: f.find_maximum_on_interval(0,6)

(69.216599407272753, 4.6263272799362944)

If you do

sage: f.find_maximum_on_interval?

you can get the documentation for that.  For symbolic answers you
could do

sage: solve(diff(f,x)==0,x)

but of course that is more limited in what it can answer.

-Marshall Hampton

On Nov 26, 7:49 pm, "Johann \"Myrkraverk\" Oskarsson"
<[email protected]> wrote:
> Hello all,
>
> Given a function f(x), what is the best way to find its maximum value
> on an interval [a,b]? Do I have to differentiate and do it manually?
>
> Johann

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to