nuniroot | R Documentation |
The function searches in an interval for a root (i.e., zero) of the function f with respect to its first argument. The argument interval is for the input of x, the corresponding outcome interval will be used as the interval to be searched in.
nuniroot(f, interval, maxlength = 100)
f |
Function for which the root is sought. |
interval |
A vector containing the end-points of the interval to be searched for the root. |
maxlength |
The number of vaulue points in the interval to be searched. It is 100 by default. |
A list with at least four components: root and f.root give the location of the root and the value of the function evaluated at that point. iter and estim.prec give the number of iterations used and an approximate estimated precision for root. (If the root occurs at one of the endpoints, the estimated precision is NA.)
f <- function(x) 1+x-0.5*x^2
interval <- c(-3,6)
nuniroot(f,interval)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.