global_min_max {sephora} | R Documentation |
Gets global minimum and maximum of a given function expression on an interval using basic calculus criteria
global_min_max(f, f1der, f2der, D)
f |
function expression |
f1der |
function expression of first derivative of |
f2der |
function expression of second derivative of |
D |
numeric vector specifying the interval over which |
This function uses uniroot.all
to get all roots of f1der
over D
, additionally,
the second derivative criterion is used to determine the global minimum and
maximum.
A list containing:
min |
numeric giving critical point where global minimum is achieved |
max |
numeric giving critical point where global maximum is achieved |
mins |
numeric vector giving all critical points satisfying second derivative criterion for minimum |
maxs |
numeric vector giving all critical points satisfying second derivative criterion for maximum |