find-extrema

Numerically compute the extrema of a given (analytic) function: minima, maxima, and points of inflection


Keywords
extrema, extremum, minima, minimum, maxima, maximum, inflection, points, numerical, analysis, root, finding, algorithm
License
MIT
Install
npm install find-extrema@1.0.0

Documentation

find-extrema Build Status

Numerically compute the extrema of a given (analytic) function: minima, maxima, and points of inflection

npm install find-extrema
import { findExtremum, rootsNewton } from 'find-extrema';
console.log('minimum of (x - 1)^2:', findExtremum(x => (x - 1) ** 2, 'minimum', {
  findRoot: f => rootsNewton(f, Math.random())
}));