22 April 2020 02:43:46 PM TEST_INTERP_1D_TEST C++ version Test the TEST_INTERP_1D library. The R8LIB library is needed. TEST01 Print the title of each function. There are 8 functions available: Index Title 1 f(x) = steps -1/2/1 at [0,1/3], [1/3,4/5], [4/5,1]. 2 f(x) = (1-3x), x < 1/3 (6x-2) if 1/3 < x 3 f(x) = x (10*x-1) (5x-2) (5x-2) (4x-3.4) (x-1) 4 f(x) = atan ( 40 * x - 15 ) 5 f(x) = cos(7*x)+5*cos(11.2*x)-2*cos(14*x)+5*cos(31.5*x)+7*cos(63*x). 6 f(x) = exp ( - ( 4*x-1 )^2 ) 7 f(x) = exp ( 2 x ) if x < 0.5, 0 otherwise 8 f(x) = 1 / ( 1 + ( 10 * (x-1/2) )^2 ) TEST_INTERP_1D_TEST02 Use P00_F to sample each function. X, F(X) for problem 1 0 0 -1 1 0.1 -1 2 0.2 -1 3 0.3 -1 4 0.4 2 5 0.5 2 6 0.6 2 7 0.7 2 8 0.8 2 9 0.9 1 10 1 1 X, F(X) for problem 2 0 0 1 1 0.1 0.7 2 0.2 0.4 3 0.3 0.1 4 0.4 0.4 5 0.5 1 6 0.6 1.6 7 0.7 2.2 8 0.8 2.8 9 0.9 3.4 10 1 4 X, F(X) for problem 3 0 0 -0 1 0.1 0 2 0.2 0.416 3 0.3 0.231 4 0.4 0 5 0.5 0.35 6 0.6 1.2 7 0.7 1.701 8 0.8 0.896 9 0.9 -0.9 10 1 0 X, F(X) for problem 4 0 0 -1.50423 1 0.1 -1.48014 2 0.2 -1.4289 3 0.3 -1.24905 4 0.4 0.785398 5 0.5 1.3734 6 0.6 1.46014 7 0.7 1.49402 8 0.8 1.51204 9 0.9 1.52321 10 1 1.53082 X, F(X) for problem 5 0 0 16 1 0.1 4.60251 2 0.2 10.9479 3 0.3 -2.41286 4 0.4 8.33648 5 0.5 3.41326 6 0.6 17.0369 7 0.7 4.07749 8 0.8 7.82541 9 0.9 -3.02927 10 1 13.3791 X, F(X) for problem 6 0 0 0.367879 1 0.1 0.697676 2 0.2 0.960789 3 0.3 0.960789 4 0.4 0.697676 5 0.5 0.367879 6 0.6 0.140858 7 0.7 0.0391639 8 0.8 0.00790705 9 0.9 0.00115923 10 1 0.00012341 X, F(X) for problem 7 0 0 1 1 0.1 1.49182 2 0.2 2.22554 3 0.3 3.32012 4 0.4 4.95303 5 0.5 0 6 0.6 0 7 0.7 0 8 0.8 0 9 0.9 0 10 1 0 X, F(X) for problem 8 0 0 0.0384615 1 0.1 0.0588235 2 0.2 0.1 3 0.3 0.2 4 0.4 0.5 5 0.5 1 6 0.6 0.5 7 0.7 0.2 8 0.8 0.1 9 0.9 0.0588235 10 1 0.0384615 TEST_INTERP_1D_TEST Normal end of execution. 22 April 2020 02:43:46 PM