Bisection
Overview
The bisection method is a method that quickly searches an given interval for the location of the root.
It starts with a begining and an ending point for the interval. Assuming that the function is
continuous
and
that the function applied to start point and end point yield one value that is positive and one value that is negative,
the zero point must be between the two.
Next the value of the function is examined at the mid-point between the two points. This value will either be positive or
negative. If it is the opposite sign of the current start point, it becomes the new end point, otherwise it becomes
the new start point and the process runs again, each step, narrowing the search space by one half.
see chapra - pg. 151
Bisection
The bisection method is a fast method to find the roots of a function through quick narrowing of the search space.
The library can be found at the following URL:
bisection api
The following demonstrates a simple example of using the bisection library to find the roots of a function.
let nr = await import('/lib/numeric/roots/v1.0.0/bisection.mjs');
let f = function(x){
return x-5;
}
let test = nr.root(f,-10,10);
Try it!