7 September 2021 11:29:44.183 AM CHEBYSHEV_TEST FORTRAN90 version. Test CHEBYSHEV. CHEBYSHEV_TEST01 CHEBYSHEV_COEFFICIENTS computes the coefficients of the Chebyshev interpolant. CHEBYSHEV_INTERPOLANT evaluates the interpolant. F(X) is a trig function: X C(I) F(X) C(F)(X) -0.951057 -0.000000 -0.424215 -0.424215 -0.587785 0.593826 -0.576453 -0.576453 0.000000 -0.000000 0.000000 0.000000 0.587785 -0.239113 0.576453 0.576453 0.951057 0.000000 0.424215 0.424215 Consider the same F(X), but now over [0,3]: X C(I) F(X) C(F)(X) 0.073415 0.316211 0.571335 0.571335 0.618322 -0.000000 0.323929 0.323929 1.500000 0.689696 -1.000000 -1.000000 2.381678 0.000000 0.323929 0.323929 2.926585 -0.468409 0.571335 0.571335 Consider the same F(X), but now with higher order: X C(I) F(X) C(F)(X) -0.987688 -0.000000 -0.115428 -0.115428 -0.891007 0.446342 -0.662900 -0.662900 -0.707107 0.000000 0.099041 0.099041 -0.453990 -0.333248 -0.869792 -0.869792 -0.156434 -0.000000 -0.552029 -0.552029 0.156434 0.275317 0.552029 0.552029 0.453990 0.000000 0.869792 0.869792 0.707107 -0.411266 -0.099041 -0.099041 0.891007 -0.000000 0.662900 0.662900 0.987688 -0.233073 0.115428 0.115428 F(X) is a degree 4 polynomial: X C(I) F(X) C(F)(X) -0.987688 -14.250000 -15.948947 -15.948947 -0.891007 8.750000 -15.430394 -15.430394 -0.707107 -1.000000 -13.967514 -13.967514 -0.453990 -0.750000 -11.289025 -11.289025 -0.156434 0.125000 -7.782111 -7.782111 0.156434 0.000000 -4.363522 -4.363522 0.453990 0.000000 -1.862659 -1.862659 0.707107 -0.000000 -0.532486 -0.532486 0.891007 -0.000000 -0.072431 -0.072431 0.987688 -0.000000 -0.000911 -0.000911 The polynomial approximation to F(X) decays: X C(I) F(X) C(F)(X) -0.987688 2.532132 0.372437 0.372437 -0.891007 1.130318 0.410243 0.410243 -0.707107 0.271495 0.493069 0.493069 -0.453990 0.044337 0.635089 0.635089 -0.156434 0.005474 0.855188 0.855188 0.156434 0.000543 1.169334 1.169334 0.453990 0.000045 1.574583 1.574583 0.707107 0.000003 2.028115 2.028115 0.891007 0.000000 2.437582 2.437582 0.987688 0.000000 2.685020 2.685020 CHEBYSHEV_TEST Normal end of execution. 7 September 2021 11:29:44.184 AM