Wed Sep 12 21:11:16 2018 CAUCHY_PRINCIPAL_VALUE_TEST Python version: 3.6.5 Test the CAUCHY_PRINCIPAL_VALUE library. CAUCHY_PRINCIPAL_VALUE_TEST01: Python version: 3.6.5 CAUCHY_PRINCIPAL_VALUE of Integral ( -1 <= t <= 1 ) exp(t) / t dt N Estimate Error 2 2.112977728449278 0.00152402 4 2.114501718105385 3.26446e-08 6 2.114501750751336 1.33626e-12 8 2.114501750751458 1.4575e-12 CAUCHY_PRINCIPAL_VALUE_TEST01: Normal end of execution. CAUCHY_PRINCIPAL_VALUE_TEST02: Python version: 3.6.5 Compute CAUCHY_PRINCIPAL_VALUE ( Integral ( 1-delta <= t <= 1+delta ) 1/(1-t)^3 dt ) Try this for delta = 1, 1/2, 1/4. N Estimate Exact Error 2 -0.7397260273972603 -0.7363873204868445 0.00333871 4 -0.7364116807468272 -0.7363873204868445 2.43603e-05 6 -0.7363867923558026 -0.7363873204868445 5.28131e-07 8 -0.7363873252791506 -0.7363873204868445 4.79231e-09 2 -0.3425852498017447 -0.3425632583544805 2.19914e-05 4 -0.3425633493215302 -0.3425632583544805 9.0967e-08 6 -0.342563258302464 -0.3425632583544805 5.20165e-11 8 -0.342563258354488 -0.3425632583544805 7.54952e-15 2 -0.1678240178701501 -0.1678238552950642 1.62575e-07 4 -0.1678238554770549 -0.1678238552950642 1.81991e-10 6 -0.1678238552950588 -0.1678238552950642 5.38458e-15 8 -0.1678238552950641 -0.1678238552950642 1.38778e-16 CAUCHY_PRINCIPAL_VALUE_TEST02: Normal end of execution. LEGENDRE_SET_TEST01: Python version: 3.6.5 LEGENDRE_SET returns points and weights of a Gauss-Legendre quadrature rule. Gauss-Legendre rule of order 3: X W -0.7745966692414834 0.5555555555555556 0.0000000000000000 0.8888888888888888 0.7745966692414834 0.5555555555555556 Gauss-Legendre rule of order 6: X W -0.9324695142031521 0.1713244923791704 -0.6612093864662645 0.3607615730481386 -0.2386191860831969 0.4679139345726910 0.2386191860831969 0.4679139345726910 0.6612093864662645 0.3607615730481386 0.9324695142031521 0.1713244923791704 Gauss-Legendre rule of order 11: X W -0.9782286581460570 0.0556685671161737 -0.8870625997680953 0.1255803694649046 -0.7301520055740494 0.1862902109277343 -0.5190961292068118 0.2331937645919905 -0.2695431559523450 0.2628045445102467 0.0000000000000000 0.2729250867779006 0.2695431559523450 0.2628045445102467 0.5190961292068118 0.2331937645919905 0.7301520055740494 0.1862902109277343 0.8870625997680953 0.1255803694649046 0.9782286581460570 0.0556685671161737 LEGENDRE_SET_TEST01: Normal end of execution. CAUCHY_PRINCIPAL_VALUE_TEST: Normal end of execution. Wed Sep 12 21:11:16 2018