17 February 2020 07:40:23 AM CHEBYSHEV_TEST C++ version Test the CHEBYSHEV library. 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 -2.22045e-17 -0.424215 -0.424215 -0.587785 0.593826 -0.576453 -0.576453 6.12323e-17 -8.88178e-17 5.77101e-16 6.34067e-16 0.587785 -0.239113 0.576453 0.576453 0.951057 4.10783e-16 0.424215 0.424215 Consider the same F(X), but now over [0,3]: X C(I) F(X) C(F)(X) 0.0734152 0.316211 0.571335 0.571335 0.618322 -5.32907e-16 0.323929 0.323929 1.5 0.689696 -1 -1 2.38168 8.21565e-16 0.323929 0.323929 2.92658 -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 -5.9952e-16 -0.115428 -0.115428 -0.891007 0.446342 -0.6629 -0.6629 -0.707107 6.38378e-17 0.0990411 0.0990411 -0.45399 -0.333248 -0.869792 -0.869792 -0.156434 -6.245e-16 -0.552029 -0.552029 0.156434 0.275317 0.552029 0.552029 0.45399 1.94289e-16 0.869792 0.869792 0.707107 -0.411266 -0.0990411 -0.0990411 0.891007 -6.1201e-16 0.6629 0.6629 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.25 -15.9489 -15.9489 -0.891007 8.75 -15.4304 -15.4304 -0.707107 -1 -13.9675 -13.9675 -0.45399 -0.75 -11.289 -11.289 -0.156434 0.125 -7.78211 -7.78211 0.156434 6.39488e-15 -4.36352 -4.36352 0.45399 7.4607e-15 -1.86266 -1.86266 0.707107 -2.84217e-15 -0.532486 -0.532486 0.891007 -8.88178e-16 -0.0724311 -0.0724311 0.987688 -9.85878e-15 -0.000911305 -0.000911305 The polynomial approximation to F(X) decays: X C(I) F(X) C(F)(X) -0.987688 2.53213 0.372437 0.372437 -0.891007 1.13032 0.410243 0.410243 -0.707107 0.271495 0.493069 0.493069 -0.45399 0.0443368 0.635089 0.635089 -0.156434 0.00547424 0.855188 0.855188 0.156434 0.000542926 1.16933 1.16933 0.45399 4.49773e-05 1.57458 1.57458 0.707107 3.19844e-06 2.02811 2.02811 0.891007 1.99211e-07 2.43758 2.43758 0.987688 1.10118e-08 2.68502 2.68502 CHEBYSHEV_TEST Normal end of execution. 17 February 2020 07:40:23 AM