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)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.
Left side of the key equation as a function in one variable.
Right side of the key equation as a function in one variable.
A real value indicating the left bound of the search region. \(f_1(a)\leq f_2(a)\) must hold true.
A real value indicating the right bound of the search region. \(f_1(b)\geq f_2(b)\) must hold true.
A positive integer defining the maximum number of iterations.
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.