Tue May 20 22:31:46 2025 sine_transform_test(): python version: 3.10.12 numpy version: 1.26.4 Test sine_transform(). sine_transform_data_test(): 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.528898 1.73029 0.528898 1: 0.858353 -0.0983475 0.858353 2: 0.571818 0.624067 0.571818 3: 0.0863097 0.368194 0.0863097 4: 0.884566 0.104382 0.884566 5: 0.43436 0.399535 0.43436 6: 0.525528 -0.524224 0.525528 7: 0.993732 -0.223373 0.993732 8: 0.721021 0.139386 0.721021 9: 0.0347561 0.252114 0.0347561 sine_transform_function_test(): 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_interpolant_test(): 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 Graphics saved as "sine_interpolant.png" sine_transform_interpolant_test2(): 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. Graphics saved as "sine_interpolant2.png" sine_transform_test(): Normal end of execution. Tue May 20 22:31:47 2025