08-Oct-2025 22:43:04 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 0.233638 0.766362 2 0.511102 0.488898 4 1.341851 0.341851 8 0.668875 0.331125 16 1.314060 0.314060 32 0.905811 0.094189 64 0.988269 0.011731 128 1.107082 0.107082 256 0.940691 0.059309 512 0.988180 0.011820 1024 1.034058 0.034058 2048 0.994366 0.005634 4096 0.989701 0.010299 8192 0.998069 0.001931 16384 0.987911 0.012089 32768 1.006049 0.006049 f(x,y) = 6 * y 3 1.000000 1 0.796099 0.203901 2 1.666071 0.666071 4 0.992087 0.007913 8 1.126671 0.126671 16 0.759529 0.240471 32 1.200917 0.200917 64 0.747816 0.252184 128 0.945267 0.054733 256 0.986885 0.013115 512 0.966747 0.033253 1024 1.005327 0.005327 2048 1.000926 0.000926 4096 1.001253 0.001253 8192 0.996906 0.003094 16384 0.988014 0.011986 32768 0.996647 0.003353 f(x,y) = 12 * x^2 4 1.000000 1 0.909777 0.090223 2 1.144319 0.144319 4 1.937759 0.937759 8 1.201704 0.201704 16 0.349756 0.650244 32 0.989673 0.010327 64 1.098304 0.098304 128 1.071742 0.071742 256 1.052044 0.052044 512 0.985763 0.014237 1024 1.016383 0.016383 2048 1.011227 0.011227 4096 0.991202 0.008798 8192 0.983223 0.016777 16384 0.993888 0.006112 32768 0.995180 0.004820 f(x,y) = 24 * x*y 5 1.000000 1 2.690665 1.690665 2 0.204193 0.795807 4 0.307626 0.692374 8 0.934780 0.065220 16 1.061990 0.061990 32 0.965791 0.034209 64 1.008540 0.008540 128 0.907340 0.092660 256 0.977003 0.022997 512 1.016134 0.016134 1024 1.019089 0.019089 2048 0.998294 0.001706 4096 1.009990 0.009990 8192 1.018340 0.018340 16384 1.000944 0.000944 32768 0.994532 0.005468 f(x,y) = 12 * y^2 6 1.000000 1 0.637910 0.362090 2 1.224944 0.224944 4 1.325873 0.325873 8 1.416835 0.416835 16 0.833635 0.166365 32 0.844644 0.155356 64 0.815453 0.184547 128 1.161721 0.161721 256 1.010869 0.010869 512 1.017467 0.017467 1024 1.075002 0.075002 2048 0.999209 0.000791 4096 0.975433 0.024567 8192 0.994884 0.005116 16384 0.994060 0.005940 32768 1.000785 0.000785 f(x,y) = 20 * x^3 7 1.000000 1 0.000270 0.999730 2 0.910204 0.089796 4 1.595211 0.595211 8 0.587523 0.412477 16 1.110517 0.110517 32 0.890901 0.109099 64 1.330732 0.330732 128 0.911581 0.088419 256 1.084963 0.084963 512 0.998283 0.001717 1024 1.006076 0.006076 2048 1.042613 0.042613 4096 0.984304 0.015696 8192 1.060449 0.060449 16384 1.009464 0.009464 32768 1.010241 0.010241 f(x,y) = 30 * x^4 8 1.000000 1 0.010206 0.989794 2 0.019813 0.980187 4 0.976163 0.023837 8 3.357397 2.357397 16 0.832527 0.167473 32 0.582973 0.417027 64 1.029425 0.029425 128 1.003092 0.003092 256 1.012489 0.012489 512 1.096554 0.096554 1024 0.948656 0.051344 2048 1.030436 0.030436 4096 0.995633 0.004367 8192 1.036537 0.036537 16384 1.005375 0.005375 32768 1.000329 0.000329 f(x,y) = 42 * x^5 9 1.000000 1 0.108328 0.891672 2 0.022762 0.977238 4 0.016953 0.983047 8 0.886710 0.113290 16 0.395445 0.604555 32 1.786046 0.786046 64 0.691648 0.308352 128 1.348300 0.348300 256 1.120630 0.120630 512 0.922341 0.077659 1024 1.007071 0.007071 2048 0.963573 0.036427 4096 1.013817 0.013817 8192 0.970456 0.029544 16384 0.981322 0.018678 32768 0.981414 0.018586 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1.000000 1 0.003302 0.996698 2 2.860720 1.860720 4 0.599910 0.400090 8 0.919871 0.080129 16 0.346653 0.653347 32 0.694299 0.305701 64 1.911204 0.911204 128 1.743962 0.743962 256 1.403379 0.403379 512 0.766318 0.233682 1024 1.036517 0.036517 2048 0.924475 0.075525 4096 1.116168 0.116168 8192 0.989755 0.010245 16384 0.990102 0.009898 32768 0.981437 0.018563 f(x,y) = (x+y)^(-0.2) 11 1.000000 1 0.986500 0.013500 2 0.995481 0.004519 4 0.977233 0.022767 8 0.971122 0.028878 16 1.030306 0.030306 32 1.056967 0.056967 64 0.982598 0.017402 128 0.997694 0.002306 256 0.999439 0.000561 512 1.002899 0.002899 1024 1.000838 0.000838 2048 1.005484 0.005484 4096 0.997893 0.002107 8192 0.999512 0.000488 16384 1.000880 0.000880 32768 0.999122 0.000878 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1.000000 1 0.910762 0.089238 2 1.077841 0.077841 4 0.886459 0.113541 8 0.947801 0.052199 16 0.996738 0.003262 32 0.968524 0.031476 64 1.001179 0.001179 128 0.988585 0.011415 256 1.003902 0.003902 512 0.997697 0.002303 1024 0.980683 0.019317 2048 0.996636 0.003364 4096 1.001913 0.001913 8192 0.998873 0.001127 16384 1.003254 0.003254 32768 1.002590 0.002590 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1.000000 1 0.757973 0.242027 2 0.925638 0.074362 4 0.986278 0.013722 8 1.006497 0.006497 16 0.953140 0.046860 32 0.957582 0.042418 64 0.940104 0.059896 128 0.997891 0.002109 256 1.027655 0.027655 512 1.000923 0.000923 1024 1.000664 0.000664 2048 1.008467 0.008467 4096 0.995569 0.004431 8192 0.996718 0.003282 16384 1.004934 0.004934 32768 1.005005 0.005005 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1.000000 1 1.653188 0.653188 2 0.906956 0.093044 4 0.955737 0.044263 8 0.964951 0.035049 16 0.899817 0.100183 32 1.004873 0.004873 64 0.978816 0.021184 128 0.920182 0.079818 256 0.988032 0.011968 512 1.009757 0.009757 1024 0.993125 0.006875 2048 1.043641 0.043641 4096 1.024104 0.024104 8192 0.994971 0.005029 16384 0.985861 0.014139 32768 1.001988 0.001988 f(x,y) = 1/sqrt(1-x-y) 15 1.000000 1 0.696115 0.303885 2 0.567905 0.432095 4 0.985630 0.014370 8 0.764971 0.235029 16 1.017214 0.017214 32 0.919603 0.080397 64 0.911295 0.088705 128 1.040087 0.040087 256 0.972311 0.027689 512 1.010838 0.010838 1024 0.965342 0.034658 2048 0.968287 0.031713 4096 1.004831 0.004831 8192 1.020123 0.020123 16384 0.999506 0.000494 32768 0.994915 0.005085 f(x,y) = log(x*y) 16 1.000000 1 1.309867 0.309867 2 1.140656 0.140656 4 0.915522 0.084478 8 0.926532 0.073468 16 1.069046 0.069046 32 1.151037 0.151037 64 0.942979 0.057021 128 1.102625 0.102625 256 1.026226 0.026226 512 1.002523 0.002523 1024 0.980772 0.019228 2048 1.011229 0.011229 4096 1.003595 0.003595 8192 0.998795 0.001205 16384 1.001586 0.001586 32768 0.999984 0.000016 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1.000000 1 2.424834 1.424834 2 0.972131 0.027869 4 1.007866 0.007866 8 1.653735 0.653735 16 0.900734 0.099266 32 0.925557 0.074443 64 0.936388 0.063612 128 1.026844 0.026844 256 0.947785 0.052215 512 0.988462 0.011538 1024 1.011559 0.011559 2048 1.000802 0.000802 4096 0.991334 0.008666 8192 1.000087 0.000087 16384 1.010887 0.010887 32768 1.002935 0.002935 f(x,y) = log ( x + y ) 18 1.000000 1 2.703939 1.703939 2 1.322741 0.322741 4 1.773206 0.773206 8 0.572169 0.427831 16 0.637487 0.362513 32 0.874000 0.126000 64 0.963012 0.036988 128 0.909249 0.090751 256 1.107684 0.107684 512 0.972362 0.027638 1024 0.964236 0.035764 2048 1.016353 0.016353 4096 0.989949 0.010051 8192 1.016647 0.016647 16384 1.000740 0.000740 32768 0.997447 0.002553 f(x,y) = sin ( x ) cos ( 5 y ) 19 1.000000 1 1.644362 0.644362 2 0.696270 0.303730 4 1.110570 0.110570 8 1.169988 0.169988 16 0.467096 0.532904 32 1.574404 0.574404 64 1.155568 0.155568 128 1.110259 0.110259 256 1.020505 0.020505 512 0.828394 0.171606 1024 1.108254 0.108254 2048 1.022928 0.022928 4096 0.997724 0.002276 8192 1.029635 0.029635 16384 0.993261 0.006739 32768 1.037426 0.037426 f(x,y) = sin ( 11 x ) cos ( y ) 20 1.000000 1 4.086126 3.086126 2 -2.108416 3.108416 4 0.666318 0.333682 8 2.261492 1.261492 16 2.581503 1.581503 32 1.461703 0.461703 64 0.700047 0.299953 128 0.488113 0.511887 256 1.052147 0.052147 512 0.627989 0.372011 1024 1.005848 0.005848 2048 1.119190 0.119190 4096 1.096732 0.096732 8192 0.944768 0.055232 16384 1.053958 0.053958 32768 1.019539 0.019539 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1.000000 1 1.591361 0.591361 2 1.333526 0.333526 4 0.809559 0.190441 8 0.862820 0.137180 16 1.477086 0.477086 32 0.830839 0.169161 64 1.271716 0.271716 128 0.932888 0.067112 256 0.912057 0.087943 512 0.910886 0.089114 1024 1.028353 0.028353 2048 1.045747 0.045747 4096 0.980661 0.019339 8192 1.003121 0.003121 16384 1.004849 0.004849 32768 0.993451 0.006549 f(x,y) = log ( r ) / r 22 1.000000 1 0.426828 0.573172 2 0.344409 0.655591 4 0.618500 0.381500 8 0.307424 0.692576 16 0.640940 0.359060 32 1.114143 0.114143 64 0.679439 0.320561 128 1.022864 0.022864 256 1.213371 0.213371 512 0.761126 0.238874 1024 0.871031 0.128969 2048 0.797490 0.202510 4096 1.097636 0.097636 8192 0.945587 0.054413 16384 1.019831 0.019831 32768 0.979214 0.020786 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. 08-Oct-2025 22:43:06