root finder that works by a bisection algorithm provided by professor. generalized algorithm to find any number of roots of any function