static double f(double x){
  return x * Math.sin(x) - 5 * x - Math.cos(x);
}

static double f ( double x ) { return x * Math . sin ( x ) - 5 * x - Math . cos ( x ) ; }
the function whose roots are to be computed .
