funcBisec | R Documentation |
Bisection function to find solutions of the key equation of the
informSCI
-algorithm.
funcBisec(f_1, f_2, a, b, maxIter = 1000, tol = 1/10^3)
f_1 |
Left side of the key equation as a function in one variable. |
f_2 |
Right side of the key equation as a function in one variable. |
a |
A real value indicating the left bound of the search region.
|
b |
A real value indicating the right bound of the search region.
|
maxIter |
A positive integer defining the maximum number of iterations. |
tol |
A non-negative numeric indicating the error tolerance. |
The function tries to find a solution of the key equation of the
informSCI
-algorithm which is equivalent to determining the
intersection point of f_1
and f_2
.
The function uses the bisection method and tries to determine the root
of the function f_1-f_2
. Note that by definition of the key equation
and the assumptions of the informSCI
-algorithm f_1-f_2
is
a continuous strictly increasing function. Because of the assumptions on
a
and b
f_1-f_2
has a non-positive function value in
point a
and non-negative function value in point b
. Thus,
f_1-f_2
has exactly one root in the closed interval [a,b]
.
The bisection method repeatedly halves the interval between a
and
b
. The function stops when the root is found or when the maximum
number of iterations is reached or when the interval is less than tol
.
Returns intersection point. In the case that no intersection point is found, the left side of the final interval is returned, rather than the midpoint. The returned point is a lower approximation of the solution of the key equation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.