Learn R Programming

xactonomial (version 1.0.3)

itp_root: Find a univariate root of the function f

Description

This finds the value \(x \in [a, b]\) such that \(f(x) = 0\) using the one-dimensional root finding ITP method (Interpolate Truncate Project). Also see itp.

Usage

itp_root(
  f,
  a,
  b,
  k1 = 0.1,
  k2 = 2,
  n0 = 1,
  eps = 0.005,
  maxiter = 100,
  fa = NULL,
  fb = NULL,
  verbose = FALSE,
  ...
)

Value

A numeric vector of length 1, the root at the last iteration

Arguments

f

The function to find the root of in terms of its first (one-dimensional) argument

a

The lower limit

b

The upper limit

k1

A tuning parameter

k2

Another tuning parameter

n0

Another tuning parameter

eps

Convergence tolerance

maxiter

Maximum number of iterations

fa

The value of f(a), if NULL then will be calculated

fb

The value of f(b), if NULL then will be calculated

verbose

Prints out information during iteration

...

Other arguments passed on to f

References

I. F. D. Oliveira and R. H. C. Takahashi. 2020. An Enhancement of the Bisection Method Average Performance Preserving Minmax Optimality. ACM Trans. Math. Softw. 47, 1, Article 5 (March 2021), 24 pages. https://doi.org/10.1145/3423597

Examples

Run this code
fpoly <- function(x) x^3 - x - 2 ## example from the ITP_method wikipedia entry
itp_root(fpoly, 1, 2, eps = .0001, verbose = TRUE)

Run the code above in your browser using DataLab