uniroot_all: Finds many (all) roots of one equation within an interval

uniroot_allR Documentation

Finds many (all) roots of one equation within an interval

Description

The function uniroot_all searches the interval from lower to upper for several roots of a function f with respect to its first argument.

Usage

uniroot_all(
  f,
  interval,
  lower = min(interval),
  upper = max(interval),
  tol = .Machine$double.eps^0.2,
  maxiter = 1000,
  trace = 0,
  n = 100,
  ...
)

Arguments

f

the function for which the root is sought. This function needs to accept a vector of input values.

interval

a vector containing the end-points of the interval to be searched for the root.

lower

the lower end point of the interval to be searched.

upper

the upper end poitn of the interval to be searched.

tol

the desired accuracy (convergence tolerance). Passed to function uniroot.

trace

integer numberl if positive, tracing information is produced. Higher values giving more details. Passed to function uniroot.

n

number of subintervals in which the root is sought.

...

additional named or unnamed arguments to be passed to f (but beware of parital matching to other arguments).

Details

this is a copy taken from the package rootSolve but imported here to avoid dependency

Value

a vector with the roots found in the interval.

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl> - original . Copied by Simon Bond.

See Also

uniroot


rpsftm documentation built on Nov. 2, 2023, 6:07 p.m.