RootFinding

Root finding algorithms

class Object
trait Matchable
class Any

Value members

Concrete methods

def bisection(fn: Double => Double, a: Double, b: Double): Double

Bisection bracketing method with linear convergence

Bisection bracketing method with linear convergence

def brent(fn: Double => Double, a: Double, b: Double): Double

Implementation of Brent root-finding algorithm Brent, R., Algorithms for Minimization Without Derivatives, Prentice-Hall, 1973.

Implementation of Brent root-finding algorithm Brent, R., Algorithms for Minimization Without Derivatives, Prentice-Hall, 1973.

def find(fn: Double => Double, x0: Double, x1: Option[Double]): Double

Generic method to compute a root approximation x of a function f such that f(x) = 0 Wrapper for Brent's method

Generic method to compute a root approximation x of a function f such that f(x) = 0 Wrapper for Brent's method

Value parameters:
fn

function

x0

first root estimate

x1

optional second root estimate such that [x0,x1] brackets x

def newtonRaphson(fn: Double => Double, fd: Double => Double, x0: Double, maxIter: Int): Double

Newton-Raphson's open method with quadratic convergence (requires the derivative and a limited number of iterations to cope with divergence)

Newton-Raphson's open method with quadratic convergence (requires the derivative and a limited number of iterations to cope with divergence)

def secant(fn: Double => Double, x0: Double, x1: Double, maxIter: Int): Double

Secant method (based on a linear approximation of the derivative between successive pair of points)

Secant method (based on a linear approximation of the derivative between successive pair of points)

Concrete fields

lazy val eps: Double