@Test
  public void testChebyshevDifferentials() {
    for (int k = 0; k < 12; ++k) {

      PolynomialFunction Tk0 = PolynomialsUtils.createChebyshevPolynomial(k);
      PolynomialFunction Tk1 = Tk0.polynomialDerivative();
      PolynomialFunction Tk2 = Tk1.polynomialDerivative();

      PolynomialFunction g0 = new PolynomialFunction(new double[] {k * k});
      PolynomialFunction g1 = new PolynomialFunction(new double[] {0, -1});
      PolynomialFunction g2 = new PolynomialFunction(new double[] {1, 0, -1});

      PolynomialFunction Tk0g0 = Tk0.multiply(g0);
      PolynomialFunction Tk1g1 = Tk1.multiply(g1);
      PolynomialFunction Tk2g2 = Tk2.multiply(g2);

      checkNullPolynomial(Tk0g0.add(Tk1g1.add(Tk2g2)));
    }
  }
  @Test
  public void testLaguerreDifferentials() {
    for (int k = 0; k < 12; ++k) {

      PolynomialFunction Lk0 = PolynomialsUtils.createLaguerrePolynomial(k);
      PolynomialFunction Lk1 = Lk0.polynomialDerivative();
      PolynomialFunction Lk2 = Lk1.polynomialDerivative();

      PolynomialFunction g0 = new PolynomialFunction(new double[] {k});
      PolynomialFunction g1 = new PolynomialFunction(new double[] {1, -1});
      PolynomialFunction g2 = new PolynomialFunction(new double[] {0, 1});

      PolynomialFunction Lk0g0 = Lk0.multiply(g0);
      PolynomialFunction Lk1g1 = Lk1.multiply(g1);
      PolynomialFunction Lk2g2 = Lk2.multiply(g2);

      checkNullPolynomial(Lk0g0.add(Lk1g1.add(Lk2g2)));
    }
  }
  @Test
  public void testLegendreDifferentials() {
    for (int k = 0; k < 12; ++k) {

      PolynomialFunction Pk0 = PolynomialsUtils.createLegendrePolynomial(k);
      PolynomialFunction Pk1 = Pk0.polynomialDerivative();
      PolynomialFunction Pk2 = Pk1.polynomialDerivative();

      PolynomialFunction g0 = new PolynomialFunction(new double[] {k * (k + 1)});
      PolynomialFunction g1 = new PolynomialFunction(new double[] {0, -2});
      PolynomialFunction g2 = new PolynomialFunction(new double[] {1, 0, -1});

      PolynomialFunction Pk0g0 = Pk0.multiply(g0);
      PolynomialFunction Pk1g1 = Pk1.multiply(g1);
      PolynomialFunction Pk2g2 = Pk2.multiply(g2);

      checkNullPolynomial(Pk0g0.add(Pk1g1.add(Pk2g2)));
    }
  }
  @Test
  public void testHermiteDifferentials() {
    for (int k = 0; k < 12; ++k) {

      PolynomialFunction Hk0 = PolynomialsUtils.createHermitePolynomial(k);
      PolynomialFunction Hk1 = Hk0.polynomialDerivative();
      PolynomialFunction Hk2 = Hk1.polynomialDerivative();

      PolynomialFunction g0 = new PolynomialFunction(new double[] {2 * k});
      PolynomialFunction g1 = new PolynomialFunction(new double[] {0, -2});
      PolynomialFunction g2 = new PolynomialFunction(new double[] {1});

      PolynomialFunction Hk0g0 = Hk0.multiply(g0);
      PolynomialFunction Hk1g1 = Hk1.multiply(g1);
      PolynomialFunction Hk2g2 = Hk2.multiply(g2);

      checkNullPolynomial(Hk0g0.add(Hk1g1.add(Hk2g2)));
    }
  }