15-May-2025 20:28:34 quad_monte_carlo_test(): MATLAB/Octave version 6.4.0 quad_monte_carlo() is an interactive program which uses n random samples to estimate the integral of a function f(x) over the interval [a,b]. Estimate integral ( 0.000000 < x < 1.000000 ) x.^2 dx quad_monte_carlo: n = 100, integral estimate q = 0.3510828062054355 Estimate integral ( 0.0 < x < 2.0 ) sqrt(x) dx quad_monte_carlo: n = 1000, integral estimate q = 1.894589278159285 Estimate integral ( 0.0 < x < 2.0 ) humps(x) dx quad_monte_carlo: n = 1, integral estimate q = -3.37956310170822 quad_monte_carlo: n = 2, integral estimate q = 67.98446867164319 quad_monte_carlo: n = 4, integral estimate q = 3.269107169642018 quad_monte_carlo: n = 8, integral estimate q = 11.43135586243907 quad_monte_carlo: n = 16, integral estimate q = 48.24612882673249 quad_monte_carlo: n = 32, integral estimate q = 17.80507122704366 quad_monte_carlo: n = 64, integral estimate q = 35.4061981006837 quad_monte_carlo: n = 128, integral estimate q = 31.30634748655782 quad_monte_carlo: n = 256, integral estimate q = 26.91667592384626 quad_monte_carlo: n = 512, integral estimate q = 30.66669408230868 quad_monte_carlo: n = 1024, integral estimate q = 30.46601495925954 quad_monte_carlo: n = 2048, integral estimate q = 31.35068271350133 quad_monte_carlo: n = 4096, integral estimate q = 29.24733063316754 quad_monte_carlo: n = 8192, integral estimate q = 29.48656460856864 quad_monte_carlo: n = 16384, integral estimate q = 29.28407639878871 quad_monte_carlo: n = 32768, integral estimate q = 29.2548019381295 quad_monte_carlo: n = 65536, integral estimate q = 29.51444238423417 quad_monte_carlo: n = 131072, integral estimate q = 29.26295950089641 quad_monte_carlo: n = 262144, integral estimate q = 29.51759074400325 quad_monte_carlo: n = 524288, integral estimate q = 29.32218025986039 quad_monte_carlo: n = 1048576, integral estimate q = 29.40499736131865 quad_monte_carlo_test(): Normal end of execution. 15-May-2025 20:28:34