message: Changed the formula for the second derivative of the Chebyshev polynomials
diff: @@ -6609,8 +6609,7 @@ void Poly_1D::CalcChebyshev(const int p, const double x, double *u, double *d,
  // U_{n+1}(z) = 2*z*U_n(z) - U_{n-1}(z)
  // U_n(z) = z*U_{n-1}(z) + T_n(z) = z*T'_n(z)/n + T_n(z)
  // T'_{n+1}(z) = (n + 1)*(z*T'_n(z)/n + T_n(z))
  - // T''_{n}(z) = n/(z^2 - 1)*(n*T_n(z) - z*U_{n-1}(z))
  - // T''_{n+1}(z) = 2*(z*n*T'_{n+1}(z) - ((n+1)^2/n)* T'_n(z) ) / (z^2 - 1)
  + // T''_{n+1}(z) = (n + 1)*(2*(n + 1)*T'_n(z) + z*T''_n(z)) / n
  double z;
  u[0] = 1.;
  d[0] = 0.;
  @@ -6619,13 +6618,11 @@ void Poly_1D::CalcChebyshev(const int p, const double x, double *u, double *d,
  u[1] = z = 2.*x - 1.;
  d[1] = 2.;
  dd[1] = 0;
  - double denom = (z*z) -1.;
  for (int n = 1; n < p; n++)
  {
  u[n+1] = 2*z*u[n] - u[n-1];
  d[n+1] = (n + 1)*(z*d[n]/n + 2*u[n]);
  - dd[n+1] = (denom == 0 ? 4.*((n+1)*(n+1)*((n+1)*(n+1) - 1)/3. ) : 2.*
  - (z*n*d[n+1] - ( (n+1.)*(n+1.)/n ) * d[n] ) / (z*z - 1.) );
  + dd[n+1] = (n + 1)*(2.*(n + 1)*d[n] + z*dd[n])/n;
  }
  }
  