Tue Oct 19 17:10:29 2021 sine_transform_test(): Python version: 3.6.9 Test sine_transform(). sine_transform_data_test Python version: 3.6.9 sine_transform_data does a sine transform of data defined by a vector. Demonstrate that the transform is its own inverse. Let R be a random N vector. Let S be the transform of D. Let T be the transform of E. Then R and T will be equal. I R S T 0: 0.26839 1.22737 0.26839 1: 0.306061 -0.359635 0.306061 2: 0.401904 0.25272 0.401904 3: 0.20739 0.442956 0.20739 4: 0.0217924 -0.0483203 0.0217924 5: 0.636086 -0.421499 0.636086 6: 0.975913 0.34479 0.975913 7: 0.488355 0.0344427 0.488355 8: 0.21355 0.0332306 0.21355 9: 0.43138 -0.0299492 0.43138 sine_transform_data_test Normal end of execution. sine_transform_function_test: Python version: 3.6.9 sine_transform_function does a sine transform of data defined by a function F(X) evaluated at equally spaced points in an interval [A,B]. Demonstrate that the transform is its own inverse. Let X(0:N+1) be N+2 equally spaced points in [A,B]. Let S be the transform of F(X(1:N)). Let F1 be the linear interpolant of (A,F(A)), (B,F(B)). Let F2 be the transform of S. Then F(X(1:N)) = F1(X(1:N)) + F2(1:N). I X(I) F(X(I)) S F1 F2 F1+F2 0 1.000000 0.950400 0.000000 0.950400 0.000000 0.950400 1 1.200000 1.425600 -1.155704 0.855360 0.570240 1.425600 2 1.400000 1.747200 4.251083 0.760320 0.986880 1.747200 3 1.600000 1.764000 -1.588474 0.665280 1.098720 1.764000 4 1.800000 1.370880 0.687471 0.570240 0.800640 1.370880 5 2.000000 0.547200 -0.359345 0.475200 0.072000 0.547200 6 2.200000 -0.604800 0.199698 0.380160 -0.984960 -0.604800 7 2.400000 -1.821600 -0.117457 0.285120 -2.106720 -1.821600 8 2.600000 -2.640000 0.065438 0.190080 -2.830080 -2.640000 9 2.800000 -2.358720 -0.029885 0.095040 -2.453760 -2.358720 10 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000 sine_transform_function_test Normal end of execution. sine_transform_interpolant_test: Python version: 3.6.9 sine_transform_function does a sine transform of data defined by a function F(X) evaluated at N equally spaced points in an interval [A,B]. sine_transform_interpolant evaluates the interpolant. The interpolant will be 0 at the 0th and (N+1)-th points. It equals the function at points 1 through N. In between, it can approximate smooth functions, and the approximation improves with N. I X(I) F(X(I)) S(I) 0: 1.3 1.61568 -134.083 1: 1.6 1.764 50.9253 2: 1.9 1.0098 -17.4326 3: 2.2 -0.6048 7.52496 4: 2.5 -2.3184 -3.86908 5: 2.8 -2.35872 2.15858 6: 3.1 2.349 -1.2589 7: 3.4 16.4736 0.704712 8: 3.7 46.5696 -0.31985 I X F(X) FHAT(X) 0: 1 0.9504 0.9504 1: 1.15 1.31483 1.28162 2: 1.3 1.61568 1.61568 3: 1.45 1.78516 1.82066 4: 1.6 1.764 1.764 5: 1.75 1.51052 1.47117 6: 1.9 1.0098 1.0098 7: 2.05 0.282738 0.328656 8: 2.2 -0.6048 -0.6048 9: 2.35 -1.53288 -1.58983 10: 2.5 -2.3184 -2.3184 11: 2.65 -2.70595 -2.62979 12: 2.8 -2.35872 -2.35872 13: 2.95 -0.849389 -0.961698 14: 3.1 2.349 2.349 15: 3.25 7.87215 8.0621 16: 3.4 16.4736 16.4736 17: 3.55 29.0339 28.6364 18: 3.7 46.5696 46.5696 19: 3.85 70.2425 71.4652 20: 4 101.369 101.369 Created plot file "sine_interpolant.png" sine_transform_interpolant_test Normal end of execution. sine_transform_interpolant_test2: Python version: 3.6.9 sine_transform_function does a sine transform of data defined by a function F(X) evaluated at N equally spaced points in an interval [A,B]. sine_transform_interpolant evaluates the interpolant. The interpolant will be 0 at the 0th and (N+1)-th points. It equals the function at points 1 through N. In between, it can approximate smooth functions, and the approximation improves with N. Created plot file "sine_interpolant2.png" sine_transform_interpolant2_test Normal end of execution. sine_transform_test Normal end of execution. Tue Oct 19 17:10:30 2021