code: public static double root(DifferentiableFunction func, double x1, double x2, double tol) {
          return root(func, x1, x2, tol, 100);
      }
docs: Returns the root of a function whose derivative is available known
  to lie between x1 and x2 by Newton-Raphson method. The root will be
  refined until its accuracy is within xacc.
  @param func the function to be evaluated.
  @param x1 the left end of search interval.
  @param x2 the right end of search interval.
  @param tol the accuracy tolerance.
  @return the root.