Gets local minimum and maximum of a given function expression on an interval using basic calculus criteria
local_min_max(f, f1der, f2der, what = c("min", "max"), x0, D)
A list containing:
x_opt
numeric giving the critical point where the local min or max
is achieved. When local min or max cannot be determined, this function returns NA
.
locals
numeric vector giving all critical points satisfying second derivative criteria.
crtPts
a list with 2 entries:
x_d1
numeric vector with local critical points over [D[1],x-1)
x_d2
numeric vector with local critical points over (x0+1,D[length(D)]]
type
character, what was found? A min
or a max
?
function expression
function expression of first derivative of f
function expression of second derivative of f
character. What to look for? A local min
or a max
?
numeric givin global minimum or maximum of f
over the
the interval D
.
numeric vector specifying the interval over which f
is optimized
This function looks for critical values
over the interval [D[1],x0-1)
\(\cup\) (x0+1, D[length(D)]]
.
global_min_max
, phenopar