How do I obtain the maximum value of a function over an interval?

In R I would do something like:

f <- function(x) { x ^ 2}
optimize(f, c(0, 100), maximum=TRUE)

Reply via email to