PiecewisePolynomialFunction1D func = new PiecewisePolynomialFunction1D();
final int nPts = 101;
for (int i = 0; i < nPts; ++i) {
final double key = 0. + 5. / (nPts - 1) * i;
System.out.println(key + "\t" + interpolator.interpolate(xValues, yValues, key) + "\t" + func.integrate(result, 0., key));
}
System.out.println("\n");
for (int i = 0; i < nPts; ++i) {