07 April 2020 02:30:02 PM RKF45_TEST C++ version Test the RKF45 library. TEST01 Solve a scalar equation using R4_RKF: Y' = 0.25 * Y * ( 1 - Y / 20 ) FLAG T Y Y' Y_Exact Error 1 0 1 0.2375 1 0 2 4 2.5032 0.547476 2.50322 -1.62125e-05 2 8 5.60005 1.00801 5.60009 -3.95775e-05 2 12 10.2781 1.24903 10.2777 0.000331879 2 16 14.8368 0.957569 14.8368 -4.00543e-05 2 20 17.731 0.502901 17.7302 0.000804901 TEST02 Solve a vector equation using R4_RKF: Y'(1) = Y(2) Y'(2) = -Y(1) This system is equivalent to the following second order system: Z" = - Z. FLAG T Y(1) Y(2) 1 0 1 0 2 0.523599 0.866026 -0.5 2 1.0472 0.500016 -0.866037 2 1.5708 1.51132e-05 -1.00004 2 2.0944 -0.500007 -0.866082 2 2.61799 -0.866071 -0.500061 2 3.14159 -1.00009 -3.74492e-05 2 3.66519 -0.866138 0.500013 2 4.18879 -0.500106 0.866104 2 4.71239 -5.98872e-05 1.00014 2 5.23599 0.50002 0.866193 2 5.75959 0.866138 0.500151 2 6.28319 1.00019 8.20951e-05 TEST03 Solve a scalar equation using R4_RKF: Y' = 0.25 * Y * ( 1 - Y / 20 ) This routine uses the SINGLE STEP mode. FLAG T Y Y' Y_Exact Error -1 0 1 0.2375 1 0 -2 0.31096 1.07649 0.254637 1.07649 0 -2 1.86576 1.5483 0.357109 1.5483 -2.02656e-06 2 4 2.5032 0.547476 2.50322 -1.62125e-05 -2 6 3.81715 0.772154 3.81718 -2.95639e-05 2 8 5.60005 1.00801 5.60009 -3.95775e-05 2 12 10.2781 1.24903 10.2777 0.000331879 2 16 14.8368 0.957569 14.8368 -4.00543e-05 2 20 17.731 0.502901 17.7302 0.000804901 TEST04 Solve a scalar equation using R8_RKF: Y' = 0.25 * Y * ( 1 - Y / 20 ) FLAG T Y Y' Y_Exact Error 1 0 1 0.2375 1 0 2 4 2.50322 0.547479 2.50322 -1.97948e-08 2 8 5.60009 1.00801 5.60009 -5.33362e-08 2 12 10.2777 1.24904 10.2777 -1.36559e-08 2 16 14.8368 0.957564 14.8368 -1.29675e-07 2 20 17.7302 0.503057 17.7302 -1.48695e-08 TEST05 Solve a vector equation using R8_RKF: Y'(1) = Y(2) Y'(2) = -Y(1) FLAG T Y(1) Y(2) 1 0 1 0 2 0.523599 0.866025 -0.5 2 1.0472 0.5 -0.866025 2 1.5708 2.82746e-09 -1 2 2.0944 -0.5 -0.866025 2 2.61799 -0.866025 -0.5 2 3.14159 -1 -5.66233e-09 2 3.66519 -0.866025 0.5 2 4.18879 -0.5 0.866025 2 4.71239 -8.49719e-09 1 2 5.23599 0.5 0.866025 2 5.75959 0.866025 0.5 2 6.28319 1 1.13321e-08 TEST06 Solve a scalar equation using R8_RKF: Y' = 0.25 * Y * ( 1 - Y / 20 ) This routine uses the SINGLE STEP mode. FLAG T Y Y' Y_Exact Error -1 0 1 0.2375 1 0 -2 0.0416598 1.00994 0.239735 1.00994 -8.88178e-16 -2 0.249959 1.06106 0.251192 1.06106 -1.21079e-11 -2 0.713324 1.18367 0.278403 1.18367 -1.49659e-09 -2 1.1805 1.32063 0.308356 1.32063 -3.29375e-09 -2 1.64772 1.47221 0.340959 1.47221 -5.34727e-09 -2 2.11578 1.63998 0.376375 1.63998 -7.68026e-09 -2 2.58563 1.82572 0.414765 1.82572 -1.03172e-08 -2 3.0583 2.03147 0.456281 2.03147 -1.32813e-08 -2 3.52915 2.25661 0.500498 2.25661 -1.64369e-08 2 4 2.50322 0.547479 2.50322 -1.97948e-08 -2 4.48822 2.78296 0.598929 2.78296 -2.37885e-08 -2 4.98478 3.0939 0.653821 3.0939 -2.81367e-08 -2 5.49161 3.43995 0.712072 3.43995 -3.28021e-08 -2 6.0111 3.82576 0.773484 3.82576 -3.77093e-08 -2 6.54618 4.25679 0.837695 4.25679 -4.27215e-08 -2 7.1006 4.73967 0.904111 4.73967 -4.76053e-08 -2 7.5503 5.15818 0.95696 5.15818 -5.06073e-08 2 8 5.60009 1.00801 5.60009 -5.33362e-08 -2 8.63696 6.264 1.07553 6.264 -5.54371e-08 -2 9.31521 7.01549 1.13866 7.01549 -5.45314e-08 -2 10.0643 7.89032 1.19437 7.89032 -4.80742e-08 -2 10.9328 8.94776 1.23616 8.94776 -3.12272e-08 2 12 10.2777 1.24904 10.2777 -1.36559e-08 -2 13.0649 11.5951 1.21819 11.5951 -5.79265e-08 -2 14.0623 12.7805 1.15336 12.7805 -1.09661e-07 -2 15.0312 13.8565 1.0641 13.8565 -1.40558e-07 -2 15.8515 14.6934 0.974653 14.6934 -1.31989e-07 2 16 14.8368 0.957564 14.8368 -1.29675e-07 -2 16.7424 15.5153 0.869764 15.5153 -1.10159e-07 -2 17.4883 16.1306 0.780193 16.1306 -8.25894e-08 -2 18.1993 16.6554 0.696327 16.6554 -5.60094e-08 -2 18.8886 17.1083 0.618405 17.1083 -3.15194e-08 -2 19.4443 17.4353 0.558962 17.4353 -2.30014e-08 2 20 17.7302 0.503057 17.7302 -1.48695e-08 RKF45_TEST Normal end of execution. 07 April 2020 02:30:02 PM