Tue May 20 21:35:14 2025 disk_rule_test(): python version: 3.10.12 numpy version: 1.26.4 Test disk_rule(). disk_rule_compute_test(): disk_rule_compute() computes a rule Q(f) for a general disk centered at (XC,YC) with radius RC, using NT equally spaced angles and NR radial distances. NT = 8 NR = 4 Estimate integrals I(f) where f = x^ex * y^ey. Ex Ey I(f) Q(f) 0 0 28.2743 28.2743 1 0 28.2743 28.2743 0 1 56.5487 56.5487 2 0 91.8916 91.8916 1 1 56.5487 56.5487 0 2 176.715 176.715 3 0 219.126 219.126 2 1 183.783 183.783 1 2 176.715 176.715 0 3 607.898 607.898 4 0 696.255 696.255 3 1 438.252 438.252 2 2 526.609 526.609 1 3 607.898 607.898 0 4 2265.48 2265.48 disk01_area_test Python version: 3.10.12 disk01_area returns the area of the unit disk. disk01_area() = 3.14159 disk01_monomial_integral_test() disk01_monomial_integral() computes monomial integrals over the interior of the unit disk in 2D. Compare with a Monte Carlo value. Number of sample points used is 4192 If any exponent is odd, the integral is zero. We will restrict this test to randomly chosen even exponents. Ex Ey MC-Estimate Exact Error 6 0 0.258548 0.245437 0.013 2 2 0.131906 0.1309 0.001 2 0 0.802535 0.785398 0.017 8 2 0.0139582 0.0143172 0.00036 4 4 0.0148499 0.0147262 0.00012 0 0 3.14159 3.14159 4.4e-16 2 2 0.131906 0.1309 0.001 0 0 3.14159 3.14159 4.4e-16 2 0 0.802535 0.785398 0.017 8 2 0.0139582 0.0143172 0.00036 8 6 0.00094658 0.000958738 1.2e-05 8 0 0.184578 0.171806 0.013 0 2 0.776594 0.785398 0.0088 0 4 0.382246 0.392699 0.01 8 4 0.00295736 0.00306796 0.00011 0 0 3.14159 3.14159 4.4e-16 0 0 3.14159 3.14159 4.4e-16 8 0 0.184578 0.171806 0.013 8 2 0.0139582 0.0143172 0.00036 4 6 0.00629827 0.00613592 0.00016 disk01_rule_test() disk01_rule() computes a rule Q(f) for the unit disk using NT equally spaced angles and NR radial distances. NT = 8 NR = 4 Estimate integrals I(f) where f = x^e(1) * y^e(2). E(1) E(2) I(f) Q(f) 0 0 3.14159 3.14159 0 2 0.785398 0.785398 0 4 0.392699 0.392699 0 6 0.245437 0.245437 2 2 0.1309 0.1309 2 4 0.0490874 0.0490874 2 6 0.0245437 0.019635 4 4 0.0147262 0.019635 4 6 0.00613592 0.00818123 6 6 0.0021914 0.00350624 disk01_sample_test(): disk01_sample() samples the unit disk. Sample points in the unit disk [[-0.41277633 0.6532823 0.59585916 -0.26493046 0.72819162 -0.58632459 -0.32980229 -0.39625831 -0.97874028 0.39530373] [-0.28794255 -0.65042945 -0.371798 -0.5992621 0.08316779 -0.36962689 0.40644756 -0.46362167 0.13377557 0.11844271]] imtqlx_test() imtqlx() takes a symmetric tridiagonal matrix A and computes its eigenvalues LAM. It also accepts a vector Z and computes Q'*Z, where Q is the matrix that diagonalizes A. Computed eigenvalues: 0: 0.267949 1: 1 2: 2 3: 3 4: 3.73205 Exact eigenvalues: 0: 0.267949 1: 1 2: 2 3: 3 4: 3.73205 Vector Z: 0: 1 1: 1 2: 1 3: 1 4: 1 Vector Q*Z: 0: -2.1547 1: -1.8855e-16 2: 0.57735 3: 1.66533e-16 4: -0.154701 legendre_ek_compute_test(): legendre_ek_compute() computes a Legendre quadrature rule using the Elhay-Kautsky algorithm. Index X W 0 0 2 0 -0.5773502691896256 1 1 0.5773502691896256 1 0 -0.7745966692414832 0.5555555555555559 1 -6.466579952145703e-17 0.8888888888888886 2 0.7745966692414834 0.5555555555555554 0 -0.8611363115940526 0.3478548451374537 1 -0.3399810435848563 0.6521451548625463 2 0.3399810435848564 0.6521451548625459 3 0.8611363115940522 0.347854845137454 0 -0.9061798459386641 0.2369268850561892 1 -0.538469310105683 0.4786286704993667 2 -3.478412152580952e-17 0.5688888888888882 3 0.5384693101056829 0.478628670499367 4 0.9061798459386642 0.2369268850561892 0 -0.9324695142031522 0.1713244923791701 1 -0.6612093864662647 0.3607615730481389 2 -0.2386191860831971 0.4679139345726916 3 0.2386191860831969 0.4679139345726918 4 0.6612093864662648 0.3607615730481388 5 0.9324695142031524 0.1713244923791705 0 -0.9491079123427583 0.1294849661688696 1 -0.7415311855993943 0.2797053914892763 2 -0.4058451513773971 0.381830050505119 3 4.452841060583418e-17 0.4179591836734696 4 0.4058451513773971 0.3818300505051177 5 0.7415311855993941 0.2797053914892761 6 0.9491079123427584 0.1294849661688694 0 -0.9602898564975358 0.101228536290376 1 -0.7966664774136267 0.2223810344533742 2 -0.5255324099163291 0.3137066458778873 3 -0.1834346424956499 0.3626837833783611 4 0.1834346424956497 0.3626837833783627 5 0.5255324099163293 0.3137066458778878 6 0.7966664774136266 0.2223810344533745 7 0.9602898564975362 0.1012285362903759 0 -0.9681602395076263 0.08127438836157426 1 -0.836031107326636 0.1806481606948577 2 -0.6133714327005901 0.2606106964029359 3 -0.3242534234038091 0.3123470770400025 4 1.604668093316319e-16 0.3302393550012599 5 0.324253423403809 0.3123470770400033 6 0.6133714327005904 0.2606106964029349 7 0.836031107326636 0.180648160694857 8 0.9681602395076262 0.08127438836157452 0 -0.973906528517172 0.06667134430868817 1 -0.8650633666889845 0.1494513491505806 2 -0.6794095682990243 0.2190863625159822 3 -0.4333953941292472 0.2692667193099962 4 -0.1488743389816309 0.2955242247147525 5 0.148874338981631 0.2955242247147538 6 0.4333953941292469 0.2692667193099955 7 0.6794095682990243 0.2190863625159825 8 0.8650633666889844 0.14945134915058 9 0.973906528517172 0.06667134430868776 disk_rule_test(): Normal end of execution. Tue May 20 21:35:15 2025