powered by
Applies the bisection algorithm to find x such that ftn(x) == x.
bisection(ftn, x.l, x.r, tol = 1e-09)
the function.
is the lower starting point.
is the upper starting point.
distance of successive iterations at which algorithm terminates.
Returns the value of x at which ftn(x) == x. If the function fails to converge within max.iter iterations, returns NULL.
We assume that ftn is a function of a single variable.
Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.
newtonraphson, fixedpoint
newtonraphson
fixedpoint
# NOT RUN { ftn5 <- function(x) return(log(x)-exp(-x)) bisection(ftn5, 1, 2, tol = 1e-6) # }
Run the code above in your browser using DataLab