Last chance! 50% off unlimited learning
Sale ends in
brentDekker(f, a, b, maxiter = 100, tol = .Machine$double.eps^0.75)
brent(f, a, b, maxiter = 100, tol = .Machine$double.eps^0.75)
brent
returns a list with
brentDekker
implements a version of the Brent-Dekker algorithm,
a well known root finding algorithms for real, univariate, continuous
functions. The Brent-Dekker approach is a clever combination of secant
and bisection with quadratic interpolation. brent
is simply an alias for brentDekker
.
ridders
, newtonRaphson
# Legendre polynomial of degree 5
lp5 <- c(63, 0, -70, 0, 15, 0)/8
f <- function(x) polyval(lp5, x)
brent(f, 0.6, 1) # 0.9061798459 correct to 10 places
Run the code above in your browser using DataLab