14 March 2012 01:24:33 PM RKF45_PRB 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 8 0 1 0.2375 1 0 8 4 1 0.2375 2.50322 -1.50322 8 8 1 0.2375 5.60009 -4.60009 8 12 1 0.2375 10.2777 -9.27773 8 16 1 0.2375 14.8368 -13.8368 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 8 0 1 0 8 0.523599 1 0 8 1.0472 1 0 8 1.5708 1 0 8 2.0944 1 0 8 2.61799 1 0 8 3.14159 1 0 8 3.66519 1 0 8 4.18879 1 0 8 4.71239 1 0 8 5.23599 1 0 8 5.75959 1 0 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 8 0 1 0.2375 1 0 8 4 1 0.2375 2.50322 -1.50322 8 8 1 0.2375 5.60009 -4.60009 8 12 1 0.2375 10.2777 -9.27773 8 16 1 0.2375 14.8368 -13.8368 RKF45_PRB Normal end of execution. 14 March 2012 01:24:33 PM