global_min_max {sephora}R Documentation

Global minimum and maximum of a real-valued continuous function over a closed interval

Description

Gets global minimum and maximum of a given function expression on an interval using basic calculus criteria

Usage

global_min_max(f, f1der, f2der, D)

Arguments

f

function expression

f1der

function expression of first derivative of f

f2der

function expression of second derivative of f

D

numeric vector specifying the interval over which f is optimized

Details

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.

Value

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

See Also

phenopar, uniroot.all


[Package sephora version 0.1.31 Index]