UnivariateFunction univariateFunction = pf.derivative();
System.arraycopy(knots, 0, newKnots, 1, knots.length); double derivativeAtFirstKnot = polynomials[0].derivative().value(0); double valueAtFirstKnot = spline.value(knots[0]); PolynomialFunction beginningFunction = new PolynomialFunction(new double[]{valueAtFirstKnot - (knots[0] - minFrame) * derivativeAtFirstKnot, derivativeAtFirstKnot});