19 December 2011 03:24:02 PM CHEBYSHEV_PRB 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 -3.77476e-16 -0.424215 -0.424215 -0.587785 0.593826 -0.576453 -0.576453 6.12323e-17 4.44089e-17 5.77101e-16 6.78476e-16 0.587785 -0.239113 0.576453 0.576453 0.951057 7.66054e-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 7.10543e-16 0.323929 0.323929 1.5 0.689696 -1 -1 2.38168 -1.11022e-15 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 -6.88338e-16 -0.115428 -0.115428 -0.891007 0.446342 -0.6629 -0.6629 -0.707107 1.08247e-16 0.0990411 0.0990411 -0.45399 -0.333248 -0.869792 -0.869792 -0.156434 -6.05072e-16 -0.552029 -0.552029 0.156434 0.275317 0.552029 0.552029 0.45399 1.4988e-16 0.869792 0.869792 0.707107 -0.411266 -0.0990411 -0.0990411 0.891007 -5.21805e-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 5.68434e-15 -4.36352 -4.36352 0.45399 7.4607e-15 -1.86266 -1.86266 0.707107 -2.66454e-15 -0.532486 -0.532486 0.891007 -3.55271e-16 -0.0724311 -0.0724311 0.987688 -1.02141e-14 -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_PRB Normal end of execution. 19 December 2011 03:24:02 PM