16-May-2025 10:51:58 triangle_integrands_test(): MATLAB/Octave version 6.4.0 Test triangle_integrands(). triangle_integrands_test01(): get_prob_num() reports the number of problems. p00_title() returns a title for each problem. The number of problems available is 22 The problem titles: 1 f(x,y) = 2 2 f(x,y) = 6 * x 3 f(x,y) = 6 * y 4 f(x,y) = 12 * x^2 5 f(x,y) = 24 * x*y 6 f(x,y) = 12 * y^2 7 f(x,y) = 20 * x^3 8 f(x,y) = 30 * x^4 9 f(x,y) = 42 * x^5 10 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 11 f(x,y) = (x+y)^(-0.2) 12 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 13 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 14 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 15 f(x,y) = 1/sqrt(1-x-y) 16 f(x,y) = log(x*y) 17 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 18 f(x,y) = log ( x + y ) 19 f(x,y) = sin ( x ) cos ( 5 y ) 20 f(x,y) = sin ( 11 x ) cos ( y ) 21 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 22 f(x,y) = log ( r ) / r triangle_integrands_test02(): p00_monte_carlo() applies a Monte Carlo rule. Problem Exact Pts Approx Error f(x,y) = 2 1 1.000000 1 1.000000 0.000000 2 1.000000 0.000000 4 1.000000 0.000000 8 1.000000 0.000000 16 1.000000 0.000000 32 1.000000 0.000000 64 1.000000 0.000000 128 1.000000 0.000000 256 1.000000 0.000000 512 1.000000 0.000000 1024 1.000000 0.000000 2048 1.000000 0.000000 4096 1.000000 0.000000 8192 1.000000 0.000000 16384 1.000000 0.000000 32768 1.000000 0.000000 f(x,y) = 6 * x 2 1.000000 1 1.048733 0.048733 2 0.979323 0.020677 4 0.309392 0.690608 8 1.305675 0.305675 16 1.033611 0.033611 32 1.095294 0.095294 64 1.024449 0.024449 128 1.083007 0.083007 256 0.978303 0.021697 512 0.981229 0.018771 1024 1.012894 0.012894 2048 1.019997 0.019997 4096 1.001705 0.001705 8192 0.999433 0.000567 16384 0.995620 0.004380 32768 1.002286 0.002286 f(x,y) = 6 * y 3 1.000000 1 0.969184 0.030816 2 0.911451 0.088549 4 1.080204 0.080204 8 0.603180 0.396820 16 0.901525 0.098475 32 1.086691 0.086691 64 1.105469 0.105469 128 1.028812 0.028812 256 1.021882 0.021882 512 0.971489 0.028511 1024 1.014291 0.014291 2048 1.009807 0.009807 4096 1.007786 0.007786 8192 0.991049 0.008951 16384 0.996598 0.003402 32768 1.010331 0.010331 f(x,y) = 12 * x^2 4 1.000000 1 1.932680 0.932680 2 0.724067 0.275933 4 0.162257 0.837743 8 0.865428 0.134572 16 1.441302 0.441302 32 0.760204 0.239796 64 1.122326 0.122326 128 0.894652 0.105348 256 0.899131 0.100869 512 0.988072 0.011928 1024 0.991448 0.008552 2048 1.010544 0.010544 4096 0.998567 0.001433 8192 0.999368 0.000632 16384 0.986290 0.013710 32768 0.991971 0.008029 f(x,y) = 24 * x*y 5 1.000000 1 0.191362 0.808638 2 2.597137 1.597137 4 0.746610 0.253390 8 1.687589 0.687589 16 0.690823 0.309177 32 0.869638 0.130362 64 1.132654 0.132654 128 1.068796 0.068796 256 1.090752 0.090752 512 1.083532 0.083532 1024 0.988459 0.011541 2048 0.997938 0.002062 4096 1.008653 0.008653 8192 1.004611 0.004611 16384 0.987784 0.012216 32768 1.002233 0.002233 f(x,y) = 12 * y^2 6 1.000000 1 0.159945 0.840055 2 0.442533 0.557467 4 0.170335 0.829665 8 1.063384 0.063384 16 1.317785 0.317785 32 1.008817 0.008817 64 0.754964 0.245036 128 0.945691 0.054309 256 1.107667 0.107667 512 0.944956 0.055044 1024 0.983487 0.016513 2048 1.023339 0.023339 4096 1.029330 0.029330 8192 0.991138 0.008862 16384 1.005330 0.005330 32768 1.002095 0.002095 f(x,y) = 20 * x^3 7 1.000000 1 3.158900 2.158900 2 1.040060 0.040060 4 0.953172 0.046828 8 2.118974 1.118974 16 1.500155 0.500155 32 0.820747 0.179253 64 0.841601 0.158399 128 0.979775 0.020225 256 0.961012 0.038988 512 0.991209 0.008791 1024 1.027587 0.027587 2048 0.999959 0.000041 4096 0.999400 0.000600 8192 1.020723 0.020723 16384 1.000639 0.000639 32768 1.011422 0.011422 f(x,y) = 30 * x^4 8 1.000000 1 0.028752 0.971248 2 3.995588 2.995588 4 0.158975 0.841025 8 1.842098 0.842098 16 0.202275 0.797725 32 1.241272 0.241272 64 0.610024 0.389976 128 1.161548 0.161548 256 0.863577 0.136423 512 0.979207 0.020793 1024 0.941297 0.058703 2048 1.014589 0.014589 4096 1.022263 0.022263 8192 0.971094 0.028906 16384 0.998498 0.001502 32768 0.999155 0.000845 f(x,y) = 42 * x^5 9 1.000000 1 0.006062 0.993938 2 0.015256 0.984744 4 1.829351 0.829351 8 0.896801 0.103199 16 0.429323 0.570677 32 1.731562 0.731562 64 0.812997 0.187003 128 0.886622 0.113378 256 1.168455 0.168455 512 0.979448 0.020552 1024 1.046029 0.046029 2048 0.917501 0.082499 4096 1.028315 0.028315 8192 0.972051 0.027949 16384 1.004569 0.004569 32768 0.982074 0.017926 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1.000000 1 0.039156 0.960844 2 1.068179 0.068179 4 0.379903 0.620097 8 0.213492 0.786508 16 1.086690 0.086690 32 2.408159 1.408159 64 1.019338 0.019338 128 1.850451 0.850451 256 0.900915 0.099085 512 1.117674 0.117674 1024 0.959603 0.040397 2048 0.918007 0.081993 4096 0.979632 0.020368 8192 1.055390 0.055390 16384 0.942267 0.057733 32768 1.013480 0.013480 f(x,y) = (x+y)^(-0.2) 11 1.000000 1 0.958636 0.041364 2 1.012557 0.012557 4 1.088629 0.088629 8 1.011860 0.011860 16 0.981590 0.018410 32 1.018803 0.018803 64 0.998710 0.001290 128 0.988426 0.011574 256 0.998847 0.001153 512 1.002757 0.002757 1024 1.001554 0.001554 2048 0.997085 0.002915 4096 0.998707 0.001293 8192 0.998371 0.001629 16384 1.000344 0.000344 32768 0.999947 0.000053 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1.000000 1 0.817955 0.182045 2 0.978420 0.021580 4 0.913245 0.086755 8 0.853154 0.146846 16 1.028835 0.028835 32 1.168788 0.168788 64 0.965574 0.034426 128 1.022668 0.022668 256 1.017138 0.017138 512 1.025687 0.025687 1024 0.986727 0.013273 2048 1.001480 0.001480 4096 0.997255 0.002745 8192 0.998413 0.001587 16384 0.998868 0.001132 32768 1.000721 0.000721 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1.000000 1 0.738628 0.261372 2 1.064651 0.064651 4 0.984819 0.015181 8 1.154199 0.154199 16 1.027570 0.027570 32 1.063192 0.063192 64 1.056393 0.056393 128 0.998308 0.001692 256 0.988395 0.011605 512 1.026468 0.026468 1024 0.988902 0.011098 2048 0.989924 0.010076 4096 0.996614 0.003386 8192 1.001522 0.001522 16384 1.004786 0.004786 32768 1.000866 0.000866 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1.000000 1 0.666050 0.333950 2 0.716836 0.283164 4 1.644785 0.644785 8 0.871094 0.128906 16 0.967744 0.032256 32 1.002325 0.002325 64 0.943710 0.056290 128 0.982283 0.017717 256 0.967582 0.032418 512 1.024346 0.024346 1024 0.987877 0.012123 2048 1.054147 0.054147 4096 0.979373 0.020627 8192 1.002533 0.002533 16384 1.011334 0.011334 32768 1.003739 0.003739 f(x,y) = 1/sqrt(1-x-y) 15 1.000000 1 1.576526 0.576526 2 0.573777 0.426223 4 1.073036 0.073036 8 1.217204 0.217204 16 1.252124 0.252124 32 0.945149 0.054851 64 1.023100 0.023100 128 1.077139 0.077139 256 0.939367 0.060633 512 1.004298 0.004298 1024 1.040317 0.040317 2048 1.048325 0.048325 4096 0.989969 0.010031 8192 1.016924 0.016924 16384 0.991831 0.008169 32768 1.003456 0.003456 f(x,y) = log(x*y) 16 1.000000 1 1.016989 0.016989 2 1.222338 0.222338 4 1.306409 0.306409 8 0.860323 0.139677 16 0.976935 0.023065 32 1.028241 0.028241 64 0.904520 0.095480 128 0.977718 0.022282 256 0.995725 0.004275 512 1.036699 0.036699 1024 0.995000 0.005000 2048 1.001555 0.001555 4096 1.011103 0.011103 8192 1.003779 0.003779 16384 0.998635 0.001365 32768 1.000750 0.000750 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1.000000 1 1.153947 0.153947 2 0.879932 0.120068 4 0.935129 0.064871 8 1.147137 0.147137 16 2.157173 1.157173 32 1.270883 0.270883 64 0.945916 0.054084 128 0.913523 0.086477 256 1.155552 0.155552 512 0.961047 0.038953 1024 0.958057 0.041943 2048 1.011389 0.011389 4096 0.982842 0.017158 8192 1.027762 0.027762 16384 0.993270 0.006730 32768 1.005657 0.005657 f(x,y) = log ( x + y ) 18 1.000000 1 0.051113 0.948887 2 1.039618 0.039618 4 1.075376 0.075376 8 0.651063 0.348937 16 1.175734 0.175734 32 0.897796 0.102204 64 0.891192 0.108808 128 1.069555 0.069555 256 0.974863 0.025137 512 0.934841 0.065159 1024 0.991677 0.008323 2048 0.984805 0.015195 4096 1.001183 0.001183 8192 1.002114 0.002114 16384 1.008564 0.008564 32768 1.003923 0.003923 f(x,y) = sin ( x ) cos ( 5 y ) 19 1.000000 1 -1.670888 2.670888 2 -0.122357 1.122357 4 -2.425487 3.425487 8 2.543474 1.543474 16 1.235602 0.235602 32 1.250112 0.250112 64 1.098626 0.098626 128 0.641958 0.358042 256 0.977085 0.022915 512 1.001866 0.001866 1024 1.028226 0.028226 2048 0.957554 0.042446 4096 1.070630 0.070630 8192 0.956829 0.043171 16384 1.018836 0.018836 32768 1.001518 0.001518 f(x,y) = sin ( 11 x ) cos ( y ) 20 1.000000 1 5.192582 4.192582 2 1.597981 0.597981 4 -1.706167 2.706167 8 0.913347 0.086653 16 1.598834 0.598834 32 1.590869 0.590869 64 0.587369 0.412631 128 0.513472 0.486528 256 1.191080 0.191080 512 1.086284 0.086284 1024 1.096188 0.096188 2048 1.108724 0.108724 4096 1.000334 0.000334 8192 0.911271 0.088729 16384 1.053315 0.053315 32768 1.003151 0.003151 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1.000000 1 1.428416 0.428416 2 1.187088 0.187088 4 0.541132 0.458868 8 0.813682 0.186318 16 0.940339 0.059661 32 0.956516 0.043484 64 1.150700 0.150700 128 0.899487 0.100513 256 0.955014 0.044986 512 0.991075 0.008925 1024 1.010666 0.010666 2048 0.930719 0.069281 4096 0.981148 0.018852 8192 1.157384 0.157384 16384 0.988475 0.011525 32768 1.003539 0.003539 f(x,y) = log ( r ) / r 22 1.000000 1 1.127487 0.127487 2 0.764325 0.235675 4 1.393004 0.393004 8 0.359796 0.640204 16 0.579742 0.420258 32 1.408325 0.408325 64 0.642144 0.357856 128 0.894087 0.105913 256 1.059059 0.059059 512 1.120191 0.120191 1024 0.905122 0.094878 2048 1.074877 0.074877 4096 0.861154 0.138846 8192 0.988141 0.011859 16384 0.946264 0.053736 32768 1.002715 0.002715 triangle_integrands_test03(): p00_vertex_sub() applies a vertex rule with subdivision. Problem Exact Pts Approx Error f(x,y) = 2 1 1.000000 3 1.000000 0.000000 6 1.000000 0.000000 15 1.000000 0.000000 45 1.000000 0.000000 153 1.000000 0.000000 f(x,y) = 6 * x 2 1.000000 3 1.000000 0.000000 6 1.000000 0.000000 15 1.000000 0.000000 45 1.000000 0.000000 153 1.000000 0.000000 f(x,y) = 6 * y 3 1.000000 3 1.000000 0.000000 6 1.000000 0.000000 15 1.000000 0.000000 45 1.000000 0.000000 153 1.000000 0.000000 f(x,y) = 12 * x^2 4 1.000000 3 2.000000 1.000000 6 1.250000 0.250000 15 1.125000 0.125000 45 1.078125 0.078125 153 1.046875 0.046875 f(x,y) = 24 * x*y 5 1.000000 3 0.000000 1.000000 6 0.750000 0.250000 15 0.875000 0.125000 45 0.921875 0.078125 153 0.953125 0.046875 f(x,y) = 12 * y^2 6 1.000000 3 2.000000 1.000000 6 1.250000 0.250000 15 1.125000 0.125000 45 1.078125 0.078125 153 1.046875 0.046875 f(x,y) = 20 * x^3 7 1.000000 3 3.333333 2.333333 6 1.458333 0.458333 15 1.223958 0.223958 45 1.147786 0.147786 153 1.091390 0.091390 f(x,y) = 30 * x^4 8 1.000000 3 5.000000 4.000000 6 1.718750 0.718750 15 1.318359 0.318359 45 1.213257 0.213257 153 1.134422 0.134422 f(x,y) = 42 * x^5 9 1.000000 3 7.000000 6.000000 6 2.078125 1.078125 15 1.411621 0.411621 45 1.274155 0.274155 153 1.175731 0.175731 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1.000000 Skip this problem, it has edge singularities. f(x,y) = (x+y)^(-0.2) 11 1.000000 Skip this problem, it has vertex singularities. f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1.000000 Skip this problem, it has edge singularities. f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1.000000 Skip this problem, it has edge singularities. f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1.000000 Skip this problem, it has edge singularities. f(x,y) = 1/sqrt(1-x-y) 15 1.000000 Skip this problem, it has edge singularities. f(x,y) = log(x*y) 16 1.000000 Skip this problem, it has edge singularities. singularity = 3 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1.000000 Skip this problem, it has internal singularities. f(x,y) = log ( x + y ) 18 1.000000 Skip this problem, it has vertex singularities. f(x,y) = sin ( x ) cos ( 5 y ) 19 1.000000 3 3.257551 2.257551 6 1.091193 0.091193 15 1.213464 0.213464 45 1.175858 0.175858 153 1.112362 0.112362 f(x,y) = sin ( 11 x ) cos ( y ) 20 1.000000 3 -1.950026 2.950026 6 -2.424940 3.424940 15 0.611848 0.388152 45 0.818723 0.181277 153 0.896438 0.103562 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1.000000 Skip this problem, it has vertex singularities. f(x,y) = log ( r ) / r 22 1.000000 Skip this problem, it has vertex singularities. triangle_integrands_test04(): p00_wandzura05_sub() applies a Wandzura rule with subdivision. Problem Exact Pts Approx Error f(x,y) = 2 1 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 6 * x 2 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 6 * y 3 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 12 * x^2 4 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 24 * x*y 5 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 12 * y^2 6 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 20 * x^3 7 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 30 * x^4 8 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = 42 * x^5 9 1.000000 7 1.000000 0.000000 Accuracy acceptable f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1.000000 7 0.798157 0.201843 28 0.883684 0.116316 112 0.933087 0.066913 448 0.961538 0.038462 1792 0.977901 0.022099 7168 0.987305 0.012695 f(x,y) = (x+y)^(-0.2) 11 1.000000 7 0.998396 0.001604 28 0.999539 0.000461 112 0.999868 0.000132 448 0.999962 0.000038 1792 0.999989 0.000011 7168 0.999997 0.000003 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1.000000 7 0.972572 0.027428 28 0.983878 0.016122 112 0.990635 0.009365 448 0.994591 0.005409 1792 0.996884 0.003116 7168 0.998208 0.001792 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1.000000 7 0.949590 0.050410 28 0.970474 0.029526 112 0.982868 0.017132 448 0.990106 0.009894 1792 0.994300 0.005700 7168 0.996721 0.003279 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1.000000 7 0.873246 0.126754 28 0.909736 0.090264 112 0.935949 0.064051 448 0.954630 0.045370 1792 0.967890 0.032110 7168 0.977285 0.022715 f(x,y) = 1/sqrt(1-x-y) 15 1.000000 7 0.843800 0.156200 28 0.887964 0.112036 112 0.920217 0.079783 448 0.943387 0.056613 1792 0.959898 0.040102 7168 0.971619 0.028381 f(x,y) = log(x*y) 16 1.000000 7 0.950264 0.049736 28 0.974388 0.025612 112 0.987008 0.012992 448 0.993457 0.006543 1792 0.996717 0.003283 7168 0.998356 0.001644 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1.000000 7 0.864525 0.135475 28 0.965722 0.034278 112 0.913986 0.086014 448 0.939178 0.060822 1792 0.956993 0.043007 7168 0.969589 0.030411 f(x,y) = log ( x + y ) 18 1.000000 7 0.991081 0.008919 28 0.997766 0.002234 112 0.999442 0.000558 448 0.999860 0.000140 1792 0.999965 0.000035 7168 0.999991 0.000009 f(x,y) = sin ( x ) cos ( 5 y ) 19 1.000000 7 0.975991 0.024009 28 0.999840 0.000160 112 0.999998 0.000002 448 1.000000 0.000000 Accuracy acceptable f(x,y) = sin ( 11 x ) cos ( y ) 20 1.000000 7 0.051313 0.948687 28 1.019286 0.019286 112 1.000129 0.000129 448 1.000002 0.000002 1792 1.000000 0.000000 Accuracy acceptable f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1.000000 7 0.973846 0.026154 28 0.987025 0.012975 112 0.993511 0.006489 448 0.996756 0.003244 1792 0.998378 0.001622 7168 0.999189 0.000811 f(x,y) = log ( r ) / r 22 1.000000 7 0.862016 0.137984 28 0.923815 0.076185 112 0.958237 0.041763 448 0.977284 0.022716 1792 0.987725 0.012275 7168 0.993404 0.006596 triangle_integrands_test(): Normal end of execution. 16-May-2025 10:51:59