public Double getRoot(final Function1D<Double, Double> function, final Double x) {
Validate.notNull(function, "function");
Validate.notNull(x, "x");
final DoubleFunction1D f = DoubleFunction1D.from(function);
return getRoot(f, f.derivative(), x);
}
/**
* Uses the {@link com.opengamma.analytics.math.function.DoubleFunction1D#derivative()} method. <i>x<sub>1</sub></i> and <i>x<sub>2</sub></i> do not have to be increasing.
* @param function The function, not null